[rabbitmq-discuss] clustering -- detached

srd srd at duneram.com
Wed May 1 21:49:18 BST 2013


thanks I'll take a look.


>  -------Original Message-------
>  From: Jerry Kuch <jerryk at rbcon.com>
>  To: srd <srd at duneram.com>, Discussions about RabbitMQ <rabbitmq-discuss at lists.rabbitmq.com>
>  Cc: Discussions about RabbitMQ <rabbitmq-discuss at lists.rabbitmq.com>
>  Subject: Re: [rabbitmq-discuss] clustering -- detached
>  Sent: 01 May '13 20:37
>  
>  IIRC that tutorial isn't suggesting you need to start rabbit that way on your clustered nodes. If you have bona fide, separate machines running brokers, start them the recommended way for that platform. Make sure Erlang cookies are properly common to the user accounts the brokers run under and that the same cookie is used by the invoker of rabbitmqctl when you issue the clustering commands.
>  
>  Sent from my iPhone (Brevity and typos are hopefully the result of 1-fingered typing rather than rudeness or illiteracy).
>  
>  
>  On May 1, 2013, at 1:31 PM, "srd" <srd at duneram.com> wrote:
>  
>  > Now that I have my 2 servers setup with rabbitmq I am now attempting to cluster them.  When I got to the first step in the http://www.rabbitmq.com/clustering.html, it told me to start rabbitmq in the normal way:
>  > rabbitmq-server -detached
>  >
>  > From what I can see, this isn't how its normally started if I am running in single node mode, as it behaves differently.
>  >
>  > In order to get the service approach to work correctly, I modified rabbitmq-server in /etc/init.d as follows:
>  > [root at cluster1 init.d]# diff rabbitmq-server.20130501 rabbitmq-server
>  > 63c63
>  > <         RABBITMQ_PID_FILE=$PID_FILE $START_PROG $DAEMON \
>  > ---
>  >>        RABBITMQ_PID_FILE=$PID_FILE $START_PROG $DAEMON -detached \
>  > [root at cluster1 init.d]#
>  >
>  > I changed it there because DAEMON appears to be the rabbitmq-server
>  >
>  > [root at cluster1 init.d]# grep DAEMON rabbitmq-server
>  > DAEMON=/usr/sbin/${NAME}
>  > test -x $DAEMON || exit 0
>  >        RABBITMQ_PID_FILE=$PID_FILE $START_PROG $DAEMON -detached \
>  > [root at cluster1 init.d]#
>  >
>  > When I performed service rabbitmq-server start
>  >
>  > It just hung and never came back with a prompt.
>  >
>  > However in another window I confirmed the rabbitmq-server was running
>  >
>  > I then killed the service console window and looked at the startup_err file:
>  > [root at cluster1 init.d]# more /var/log/rabbitmq/startup_err
>  > Warning: PID file not written; -detached was passed.
>  >
>  > and then i had to separately kill the process(s) associated with rabbitmq.
>  >
>  > so my questions are thus:
>  >   1) the documentation states this is how to normally start the server.  Is that normally for all modes or just for a clustered node approach?
>  >   2) What can I do to keep the command from hanging if started as a service?  
>  >
>  >
>  >
>  >> -------Original Message-------
>  >> From: Gerald Kuch <jkuch at gopivotal.com>
>  >> To: srd <srd at duneram.com>, Discussions about RabbitMQ <rabbitmq-discuss at lists.rabbitmq.com>
>  >> Subject: Re: [rabbitmq-discuss] another question on cookies version 3.0.4
>  >> Sent: 01 May '13 19:52
>  >>
>  >> Ooops, my fingers auto-completed the "/etc/init.d" on the end of the
>  >> sentence.  Forget about that part.
>  >>
>  >>
>  >> On Wed, May 1, 2013 at 12:51 PM, Gerald Kuch <[LINK:
>  >> mailto:jkuch at gopivotal.com] jkuch at gopivotal.com> wrote:
>  >>
>  >> Depends how you started it:  Either /sbin/service/rabbitmq-server stop or
>  >> /etc/init.d/.
>  >>
>  >>
>  >> Of course 'kill' will stop it, but the cleanliness of doing the
>  >> former is preferable in non-emergency circumstances.
>  >>
>  >>
>  >> On Wed, May 1, 2013 at 6:26 AM, srd <[LINK: mailto:srd at duneram.com]
>  >> srd at duneram.com> wrote:
>  >> Thank you for your help.  I will give this a try.
>  >>
>  >> I've been starting it wrong all this time.
>  >>
>  >> what is the best way to stop the server?  up until now I have found no
>  >> good way to stop it except
>  >>
>  >> ps -efwww | grep rabbit
>  >> and then with that kill off the 4-6 associated jobs.
>  >>
>  >> Dave
>  >>
>  >>
>  >>>  -------Original Message-------
>  >>>  From: Tim Watson <[LINK: mailto:tim at rabbitmq.com] tim at rabbitmq.com>
>  >>>  To: srd <[LINK: mailto:srd at duneram.com] srd at duneram.com>, Discussions
>  >> about RabbitMQ <[LINK: mailto:rabbitmq-discuss at lists.rabbitmq.com]
>  >> rabbitmq-discuss at lists.rabbitmq.com>
>  >>>  Subject: Re: [rabbitmq-discuss] another question on cookies version
>  >> 3.0.4
>  >>>  Sent: 01 May '13 13:21
>  >>>
>  >>>  Hi,
>  >>>
>  >>>  On 1 May 2013, at 14:15, srd wrote:
>  >>>
>  >>>  > so my questions are:
>  >>>  > 1) How does one normally start the server?
>  >>>
>  >>>  Depending on the platform, either /sbin/service rabbitmq-server start
>  >> or via /etc/init.d/.
>  >>>
>  >>>  > 2) my reason for wanting to do cookies is I wanted to setup a multi
>  >> node cluster (different servers)
>  >>>  >    If I start a server (no parameters) on each server the cookie
>  >> hash is different.
>  >>>
>  >>>  You need to ensure that all the cookies are the same. You can do this
>  >> by placing the .erlang.cookie file in the /home/rabbitmq directory on each
>  >> server.
>  >>>
>  >>>  > 3) I have looked at the clustering guide but haven't succeeded
>  >> in a setup using it.  How does one normally synchronize the cookies
>  >> across servers?
>  >>>
>  >>>  That's up to you - rabbit doesn't provide anything out of the
>  >> box to do this.
>  >>>
>  >>>  > 4) where is the cookie file stored?   I found one on the rabbitmq
>  >> user's root directory.   Is that where it is stored?
>  >>>
>  >>>  That's correct.
>  >>>
>  >>>  > 5) If I have to set a cookie value, is there a config file where it
>  >> can be set (or env variable?) and what is the syntax to set it?
>  >>>  >
>  >>>
>  >>>  I would recommend just using the cookie stored in the rabbitmq
>  >> user's home directory.
>  >>>
>  >>>  Cheers,
>  >>>  Tim
>  >> _______________________________________________
>  >> rabbitmq-discuss mailing list
>  >> [LINK: mailto:rabbitmq-discuss at lists.rabbitmq.com]
>  >> rabbitmq-discuss at lists.rabbitmq.com
>  >> [LINK:
>  >> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss]
>  >> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>  > _______________________________________________
>  > 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