When attempting to use rabbitmqctl
, I get the following error:
$ which rabbitmqctl
/usr/sbin/rabbitmqctl
$ sudo rabbitmqctl status
/usr/lib/rabbitmq/bin/rabbitmqctl: line 29: exec: erl: not found
(/usr/sbin/rabbitmqctl
most likely invokes /usr/lib/rabbitmq/bin/rabbitmqctl
in its source: /usr/lib/rabbitmq/bin/${SCRIPT}
- guessing ${SCRIPT}
evaluates to rabbitmqctl
)
However, when simply accessing erl
from the shell, I reach the erlang shell as expected
$ which erl
/usr/local/bin/erl
$ ls -la /usr/local/bin/erl
lrwxrwxrwx 1 root root 21 Jul 18 02:03 /usr/local/bin/erl -> ../lib/erlang/bin/erl
$ erl
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:16:16] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.9.1 (abort with ^G)
1>
Setup information:
- CentOS 6.2
- Erlang R15B01 compiled from
otp_src_R15B01.tar.gz
- RabbitMQ 2.8.4 installed from
rabbitmq-server-2.8.4-1.noarch.rpm
. Default configuration (no conf files).
Path:
$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/myuser/bin
After looking in the source of rabbitmqctl
, it seems this is just a simple invocation to erl
, no magic involved:
exec erl \
-pa "${RABBITMQ_HOME}/ebin" \
-noinput \
-hidden \
${RABBITMQ_CTL_ERL_ARGS} \
-sname rabbitmqctl$$ \
-s rabbit_control \
-nodename $RABBITMQ_NODENAME \
-extra "$@"
Can't seem to figure out what the problem really is...