redhat-cop/containers-quickstarts

RabbitMQ errors

Closed this issue · 5 comments

Thank you for the template. I successfully built the image in Openshift 3.11

In the RabbitMq pod logs, I see this:

/usr/local/bin/docker-entrypoint.sh: line 182: hostname: command not found
--
  | /usr/local/bin/docker-entrypoint.sh: line 182: hostname: command not found

And the health check seems to fail with this message:

Readiness probe failed: warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell) Error: this command requires the 'rabbit' app to be running on the target node. Start it with 'rabbitmqctl start_app'. Arguments given: check_port_connectivity �[1mUsage�[0m rabbitmq-diagnostics [--node <node>] [--longnames] [--quiet] check_port_connectivity [--timeout <timeout>]

Also running commands in the terminal state the locale is wrong.

Output in pod from: sh-4.2$ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

AND:

sh-4.2$ cat /etc/locale.conf
LANG="en_US.UTF-8"
sh-4.2$

Running rabbitmqctl in shell produces this warning:

warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell)

Thank you for reporting this @gil0109, I have created #312 to address this issue.

@gil0109 I've created a new release that includes the above mentioned fix. Again thank you for reporting.

@pabrahamsson Wonderful, I will give it a try. Thank you for your quick response and FIX!!

@pabrahamsson Now I am getting this error during build in Openshift 3.1.1:


+ grep GNUPG
--
  | GNUPGHOME=/tmp/tmp.R0xhHEaG95
  | + gpg --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 0A9AF2115F4687BD29803A206B73A36E6026DFCA
  | gpg: keyring `/tmp/tmp.R0xhHEaG95/secring.gpg' created
  | gpg: keyring `/tmp/tmp.R0xhHEaG95/pubring.gpg' created
  | gpg: requesting key 6026DFCA from hkp server ha.pool.sks-keyservers.net
  | gpgkeys: key 0A9AF2115F4687BD29803A206B73A36E6026DFCA can't be retrieved
  | gpg: no valid OpenPGP data found.
  | gpg: Total number processed: 0
  | Removing intermediate container b73536254e78
  | error: build error: The command '/bin/sh -c set -xe &&     curl -LO https://github.com/rabbitmq/erlang-rpm/releases/download/v${ERLANG_VERSION}/erlang-${ERLANG_VERSION}-1.el7.x86_64.rpm  &&     rpm -Uvh ./erlang-${ERLANG_VERSION}-1.el7.x86_64.rpm &&     rm *.rpm &&     curl -Lo rabbitmq-server.tar.xz https://github.com/rabbitmq/rabbitmq-server/releases/download/v${RABBITMQ_VERSION}/rabbitmq-server-generic-unix-${RABBITMQ_VERSION}.tar.xz  &&     curl -Lo rabbitmq-server.tar.xz.asc https://github.com/rabbitmq/rabbitmq-server/releases/download/v${RABBITMQ_VERSION}/rabbitmq-server-generic-unix-${RABBITMQ_VERSION}.tar.xz.asc  &&     export GNUPGHOME="$(mktemp -d)" &&     env \| grep GNUPG &&     gpg --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys "$GPG_KEY" &&     gpg --batch --verify rabbitmq-server.tar.xz.asc rabbitmq-server.tar.xz &&     rm -rf "$GNUPGHOME" &&     mkdir -p "$RABBITMQ_HOME" &&     tar       --extract       --verbose       --file rabbitmq-server.tar.xz       --directory "$RABBITMQ_HOME"       --strip-components 1 &&     rm rabbitmq-server.tar.xz* &&     grep -qE '^SYS_PREFIX=\$\{RABBITMQ_HOME\}$' "$RABBITMQ_HOME/sbin/rabbitmq-defaults" &&     sed -ri 's!^(SYS_PREFIX=).*$!\1!' "$RABBITMQ_HOME/sbin/rabbitmq-defaults" &&     grep -qE '^SYS_PREFIX=$' "$RABBITMQ_HOME/sbin/rabbitmq-defaults" &&     groupadd --system rabbitmq &&     adduser -u 1001 -r -c "RabbitMQ User" -d /var/lib/rabbitmq -g rabbitmq rabbitmq &&     mkdir -p /var/lib/rabbitmq /etc/rabbitmq &&     chown -R 1001:0 /var/lib/rabbitmq /etc/rabbitmq ${RABBITMQ_HOME}/plugins &&     chmod -R g=u /var/lib/rabbitmq /etc/rabbitmq &&     rm -rf /var/lib/rabbitmq/.erlang.cookie &&     ln -sf "$RABBITMQ_HOME/plugins" /plugins &&     INSTALL_PKGS="hostname" &&     yum install -y $INSTALL_PKGS &&     rm -rf /var/cache/yum' returned a non-zero code: 2


It's working now! Thanks