[rabbitmq-discuss] Bring cluster up after node crash

Jean Paul Galea ninuhadida at gmail.com
Mon Mar 25 07:35:04 GMT 2013


I ran into the same problem when installing Erlang from erlang-solutions.

The problem is with the dependency "erlang-nox" which is declared in the 
RabbitMQ package. This package is a meta-package which tries to install 
erlang packages from the Ubuntu repository, conflicting with the ones 
from erlang-solutions.

I also found the hack that you are linking to, but I think it can be 
done more elegantly.

I wrote this simple bash script; fetches rabbitmq-server package using 
apt-get, drops the erlang-nox dependency and installs it.

One thing that may bother you is that apt-get will always flag 
rabbitmq-server as "upgradeable", since the installed package differs 
from the one in the repo.

However, if you do something like `apt-get update && apt-get upgrade && 
apt-get dist-upgrade` it will __not__ automatically re-install the package.

Also note that the script does not actually remove the "erlang-nox" 
dependency, rather it simply replaces the whole line with "adduser, 
logrotate", hence if the RabbitMQ team declares a new dependency, this 
script would need to be updated.

------------------------

cat > /tmp/rabbitmq-install.sh << "EOF"
#!/bin/bash

TMPDIR1=`mktemp -d` || exit 99
TMPDIR2=`mktemp -d` || exit 99
trap 'rm -rf "$TMPDIR1" "$TMPDIR2"' 0 1 2 3 13 15

cd $TMPDIR1

/usr/bin/apt-get download rabbitmq-server || exit 1

PACKAGE=`ls -1`

/usr/bin/dpkg-deb --extract $PACKAGE $TMPDIR2
/usr/bin/dpkg-deb --control $PACKAGE ${TMPDIR2}/DEBIAN
sed --in-place 's/^Depends:.*$/Depends: adduser, logrotate/' 
${TMPDIR2}/DEBIAN/control
/usr/bin/dpkg --build $TMPDIR2 ${PACKAGE}.modified
/usr/bin/dpkg --install ${PACKAGE}.modified
EOF

/bin/bash /tmp/rabbitmq-install.sh

rm /tmp/rabbitmq-install.sh


On 03/25/2013 05:55 AM, carlhoerberg wrote:
> What's the recommended way of using a recent erlang version and rabbitmq in
> ubuntu?
> erlang-solutions and your ubuntu package doesn't seem to play well together,
> found this "hack" though, https://gist.github.com/RJ/2284940
>
> We had to "kill" them, as rabbitmqctl stop didn't respond at all..
>
>
>
> --
> View this message in context: http://rabbitmq.1065348.n5.nabble.com/Bring-cluster-up-after-node-crash-tp25530p25682.html
> Sent from the RabbitMQ mailing list archive at Nabble.com.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



More information about the rabbitmq-discuss mailing list