Tag Archives: rabbitmq

Rabbitmq Server cluster docker images for openshift origin platform

Build rabbitmq cluster docker images for openshift origin platform.
Down load docker file tarball rabbitmq.tar, and cd rabbitmq, run

docker build -t rabbitmq . 

after build process is done, tag the images built with rabbitmq:v002

docker images

docker tag image-id rabbitmq:v002

and then deploy a rabbitmq-server cluster in openshift origin platform. we should create a serviceaccount rabbitmq, and add it with anyuid scc.

oc create serviceaccount rabbitmq
oc adm policy add-scc-to-user anyuid -z rabbitmq

deploy it

oc create -f rabbitmq.yaml

Adjust total file descriptors of rabbitmq

The total file descriptors number of rabbitmq is 1024 by default. This value is not big enough obviously when your openstack cluster grows. If the file descriptor or socket descriptor reaches its limit, the rabbitmq server will close incoming connections. and you will see the error below:

AMQP server on controller1:5672 is unreachable: timed out. Trying again in 1 seconds.
AMQP server on controller1:5672 is unreachable: timed out. Trying again in 2 seconds.
AMQP server on controller1:5672 is unreachable: timed out. Trying again in 4 seconds.
AMQP server on controller1:5672 is unreachable: timed out. Trying again in 6 seconds.
AMQP server on controller1:5672 is unreachable: timed out. Trying again in 8 seconds.
AMQP server controller1:5672 closed the connection. Check login credentials: Socket closed
AMQP server on controller1:5672 is unreachable: timed out. Trying again in 12 seconds.
AMQP server on controller1:5672 is unreachable: timed out. Trying again in 14 seconds.
AMQP server on controller1:5672 is unreachable: timed out. Trying again in 16 seconds.
AMQP server on controller1:5672 is unreachable: timed out. Trying again in 18 seconds.
AMQP server on controller1:5672 is unreachable: timed out. Trying again in 20 seconds.
AMQP server controller1:5672 closed the connection. Check login credentials: Socket closed

To check the current status of file descriptors used, you can run command ‘service rabbitmq-server status’
the result is

Continue reading