[rabbitmq-discuss] getting started, broker runs; can't get status

Dave Farkas dave at interactivemediums.com
Sat Jan 31 19:34:01 GMT 2009


Hey Ben,

On Sat, Jan 31, 2009 at 1:12 PM, Ben Hood <0x6e6562 at gmail.com> wrote:

> It's probably bad form to butt in, but is the server and rabbitmqctl
> being run as the same user? I just want to exclude the possibility of
> Erlang's cookie mechanism preventing you from connecting to a node
> running as another user.
>
> Ben
>

No worries, the more the merrier. :)  I believe everything is being
run as the rabbitmq user.
I run the start script as root, and then it executes the server start
up as rabbitmq. Here's the relevant information from the
/etc/init.d/rabbitmq script

DAEMON_NAME=rabbitmq-multi
DAEMON=/usr/lib64/rabbitmq/bin/$DAEMON_NAME
NAME=rabbitmq-server
DESC=rabbitmq-server
USER=rabbitmq
NODE_COUNT=1

start_rabbitmq () {
    set +e
    su $USER -s /bin/sh -c "$DAEMON start_all ${NODE_COUNT}" >
/var/log/rabbitmq/startup_log 2> /var/log/rabbitmq/startup_err

I was running the /usr/sbin/rabbitmqctl command as root, but it looks
like it also executes the status check as rabbitmq.

if [ `id -u` = 0 ] ; then
        su rabbitmq -s /bin/sh -c "/usr/lib64/rabbitmq/bin/rabbitmqctl
${CMDLINE}"
else
        /usr/lib64/rabbitmq/bin/rabbitmqctl
        echo -e "\nOnly root should run rabbitmqctl\n"
        exit 1
fi

Thanks,
Dave




More information about the rabbitmq-discuss mailing list