[rabbitmq-discuss] Running Rabbitmq on AWS EC2 and changing hostnames

Pradeepto Bhattacharya pradeeptob at gmail.com
Mon Dec 9 01:29:59 GMT 2013


Hi,

I am still very new to Rabbitmq.

For my project, I have to run Rabbitmq on an AWS EC2 instance.
Everything works great until, I Stop/Start my instance for some
reason. I have read [1] but that doesn't help because setting the
hostname to a fixed string is not an option for my project as it is
expected that someone can change it later again.

My application doesn't work properly after the stop/start routine. I
am running an CentOS 6.4 based instance.

I have tried modifiying the init script ( /etc/init.d/rabbitmq-server
) to something like this -

        "RABBITMQ_MNESIA_DIR=/var/lib/rabbitmq/mnesia/myapplication \
        RABBITMQ_PLUGINS_EXPAND_DIR=/var/lib/rabbitmq/mnesia/myapplication-plugins-expand
\
        RABBITMQ_PID_FILE=$PID_FILE $START_PROG $DAEMON \
            > "${INIT_LOG_DIR}/startup_log" \
            2> "${INIT_LOG_DIR}/startup_err" \
            0<&- &
        $CONTROL wait $PID_FILE >/dev/null 2>&1"

Note that I have added RABBITMQ_MNESIA_DIR and
RABBITMQ_PLUGINS_EXPAND_DIR at the beginning. The reason, I did this
because I noticed that those directories used the internal ip for the
EC2 instance and thus changed everytime the instance stopped and
started.

Is this the right way to get this done? What would be solution when
hostnames/nodenames keep changing for instances that run rabbitmq? I
have tried many things but in vain and almost at my wits end right
now.

Thank you in advance.

[1] http://www.rabbitmq.com/ec2.html

Regards,

Pradeepto
-- 
Pradeepto Kumar Bhattacharya
KDE e.V. Board of Director | Proud KDE Contributor
The KDE Project : http://www.kde.org


More information about the rabbitmq-discuss mailing list