Install.sh fails (stops at zookeeper)

Hi, trying to do a on-prem install of version: 21.4.0 via ansible (Also tried 21.4.1)

when it gets to running the install.sh script it always hangs on the set-up-zookeeper.sh step, there are no errors, or outputs to suggest a reason, it just stays there untill i break out of it.

ansible command:

    - name: sentry_install
      command: "/opt/sentry/onpremise-21.4.0/install.sh --no-user-prompt"

sentry_install_log

Docker images built.

▶ Turning things off ...
--no-ansi option is deprecated and will be removed in future versions. Use `--ansi never` instead.
Removing network onpremise_default
Network onpremise_default not found.
--no-ansi option is deprecated and will be removed in future versions. Use `--ansi never` instead.
Removing network sentry_onpremise_default
Network sentry_onpremise_default not found.

▶ Setting up Zookeeper ...
--no-ansi option is deprecated and will be removed in future versions. Use `--ansi never` instead.
Creating network "sentry_onpremise_default" with the default driver
Creating volume "sentry_onpremise_sentry-secrets" with default driver
Creating volume "sentry_onpremise_sentry-smtp" with default driver
Creating volume "sentry_onpremise_sentry-zookeeper-log" with default driver
Creating volume "sentry_onpremise_sentry-kafka-log" with default driver
Creating volume "sentry_onpremise_sentry-smtp-log" with default driver
Creating volume "sentry_onpremise_sentry-clickhouse-log" with default driver
Creating sentry_onpremise_zookeeper_run ... 
Creating sentry_onpremise_zookeeper_run ... done

This is the file where we do some zookeeper set up: onpremise/set-up-zookeeper.sh at a95b9fa011ebf3d8fb0fcd6e20d35527c72911cf · getsentry/onpremise · GitHub

You can try running it standalone via

source install/_lib.sh
source set-up-zookeeper.sh

and see if you get any useful errors.

Thanks @BYK

Added a ansible task of:

    - name: sentry_test_zoo
      shell: | 
        source /opt/sentry/onpremise-21.4.1/install/_lib.sh
        source /opt/sentry/onpremise-21.4.1/install/set-up-zookeeper.sh

and get output:

       TASK [sentry_test_zoo] *********************************************************
       fatal: [localhost]: FAILED! => {"changed": true, "cmd": "source /opt/sentry/onpremise-21.4.1/install/_lib.sh\nsource /opt/sentry/onpremise-21.4.1/install/set-up-zookeeper.sh\n", "delta": "0:00:00.041055", "end": "2021-05-03 21:18:30.118887", "msg": "non-zero return code", "rc": 2, "start": "2021-05-03 21:18:30.077832", "stderr": "/opt/sentry/onpremise-21.4.1/install/_lib.sh: line 6: syntax error near unexpected token `>'", "stderr_lines": ["/opt/sentry/onpremise-21.4.1/install/_lib.sh: line 6: syntax error near unexpected token `>'"], "stdout": "", "stdout_lines": []}

Which version of bash are you using on the target machine?

Hi @BYK

5.0.17(1)-release

We had a report around Windows-style line endings in the script yesterday. How are you shipping the repo to the target machine? Could this be an issue?

I get the same error via:

Ansible run locally:
I bring up a Amazon Linux2 instance, install ansible copy the ansible playbook and run it.

Ansible remote:
i use ansible on my workstation and run the playbook remotely.

Packer shell command:
Via a packer shell provider using inline:

S