From michael.s.klishin at gmail.com Sat Dec 1 17:28:44 2012 From: michael.s.klishin at gmail.com (Michael Klishin) Date: Sat, 1 Dec 2012 09:28:44 -0800 (PST) Subject: [rabbitmq-discuss] ANN Bunny 0.9.0.pre1 is released, feedback wanted In-Reply-To: References: Message-ID: <7429e36b-10e3-496e-b512-723191361e20@googlegroups.com> The answer is in our new shiny test suite: > > https://github.com/ruby-amqp/bunny/tree/migrate_to_amq_protocol/spec/higher_level_api/integration > > And here's initial bits of the change log, which will be greatly expanded > before 0.9.0 final: > > https://github.com/ruby-amqp/bunny/blob/migrate_to_amq_protocol/ChangeLog.md > > the migrate_to_amq_protocol branch is now master, so those URLs should be https://github.com/ruby-amqp/bunny/tree/master/spec/higher_level_api/integration and https://github.com/ruby-amqp/bunny/blob/master/ChangeLog.md respectively. -- MK -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt at soupmatt.com Sat Dec 1 19:26:43 2012 From: matt at soupmatt.com (Matt Campbell) Date: Sat, 1 Dec 2012 11:26:43 -0800 (PST) Subject: [rabbitmq-discuss] Bug Report: Can't view queues and exchanges in Management UI on with Rabbitmq 3.0.0 when a specific vhost is selected in the upper left. Message-ID: <03e5c15b-98a5-4cbd-8238-7176638e46b6@googlegroups.com> Rabbitmq 3.0.0 installed via homebrew on Mac OS X 10.8.2 Erlang R15B03 installed via homebrew on Mac OS X 10.8.2 Browsers tested in: Chrome 23, Safari 6.0.2, Firefox 17.0.1 When you have a vhost selected in the top left corner of the Web UI screen, you cannot view the detail pages for exchanges or queues. If you set the vhost dropdown to all, it works just fine. Looking in the web console, it looks like the xhr the UI is making to the http api have the vhost name appended to the end of the url. For example, when trying to load the detail screen for a queue, it is calling /api/queues/my-vhost/my-queue/my-vhost. This behavior was present in Chrome, Safari and Firefox. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dawn_l2012 at yahoo.com Sun Dec 2 08:44:34 2012 From: dawn_l2012 at yahoo.com (Dawn L) Date: Sun, 2 Dec 2012 00:44:34 -0800 (PST) Subject: [rabbitmq-discuss] Is heartbeat option working in C-client? Message-ID: <1354437874.6889.YahooMailNeo@web161201.mail.bf1.yahoo.com> I'm writing RabbitMQ C-client code.?After I?turn on the heartbeat option?with the "heartbeat" parameter in amqp_login() function?- i.e., passing a value 10 (seconds) instead of 0 when calling amqp_login() ? amqp_rpc_reply_t amqp_login ??? ( amqp_connection_state_t state, ????? char const *vhost, ????? int channel_max, ????? uint32_t frame_max, ????? int heartbeat, ??????amqp_sasl_method_enum sasl_method, ????? ... )? ? My C-client?can start to receive heartbeat message (the message has?frame_type "AMQP_FRAME_HEARTBEAT"). However, after getting the heartbeat messages for two times, the connection and channels opened by my client have been?abruptly closed by the server. From what I read in the past articals, if the client sends any kind of message to server before the timeout, the connection shouldn't be closed. However, this?is not the case?for me - I've tried to?respond with?either normal messages (via normal channel), or frames with frame type AMQP_FRAME_HEARTBEAT?(via channel 0)?right after?the client?received the heartbead message, but the?connection is still?closed by the server regardless. ? Is?it because the heartbeat?functionality has not been?fully implemented yet? Or is there any special kind of message that should be send as response message to the heartbeat message? If?it's the second case, can you provide sample code?for reponse message?? ? Thanks?a lot, Dawn? -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Sun Dec 2 10:39:10 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Sun, 02 Dec 2012 10:39:10 +0000 Subject: [rabbitmq-discuss] Is heartbeat option working in C-client? In-Reply-To: <1354437874.6889.YahooMailNeo@web161201.mail.bf1.yahoo.com> References: <1354437874.6889.YahooMailNeo@web161201.mail.bf1.yahoo.com> Message-ID: <50BB2FCE.8020601@rabbitmq.com> Dawn, On 02/12/12 08:44, Dawn L wrote: > My C-client can start to receive heartbeat message (the message has > frame_type "AMQP_FRAME_HEARTBEAT"). However, after getting the > heartbeat messages for two times, the connection and channels opened > by my client have been abruptly closed by the server. Looks like the server did not receive any frame for too long. Check the server logs to confirm thwat. > From what I read in the past articals, if the client sends any kind > of message to server before the timeout, the connection shouldn't be > closed. However, this is not the case for me - I've tried to respond > with either normal messages (via normal channel), or frames with > frame type AMQP_FRAME_HEARTBEAT (via channel 0) right after the > client received the heartbead message, but the connection is still > closed by the server regardless. Is it because the heartbeat > functionality has not been fully implemented yet? Or is there any > special kind of message that should be send as response message to > the heartbeat message? Heartbeats in the sending and receiving direction are completely independent. When a heartbeat interval has been agreed then each peer is supposed to send *some* data to the other at least every heartbeat_interval. The heartbeat frames are there to fill in the time slots when no other data is being sent. So you certainly shouldn't be *waiting* to receive a heartbeat before sending something since that would establish an artificial interlocking of the sending and receiving direction. For more details see section 4.2.7 of the AMQP 0-9-1 spec. If you think you are doing everything right and the connection is still being torn down then look at a protocol trace with wireshark. That should hopefully identify the problem. Regards, Matthias. From dawn_l2012 at yahoo.com Sun Dec 2 15:49:10 2012 From: dawn_l2012 at yahoo.com (Dawn L) Date: Sun, 2 Dec 2012 07:49:10 -0800 (PST) Subject: [rabbitmq-discuss] Is heartbeat option working in C-client? In-Reply-To: <50BB2FCE.8020601@rabbitmq.com> References: <1354437874.6889.YahooMailNeo@web161201.mail.bf1.yahoo.com> <50BB2FCE.8020601@rabbitmq.com> Message-ID: <1354463350.34392.YahooMailNeo@web161206.mail.bf1.yahoo.com> Matthias, ??? Thanks?for your quick response. My client has sent messages to the server right after the connection is opened, as well as when heartbeat is received... I'm pretty sure that the server has received the message since my client has got a response from it.?Everything looks to be right and according the requirement, that's why I suspect that the heartbeat machanism might not be fully working on the server side, since even though it receives data from the client it still tears down the connection. I wonder if you or anybody have been using heartbeat in C-client and has it ever worked? ? ?? The program I'm writing has been working for a few months and I'm trying to add heartbeat handling to deal with the?unreliable network.?? ? Best regards. Dawn ________________________________ From: Matthias Radestock To: Dawn L ; Discussions about RabbitMQ Sent: Sunday, December 2, 2012 4:39 AM Subject: Re: [rabbitmq-discuss] Is heartbeat option working in C-client? Dawn, On 02/12/12 08:44, Dawn L wrote: > My C-client can start to receive heartbeat message (the message has > frame_type "AMQP_FRAME_HEARTBEAT"). However, after getting the > heartbeat messages for two times, the connection and channels opened > by my client have been abruptly closed by the server. Looks like the server did not receive any frame for too long. Check the server logs to confirm thwat. > From what I read in the past articals, if the client sends any kind > of message to server before the timeout, the connection shouldn't be > closed. However, this is not the case for me - I've tried to respond > with either normal messages (via normal channel), or frames with > frame type AMQP_FRAME_HEARTBEAT (via channel 0) right after the > client received the heartbead message, but the connection is still > closed by the server regardless. Is it because the heartbeat > functionality has not been fully implemented yet? Or is there any > special kind of message that should be send as response message to > the heartbeat message? Heartbeats in the sending and receiving direction are completely independent. When a heartbeat interval has been agreed then each peer is supposed to send *some* data to the other at least every heartbeat_interval. The heartbeat frames are there to fill in the time slots when no other data is being sent. So you certainly shouldn't be *waiting* to receive a heartbeat before sending something since that would establish an artificial interlocking of the sending and receiving direction. For more details see section 4.2.7 of the AMQP 0-9-1 spec. If you think you are doing everything right and the connection is still being torn down then look at a protocol trace with wireshark. That should hopefully identify the problem. Regards, Matthias. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dawn_l2012 at yahoo.com Sun Dec 2 16:07:41 2012 From: dawn_l2012 at yahoo.com (Dawn L) Date: Sun, 2 Dec 2012 08:07:41 -0800 (PST) Subject: [rabbitmq-discuss] Is heartbeat option working in C-client? In-Reply-To: <1354463350.34392.YahooMailNeo@web161206.mail.bf1.yahoo.com> References: <1354437874.6889.YahooMailNeo@web161201.mail.bf1.yahoo.com> <50BB2FCE.8020601@rabbitmq.com> <1354463350.34392.YahooMailNeo@web161206.mail.bf1.yahoo.com> Message-ID: <1354464461.48498.YahooMailNeo@web161201.mail.bf1.yahoo.com> server log says: ? "=ERROR REPORT==== 2-Dec-2012::10:04:05 === closing AMQP connection <0.13204.0>? (client ip:54786 -> server ip:5672): {timeout,running} ________________________________ From: Dawn L To: Matthias Radestock ; Discussions about RabbitMQ Sent: Sunday, December 2, 2012 9:49 AM Subject: Re: [rabbitmq-discuss] Is heartbeat option working in C-client? Matthias, ??? Thanks?for your quick response. My client has sent messages to the server right after the connection is opened, as well as when heartbeat is received... I'm pretty sure that the server has received the message since my client has got a response from it.?Everything looks to be right and according the requirement, that's why I suspect that the heartbeat machanism might not be fully working on the server side, since even though it receives data from the client it still tears down the connection. I wonder if you or anybody have been using heartbeat in C-client and has it ever worked? ? ?? The program I'm writing has been working for a few months and I'm trying to add heartbeat handling to deal with the?unreliable network.?? ? Best regards. Dawn ________________________________ From: Matthias Radestock To: Dawn L ; Discussions about RabbitMQ Sent: Sunday, December 2, 2012 4:39 AM Subject: Re: [rabbitmq-discuss] Is heartbeat option working in C-client? Dawn, On 02/12/12 08:44, Dawn L wrote: > My C-client can start to receive heartbeat message (the message has > frame_type "AMQP_FRAME_HEARTBEAT"). However, after getting the > heartbeat messages for two times, the connection and channels opened > by my client have been abruptly closed by the server. Looks like the server did not receive any frame for too long. Check the server logs to confirm thwat. > From what I read in the past articals, if the client sends any kind > of message to server before the timeout, the connection shouldn't be > closed. However, this is not the case for me - I've tried to respond > with either normal messages (via normal channel), or frames with > frame type AMQP_FRAME_HEARTBEAT (via channel 0) right after the > client received the heartbead message, but the connection is still > closed by the server regardless. Is it because the heartbeat > functionality has not been fully implemented yet? Or is there any > special kind of message that should be send as response message to > the heartbeat message? Heartbeats in the sending and receiving direction are completely independent. When a heartbeat interval has been agreed then each peer is supposed to send *some* data to the other at least every heartbeat_interval. The heartbeat frames are there to fill in the time slots when no other data is being sent. So you certainly shouldn't be *waiting* to receive a heartbeat before sending something since that would establish an artificial interlocking of the sending and receiving direction. For more details see section 4.2.7 of the AMQP 0-9-1 spec. If you think you are doing everything right and the connection is still being torn down then look at a protocol trace with wireshark. That should hopefully identify the problem. Regards, Matthias. _______________________________________________ rabbitmq-discuss mailing list rabbitmq-discuss at lists.rabbitmq.com https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Sun Dec 2 16:43:36 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Sun, 02 Dec 2012 16:43:36 +0000 Subject: [rabbitmq-discuss] Is heartbeat option working in C-client? In-Reply-To: <1354463350.34392.YahooMailNeo@web161206.mail.bf1.yahoo.com> References: <1354437874.6889.YahooMailNeo@web161201.mail.bf1.yahoo.com> <50BB2FCE.8020601@rabbitmq.com> <1354463350.34392.YahooMailNeo@web161206.mail.bf1.yahoo.com> Message-ID: <50BB8538.9080203@rabbitmq.com> Dawn, On 02/12/12 15:49, Dawn L wrote: > Thanks for your quick response. My client has sent messages to the > server right after the connection is opened, as well as when heartbeat > is received... I'm pretty sure that the server has received the message > since my client has got a response from it. Everything looks to be right > and according the requirement, that's why I suspect that the heartbeat > machanism might not be fully working on the server side, since even > though it receives data from the client it still tears down the > connection. Lots of users have heartbeats enabled in their clients. This is well-tested code at the server, and hasn't changed for ages. So this is very unlikely to be a server problem. > I wonder if you or anybody have been using heartbeat in > C-client and has it ever worked? I'd be surprised if there are no users of the C client that have heartbeats enabled. As I suggested before, your best bet is probably run a packet capture with wireshark (or similar) to help identify the problem. > server log says: > > "=ERROR REPORT==== 2-Dec-2012::10:04:05 === > closing AMQP connection <0.13204.0> (client ip:54786 -> server ip:5672): > {timeout,running} Right, that's the server saying it didn't receive any data or a heartbeat for too long. The message is more informative in more recent version of rabbit - though the logic hasn't changed - so you may want to upgrade. Regards, Matthias. From alan.antonuk at gmail.com Sun Dec 2 19:04:01 2012 From: alan.antonuk at gmail.com (Alan Antonuk) Date: Sun, 2 Dec 2012 14:04:01 -0500 Subject: [rabbitmq-discuss] Is heartbeat option working in C-client? In-Reply-To: <1354437874.6889.YahooMailNeo@web161201.mail.bf1.yahoo.com> References: <1354437874.6889.YahooMailNeo@web161201.mail.bf1.yahoo.com> Message-ID: The rabbitmq-c client does not support AMQP heartbeats. -Alan On Sun, Dec 2, 2012 at 3:44 AM, Dawn L wrote: > I'm writing RabbitMQ C-client code. After I turn on the heartbeat > option with the "heartbeat" parameter in amqp_login() function - i.e., > passing a value 10 (seconds) instead of 0 when calling amqp_login() > > amqp_rpc_reply_t amqp_login > ( amqp_connection_state_t state, > char const *vhost, > int channel_max, > uint32_t frame_max, > int heartbeat, > amqp_sasl_method_enum sasl_method, > ... ) > > My C-client can start to receive heartbeat message (the message > has frame_type "AMQP_FRAME_HEARTBEAT"). However, after getting the > heartbeat messages for two times, the connection and channels opened by my > client have been abruptly closed by the server. From what I read in the > past articals, if the client sends any kind of message to server before the > timeout, the connection shouldn't be closed. However, this is not the > case for me - I've tried to respond with either normal messages (via normal > channel), or frames with frame type AMQP_FRAME_HEARTBEAT (via channel > 0) right after the client received the heartbead message, but > the connection is still closed by the server regardless. > > Is it because the heartbeat functionality has not been fully implemented > yet? Or is there any special kind of message that should be send as > response message to the heartbeat message? If it's the second case, can you > provide sample code for reponse message? > > Thanks a lot, > Dawn > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Sun Dec 2 19:21:55 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Sun, 02 Dec 2012 19:21:55 +0000 Subject: [rabbitmq-discuss] Is heartbeat option working in C-client? In-Reply-To: References: <1354437874.6889.YahooMailNeo@web161201.mail.bf1.yahoo.com> Message-ID: <50BBAA53.1030809@rabbitmq.com> Alan, On 02/12/12 19:04, Alan Antonuk wrote: > The rabbitmq-c client does not support AMQP heartbeats. In the sense that it is not automatically sending heartbeats in the absence of other traffic, and is not automatically monitoring inbound traffic/heartbeats? Sure. But if an app sends/receives heartbeats explicitly, as Dawn appears to be doing, that should work, shouldn't it? Matthias. From emile at rabbitmq.com Mon Dec 3 10:10:34 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Mon, 03 Dec 2012 10:10:34 +0000 Subject: [rabbitmq-discuss] .NET client: intermittent AlreadyClosedException - connected host has failed to respond In-Reply-To: References: <6762d23c-8815-4624-8f92-e86b75ecedab@googlegroups.com> <50B5E4E2.8040500@rabbitmq.com> Message-ID: <50BC7A9A.3020609@rabbitmq.com> Hi Andrei, On 29/11/12 18:15, Andrei Volkov wrote: > It looks like a TCP port exhaustion on the client side. > What happens is, unlike our main app, our healthcheck page opens (and > closes) a new connection every time it is hit. The healthcheck page is > hit every 5 seconds. By default on Windows the ephemeral TCP port can't > be reused until after 240 seconds after it's closed. Hence the port > exhaustion. That explanation would work if there were only 48 ports available in the ephemeral range. By default there are many more, so I would be surprised if this was the cause. -Emile From michael.s.klishin at gmail.com Mon Dec 3 10:11:28 2012 From: michael.s.klishin at gmail.com (Michael Klishin) Date: Mon, 3 Dec 2012 14:11:28 +0400 Subject: [rabbitmq-discuss] ANN Bunny 0.9.0.pre3 Message-ID: Bunny 0.9.0.pre3 is released to rubygems.org: https://rubygems.org/gems/bunny/versions/0.9.0.pre3 New in this release: * Publisher confirms support * Consumers now can be objects that react to all consumer-related events, not just deliveries * Bunny now properly announces client capabilities to RabbitMQ More detailed change log: https://github.com/ruby-amqp/bunny/blob/master/ChangeLog.md One more documentation guide is up on rubybunny.info: http://rubybunny.info/articles/connecting.html Finally, all new Bunny 0.9 work now happens in master and not on a topic branch. If you use Bunny from git, please update your Gemfiles. -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Mon Dec 3 10:22:47 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Mon, 03 Dec 2012 10:22:47 +0000 Subject: [rabbitmq-discuss] Bug Report: Can't view queues and exchanges in Management UI on with Rabbitmq 3.0.0 when a specific vhost is selected in the upper left. In-Reply-To: <03e5c15b-98a5-4cbd-8238-7176638e46b6@googlegroups.com> References: <03e5c15b-98a5-4cbd-8238-7176638e46b6@googlegroups.com> Message-ID: <50BC7D77.7000907@rabbitmq.com> On 01/12/12 19:26, Matt Campbell wrote: > When you have a vhost selected in the top left corner of the Web UI > screen, you cannot view the detail pages for exchanges or queues. You're correct. This is already fixed in the nightlies and will be in the (hopefully imminent) 3.0.1 release. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From simon at rabbitmq.com Mon Dec 3 10:42:52 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Mon, 03 Dec 2012 10:42:52 +0000 Subject: [rabbitmq-discuss] x-received-from headers with the Shovel plugin... In-Reply-To: References: <50B886EF.6090306@rabbitmq.com> Message-ID: <50BC822C.2070806@rabbitmq.com> On 30/11/12 21:23, David Buckingham wrote: > It's not that I want shovel to be more opinionated, just more > informative. For example, I'm playing with a topology that includes > both federation and shovel. I'd like to offer the consumers the > ability to have a true understanding of the path of the message. > Currently, the x-received-from header only includes the upstream > exchanges where the message was published. If the message was > originally "shoveled" from a remote queue to the upstream exchange, > I'd like the x-received-from header to indicate both the source > (shoveled queue), and the upstream exchange. Oh, sure, I just wanted to explain how it came to be the way it is. > Is it possible to "fake" the x-received-from header using the > 'publish_properties' config item? Sort of. The problem is that the shovel will only overwrite properties, not append to them. And in fact it will treat headers as a single property. So if the shovel is the first step in the chain, you're good. Otherwise no. Hmm. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From simon at rabbitmq.com Mon Dec 3 11:01:09 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Mon, 03 Dec 2012 11:01:09 +0000 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <20121129164559.GW335@kaka.it.su.se> References: <20121112114419.GG360@kaka.it.su.se> <50A229F6.1040407@rabbitmq.com> <20121113143505.GL360@kaka.it.su.se> <50A2818F.3090308@rabbitmq.com> <20121129164559.GW335@kaka.it.su.se> Message-ID: <50BC8675.8030702@rabbitmq.com> On 29/11/12 16:46, Simon Lundstr?m wrote: > Sorry to revisit an old message, but it's kind of related... > When trying to handle when password is undefined I have found that > the {'EXIT', Port, normal} message is only sent when a user logs in > via AMQP (and probably STOMP). Well, the {'EXIT', Port, Reason} message is sent by the Erlang runtime, so whatever is determining whether it gets sent or not is down to the interaction between the runtime and kinit. It's worth noting at this point that I have never written anything that uses open_port, so we really are reaching the limits of my ability to help you. According to the docs: "During use of a port opened using {spawn, Name}, {spawn_driver, Name} or {spawn_executable, Name}, errors arising when sending messages to it are reported to the owning process using signals of the form {'EXIT', Port, PosixCode}. See file(3) for possible values of PosixCode." So it sounds like the messages might be optional. > I never receive an EXIT-message when a user logs in via the > API/mgmt. > > Why is that? How can I handle the EXIT-message "sometimes"? If you really are only getting them sometimes, then "after 0" should be fine as long as you have received everything else you expect from the port by that point. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From tim at rabbitmq.com Mon Dec 3 11:21:55 2012 From: tim at rabbitmq.com (Tim Watson) Date: Mon, 03 Dec 2012 11:21:55 +0000 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <50BC8675.8030702@rabbitmq.com> References: <20121112114419.GG360@kaka.it.su.se> <50A229F6.1040407@rabbitmq.com> <20121113143505.GL360@kaka.it.su.se> <50A2818F.3090308@rabbitmq.com> <20121129164559.GW335@kaka.it.su.se> <50BC8675.8030702@rabbitmq.com> Message-ID: <50BC8B53.4050103@rabbitmq.com> On 12/03/2012 11:01 AM, Simon MacMullen wrote: > On 29/11/12 16:46, Simon Lundstr?m wrote: >> Sorry to revisit an old message, but it's kind of related... > >> When trying to handle when password is undefined I have found that >> the {'EXIT', Port, normal} message is only sent when a user logs in >> via AMQP (and probably STOMP). > > Well, the {'EXIT', Port, Reason} message is sent by the Erlang > runtime, so whatever is determining whether it gets sent or not is > down to the interaction between the runtime and kinit. > > It's worth noting at this point that I have never written anything > that uses open_port, so we really are reaching the limits of my > ability to help you. According to the docs: > > "During use of a port opened using {spawn, Name}, {spawn_driver, Name} > or {spawn_executable, Name}, errors arising when sending messages to > it are reported to the owning process using signals of the form > {'EXIT', Port, PosixCode}. See file(3) for possible values of PosixCode." > So it sounds like the messages might be optional. > This all depends what arguments you've passed in `Options' when you called erlang:open_port/2 and whether or not your process is trapping exits. For example, if you pass the exit_status option, then you'll get a `{Port,{exit_status,Status}}' message when the port exits. If you're trapping exits, then you will get 'EXIT' messages from the port (as you're the controlling process if you called open_port) and you'll need to handle these too. Normally what will happen is when stdio for the port detects `eof' then it will close (and the exit signal will be generated). If you want to avoid getting the exit signals, you can pass 'eof' in the options which (as per the open_port/2 docs) will change this behaviour such that: "The port will not be closed at the end of the file and produce an exit signal. Instead, it will remain open and a {Port, eof} message will be sent to the process holding the port." Either way you're going to end up getting some messages from the port and you need to learn about the port protocol (from http://erlang.org/doc/man/erlang.html#open_port-2 and http://www.erlang.org/doc/tutorial/c_port.html) and make sure you're handling all of them. >> I never receive an EXIT-message when a user logs in via the >> API/mgmt. >> >> Why is that? How can I handle the EXIT-message "sometimes"? > > If you really are only getting them sometimes, then "after 0" should > be fine as long as you have received everything else you expect from > the port by that point. > I would suggest making sure your port isn't 'hanging' by receiving until you've got either 'EXIT' or a combination of 'eof' and 'exit_status' messages - iirc the ordering guarantees with these allows you to write a shutdown loop like so (you might want to ignore or use the stdout during shutdown/close for your own purposes, I don't know how your app works): shutdown_loop(Port, Acc) -> receive {Port, {exit_status, 0}} -> {ok, Acc}; {Port, {exit_status, Rc}} -> {error, Rc, Acc}; {Port, {data, {eol, Line}}} -> shutdown_loop(Port, [Line|Acc]); {Port, {data, {eol, []}}} -> shutdown_loop(Port, Acc); {Port, {data, Data}} -> shutdown_loop(Port, [io_lib:format("~p~n", [Data])|Acc]) end. If you want to avoid blocking (the reader! yes you do I would've thought) then you might consider using an 'insulator' process in which to open and interact with the port. This allows you to timeout and/or terminate the port without blocking the reader process - some port commands are blocking and if your C code (or external application or whatever) gets stuck then you could be in trouble. HTH Cheers, Tim From carl.hoerberg at gmail.com Mon Dec 3 14:29:56 2012 From: carl.hoerberg at gmail.com (carlhoerberg) Date: Mon, 3 Dec 2012 06:29:56 -0800 (PST) Subject: [rabbitmq-discuss] Cluster issues In-Reply-To: References: <416D3B2E4A1946E4BC8F75B32CE4E415@gmail.com> Message-ID: <1354544996783-23798.post@n5.nabble.com> Ok, thank you! I shut the server down with "shutdown -h now", so upstart should've stopped rabbitmq gracefully. Yes, there's HA queues setup, i load balance client connections through round-robin DNS, so different nodes were masters for different queues. -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/Cluster-issues-tp23604p23798.html Sent from the RabbitMQ mailing list archive at Nabble.com. From alan.antonuk at gmail.com Mon Dec 3 14:42:29 2012 From: alan.antonuk at gmail.com (Alan Antonuk) Date: Mon, 3 Dec 2012 09:42:29 -0500 Subject: [rabbitmq-discuss] Is heartbeat option working in C-client? In-Reply-To: <50BBAA53.1030809@rabbitmq.com> References: <1354437874.6889.YahooMailNeo@web161201.mail.bf1.yahoo.com> <50BBAA53.1030809@rabbitmq.com> Message-ID: Sorry I didn't read Dawn's email all the way through the first time I read it, so Matthais is correct: The library will not do any kind of automatic sending of heartbeats to the broker. The library should be able to be used in such a way that you could correctly implement heartbeats, though I have not seen it been done with rabbitmq-c. -Alan On Sun, Dec 2, 2012 at 2:21 PM, Matthias Radestock wrote: > Alan, > > > On 02/12/12 19:04, Alan Antonuk wrote: > >> The rabbitmq-c client does not support AMQP heartbeats. >> > > In the sense that it is not automatically sending heartbeats in the > absence of other traffic, and is not automatically monitoring inbound > traffic/heartbeats? Sure. > > But if an app sends/receives heartbeats explicitly, as Dawn appears to be > doing, that should work, shouldn't it? > > Matthias. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pradeep.kip at gmail.com Mon Dec 3 15:58:22 2012 From: pradeep.kip at gmail.com (Pradeep Kumar) Date: Mon, 3 Dec 2012 10:58:22 -0500 Subject: [rabbitmq-discuss] Cannot join cluster In-Reply-To: <50B8F858.3060605@rabbitmq.com> References: <9765f3f7-95f4-4f1d-bc2d-48b09e04642a@googlegroups.com> <50B8F858.3060605@rabbitmq.com> Message-ID: Hi Matthias, I got the pang response instead of ping. What are my next steps? Please help. Thanks Pradeep On Fri, Nov 30, 2012 at 1:18 PM, Matthias Radestock wrote: > On 30/11/12 18:03, Francesco Mazzoli wrote: > >> Also, try to issue >> >> rabbitmqctl eval 'net_adm:ping(node at host).' >> >> On the machine with the node you are trying to cluster from, where >> `node at host' >> is the node you are trying to cluster to. If you get a `pang' this will >> confirm >> that the erlang node can?t be reached. >> > > Alternatively, run 'rabbitmqctl -n node at host status', which will display > a bunch of diagnostics if it fails to connect to the other node. > > Matthias. > > > ______________________________**_________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.**rabbitmq.com > https://lists.rabbitmq.com/**cgi-bin/mailman/listinfo/**rabbitmq-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From prabodh.upreti at vce.com Mon Dec 3 17:04:59 2012 From: prabodh.upreti at vce.com (Prabodh Upreti) Date: Mon, 3 Dec 2012 09:04:59 -0800 (PST) Subject: [rabbitmq-discuss] rabbitmqadmin create exchange Message-ID: <1354554299321-23801.post@n5.nabble.com> Hello I need to create an exchange via a script hence was planning to use rabbitmqadmin. /usr/local/bin/rabbitmqadmin declare exchange name=exchangename type = topic I am getting *** Access refused: /exchanges/%2F/exchangename (** exchangename is the name I am giving ) Currently I do not have any uses in the rabbitmq database (not even guest). I am managing user via external SSO. Could I be getting this because the guest user is missing. I would appreciate your help. thank you. -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/rabbitmqadmin-create-exchange-tp23801.html Sent from the RabbitMQ mailing list archive at Nabble.com. From simon at rabbitmq.com Mon Dec 3 17:08:37 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Mon, 03 Dec 2012 17:08:37 +0000 Subject: [rabbitmq-discuss] rabbitmqadmin create exchange In-Reply-To: <1354554299321-23801.post@n5.nabble.com> References: <1354554299321-23801.post@n5.nabble.com> Message-ID: <50BCDC95.8070705@rabbitmq.com> By default rabbitmqadmin authenticates with guest/guest. To use something else, specify -u / --username and -p / --password. For more information, "rabbitmqadmin --help". Cheers, Simon On 03/12/12 17:04, Prabodh Upreti wrote: > Hello > > I need to create an exchange via a script hence was planning to use > rabbitmqadmin. > > /usr/local/bin/rabbitmqadmin declare exchange name=exchangename type = topic > > I am getting > > *** Access refused: /exchanges/%2F/exchangename (** exchangename is the name > I am giving ) > > Currently I do not have any uses in the rabbitmq database (not even guest). > I am managing user via external SSO. > > Could I be getting this because the guest user is missing. I would > appreciate your help. thank you. > > > > > > -- > View this message in context: http://rabbitmq.1065348.n5.nabble.com/rabbitmqadmin-create-exchange-tp23801.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 > -- Simon MacMullen RabbitMQ, VMware From emile at rabbitmq.com Mon Dec 3 17:21:08 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Mon, 03 Dec 2012 17:21:08 +0000 Subject: [rabbitmq-discuss] Cannot join cluster In-Reply-To: References: <9765f3f7-95f4-4f1d-bc2d-48b09e04642a@googlegroups.com> <50B8F858.3060605@rabbitmq.com> Message-ID: <50BCDF84.6050800@rabbitmq.com> Hi, On 03/12/12 15:58, Pradeep Kumar wrote: > I got the pang response instead of ping. If there was a message about a disallowed connection in the broker logfile of the node that you try to contact then the erlang cookies are not synchronised. Make sure the erlang cookies are the same on all nodes to be clustered. You should also make sure that the hostnames of all nodes resolve to the same addresses on all hosts. If there are firewalls between any hosts then make sure that the required ports are allowed. The clustering guide explains how to do that and how to set up clustering between different hosts. http://www.rabbitmq.com/clustering.html -Emile From sbellem at gmail.com Mon Dec 3 15:46:27 2012 From: sbellem at gmail.com (Sylvain Bellemare) Date: Mon, 3 Dec 2012 07:46:27 -0800 (PST) Subject: [rabbitmq-discuss] In Python, channel.queue_declare(exclusive=True) hangs the process In-Reply-To: <61c9707c-86d4-481b-886a-6580d10cf986@googlegroups.com> References: <61c9707c-86d4-481b-886a-6580d10cf986@googlegroups.com> Message-ID: I have encountered the same problem. Le jeudi 15 novembre 2012 23:34:32 UTC+1, Abe a ?crit : > > I'm following along with the tutorial code exactly ( > http://www.rabbitmq.com/tutorials/tutorial-five-python.html), and when I > run receive_logs_topic.py, the program doesn't ever make it past line 12. > Same things happens with the code from tutorial 4. I've restarted Rabbit to > no avail. Not really sure where to go from here, since this is straight out > of the box... -------------- next part -------------- An HTML attachment was scrubbed... URL: From sbellem at gmail.com Mon Dec 3 15:59:47 2012 From: sbellem at gmail.com (Sylvain Bellemare) Date: Mon, 3 Dec 2012 07:59:47 -0800 (PST) Subject: [rabbitmq-discuss] In Python, channel.queue_declare(exclusive=True) hangs the process In-Reply-To: <61c9707c-86d4-481b-886a-6580d10cf986@googlegroups.com> References: <61c9707c-86d4-481b-886a-6580d10cf986@googlegroups.com> Message-ID: <49e13991-2585-4e7f-9438-f15b5d65ec4a@googlegroups.com> Using pika 0.9.5 instead of 0.9.7 worked for me ... http://rabbitmq.1065348.n5.nabble.com/In-Python-channel-queue-declare-exclusive-True-hangs-the-process-td23446.html Le jeudi 15 novembre 2012 23:34:32 UTC+1, Abe a ?crit : > > I'm following along with the tutorial code exactly ( > http://www.rabbitmq.com/tutorials/tutorial-five-python.html), and when I > run receive_logs_topic.py, the program doesn't ever make it past line 12. > Same things happens with the code from tutorial 4. I've restarted Rabbit to > no avail. Not really sure where to go from here, since this is straight out > of the box... -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.s.klishin at gmail.com Mon Dec 3 18:22:51 2012 From: michael.s.klishin at gmail.com (Michael Klishin) Date: Mon, 3 Dec 2012 22:22:51 +0400 Subject: [rabbitmq-discuss] In Python, channel.queue_declare(exclusive=True) hangs the process In-Reply-To: <49e13991-2585-4e7f-9438-f15b5d65ec4a@googlegroups.com> References: <61c9707c-86d4-481b-886a-6580d10cf986@googlegroups.com> <49e13991-2585-4e7f-9438-f15b5d65ec4a@googlegroups.com> Message-ID: 2012/12/3 Sylvain Bellemare > Using pika 0.9.5 instead of 0.9.7 worked for me ... > http://rabbitmq.1065348.n5.nabble.com/In-Python-channel-queue-declare-exclusive-True-hangs-the-process-td23446.html > Sylvain, AFAIR there was a 0.9.8 release that is compatible with 0.9.5. Try it? -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.berg at pardot.com Mon Dec 3 18:55:09 2012 From: eric.berg at pardot.com (Eric Berg) Date: Mon, 3 Dec 2012 13:55:09 -0500 Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 and PECL AMQP package problems Message-ID: I was sailing smoothly on RabbitMQ 2.8.7 using the newest PECL AMQP package 1.0.9. However a recent upgrade to RabbitMQ 3.0.0 has caused some problems with PECL AMQP 1.0.9. I am able to connect and bind one exchange to another successfully, however the bind method throws an exception, even though it has been successful. I get an AMQPExchangeException with message "Library error: Resource temporarily unavailable" I am able to connect and perform every function with other libraries to the same RabbitMQ instance without problems. Has anyone else run into this issue? Thanks. Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierpaolo at dropbox.com Tue Dec 4 05:06:23 2012 From: pierpaolo at dropbox.com (Pierpaolo Baccichet) Date: Mon, 3 Dec 2012 21:06:23 -0800 Subject: [rabbitmq-discuss] Latency of publish confirm Message-ID: Hello, I am evaluating using rabbitMQ as a component in our backend system. I am planning to run it with a clustered configuration with queues mirrored on at least one node beside the one the queue is declared on. Each publisher opens channels with publisher confirms and the code implements a blocking call that waits for the ack to be received back before it returns control to the app. There will be a lot of publisher processes (order of magnitude in the tens of thousands) and each publisher will have a fairly low message per second rate (let's say 1 message per second). I am running a very small experiment to evaluate the latency of the publish call and I am seeing that rabbitMQ holds the ack for roughly 25 milliseconds before sending it to the publisher. To clarify what I am seeing, below is a wireshark capture that I took on the rabbit node for a single published message (gaps in the packet number are due to other traffic live on the machine). No. Time. Source Src_port Destination Dest_port Proto Length Info 174 3.070464 publisher_ip 28086 rabbitmq_ip amqp AMQP 104 Basic.Publish 175 3.070483 publisher_ip 28086 rabbitmq_ip amqp AMQP 90 Content-Header 177 3.070674 publisher_ip 28086 rabbitmq_ip amqp AMQP 77 Content-Body 200 3.072493 rabbitmq_ip amqp consumer_ip 28085 AMQP 149 Basic.Deliver Content-Header Content-Body 202 3.073846 consumer_ip 28085 rabbitmq_ip amqp AMQP 89 Basic.Ack 207 3.098541 rabbitmq_ip amqp publisher_ip 28086 AMQP 89 Basic.Ack I did multiple experiments and this behavior is very consistent. All messages are delivered reasonably fast apart of the very last one that seem to be held in rabbitMQ for 25 milliseconds before it's delivered on the network. Why is this happening? Is RabbitMQ trying to aggregate multiple messages together before delivering them on the network? Is there a way to speed up this behavior? Cheers, Pierpaolo -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashwinraghav at gmail.com Tue Dec 4 06:50:28 2012 From: ashwinraghav at gmail.com (Ashwin Raghav) Date: Tue, 4 Dec 2012 01:50:28 -0500 Subject: [rabbitmq-discuss] Question on RabbitMQ's message copying Message-ID: I had a questions about how(whether) rabbit internally copies a message from an exchange to a queue. I have read the documentation that says "Exchanges copy messages to queues using rules called bindings". I was wondering whether this is a logical copy or an actual full-on copy. I ask because I was posed with a question recently on a project that I work on. Why are you physically copying the same message to so many queues? Would something like a reference count implementation with just a single copy of the message not suffice? Kindly clarify. -- Regards, Ashwin Raghav Mohan Ganesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashwinraghav at gmail.com Tue Dec 4 06:53:28 2012 From: ashwinraghav at gmail.com (Ashwin Raghav) Date: Tue, 4 Dec 2012 01:53:28 -0500 Subject: [rabbitmq-discuss] Question on RabbitMQ's message copying In-Reply-To: References: Message-ID: To be more concrete, will a fanout exchange that has bindings to n queues contain n physical copies of the message. I understand that there is a need to buffer on the client and this means that each client has a local copy. But in rabbit's internal implementation, are there 'n' copies or just 1 physical copy. Ashwin On Tue, Dec 4, 2012 at 1:50 AM, Ashwin Raghav wrote: > I was wondering whether this is a logical copy or an actual full-on copy. > I ask because I was posed with a question recently on a project that I work > on. Why are you physically copying the same message to so many queues? > Would something like a reference count implementation with just a single > copy of the message not suffice? > -- Regards, Ashwin Raghav Mohan Ganesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Tue Dec 4 08:29:24 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Tue, 04 Dec 2012 08:29:24 +0000 Subject: [rabbitmq-discuss] Question on RabbitMQ's message copying In-Reply-To: References: Message-ID: <50BDB464.4030502@rabbitmq.com> Ashwin, On 04/12/12 06:53, Ashwin Raghav wrote: > will a fanout exchange that has bindings to n queues contain n physical > copies of the message. I understand that there is a need to buffer on > the client and this means that each client has a local copy. But in > rabbit's internal implementation, are there 'n' copies or just 1 > physical copy. There is just one copy of the message payload per cluster node for payloads > 64 bytes. Smaller payloads are copied. Matthias. From matthias at rabbitmq.com Tue Dec 4 08:55:13 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Tue, 04 Dec 2012 08:55:13 +0000 Subject: [rabbitmq-discuss] Latency of publish confirm In-Reply-To: References: Message-ID: <50BDBA71.6010004@rabbitmq.com> Pierpaolo, On 04/12/12 05:06, Pierpaolo Baccichet wrote: > I am running a very small experiment to evaluate the latency of the > publish call and I am seeing that rabbitMQ holds the ack for roughly > 25 milliseconds before sending it to the publisher. [...] Why is > this happening? Is RabbitMQ trying to aggregate multiple messages > together before delivering them on the network? I am guessing your messages are marked as persistent. The 25ms is indeed an aggregation interval, but for the disk (in particular fsyncs) rather than the network. > There will be a lot of publisher processes (order of magnitude in the > tens of thousands) and each publisher will have a fairly low message > per second rate (let's say 1 message per second). The aggregation will go across all puplishers, so you will see much higher rates. A quick experiment on my machine using the MulticastMain program that ships with the Java client shows a rate of 1500Hz with 500 producers publishing to a single queue in "wait for confirmation after every message" mode (MCM -f persistent -c 1 -x 500 -i 10). Regards, Matthias. From matthias at rabbitmq.com Tue Dec 4 09:05:15 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Tue, 04 Dec 2012 09:05:15 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 and PECL AMQP package problems In-Reply-To: References: Message-ID: <50BDBCCB.2050905@rabbitmq.com> Eric, On 03/12/12 18:55, Eric Berg wrote: > I was sailing smoothly on RabbitMQ 2.8.7 using the newest PECL AMQP > package 1.0.9. However a recent upgrade to RabbitMQ 3.0.0 has caused > some problems with PECL AMQP 1.0.9. I am able to connect and bind one > exchange to another successfully, however the bind method throws an > exception, even though it has been successful. There haven't been any changes to the protocol or how RabbitMQ handles it between 2.8.7 and 3.0.0, so the difference in behaviour you are seeing is a little odd. > I get an AMQPExchangeException with message "Library error: Resource > temporarily unavailable" What do the server logs say? Regards, Matthias. From matthias at rabbitmq.com Tue Dec 4 09:22:23 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Tue, 04 Dec 2012 09:22:23 +0000 Subject: [rabbitmq-discuss] Latency of publish confirm In-Reply-To: <50BDBA71.6010004@rabbitmq.com> References: <50BDBA71.6010004@rabbitmq.com> Message-ID: <50BDC0CF.4040900@rabbitmq.com> On 04/12/12 08:55, Matthias Radestock wrote: > I am guessing your messages are marked as persistent. The 25ms is indeed > an aggregation interval, but for the disk (in particular fsyncs) rather > than the network. However, fsyncs also happen when queues and the storage sub-system go idle, so the interval only kicks in when the system is busy (thus ensuring that fsyncs aren't delayed indefinitely). So I am pretty sure what you are seeing is simply the cost of performing an fsync per message. There's nothing that can be done about that except buying faster disks / switching to SSDs. Regards, Matthias. From ponmuthu at omnesysindia.com Tue Dec 4 10:31:47 2012 From: ponmuthu at omnesysindia.com (PONMUTHU M) Date: Tue, 4 Dec 2012 02:31:47 -0800 (PST) Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . Message-ID: <1354617107744-23817.post@n5.nabble.com> RabbitMQ 3.0.0 Erlang R15B02 My Aim is to start multiple nodes comes under same mgnt port (say 15672 in latest version). but its getting crashed & o/p is like 15672 port releated . please help me to fix this issue. Startup for multi nodes ---------------------------------- RABBITMQ_NODENAME=$1 \ RABBITMQ_NODE_PORT=$2 \ RABBITMQ_MNESIA_DIR=/tmp/rabbitmq-$1-mnesia \ RABBITMQ_PLUGINS_EXPAND_DIR=/tmp/rabbitmq-$1-plugins-scratch \ RABBITMQ_LOG_BASE=/tmp \ RABBITMQ_SERVER_START_ARGS="-rabbitmq_management port 15672" \ ${RMQ_ROOT_PATH}rabbitmq-server & # -detached :::Error ::: +---+ +---+ | | | | | | | | | | | | | +---+ +-------+ | | | RabbitMQ +---+ | | | | | | v3.0.0 +---+ | | | +-------------------+ AMQP 0-9-1 / 0-9 / 0-8 Copyright (C) 2007-2012 VMware, Inc. Licensed under the MPL. See http://www.rabbitmq.com/ . . . (lot of lines) . BOOT FAILED =========== Error description: {could_not_start,rabbitmq_management, {could_not_start_listener,[{port,15672}],eaddrinuse}} Log files (may contain more information): /tmp/test1.log /tmp/test1-sasl.log {"init terminating in do_boot",{rabbit,failure_during_boot,{could_not_start,rabbitmq_management,{could_not_start_listener,[{port,15672}],eaddrinuse}}}} Crash dump was written to: erl_crash.dump init terminating in do_boot () -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/RMQ-3-0-0-multi-rabbit-nodes-not-able-to-start-tp23817.html Sent from the RabbitMQ mailing list archive at Nabble.com. From marutha.tech at gmail.com Tue Dec 4 10:35:17 2012 From: marutha.tech at gmail.com (Maruthavanan Subbarayan) Date: Tue, 4 Dec 2012 16:05:17 +0530 Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: <1354617107744-23817.post@n5.nabble.com> References: <1354617107744-23817.post@n5.nabble.com> Message-ID: Seems that the port is already in use. Check if you have some application that is already running on the same port. Thanks Marutha On Dec 4, 2012 4:03 PM, "PONMUTHU M" wrote: > RabbitMQ 3.0.0 > Erlang R15B02 > > My Aim is to start multiple nodes comes under same mgnt port (say 15672 in > latest version). but its getting crashed & o/p is like 15672 port releated > . > please help me to fix this issue. > > > Startup for multi nodes > ---------------------------------- > > RABBITMQ_NODENAME=$1 \ > RABBITMQ_NODE_PORT=$2 \ > RABBITMQ_MNESIA_DIR=/tmp/rabbitmq-$1-mnesia \ > RABBITMQ_PLUGINS_EXPAND_DIR=/tmp/rabbitmq-$1-plugins-scratch \ > RABBITMQ_LOG_BASE=/tmp \ > RABBITMQ_SERVER_START_ARGS="-rabbitmq_management port 15672" \ > ${RMQ_ROOT_PATH}rabbitmq-server & # -detached > > > :::Error ::: > > > +---+ +---+ > | | | | > | | | | > | | | | > | +---+ +-------+ > | | > | RabbitMQ +---+ | > | | | | > | v3.0.0 +---+ | > | | > +-------------------+ > AMQP 0-9-1 / 0-9 / 0-8 > Copyright (C) 2007-2012 VMware, Inc. > Licensed under the MPL. See http://www.rabbitmq.com/ > > . > . > . (lot of lines) > . > BOOT FAILED > =========== > > Error description: > {could_not_start,rabbitmq_management, > {could_not_start_listener,[{port,15672}],eaddrinuse}} > > Log files (may contain more information): > /tmp/test1.log > /tmp/test1-sasl.log > > {"init terminating in > > do_boot",{rabbit,failure_during_boot,{could_not_start,rabbitmq_management,{could_not_start_listener,[{port,15672}],eaddrinuse}}}} > > Crash dump was written to: erl_crash.dump > init terminating in do_boot () > > > > -- > View this message in context: > http://rabbitmq.1065348.n5.nabble.com/RMQ-3-0-0-multi-rabbit-nodes-not-able-to-start-tp23817.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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Tue Dec 4 10:32:16 2012 From: tim at rabbitmq.com (Tim Watson) Date: Tue, 04 Dec 2012 10:32:16 +0000 Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: <1354617107744-23817.post@n5.nabble.com> References: <1354617107744-23817.post@n5.nabble.com> Message-ID: <50BDD130.7030507@rabbitmq.com> You cannot start two applications listening on the same port - that's impossible. This restriction has nothing to do with RabbitMQ BTW - it is a general restriction on all operating system networking APIs. http://en.wikipedia.org/wiki/Port_%28computer_networking%29 Also see the 'A cluster on a single machine' section of http://www.rabbitmq.com/clustering.html. Tim On 12/04/2012 10:31 AM, PONMUTHU M wrote: > RabbitMQ 3.0.0 > Erlang R15B02 > > My Aim is to start multiple nodes comes under same mgnt port (say 15672 in > latest version). but its getting crashed& o/p is like 15672 port releated . > please help me to fix this issue. > > > Startup for multi nodes > ---------------------------------- > > RABBITMQ_NODENAME=$1 \ > RABBITMQ_NODE_PORT=$2 \ > RABBITMQ_MNESIA_DIR=/tmp/rabbitmq-$1-mnesia \ > RABBITMQ_PLUGINS_EXPAND_DIR=/tmp/rabbitmq-$1-plugins-scratch \ > RABBITMQ_LOG_BASE=/tmp \ > RABBITMQ_SERVER_START_ARGS="-rabbitmq_management port 15672" \ > ${RMQ_ROOT_PATH}rabbitmq-server& # -detached > > > :::Error ::: > > > +---+ +---+ > | | | | > | | | | > | | | | > | +---+ +-------+ > | | > | RabbitMQ +---+ | > | | | | > | v3.0.0 +---+ | > | | > +-------------------+ > AMQP 0-9-1 / 0-9 / 0-8 > Copyright (C) 2007-2012 VMware, Inc. > Licensed under the MPL. See http://www.rabbitmq.com/ > > . > . > . (lot of lines) > . > BOOT FAILED > =========== > > Error description: > {could_not_start,rabbitmq_management, > {could_not_start_listener,[{port,15672}],eaddrinuse}} > > Log files (may contain more information): > /tmp/test1.log > /tmp/test1-sasl.log > > {"init terminating in > do_boot",{rabbit,failure_during_boot,{could_not_start,rabbitmq_management,{could_not_start_listener,[{port,15672}],eaddrinuse}}}} > > Crash dump was written to: erl_crash.dump > init terminating in do_boot () > > > > -- > View this message in context: http://rabbitmq.1065348.n5.nabble.com/RMQ-3-0-0-multi-rabbit-nodes-not-able-to-start-tp23817.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 From ponmuthu at omnesysindia.com Tue Dec 4 10:40:06 2012 From: ponmuthu at omnesysindia.com (PONMUTHU M) Date: Tue, 4 Dec 2012 02:40:06 -0800 (PST) Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: <1354617107744-23817.post@n5.nabble.com> References: <1354617107744-23817.post@n5.nabble.com> Message-ID: <1354617606357-23820.post@n5.nabble.com> but after changing port 15673 which is free in my box , also not able to start its picking 15672 i want to know . from where its picking ? RABBITMQ_NODENAME=$1 \ RABBITMQ_NODE_PORT=$2 \ RABBITMQ_MNESIA_DIR=/tmp/rabbitmq-$1-mnesia \ RABBITMQ_PLUGINS_EXPAND_DIR=/tmp/rabbitmq-$1-plugins-scratch \ RABBITMQ_LOG_BASE=/tmp \ RABBITMQ_SERVER_START_ARGS="-rabbitmq_mochiweb listeners [{mgmt,[{port,15673}]}]" \ ${RMQ_ROOT_PATH}rabbitmq-server & # -detached BOOT FAILED =========== Error description: {could_not_start,rabbitmq_management, {could_not_start_listener,[{port,15672}],eaddrinuse}} Log files (may contain more information): /tmp/pon1.log /tmp/pon1-sasl.log {"init terminating in do_boot",{rabbit,failure_during_boot,{could_not_start,rabbitmq_management,{could_not_start_listener,[{port,15672}],eaddrinuse}}}} Crash dump was written to: erl_crash.dump init terminating in do_boot () -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/RMQ-3-0-0-multi-rabbit-nodes-not-able-to-start-tp23817p23820.html Sent from the RabbitMQ mailing list archive at Nabble.com. From michael.s.klishin at gmail.com Tue Dec 4 10:39:56 2012 From: michael.s.klishin at gmail.com (Michael Klishin) Date: Tue, 4 Dec 2012 14:39:56 +0400 Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: <1354617107744-23817.post@n5.nabble.com> References: <1354617107744-23817.post@n5.nabble.com> Message-ID: 2012/12/4 PONMUTHU M > Error description: > {could_not_start,rabbitmq_management, > {could_not_start_listener,[{port,15672}],eaddrinuse}} > If you want to run a cluster on a single machine, you need to disable the management plugin or use separate configuration files for each node. Otherwise 3 copies of the plugin will try to bind to the same port (15672). -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Tue Dec 4 10:35:39 2012 From: tim at rabbitmq.com (Tim Watson) Date: Tue, 04 Dec 2012 10:35:39 +0000 Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: <1354617606357-23820.post@n5.nabble.com> References: <1354617107744-23817.post@n5.nabble.com> <1354617606357-23820.post@n5.nabble.com> Message-ID: <50BDD1FB.2090903@rabbitmq.com> On 12/04/2012 10:40 AM, PONMUTHU M wrote: > but after changing port 15673 which is free in my box , also not able to > start its picking 15672 > > i want to know . from where its picking ? Use RABBITMQ_SERVER_START_ARGS="-rabbitmq_management listener [{port,15673}]" instead > RABBITMQ_NODENAME=$1 \ > RABBITMQ_NODE_PORT=$2 \ > RABBITMQ_MNESIA_DIR=/tmp/rabbitmq-$1-mnesia \ > RABBITMQ_PLUGINS_EXPAND_DIR=/tmp/rabbitmq-$1-plugins-scratch \ > RABBITMQ_LOG_BASE=/tmp \ > RABBITMQ_SERVER_START_ARGS="-rabbitmq_mochiweb listeners > [{mgmt,[{port,15673}]}]" \ > ${RMQ_ROOT_PATH}rabbitmq-server& # -detached > > > BOOT FAILED > =========== > > Error description: > {could_not_start,rabbitmq_management, > {could_not_start_listener,[{port,15672}],eaddrinuse}} > > Log files (may contain more information): > /tmp/pon1.log > /tmp/pon1-sasl.log > > {"init terminating in > do_boot",{rabbit,failure_during_boot,{could_not_start,rabbitmq_management,{could_not_start_listener,[{port,15672}],eaddrinuse}}}} > > Crash dump was written to: erl_crash.dump > init terminating in do_boot () > > > > > -- > View this message in context: http://rabbitmq.1065348.n5.nabble.com/RMQ-3-0-0-multi-rabbit-nodes-not-able-to-start-tp23817p23820.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 From ponmuthu at omnesysindia.com Tue Dec 4 10:41:47 2012 From: ponmuthu at omnesysindia.com (ponmuthu) Date: Tue, 4 Dec 2012 16:11:47 +0530 Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: <50BDD130.7030507@rabbitmq.com> References: <1354617107744-23817.post@n5.nabble.com> <50BDD130.7030507@rabbitmq.com> Message-ID: <011701cdd20b$f88ce970$e9a6bc50$@omnesysindia.com> Yes I understand the scenario. but after changing port 15673 which is free in my box , also not able to start its picking 15672 i want to know . from where its picking ? RABBITMQ_NODENAME=$1 \ RABBITMQ_NODE_PORT=$2 \ RABBITMQ_MNESIA_DIR=/tmp/rabbitmq-$1-mnesia \ RABBITMQ_PLUGINS_EXPAND_DIR=/tmp/rabbitmq-$1-plugins-scratch \ RABBITMQ_LOG_BASE=/tmp \ RABBITMQ_SERVER_START_ARGS="-rabbitmq_mochiweb listeners [{mgmt,[{port,15673}]}]" \ ${RMQ_ROOT_PATH}rabbitmq-server & # -detached BOOT FAILED =========== Error description: {could_not_start,rabbitmq_management, {could_not_start_listener,[{port,15672}],eaddrinuse}} Log files (may contain more information): /tmp/pon1.log /tmp/pon1-sasl.log {"init terminating in do_boot",{rabbit,failure_during_boot,{could_not_start,rabbitmq_m anagement,{could_not_start_listener,[{port,15672}],eaddrinuse}}} } Crash dump was written to: erl_crash.dump init terminating in do_boot () Regards, PONMUTHU M -----Original Message----- From: Tim Watson [mailto:tim at rabbitmq.com] Sent: Tuesday, December 04, 2012 4:02 PM To: Discussions about RabbitMQ Cc: PONMUTHU M Subject: Re: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . You cannot start two applications listening on the same port - that's impossible. This restriction has nothing to do with RabbitMQ BTW - it is a general restriction on all operating system networking APIs. http://en.wikipedia.org/wiki/Port_%28computer_networking%29 Also see the 'A cluster on a single machine' section of http://www.rabbitmq.com/clustering.html. Tim On 12/04/2012 10:31 AM, PONMUTHU M wrote: > RabbitMQ 3.0.0 > Erlang R15B02 > > My Aim is to start multiple nodes comes under same mgnt port (say > 15672 in latest version). but its getting crashed& o/p is like 15672 port releated . > please help me to fix this issue. > > > Startup for multi nodes > ---------------------------------- > > RABBITMQ_NODENAME=$1 \ > RABBITMQ_NODE_PORT=$2 \ > RABBITMQ_MNESIA_DIR=/tmp/rabbitmq-$1-mnesia \ > RABBITMQ_PLUGINS_EXPAND_DIR=/tmp/rabbitmq-$1-plugins-scratch \ > RABBITMQ_LOG_BASE=/tmp \ > RABBITMQ_SERVER_START_ARGS="-rabbitmq_management port 15672" \ > ${RMQ_ROOT_PATH}rabbitmq-server& # -detached > > > :::Error ::: > > > +---+ +---+ > | | | | > | | | | > | | | | > | +---+ +-------+ > | | > | RabbitMQ +---+ | > | | | | > | v3.0.0 +---+ | > | | > +-------------------+ > AMQP 0-9-1 / 0-9 / 0-8 > Copyright (C) 2007-2012 VMware, Inc. > Licensed under the MPL. See http://www.rabbitmq.com/ > > . > . > . (lot of lines) > . > BOOT FAILED > =========== > > Error description: > {could_not_start,rabbitmq_management, > {could_not_start_listener,[{port,15672}],eaddrinuse}} > > Log files (may contain more information): > /tmp/test1.log > /tmp/test1-sasl.log > > {"init terminating in > do_boot",{rabbit,failure_during_boot,{could_not_start,rabbitmq_m anagem > ent,{could_not_start_listener,[{port,15672}],eaddrinuse}}}} > > Crash dump was written to: erl_crash.dump init terminating in do_boot > () > > > > -- > View this message in context: > http://rabbitmq.1065348.n5.nabble.com/RMQ-3-0-0-multi-rabbit-nod es-not > -able-to-start-tp23817.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-dis cuss From ponmuthu at omnesysindia.com Tue Dec 4 10:43:24 2012 From: ponmuthu at omnesysindia.com (PONMUTHU M) Date: Tue, 4 Dec 2012 02:43:24 -0800 (PST) Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: References: <1354617107744-23817.post@n5.nabble.com> Message-ID: <1354617804867-23823.post@n5.nabble.com> my aim to start multiple nodes in same mgmt plugin 15672 is there any way to do that ? -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/RMQ-3-0-0-multi-rabbit-nodes-not-able-to-start-tp23817p23823.html Sent from the RabbitMQ mailing list archive at Nabble.com. From ponmuthu at omnesysindia.com Tue Dec 4 10:47:48 2012 From: ponmuthu at omnesysindia.com (PONMUTHU M) Date: Tue, 4 Dec 2012 02:47:48 -0800 (PST) Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: References: <1354617107744-23817.post@n5.nabble.com> Message-ID: <1354618068876-23825.post@n5.nabble.com> use separate configuration files for each node ?? -- please explain -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/RMQ-3-0-0-multi-rabbit-nodes-not-able-to-start-tp23817p23825.html Sent from the RabbitMQ mailing list archive at Nabble.com. From tim at rabbitmq.com Tue Dec 4 10:42:30 2012 From: tim at rabbitmq.com (Tim Watson) Date: Tue, 04 Dec 2012 10:42:30 +0000 Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: <1354617804867-23823.post@n5.nabble.com> References: <1354617107744-23817.post@n5.nabble.com> <1354617804867-23823.post@n5.nabble.com> Message-ID: <50BDD396.6070905@rabbitmq.com> On 12/04/2012 10:43 AM, PONMUTHU M wrote: > my aim to start multiple nodes in same mgmt plugin 15672 > > is there any way to do that ? > It is impossible for any two applications running on the same host to listen for incoming network connections on the same port. Let me repeat that again, just so it is clear: what you are asking for is not possible in RabbitMQ or any other server application. I promise that when I said this in my previous response I was telling the truth! ;-) Cheers, Tim Useful Links: http://lmgtfy.com/?q=networking+ports From ponmuthu at omnesysindia.com Tue Dec 4 10:50:29 2012 From: ponmuthu at omnesysindia.com (ponmuthu) Date: Tue, 4 Dec 2012 16:20:29 +0530 Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: <50BDD1FB.2090903@rabbitmq.com> References: <1354617107744-23817.post@n5.nabble.com> <1354617606357-23820.post@n5.nabble.com> <50BDD1FB.2090903@rabbitmq.com> Message-ID: <012101cdd20d$3010af20$90320d60$@omnesysindia.com> Its working fine . but is ther any way to get all nodes in same mgnt plugin ? -----Original Message----- From: Tim Watson [mailto:tim at rabbitmq.com] Sent: Tuesday, December 04, 2012 4:06 PM To: Discussions about RabbitMQ Cc: PONMUTHU M Subject: Re: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . On 12/04/2012 10:40 AM, PONMUTHU M wrote: > but after changing port 15673 which is free in my box , also not able > to start its picking 15672 > > i want to know . from where its picking ? Use RABBITMQ_SERVER_START_ARGS="-rabbitmq_management listener [{port,15673}]" instead > RABBITMQ_NODENAME=$1 \ > RABBITMQ_NODE_PORT=$2 \ > RABBITMQ_MNESIA_DIR=/tmp/rabbitmq-$1-mnesia \ > RABBITMQ_PLUGINS_EXPAND_DIR=/tmp/rabbitmq-$1-plugins-scratch \ > RABBITMQ_LOG_BASE=/tmp \ > RABBITMQ_SERVER_START_ARGS="-rabbitmq_mochiweb listeners > [{mgmt,[{port,15673}]}]" \ ${RMQ_ROOT_PATH}rabbitmq-server& # > -detached > > > BOOT FAILED > =========== > > Error description: > {could_not_start,rabbitmq_management, > > {could_not_start_listener,[{port,15672}],eaddrinuse}} > > Log files (may contain more information): > /tmp/pon1.log > /tmp/pon1-sasl.log > > {"init terminating in > do_boot",{rabbit,failure_during_boot,{could_not_start,rabbitmq_m anagem > ent,{could_not_start_listener,[{port,15672}],eaddrinuse}}}} > > Crash dump was written to: erl_crash.dump init terminating in do_boot > () > > > > > -- > View this message in context: > http://rabbitmq.1065348.n5.nabble.com/RMQ-3-0-0-multi-rabbit-nod es-not > -able-to-start-tp23817p23820.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-dis cuss From ponmuthu at omnesysindia.com Tue Dec 4 10:51:18 2012 From: ponmuthu at omnesysindia.com (ponmuthu) Date: Tue, 4 Dec 2012 16:21:18 +0530 Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: <50BDD396.6070905@rabbitmq.com> References: <1354617107744-23817.post@n5.nabble.com> <1354617804867-23823.post@n5.nabble.com> <50BDD396.6070905@rabbitmq.com> Message-ID: <012201cdd20d$4cb23e50$e616baf0$@omnesysindia.com> Ok thanks dude. -----Original Message----- From: Tim Watson [mailto:tim at rabbitmq.com] Sent: Tuesday, December 04, 2012 4:13 PM To: Discussions about RabbitMQ Cc: PONMUTHU M Subject: Re: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . On 12/04/2012 10:43 AM, PONMUTHU M wrote: > my aim to start multiple nodes in same mgmt plugin 15672 > > is there any way to do that ? > It is impossible for any two applications running on the same host to listen for incoming network connections on the same port. Let me repeat that again, just so it is clear: what you are asking for is not possible in RabbitMQ or any other server application. I promise that when I said this in my previous response I was telling the truth! ;-) Cheers, Tim Useful Links: http://lmgtfy.com/?q=networking+ports From michael.s.klishin at gmail.com Tue Dec 4 10:51:11 2012 From: michael.s.klishin at gmail.com (Michael Klishin) Date: Tue, 4 Dec 2012 14:51:11 +0400 Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: <1354618068876-23825.post@n5.nabble.com> References: <1354617107744-23817.post@n5.nabble.com> <1354618068876-23825.post@n5.nabble.com> Message-ID: 2012/12/4 PONMUTHU M > use separate configuration files for each node ?? -- please explain Tim demonstrates how to override management plugin port setting for a node via environment variables. This is more convenient than what I had suggested. -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.s.klishin at gmail.com Tue Dec 4 10:52:35 2012 From: michael.s.klishin at gmail.com (Michael Klishin) Date: Tue, 4 Dec 2012 14:52:35 +0400 Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: <1354617804867-23823.post@n5.nabble.com> References: <1354617107744-23817.post@n5.nabble.com> <1354617804867-23823.post@n5.nabble.com> Message-ID: 2012/12/4 PONMUTHU M > my aim to start multiple nodes in same mgmt plugin 15672 > > is there any way to do that ? > There is no: RabbitMQ management plugin is a separate Erlang application running in the same VM as RabbitMQ. If you start 3 nodes on the same machine, you run 3 Erlang VMs, each with its own rabbit plus its own management plugin copy. There is no way to share the plugin between VMs, so they need to use different ports. -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -------------- next part -------------- An HTML attachment was scrubbed... URL: From videlalvaro at gmail.com Tue Dec 4 10:53:31 2012 From: videlalvaro at gmail.com (Alvaro Videla) Date: Tue, 4 Dec 2012 11:53:31 +0100 Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: <50BDD396.6070905@rabbitmq.com> References: <1354617107744-23817.post@n5.nabble.com> <1354617804867-23823.post@n5.nabble.com> <50BDD396.6070905@rabbitmq.com> Message-ID: Hi, So you want to run 3 RabbitMQ nodes in the *same* machine each with their own management plugin. Right? So first you need to make sure that each RabbitMQ node has its own port and node name and what not so the three nodes can run on one machine. So as Tim Watson says: "Also see the 'A cluster on a single machine' section of http://www.rabbitmq.com/**clustering.html ." Now onto your second problem. Running the management plugin in each of these nodes. For this you also need to specify a unique port for each node. See the configuration guide for the management plugin here: http://www.rabbitmq.com/management.html Regards, Alvaro On Tue, Dec 4, 2012 at 11:42 AM, Tim Watson wrote: > On 12/04/2012 10:43 AM, PONMUTHU M wrote: > >> my aim to start multiple nodes in same mgmt plugin 15672 >> >> is there any way to do that ? >> >> > It is impossible for any two applications running on the same host to > listen for incoming network connections on the same port. Let me repeat > that again, just so it is clear: what you are asking for is not possible in > RabbitMQ or any other server application. I promise that when I said this > in my previous response I was telling the truth! ;-) > > Cheers, > Tim > > Useful Links: http://lmgtfy.com/?q=**networking+ports > > ______________________________**_________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.**rabbitmq.com > https://lists.rabbitmq.com/**cgi-bin/mailman/listinfo/**rabbitmq-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Tue Dec 4 10:53:58 2012 From: tim at rabbitmq.com (Tim Watson) Date: Tue, 04 Dec 2012 10:53:58 +0000 Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: <012101cdd20d$3010af20$90320d60$@omnesysindia.com> References: <1354617107744-23817.post@n5.nabble.com> <1354617606357-23820.post@n5.nabble.com> <50BDD1FB.2090903@rabbitmq.com> <012101cdd20d$3010af20$90320d60$@omnesysindia.com> Message-ID: <50BDD646.4020707@rabbitmq.com> Hi On 12/04/2012 10:50 AM, ponmuthu wrote: > Its working fine . but is ther any way to get all nodes in same > mgnt plugin ? Let's just make sure we're answering your question properly. It sounds like you are running a cluster on a single machine. In this scenario, the management plugin can either 1. run on all nodes on a different port 2. run on one node only Using *either* of these approaches, you should still be able to see all three nodes in the management ui, *as long as they are clustered together* !!! If you are doing (1) then as I showed you, the RABBITMQ_SERVER_START_ARGS needs to use '-rabbitmq_management listener [{port, ?}]' where the port is different for each node. That should work just fine and all three nodes will have a listener running on a different port. If you just want to run management on one of your nodes and not the other two then you can do this by pointing to a different RABBITMQ_ENABLED_PLUGINS_FILE for the node on which you want to run management and enabling the plugin on *only* that node by running `RABBITMQ_ENABLED_PLUGINS_FILE=/path/to/the/file rabbitmq-plugins enable rabbitmq_management` and restarting just that rabbit. This will enable management on *one node only* but as long as the other nodes are *clustered* then they will all appear in the UI. Does that make sense? Sorry if I misunderstood your question at first. :-) > -----Original Message----- > From: Tim Watson [mailto:tim at rabbitmq.com] > Sent: Tuesday, December 04, 2012 4:06 PM > To: Discussions about RabbitMQ > Cc: PONMUTHU M > Subject: Re: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not > able to start . > > On 12/04/2012 10:40 AM, PONMUTHU M wrote: >> but after changing port 15673 which is free in my box , also > not able >> to start its picking 15672 >> >> i want to know . from where its picking ? > Use > > RABBITMQ_SERVER_START_ARGS="-rabbitmq_management listener > [{port,15673}]" > > instead > > >> RABBITMQ_NODENAME=$1 \ >> RABBITMQ_NODE_PORT=$2 \ >> RABBITMQ_MNESIA_DIR=/tmp/rabbitmq-$1-mnesia \ >> RABBITMQ_PLUGINS_EXPAND_DIR=/tmp/rabbitmq-$1-plugins-scratch \ >> RABBITMQ_LOG_BASE=/tmp \ >> RABBITMQ_SERVER_START_ARGS="-rabbitmq_mochiweb listeners >> [{mgmt,[{port,15673}]}]" \ ${RMQ_ROOT_PATH}rabbitmq-server& # >> -detached >> >> >> BOOT FAILED >> =========== >> >> Error description: >> {could_not_start,rabbitmq_management, >> >> {could_not_start_listener,[{port,15672}],eaddrinuse}} >> >> Log files (may contain more information): >> /tmp/pon1.log >> /tmp/pon1-sasl.log >> >> {"init terminating in >> > do_boot",{rabbit,failure_during_boot,{could_not_start,rabbitmq_m > anagem >> ent,{could_not_start_listener,[{port,15672}],eaddrinuse}}}} >> >> Crash dump was written to: erl_crash.dump init terminating in > do_boot >> () >> >> >> >> >> -- >> View this message in context: >> > http://rabbitmq.1065348.n5.nabble.com/RMQ-3-0-0-multi-rabbit-nod > es-not >> -able-to-start-tp23817p23820.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-dis > cuss > > From videlalvaro at gmail.com Tue Dec 4 11:01:32 2012 From: videlalvaro at gmail.com (Alvaro Videla) Date: Tue, 4 Dec 2012 12:01:32 +0100 Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: <012101cdd20d$3010af20$90320d60$@omnesysindia.com> References: <1354617107744-23817.post@n5.nabble.com> <1354617606357-23820.post@n5.nabble.com> <50BDD1FB.2090903@rabbitmq.com> <012101cdd20d$3010af20$90320d60$@omnesysindia.com> Message-ID: See here: http://www.rabbitmq.com/management.html the "Note on clustering" and also read about the "management agent". -Alvaro On Tue, Dec 4, 2012 at 11:50 AM, ponmuthu wrote: > Its working fine . but is ther any way to get all nodes in same > mgnt plugin ? > > -----Original Message----- > From: Tim Watson [mailto:tim at rabbitmq.com] > Sent: Tuesday, December 04, 2012 4:06 PM > To: Discussions about RabbitMQ > Cc: PONMUTHU M > Subject: Re: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not > able to start . > > On 12/04/2012 10:40 AM, PONMUTHU M wrote: > > but after changing port 15673 which is free in my box , also > not able > > to start its picking 15672 > > > > i want to know . from where its picking ? > > Use > > RABBITMQ_SERVER_START_ARGS="-rabbitmq_management listener > [{port,15673}]" > > instead > > > > RABBITMQ_NODENAME=$1 \ > > RABBITMQ_NODE_PORT=$2 \ > > RABBITMQ_MNESIA_DIR=/tmp/rabbitmq-$1-mnesia \ > > RABBITMQ_PLUGINS_EXPAND_DIR=/tmp/rabbitmq-$1-plugins-scratch \ > > > RABBITMQ_LOG_BASE=/tmp \ > > RABBITMQ_SERVER_START_ARGS="-rabbitmq_mochiweb listeners > > [{mgmt,[{port,15673}]}]" \ ${RMQ_ROOT_PATH}rabbitmq-server& # > > > -detached > > > > > > BOOT FAILED > > =========== > > > > Error description: > > {could_not_start,rabbitmq_management, > > > > {could_not_start_listener,[{port,15672}],eaddrinuse}} > > > > Log files (may contain more information): > > /tmp/pon1.log > > /tmp/pon1-sasl.log > > > > {"init terminating in > > > do_boot",{rabbit,failure_during_boot,{could_not_start,rabbitmq_m > anagem > > ent,{could_not_start_listener,[{port,15672}],eaddrinuse}}}} > > > > Crash dump was written to: erl_crash.dump init terminating in > do_boot > > () > > > > > > > > > > -- > > View this message in context: > > > http://rabbitmq.1065348.n5.nabble.com/RMQ-3-0-0-multi-rabbit-nod > es-not > > -able-to-start-tp23817p23820.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-dis > cuss > > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Tue Dec 4 10:58:09 2012 From: tim at rabbitmq.com (Tim Watson) Date: Tue, 04 Dec 2012 10:58:09 +0000 Subject: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not able to start . In-Reply-To: References: <1354617107744-23817.post@n5.nabble.com> <1354617606357-23820.post@n5.nabble.com> <50BDD1FB.2090903@rabbitmq.com> <012101cdd20d$3010af20$90320d60$@omnesysindia.com> Message-ID: <50BDD741.7060509@rabbitmq.com> On 12/04/2012 11:01 AM, Alvaro Videla wrote: > See here: http://www.rabbitmq.com/management.html the "Note on > clustering" and also read about the "management agent". > Sheesh yeah, thanks for pointing out the bit about the management agent Alvaro - I completely forgot about that! ponmuthu - take note of this and please read through the documentation carefully. > -Alvaro > > > On Tue, Dec 4, 2012 at 11:50 AM, ponmuthu > wrote: > > Its working fine . but is ther any way to get all nodes in same > mgnt plugin ? > > -----Original Message----- > From: Tim Watson [mailto:tim at rabbitmq.com ] > Sent: Tuesday, December 04, 2012 4:06 PM > To: Discussions about RabbitMQ > Cc: PONMUTHU M > Subject: Re: [rabbitmq-discuss] RMQ-3.0.0 multi rabbit nodes not > able to start . > > On 12/04/2012 10:40 AM, PONMUTHU M wrote: > > but after changing port 15673 which is free in my box , also > not able > > to start its picking 15672 > > > > i want to know . from where its picking ? > > Use > > RABBITMQ_SERVER_START_ARGS="-rabbitmq_management listener > [{port,15673}]" > > instead > > > > RABBITMQ_NODENAME=$1 \ > > RABBITMQ_NODE_PORT=$2 \ > > RABBITMQ_MNESIA_DIR=/tmp/rabbitmq-$1-mnesia \ > > RABBITMQ_PLUGINS_EXPAND_DIR=/tmp/rabbitmq-$1-plugins-scratch \ > > > RABBITMQ_LOG_BASE=/tmp \ > > RABBITMQ_SERVER_START_ARGS="-rabbitmq_mochiweb listeners > > [{mgmt,[{port,15673}]}]" \ ${RMQ_ROOT_PATH}rabbitmq-server& # > > > -detached > > > > > > BOOT FAILED > > =========== > > > > Error description: > > {could_not_start,rabbitmq_management, > > > > {could_not_start_listener,[{port,15672}],eaddrinuse}} > > > > Log files (may contain more information): > > /tmp/pon1.log > > /tmp/pon1-sasl.log > > > > {"init terminating in > > > do_boot",{rabbit,failure_during_boot,{could_not_start,rabbitmq_m > anagem > > ent,{could_not_start_listener,[{port,15672}],eaddrinuse}}}} > > > > Crash dump was written to: erl_crash.dump init terminating in > do_boot > > () > > > > > > > > > > -- > > View this message in context: > > > http://rabbitmq.1065348.n5.nabble.com/RMQ-3-0-0-multi-rabbit-nod > es-not > > > -able-to-start-tp23817p23820.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-dis > cuss > > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris.d at frugalit.co.uk Tue Dec 4 11:24:28 2012 From: chris.d at frugalit.co.uk (Chris Duncan) Date: Tue, 4 Dec 2012 03:24:28 -0800 (PST) Subject: [rabbitmq-discuss] What purpose do the default exchanges in a vhost serve? Message-ID: I've been playing around with the default exchanges that get automatically created in a vhost when it is created. Should I be able to delete amq.direct, amq.fanout etc.? I've found that I can delete them, although I can't delete the default 'nameless' exchange, which makes sense. Do these amq.* exchanges serve any particular purpose? Cheers, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From videlalvaro at gmail.com Tue Dec 4 11:30:56 2012 From: videlalvaro at gmail.com (Alvaro Videla) Date: Tue, 4 Dec 2012 12:30:56 +0100 Subject: [rabbitmq-discuss] What purpose do the default exchanges in a vhost serve? In-Reply-To: References: Message-ID: Hi, The amq.* exchanges are dictated by the AMQP spec. The unnamed exchange can be used in your app with various purposes. For example: every queue gets bound to the "anon" exchange using the queue name as routing key. That means you can send a message directly to a queue by doing: channel.publish(msg, '', 'queue-name') That's quite useful in RPC scenarios, or to send messages to anon queues for example. Regards, Alvaro On Tue, Dec 4, 2012 at 12:24 PM, Chris Duncan wrote: > I've been playing around with the default exchanges that get automatically > created in a vhost when it is created. Should I be able to delete > amq.direct, amq.fanout etc.? I've found that I can delete them, although I > can't delete the default 'nameless' exchange, which makes sense. Do these > amq.* exchanges serve any particular purpose? > > Cheers, > > Chris > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Tue Dec 4 11:34:48 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Tue, 04 Dec 2012 11:34:48 +0000 Subject: [rabbitmq-discuss] What purpose do the default exchanges in a vhost serve? In-Reply-To: References: Message-ID: <50BDDFD8.507@rabbitmq.com> On 04/12/12 11:30, Alvaro Videla wrote: > The amq.* exchanges are dictated by the AMQP spec. ...and they are there just for convenience, i.e. apps are free to use them as they please. Matthias. From celldee at gmail.com Tue Dec 4 11:48:01 2012 From: celldee at gmail.com (Chris Duncan) Date: Tue, 04 Dec 2012 11:48:01 +0000 Subject: [rabbitmq-discuss] What purpose do the default exchanges in a vhost serve? In-Reply-To: <50BDDFD8.507@rabbitmq.com> References: <50BDDFD8.507@rabbitmq.com> Message-ID: <50BDE2F1.3070305@gmail.com> On 04/12/12 11:34, Matthias Radestock wrote: > On 04/12/12 11:30, Alvaro Videla wrote: >> The amq.* exchanges are dictated by the AMQP spec. > > ...and they are there just for convenience, i.e. apps are free to use > them as they please. > > Matthias. > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss Thanks Alvaro and Matthias. I'm familiar with the default nameless exchange, but was wondering whether there were any unforeseen consequences if any of the amq.* exchanges were deleted. If I delete one of the amq.* exchanges, should I be able to re-create it? I've tried a redeclaration, but that doesn't seem to work. Cheers, Chris From videlalvaro at gmail.com Tue Dec 4 11:52:49 2012 From: videlalvaro at gmail.com (Alvaro Videla) Date: Tue, 4 Dec 2012 12:52:49 +0100 Subject: [rabbitmq-discuss] What purpose do the default exchanges in a vhost serve? In-Reply-To: <50BDE2F1.3070305@gmail.com> References: <50BDDFD8.507@rabbitmq.com> <50BDE2F1.3070305@gmail.com> Message-ID: Hi On Tue, Dec 4, 2012 at 12:48 PM, Chris Duncan wrote: > If I delete one of the amq.* exchanges, should I be able to re-create it? > I've tried a redeclaration, but that doesn't seem to work. You can't do that. See: http://hg.rabbitmq.com/rabbitmq-server/file/d5898ecfbe72/src/rabbit_channel.erl#l529 Regards, Alvaro -------------- next part -------------- An HTML attachment was scrubbed... URL: From celldee at gmail.com Tue Dec 4 12:04:42 2012 From: celldee at gmail.com (Chris Duncan) Date: Tue, 04 Dec 2012 12:04:42 +0000 Subject: [rabbitmq-discuss] What purpose do the default exchanges in a vhost serve? In-Reply-To: References: <50BDDFD8.507@rabbitmq.com> <50BDE2F1.3070305@gmail.com> Message-ID: <50BDE6DA.7000609@gmail.com> On 04/12/12 11:52, Alvaro Videla wrote: > Hi > > On Tue, Dec 4, 2012 at 12:48 PM, Chris Duncan > wrote: > > If I delete one of the amq.* exchanges, should I be able to > re-create it? I've tried a redeclaration, but that doesn't seem to > work. > > > You can't do that. See: > http://hg.rabbitmq.com/rabbitmq-server/file/d5898ecfbe72/src/rabbit_channel.erl#l529 > > Regards, > > Alvaro > > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss Thanks Alvaro, that's what I'm observing. Last question: would you expect to get an 'ACCESS_REFUSED' error if you tried to declare an exchange with a name like 'amq.test'. I don't get an error, but I do if I try to declare a queue with a similar name. Cheers, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From videlalvaro at gmail.com Tue Dec 4 12:13:53 2012 From: videlalvaro at gmail.com (Alvaro Videla) Date: Tue, 4 Dec 2012 13:13:53 +0100 Subject: [rabbitmq-discuss] What purpose do the default exchanges in a vhost serve? In-Reply-To: <50BDE6DA.7000609@gmail.com> References: <50BDDFD8.507@rabbitmq.com> <50BDE2F1.3070305@gmail.com> <50BDE6DA.7000609@gmail.com> Message-ID: According to that source file check_name/2 seems to be called for both cases, exchange and queue declaration. So I'm not sure why you see such behavior. Cheers, Alvaro On Tue, Dec 4, 2012 at 1:04 PM, Chris Duncan wrote: > On 04/12/12 11:52, Alvaro Videla wrote: > > Hi > > On Tue, Dec 4, 2012 at 12:48 PM, Chris Duncan wrote: > >> If I delete one of the amq.* exchanges, should I be able to re-create it? >> I've tried a redeclaration, but that doesn't seem to work. > > > You can't do that. See: > http://hg.rabbitmq.com/rabbitmq-server/file/d5898ecfbe72/src/rabbit_channel.erl#l529 > > Regards, > > Alvaro > > > _______________________________________________ > rabbitmq-discuss mailing listrabbitmq-discuss at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > > Thanks Alvaro, that's what I'm observing. Last question: would you expect > to get an 'ACCESS_REFUSED' error if you tried to declare an exchange with a > name like 'amq.test'. I don't get an error, but I do if I try to declare a > queue with a similar name. > > Cheers, > > Chris > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Tue Dec 4 12:18:03 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Tue, 04 Dec 2012 12:18:03 +0000 Subject: [rabbitmq-discuss] What purpose do the default exchanges in a vhost serve? In-Reply-To: References: <50BDDFD8.507@rabbitmq.com> <50BDE2F1.3070305@gmail.com> <50BDE6DA.7000609@gmail.com> Message-ID: <50BDE9FB.9000408@rabbitmq.com> On 04/12/12 12:13, Alvaro Videla wrote: > According to that source file check_name/2 seems to be called for both > cases, exchange and queue declaration. So I'm not sure why you see such > behavior. (amqp_client at i)13> amqp_channel:call(C, #'exchange.declare'{exchange = <<"amq.test">>}). ** exception exit: {{shutdown, {server_initiated_close,403, <<"ACCESS_REFUSED - exchange name 'amq.test' contains reserved prefix 'amq.*'">>}}, So, as expected, this doesn't work. Matthias. From celldee at gmail.com Tue Dec 4 12:25:07 2012 From: celldee at gmail.com (Chris Duncan) Date: Tue, 04 Dec 2012 12:25:07 +0000 Subject: [rabbitmq-discuss] What purpose do the default exchanges in a vhost serve? In-Reply-To: <50BDE9FB.9000408@rabbitmq.com> References: <50BDDFD8.507@rabbitmq.com> <50BDE2F1.3070305@gmail.com> <50BDE6DA.7000609@gmail.com> <50BDE9FB.9000408@rabbitmq.com> Message-ID: <50BDEBA3.4070705@gmail.com> On 04/12/12 12:18, Matthias Radestock wrote: > On 04/12/12 12:13, Alvaro Videla wrote: >> According to that source file check_name/2 seems to be called for both >> cases, exchange and queue declaration. So I'm not sure why you see such >> behavior. > > (amqp_client at i)13> amqp_channel:call(C, #'exchange.declare'{exchange = > <<"amq.test">>}). > ** exception exit: {{shutdown, > {server_initiated_close,403, > <<"ACCESS_REFUSED - exchange name > 'amq.test' contains reserved prefix 'amq.*'">>}}, > > So, as expected, this doesn't work. > > > Matthias. > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss OK, thanks for the clarification. I'll do some more testing. Regards, Chris From hadas100.b at gmail.com Tue Dec 4 13:21:51 2012 From: hadas100.b at gmail.com (Hadas) Date: Tue, 4 Dec 2012 05:21:51 -0800 (PST) Subject: [rabbitmq-discuss] Config rabbitMQ to load balance Message-ID: <766f087f-400f-4b8d-a503-6d8b117c753d@googlegroups.com> I use rabbitMQ queues wuth WCF .net. My config looks like: and my service is: It works with this config. Now I want to use queues with HA parameter but my service don't get any message from the queue. What I need to change to get it works? thannk! -------------- next part -------------- An HTML attachment was scrubbed... URL: From celldee at gmail.com Tue Dec 4 13:43:26 2012 From: celldee at gmail.com (Chris Duncan) Date: Tue, 04 Dec 2012 13:43:26 +0000 Subject: [rabbitmq-discuss] What purpose do the default exchanges in a vhost serve? In-Reply-To: <50BDE9FB.9000408@rabbitmq.com> References: <50BDDFD8.507@rabbitmq.com> <50BDE2F1.3070305@gmail.com> <50BDE6DA.7000609@gmail.com> <50BDE9FB.9000408@rabbitmq.com> Message-ID: <50BDFDFE.5060106@gmail.com> On 04/12/12 12:18, Matthias Radestock wrote: > On 04/12/12 12:13, Alvaro Videla wrote: >> According to that source file check_name/2 seems to be called for both >> cases, exchange and queue declaration. So I'm not sure why you see such >> behavior. > > (amqp_client at i)13> amqp_channel:call(C, #'exchange.declare'{exchange = > <<"amq.test">>}). > ** exception exit: {{shutdown, > {server_initiated_close,403, > <<"ACCESS_REFUSED - exchange name > 'amq.test' contains reserved prefix 'amq.*'">>}}, > > So, as expected, this doesn't work. > > > Matthias. > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss Problem was in the client code. Thanks again for your assistance. From tonygarnockjones+rabbitmq at gmail.com Tue Dec 4 14:50:50 2012 From: tonygarnockjones+rabbitmq at gmail.com (Tony Garnock-Jones) Date: Tue, 4 Dec 2012 09:50:50 -0500 Subject: [rabbitmq-discuss] Question on Rabbit's Message Copying In-Reply-To: References: Message-ID: Hi Ashwin, Messages are not explicitly copied - Erlang's message-passing is used to distribute "copies" of each AMQP message to the queue processes it is destined for. Since Erlang terms are immutable, the underlying memory-management system is free to use whichever strategy works best. Sometimes that will be many pointers to a shared value; other times it will be separate copies. I don't know which strategy Erlang chooses at present: you will have to ask the Erlang mailing list or do some experiments of your own. Hope this helps! Regards, Tony On 4 December 2012 01:40, Ashwin Raghav wrote: > Hi tony, > I had a questions about how(whether) rabbit internally copies a message > from an exchange to a queue. > I have read the documentation that says "Exchanges copy messages to queues > using rules called bindings". > > I was wondering whether this is a logical copy or an actual full-on copy. > I ask because I was posed with a question recently on a project that I work > on. Why are you physically copying the same message to so many queues? > Would something like a reference count implementation with just a single > copy of the message not suffice? > > Kindly clarify. > -- > Regards, > Ashwin Raghav Mohan Ganesh > > -- > Tony Garnock-Jones > tonygarnockjones at gmail.com > http://homepages.kcbbs.gen.nz/tonyg/ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From DWise at capulaglobal.com Tue Dec 4 14:53:17 2012 From: DWise at capulaglobal.com (Dan Wise) Date: Tue, 4 Dec 2012 14:53:17 +0000 Subject: [rabbitmq-discuss] Pika 0.9.8 Released In-Reply-To: References: Message-ID: Gavin, I have been using pika 0.9.8 with messages with only properties, but a body size of zero. I am finding that the callback registered with the consumer does not get called. Having debugged through it, I am only getting the Method and Header frames, but no Body frame. Is this expected behaviour? Dan. From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Gavin M. Roy Sent: 18 November 2012 23:30 To: Discussions about RabbitMQ Subject: [rabbitmq-discuss] Pika 0.9.8 Released Pika 0.9.8 is purely a bugfix release addressing issues raised in 0.9.6 and 0.9.7 and has been uploaded to pypi. It has been tested against all the python demos at RabbitMQ.com and appears to work as expected in those cases. Thanks to those who reported issues. The documentation has been updated and can found at http://pika.readthedocs.org/ Bugfixes * Channel.queue_declare/BlockingChannel.queue_declare not setting up callbacks property for empty queue name (Issue #218) * Channel.queue_bind/BlockingChannel.queue_bind not allowing empty routing key * Connection._on_connection_closed calling wrong method in Channel (Issue #219) * Fix tx_commit and tx_rollback bugs in BlockingChannel (Issue #217) If you happen across any bugs, please report them at https://github.com/pika/pika/issues Regards, Gavin ________________________________ This email and any attachments are confidential, for the exclusive attention of the recipient and may also be legally privileged or otherwise protected from disclosure. No information contained herein shall be disclosed to any other person without our written consent unless it is clearly publicly available or otherwise specified by us for onward transmission. If you received this email in error, please notify the sender by return email or by telephone on +44 (0)20 7071 0900; do not duplicate or redistribute it by any means; and delete or otherwise destroy all copies whether in electronic or hard copy form. Any views contained in this email are those of the author and may not reflect those of any Capula entity. We reserve the right to monitor and review all emails within our network to ensure compliance with our policies and to protect our business. Emails are not secure and are not warranted by us to be free of errors nor of viruses nor of other defects which may affect a computer system. Anyone who communicates with us by email is taken to accept these risks. Unless specifically indicated, this email is not an offer or solicitation to buy or sell any investment product. Any information regarding investment products is subject to change without notice. Capula Investment Management LLP is registered in England no. OC313398 and is authorised and regulated by the Financial Services Authority. Capula Investment Services Ltd is registered in England no. 05460265. The registered office of both companies is 4th Floor Reading Bridge House, George Street, Reading, RG1 8LS. The principal place of business of both companies is 8 Lancelot Place, London SW7 1DR. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmr at meetme.com Tue Dec 4 15:02:59 2012 From: gmr at meetme.com (Gavin M. Roy) Date: Tue, 4 Dec 2012 10:02:59 -0500 Subject: [rabbitmq-discuss] Pika 0.9.8 Released In-Reply-To: References: Message-ID: <09D29393C63A4598B6EB547B5EB2F132@meetme.com> Hi Dan, From DWise at capulaglobal.com Tue Dec 4 15:08:49 2012 From: DWise at capulaglobal.com (Dan Wise) Date: Tue, 4 Dec 2012 15:08:49 +0000 Subject: [rabbitmq-discuss] Pika 0.9.8 Released In-Reply-To: <09D29393C63A4598B6EB547B5EB2F132@meetme.com> References: <09D29393C63A4598B6EB547B5EB2F132@meetme.com> Message-ID: Gavin, No probs, these things happen. For the time being I?ve taken a look at your fix, it makes sense, so I?ll hack this into my copy of the library until 0.9.9 is official and I?ve had a chance to run my tests on it. Regards, Dan. From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Gavin M. Roy Sent: 04 December 2012 15:03 To: Discussions about RabbitMQ Subject: Re: [rabbitmq-discuss] Pika 0.9.8 Released Hi Dan, From my testing and working through the issue It does appear that RabbitMQ does not send a body frame if the body size is 0. This issue has been fixed (https://github.com/pika/pika/issues/227) and will be addressed in the next release. I have a few other fixes I am looking to group with this one prior to 0.9.9 being pushed to pypi. If you want to test, master is fairly stable at this point and it can be installed via pip: pip install -e git+https://github.com/pika/pika.git#egg=pika Sorry for the trouble. Gavin On Tuesday, December 4, 2012 at 9:53 AM, Dan Wise wrote: Gavin, I have been using pika 0.9.8 with messages with only properties, but a body size of zero. I am finding that the callback registered with the consumer does not get called. Having debugged through it, I am only getting the Method and Header frames, but no Body frame. Is this expected behaviour? Dan. From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Gavin M. Roy Sent: 18 November 2012 23:30 To: Discussions about RabbitMQ Subject: [rabbitmq-discuss] Pika 0.9.8 Released Pika 0.9.8 is purely a bugfix release addressing issues raised in 0.9.6 and 0.9.7 and has been uploaded to pypi. It has been tested against all the python demos at RabbitMQ.com and appears to work as expected in those cases. Thanks to those who reported issues. The documentation has been updated and can found at http://pika.readthedocs.org/ Bugfixes * Channel.queue_declare/BlockingChannel.queue_declare not setting up callbacks property for empty queue name (Issue #218) * Channel.queue_bind/BlockingChannel.queue_bind not allowing empty routing key * Connection._on_connection_closed calling wrong method in Channel (Issue #219) * Fix tx_commit and tx_rollback bugs in BlockingChannel (Issue #217) If you happen across any bugs, please report them at https://github.com/pika/pika/issues Regards, Gavin ________________________________ This email and any attachments are confidential, for the exclusive attention of the recipient and may also be legally privileged or otherwise protected from disclosure. No information contained herein shall be disclosed to any other person without our written consent unless it is clearly publicly available or otherwise specified by us for onward transmission. If you received this email in error, please notify the sender by return email or by telephone on +44 (0)20 7071 0900; do not duplicate or redistribute it by any means; and delete or otherwise destroy all copies whether in electronic or hard copy form. Any views contained in this email are those of the author and may not reflect those of any Capula entity. We reserve the right to monitor and review all emails within our network to ensure compliance with our policies and to protect our business. Emails are not secure and are not warranted by us to be free of errors nor of viruses nor of other defects which may affect a computer system. Anyone who communicates with us by email is taken to accept these risks. Unless specifically indicated, this email is not an offer or solicitation to buy or sell any investment product. Any information regarding investment products is subject to change without notice. Capula Investment Management LLP is registered in England no. OC313398 and is authorised and regulated by the Financial Services Authority. Capula Investment Services Ltd is registered in England no. 05460265. The registered office of both companies is 4th Floor Reading Bridge House, George Street, Reading, RG1 8LS. The principal place of business of both companies is 8 Lancelot Place, London SW7 1DR. _______________________________________________ rabbitmq-discuss mailing list rabbitmq-discuss at lists.rabbitmq.com https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierpaolo at dropbox.com Tue Dec 4 15:11:32 2012 From: pierpaolo at dropbox.com (Pierpaolo Baccichet) Date: Tue, 4 Dec 2012 07:11:32 -0800 Subject: [rabbitmq-discuss] Latency of publish confirm In-Reply-To: <50BDC0CF.4040900@rabbitmq.com> References: <50BDBA71.6010004@rabbitmq.com> <50BDC0CF.4040900@rabbitmq.com> Message-ID: Hello Matthias, Thanks for your quick response! I double checked the code to make sure that I am not marking messages as persistent and indeed that's the case. The queues and the exchanges are marked as durable but the individual messages I send are not setting the delivery_mode=2. I am a little skeptical the issue here is sync on disk because adding producers does not change the behavior. I ran a test with 5 producers sending 10 messages per second each and I am still seeing exactly the same results. Each producer observes latencies that are multiple of 31 milliseconds (though based on wireshark capture, this latency seems to be dominated by the 25 milliseconds we see in rabbitMQ side). Example output of what I am seeing on the producer side is below: 1354633782.0697601 - completing send 15 took 63.736915588378906 1354633782.233757 - completing send 16 took 63.80009651184082 1354633782.3976469 - completing send 17 took 63.717842102050781 1354633782.5615449 - completing send 18 took 63.707828521728516 1354633782.725692 - completing send 19 took 63.929080963134766 1354633782.8579049 - completing send 20 took 31.997919082641602 1354633783.0219419 - completing send 21 took 63.837051391601562 1354633783.1538589 - completing send 22 took 31.718969345092773 1354633783.285862 - completing send 23 took 31.77189826965332 1354633783.4498329 - completing send 24 took 63.776016235351562 Also, in my previous email I forgot to specify my environment. I am running on rabbitMQ 3.0 Erlang R15B02. Python and pika 0.9.8 on the client side Pierpaolo On Tue, Dec 4, 2012 at 1:22 AM, Matthias Radestock wrote: > On 04/12/12 08:55, Matthias Radestock wrote: > >> I am guessing your messages are marked as persistent. The 25ms is indeed >> an aggregation interval, but for the disk (in particular fsyncs) rather >> than the network. >> > > However, fsyncs also happen when queues and the storage sub-system go > idle, so the interval only kicks in when the system is busy (thus ensuring > that fsyncs aren't delayed indefinitely). > > So I am pretty sure what you are seeing is simply the cost of performing > an fsync per message. There's nothing that can be done about that except > buying faster disks / switching to SSDs. > > Regards, > > Matthias. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierpaolo at dropbox.com Tue Dec 4 15:16:11 2012 From: pierpaolo at dropbox.com (Pierpaolo Baccichet) Date: Tue, 4 Dec 2012 07:16:11 -0800 Subject: [rabbitmq-discuss] Latency of publish confirm In-Reply-To: References: <50BDBA71.6010004@rabbitmq.com> <50BDC0CF.4040900@rabbitmq.com> Message-ID: Found something interesting. I tried to temporarily disable the policy for mirroring of my test queue and now I am consistently getting 7/7.5 milliseconds latency. Seems like the issue is triggered by the mirroring of the queue. Pier On Tue, Dec 4, 2012 at 7:11 AM, Pierpaolo Baccichet wrote: > Hello Matthias, > > Thanks for your quick response! > > I double checked the code to make sure that I am not marking messages as > persistent and indeed that's the case. The queues and the exchanges are > marked as durable but the individual messages I send are not setting the > delivery_mode=2. > > I am a little skeptical the issue here is sync on disk because adding > producers does not change the behavior. I ran a test with 5 producers > sending 10 messages per second each and I am still seeing exactly the same > results. Each producer observes latencies that are multiple of 31 > milliseconds (though based on wireshark capture, this latency seems to be > dominated by the 25 milliseconds we see in rabbitMQ side). Example output > of what I am seeing on the producer side is below: > > 1354633782.0697601 - completing send 15 took 63.736915588378906 > 1354633782.233757 - completing send 16 took 63.80009651184082 > 1354633782.3976469 - completing send 17 took 63.717842102050781 > 1354633782.5615449 - completing send 18 took 63.707828521728516 > 1354633782.725692 - completing send 19 took 63.929080963134766 > 1354633782.8579049 - completing send 20 took 31.997919082641602 > 1354633783.0219419 - completing send 21 took 63.837051391601562 > 1354633783.1538589 - completing send 22 took 31.718969345092773 > 1354633783.285862 - completing send 23 took 31.77189826965332 > 1354633783.4498329 - completing send 24 took 63.776016235351562 > > Also, in my previous email I forgot to specify my environment. I am > running on rabbitMQ 3.0 Erlang R15B02. Python and pika 0.9.8 on the > client side > > Pierpaolo > > > On Tue, Dec 4, 2012 at 1:22 AM, Matthias Radestock wrote: > >> On 04/12/12 08:55, Matthias Radestock wrote: >> >>> I am guessing your messages are marked as persistent. The 25ms is indeed >>> an aggregation interval, but for the disk (in particular fsyncs) rather >>> than the network. >>> >> >> However, fsyncs also happen when queues and the storage sub-system go >> idle, so the interval only kicks in when the system is busy (thus ensuring >> that fsyncs aren't delayed indefinitely). >> >> So I am pretty sure what you are seeing is simply the cost of performing >> an fsync per message. There's nothing that can be done about that except >> buying faster disks / switching to SSDs. >> >> Regards, >> >> Matthias. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmr at meetme.com Tue Dec 4 15:21:07 2012 From: gmr at meetme.com (Gavin M. Roy) Date: Tue, 4 Dec 2012 10:21:07 -0500 Subject: [rabbitmq-discuss] Latency of publish confirm In-Reply-To: References: <50BDBA71.6010004@rabbitmq.com> <50BDC0CF.4040900@rabbitmq.com> Message-ID: Out of curiosity, which adapter are you using? There's a loop in BlockingConnection which will stop what a producer is doing to make sure that there are no pending RPC requests from RabbitMQ. For your type of test, I'd make sure you're using one of the async adapters to be 100% sure it's not on pika's side. On Tuesday, December 4, 2012 at 10:11 AM, Pierpaolo Baccichet wrote: > Hello Matthias, > > Thanks for your quick response! > > I double checked the code to make sure that I am not marking messages as persistent and indeed that's the case. The queues and the exchanges are marked as durable but the individual messages I send are not setting the delivery_mode=2. > > I am a little skeptical the issue here is sync on disk because adding producers does not change the behavior. I ran a test with 5 producers sending 10 messages per second each and I am still seeing exactly the same results. Each producer observes latencies that are multiple of 31 milliseconds (though based on wireshark capture, this latency seems to be dominated by the 25 milliseconds we see in rabbitMQ side). Example output of what I am seeing on the producer side is below: > > 1354633782.0697601 - completing send 15 took 63.736915588378906 > 1354633782.233757 - completing send 16 took 63.80009651184082 > 1354633782.3976469 - completing send 17 took 63.717842102050781 > 1354633782.5615449 - completing send 18 took 63.707828521728516 > 1354633782.725692 - completing send 19 took 63.929080963134766 > 1354633782.8579049 - completing send 20 took 31.997919082641602 > 1354633783.0219419 - completing send 21 took 63.837051391601562 > 1354633783.1538589 - completing send 22 took 31.718969345092773 > 1354633783.285862 - completing send 23 took 31.77189826965332 > 1354633783.4498329 - completing send 24 took 63.776016235351562 > > > Also, in my previous email I forgot to specify my environment. I am running on rabbitMQ 3.0 Erlang R15B02. Python and pika 0.9.8 on the client side > > Pierpaolo > > > On Tue, Dec 4, 2012 at 1:22 AM, Matthias Radestock wrote: > > On 04/12/12 08:55, Matthias Radestock wrote: > > > I am guessing your messages are marked as persistent. The 25ms is indeed > > > an aggregation interval, but for the disk (in particular fsyncs) rather > > > than the network. > > > > However, fsyncs also happen when queues and the storage sub-system go idle, so the interval only kicks in when the system is busy (thus ensuring that fsyncs aren't delayed indefinitely). > > > > So I am pretty sure what you are seeing is simply the cost of performing an fsync per message. There's nothing that can be done about that except buying faster disks / switching to SSDs. > > > > Regards, > > > > Matthias. > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com (mailto:rabbitmq-discuss at lists.rabbitmq.com) > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierpaolo at dropbox.com Tue Dec 4 15:30:27 2012 From: pierpaolo at dropbox.com (Pierpaolo Baccichet) Date: Tue, 4 Dec 2012 07:30:27 -0800 Subject: [rabbitmq-discuss] Latency of publish confirm In-Reply-To: References: <50BDBA71.6010004@rabbitmq.com> <50BDC0CF.4040900@rabbitmq.com> Message-ID: Hello Gavin, I am using the select based adapter (with a layer on top to manage reconnection logics to different nodes in the cluster and thread-safety). I instrumented the code right around the select call to the socket and as far as I can tell, client side is ok. As per my last email, it definitely looks like some timeout is triggering with mirrored queues. Pier On Tue, Dec 4, 2012 at 7:21 AM, Gavin M. Roy wrote: > Out of curiosity, which adapter are you using? There's a loop in > BlockingConnection which will stop what a producer is doing to make sure > that there are no pending RPC requests from RabbitMQ. For your type of > test, I'd make sure you're using one of the async adapters to be 100% sure > it's not on pika's side. > > On Tuesday, December 4, 2012 at 10:11 AM, Pierpaolo Baccichet wrote: > > Hello Matthias, > > Thanks for your quick response! > > I double checked the code to make sure that I am not marking messages as > persistent and indeed that's the case. The queues and the exchanges are > marked as durable but the individual messages I send are not setting the > delivery_mode=2. > > I am a little skeptical the issue here is sync on disk because adding > producers does not change the behavior. I ran a test with 5 producers > sending 10 messages per second each and I am still seeing exactly the same > results. Each producer observes latencies that are multiple of 31 > milliseconds (though based on wireshark capture, this latency seems to be > dominated by the 25 milliseconds we see in rabbitMQ side). Example output > of what I am seeing on the producer side is below: > > 1354633782.0697601 - completing send 15 took 63.736915588378906 > 1354633782.233757 - completing send 16 took 63.80009651184082 > 1354633782.3976469 - completing send 17 took 63.717842102050781 > 1354633782.5615449 - completing send 18 took 63.707828521728516 > 1354633782.725692 - completing send 19 took 63.929080963134766 > 1354633782.8579049 - completing send 20 took 31.997919082641602 > 1354633783.0219419 - completing send 21 took 63.837051391601562 > 1354633783.1538589 - completing send 22 took 31.718969345092773 > 1354633783.285862 - completing send 23 took 31.77189826965332 > 1354633783.4498329 - completing send 24 took 63.776016235351562 > > Also, in my previous email I forgot to specify my environment. I am > running on rabbitMQ 3.0 Erlang R15B02. Python and pika 0.9.8 on the > client side > > Pierpaolo > > > On Tue, Dec 4, 2012 at 1:22 AM, Matthias Radestock wrote: > > On 04/12/12 08:55, Matthias Radestock wrote: > > I am guessing your messages are marked as persistent. The 25ms is indeed > an aggregation interval, but for the disk (in particular fsyncs) rather > than the network. > > > However, fsyncs also happen when queues and the storage sub-system go > idle, so the interval only kicks in when the system is busy (thus ensuring > that fsyncs aren't delayed indefinitely). > > So I am pretty sure what you are seeing is simply the cost of performing > an fsync per message. There's nothing that can be done about that except > buying faster disks / switching to SSDs. > > Regards, > > Matthias. > > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashwinraghav at gmail.com Tue Dec 4 15:34:44 2012 From: ashwinraghav at gmail.com (Ashwin Raghav) Date: Tue, 4 Dec 2012 10:34:44 -0500 Subject: [rabbitmq-discuss] Question on Rabbit's Message Copying In-Reply-To: References: Message-ID: Thanks Tony, That helped my understanding. On Tue, Dec 4, 2012 at 9:50 AM, Tony Garnock-Jones < tonygarnockjones+rabbitmq at gmail.com> wrote: > Hi Ashwin, > > Messages are not explicitly copied - Erlang's message-passing is used to > distribute "copies" of each AMQP message to the queue processes it is > destined for. Since Erlang terms are immutable, the underlying > memory-management system is free to use whichever strategy works best. > Sometimes that will be many pointers to a shared value; other times it will > be separate copies. I don't know which strategy Erlang chooses at present: > you will have to ask the Erlang mailing list or do some experiments of your > own. Hope this helps! > > Regards, > Tony > > > On 4 December 2012 01:40, Ashwin Raghav wrote: > >> Hi tony, >> I had a questions about how(whether) rabbit internally copies a message >> from an exchange to a queue. >> I have read the documentation that says "Exchanges copy messages to >> queues using rules called bindings". >> >> I was wondering whether this is a logical copy or an actual full-on copy. >> I ask because I was posed with a question recently on a project that I work >> on. Why are you physically copying the same message to so many queues? >> Would something like a reference count implementation with just a single >> copy of the message not suffice? >> >> Kindly clarify. >> -- >> Regards, >> Ashwin Raghav Mohan Ganesh >> >> -- >> Tony Garnock-Jones >> tonygarnockjones at gmail.com >> http://homepages.kcbbs.gen.nz/tonyg/ >> >> -- Regards, Ashwin Raghav Mohan Ganesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Tue Dec 4 16:18:16 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Tue, 04 Dec 2012 16:18:16 +0000 Subject: [rabbitmq-discuss] Latency of publish confirm In-Reply-To: References: <50BDBA71.6010004@rabbitmq.com> <50BDC0CF.4040900@rabbitmq.com> Message-ID: <50BE2248.4070103@rabbitmq.com> Hi. Yes you are right, there is 25ms of latency sending confirms inside the broker when using mirrored queues. I'll file a bug to get this fixed. Cheers, Simon On 04/12/12 15:16, Pierpaolo Baccichet wrote: > Found something interesting. I tried to temporarily disable the policy > for mirroring of my test queue and now I am consistently getting 7/7.5 > milliseconds latency. Seems like the issue is triggered by the mirroring > of the queue. > > Pier > > > On Tue, Dec 4, 2012 at 7:11 AM, Pierpaolo Baccichet > > wrote: > > Hello Matthias, > > Thanks for your quick response! > > I double checked the code to make sure that I am not marking > messages as persistent and indeed that's the case. The queues and > the exchanges are marked as durable but the individual messages I > send are not setting the delivery_mode=2. > > I am a little skeptical the issue here is sync on disk because > adding producers does not change the behavior. I ran a test with 5 > producers sending 10 messages per second each and I am still seeing > exactly the same results. Each producer observes latencies that are > multiple of 31 milliseconds (though based on wireshark capture, this > latency seems to be dominated by the 25 milliseconds we see in > rabbitMQ side). Example output of what I am seeing on the producer > side is below: > > 1354633782.0697601 - completing send 15 took 63.736915588378906 > 1354633782.233757 - completing send 16 took 63.80009651184082 > 1354633782.3976469 - completing send 17 took 63.717842102050781 > 1354633782.5615449 - completing send 18 took 63.707828521728516 > 1354633782.725692 - completing send 19 took 63.929080963134766 > 1354633782.8579049 - completing send 20 took 31.997919082641602 > 1354633783.0219419 - completing send 21 took 63.837051391601562 > 1354633783.1538589 - completing send 22 took 31.718969345092773 > 1354633783.285862 - completing send 23 took 31.77189826965332 > 1354633783.4498329 - completing send 24 took 63.776016235351562 > > Also, in my previous email I forgot to specify my environment. I am > running on rabbitMQ 3.0 Erlang R15B02. Python and pika 0.9.8 on the > client side > > Pierpaolo > > > On Tue, Dec 4, 2012 at 1:22 AM, Matthias Radestock > > wrote: > > On 04/12/12 08:55, Matthias Radestock wrote: > > I am guessing your messages are marked as persistent. The > 25ms is indeed > an aggregation interval, but for the disk (in particular > fsyncs) rather > than the network. > > > However, fsyncs also happen when queues and the storage > sub-system go idle, so the interval only kicks in when the > system is busy (thus ensuring that fsyncs aren't delayed > indefinitely). > > So I am pretty sure what you are seeing is simply the cost of > performing an fsync per message. There's nothing that can be > done about that except buying faster disks / switching to SSDs. > > Regards, > > Matthias. > > > > > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > -- Simon MacMullen RabbitMQ, VMware From rbraman at ehrdoctors.com Tue Dec 4 16:19:24 2012 From: rbraman at ehrdoctors.com (Richard Braman) Date: Tue, 4 Dec 2012 11:19:24 -0500 Subject: [rabbitmq-discuss] Timeout during Connection negotiation Message-ID: Hi, We have been doing some development with the rabbit client and server, and as such have developed 3 separate clients. 1 of the client application runs a number of client instances each configured with its own exchanges , routing keys, and queues as adapters inside an integration engine. The clients all do basic consume and publish fun We tested the configuration on a local RabbitMQ server and never experienced this problem. When we reconfigured the clients to use a different (remote) RabbitMQ server, we started experiencing the error below. The funny thing is, if we shut down the majority of the clients (there are approximately 16 running, and say just run 3 clients) the error will not occur. At some point when you start running the other clients, one will bomb with this error. This happens with the client that uses Java code and with the client using Spring Integration. Thanks in advance for the help. 14:59:11.530 ERROR [task-scheduler-5][org.springframework.integration.handler.LoggingHandler] org.springframework.integration.MessageHandlingException: error oc$ at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.integration.monitor.SimpleMessageHandlerMetrics.handleMessage(SimpleMessageHandlerMetrics.java:106) at org.springframework.integration.monitor.SimpleMessageHandlerMetrics.invoke(SimpleMessageHandlerMetrics.java:86) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy3.handleMessage(Unknown Source) at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:114) at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:101) at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:61) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:157) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.integration.monitor.DirectChannelMetrics.monitorSend(DirectChannelMetrics.java:113) at org.springframework.integration.monitor.DirectChannelMetrics.doInvoke(DirectChannelMetrics.java:97) at org.springframework.integration.monitor.DirectChannelMetrics.invoke(DirectChannelMetrics.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy0.send(Unknown Source) at org.springframework.integration.core.MessagingTemplate.doSend(MessagingTemplate.java:288) at org.springframework.integration.core.MessagingTemplate.send(MessagingTemplate.java:149) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendMessage(AbstractReplyProducingMessageHandler.java:175) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendReplyMessage(AbstractReplyProducingMessageHandler.java:159) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.produceReply(AbstractReplyProducingMessageHandler.java:124) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleResult(AbstractReplyProducingMessageHandler.java:118) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:100) at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:61) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:157) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.integration.monitor.DirectChannelMetrics.monitorSend(DirectChannelMetrics.java:113) at org.springframework.integration.monitor.DirectChannelMetrics.doInvoke(DirectChannelMetrics.java:97) at org.springframework.integration.monitor.DirectChannelMetrics.invoke(DirectChannelMetrics.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy0.send(Unknown Source) at org.springframework.integration.core.MessagingTemplate.doSend(MessagingTemplate.java:288) at org.springframework.integration.core.MessagingTemplate.send(MessagingTemplate.java:149) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendMessage(AbstractReplyProducingMessageHandler.java:175) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendReplyMessage(AbstractReplyProducingMessageHandler.java:159) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.produceReply(AbstractReplyProducingMessageHandler.java:124) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleResult(AbstractReplyProducingMessageHandler.java:118) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:100) at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:73) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.integration.monitor.SimpleMessageHandlerMetrics.handleMessage(SimpleMessageHandlerMetrics.java:106) at org.springframework.integration.monitor.SimpleMessageHandlerMetrics.invoke(SimpleMessageHandlerMetrics.java:86) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy3.handleMessage(Unknown Source) at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:114) at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:101) at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:61) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:157) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.integration.monitor.SimpleMessageHandlerMetrics.handleMessage(SimpleMessageHandlerMetrics.java:106) at org.springframework.integration.monitor.SimpleMessageHandlerMetrics.invoke(SimpleMessageHandlerMetrics.java:86) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy3.handleMessage(Unknown Source) at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:114) at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:101) at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:61) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:157) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.integration.monitor.DirectChannelMetrics.monitorSend(DirectChannelMetrics.java:113) at org.springframework.integration.monitor.DirectChannelMetrics.doInvoke(DirectChannelMetrics.java:97) at org.springframework.integration.monitor.DirectChannelMetrics.invoke(DirectChannelMetrics.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy0.send(Unknown Source) at org.springframework.integration.core.MessagingTemplate.doSend(MessagingTemplate.java:288) at org.springframework.integration.core.MessagingTemplate.send(MessagingTemplate.java:149) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendMessage(AbstractReplyProducingMessageHandler.java:175) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendReplyMessage(AbstractReplyProducingMessageHandler.java:159) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.produceReply(AbstractReplyProducingMessageHandler.java:124) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleResult(AbstractReplyProducingMessageHandler.java:118) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:100) at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:73) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.integration.monitor.SimpleMessageHandlerMetrics.handleMessage(SimpleMessageHandlerMetrics.java:106) at org.springframework.integration.monitor.SimpleMessageHandlerMetrics.invoke(SimpleMessageHandlerMetrics.java:86) at org.springframework.integration.monitor.DirectChannelMetrics.monitorSend(DirectChannelMetrics.java:113) at org.springframework.integration.monitor.DirectChannelMetrics.doInvoke(DirectChannelMetrics.java:97) at org.springframework.integration.monitor.DirectChannelMetrics.invoke(DirectChannelMetrics.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy0.send(Unknown Source) at org.springframework.integration.core.MessagingTemplate.doSend(MessagingTemplate.java:288) at org.springframework.integration.core.MessagingTemplate.send(MessagingTemplate.java:149) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendMessage(AbstractReplyProducingMessageHandler.java:175) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendReplyMessage(AbstractReplyProducingMessageHandler.java:159) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.produceReply(AbstractReplyProducingMessageHandler.java:124) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleResult(AbstractReplyProducingMessageHandler.java:118) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:100) at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:73) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.integration.monitor.SimpleMessageHandlerMetrics.handleMessage(SimpleMessageHandlerMetrics.java:106) at org.springframework.integration.monitor.SimpleMessageHandlerMetrics.invoke(SimpleMessageHandlerMetrics.java:86) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy3.handleMessage(Unknown Source) at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:114) at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:101) at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:61) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:157) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.integration.monitor.DirectChannelMetrics.monitorSend(DirectChannelMetrics.java:113) at org.springframework.integration.monitor.DirectChannelMetrics.doInvoke(DirectChannelMetrics.java:97) at org.springframework.integration.monitor.DirectChannelMetrics.invoke(DirectChannelMetrics.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy0.send(Unknown Source) at org.springframework.integration.core.MessagingTemplate.doSend(MessagingTemplate.java:288) at org.springframework.integration.core.MessagingTemplate.send(MessagingTemplate.java:149) at org.springframework.integration.endpoint.SourcePollingChannelAdapter.doPoll(SourcePollingChannelAdapter.java:97) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy3.handleMessage(Unknown Source) at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:114) at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:101) at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:61) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:157) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.integration.monitor.DirectChannelMetrics.monitorSend(DirectChannelMetrics.java:113) at org.springframework.integration.monitor.DirectChannelMetrics.doInvoke(DirectChannelMetrics.java:97) at org.springframework.integration.monitor.DirectChannelMetrics.invoke(DirectChannelMetrics.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy0.send(Unknown Source) at org.springframework.integration.core.MessagingTemplate.doSend(MessagingTemplate.java:288) at org.springframework.integration.core.MessagingTemplate.send(MessagingTemplate.java:149) at org.springframework.integration.endpoint.SourcePollingChannelAdapter.doPoll(SourcePollingChannelAdapter.java:97) at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:146) at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:144) at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:207) at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52) at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48) at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49) at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:202) at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: org.springframework.amqp.AmqpIOException: java.io.IOException at org.springframework.amqp.rabbit.connection.RabbitUtils.convertRabbitAccessException(RabbitUtils.java:109) at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:118) at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:179) at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils$1.createConnection(ConnectionFactoryUtils.java:77) at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.doGetTransactionalResourceHolder(ConnectionFactoryUtils.java:121) at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.getTransactionalResourceHolder(ConnectionFactoryUtils.java:67) at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:144) at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:207) at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52) at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48) at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49) at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:202) at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: org.springframework.amqp.AmqpIOException: java.io.IOException at org.springframework.amqp.rabbit.connection.RabbitUtils.convertRabbitAccessException(RabbitUtils.java:109) at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:118) at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:179) at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils$1.createConnection(ConnectionFactoryUtils.java:77) at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.doGetTransactionalResourceHolder(ConnectionFactoryUtils.java:121) at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.getTransactionalResourceHolder(ConnectionFactoryUtils.java:67) at org.springframework.amqp.rabbit.connection.RabbitAccessor.getTransactionalResourceHolder(RabbitAccessor.java:100) at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:402) at org.springframework.amqp.rabbit.core.RabbitTemplate.send(RabbitTemplate.java:225) at org.springframework.amqp.rabbit.core.RabbitTemplate.convertAndSend(RabbitTemplate.java:258) at org.springframework.integration.amqp.outbound.AmqpOutboundEndpoint.send(AmqpOutboundEndpoint.java:137) at org.springframework.integration.amqp.outbound.AmqpOutboundEndpoint.handleRequestMessage(AmqpOutboundEndpoint.java:131) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:97) at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:73) ... 126 more Caused by: java.io.IOException at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:106) at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:102) at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:353) at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:516) at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:533) at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:116) ... 138 more Caused by: com.rabbitmq.client.ShutdownSignalException: connection error; reason: java.net.SocketTimeoutException: Timeout during Connection negotiation at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:67) at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:33) at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:343) at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:306) ... 141 more Caused by: java.net.SocketTimeoutException: Timeout during Connection negotiation at com.rabbitmq.client.impl.AMQConnection.handleSocketTimeout(AMQConnection.java:559) at com.rabbitmq.client.impl.AMQConnection.access$500(AMQConnection.java:53) at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:534) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jerryk at rbcon.com Tue Dec 4 19:18:29 2012 From: jerryk at rbcon.com (Jerry Kuch) Date: Tue, 4 Dec 2012 11:18:29 -0800 (PST) Subject: [rabbitmq-discuss] [SOS] About how to send HTTP request to MQ server using JSON-PRC from mobile devices In-Reply-To: <006a01cdced4$9cba8330$d62f8990$@li@quanshi.com> References: <006a01cdced4$9cba8330$d62f8990$@li@quanshi.com> Message-ID: <1354648709162-23857.post@n5.nabble.com> Hi, Chenglin: Although I'm not totally sure what your goals are (and it might be helpful to learn more!), you likely have a couple of options to look at for doing what you seem to want to do. First off, there's probably no reason for you to worry about implementing HTTP yourself... :-) For libraries you can use from mobile clients, your options are likely: 1) On Android: You can make use of our regular Java client, as various folks have. One has documented his experiences in this blog post: http://simonwdixon.wordpress.com/2011/06/03/getting-started-with-rabbitmq-on-android-part-1/ 2) On iPhone/iOS: Here, without Java, you're going to be working in Objective C, so I'd suggest you look at the RabbitMQ C library, which you can find on GitHub at: https://github.com/rabbitmq/rabbitmq-c I'm starting to work on something using it now, and it's reasonably straightforward to get it building in Xcode. Should you pursue this route and have trouble, pay us a visit again on the mailing list and we can try and get you back on course. If you're wanting to expose messaging to web browsers, you ought to look at the RabbitMQ Web-STOMP plugin. It implements the STOMP protocol (Steaming Text Oriented Message), which gives you an interoperable wire format that lets a STOMP client talk to RabbitMQ, with STOMP exposed through WebSockets. This is Rabbit's contemporary answer to exposing messaging to things running in web browsers and you can read more here: http://www.rabbitmq.com/blog/2012/05/14/introducing-rabbitmq-web-stomp/ It's bundled in the just released RabbitMQ 3.0 by default, so you should find it fairly easy to start experimenting with. Best regards, Jerry -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/SOS-About-how-to-send-HTTP-request-to-MQ-server-using-JSON-PRC-from-mobile-devices-tp23758p23857.html Sent from the RabbitMQ mailing list archive at Nabble.com. From pierpaolo at dropbox.com Tue Dec 4 19:26:15 2012 From: pierpaolo at dropbox.com (Pierpaolo Baccichet) Date: Tue, 4 Dec 2012 11:26:15 -0800 Subject: [rabbitmq-discuss] Latency of publish confirm In-Reply-To: <50BE2248.4070103@rabbitmq.com> References: <50BDBA71.6010004@rabbitmq.com> <50BDC0CF.4040900@rabbitmq.com> <50BE2248.4070103@rabbitmq.com> Message-ID: Do you happen to already know where the timeout is? I would be happy to change it on my local repo and run a validation on it On Tue, Dec 4, 2012 at 8:18 AM, Simon MacMullen wrote: > Hi. Yes you are right, there is 25ms of latency sending confirms inside > the broker when using mirrored queues. I'll file a bug to get this fixed. > > Cheers, Simon > > > On 04/12/12 15:16, Pierpaolo Baccichet wrote: > >> Found something interesting. I tried to temporarily disable the policy >> for mirroring of my test queue and now I am consistently getting 7/7.5 >> milliseconds latency. Seems like the issue is triggered by the mirroring >> of the queue. >> >> Pier >> >> >> On Tue, Dec 4, 2012 at 7:11 AM, Pierpaolo Baccichet >> **> wrote: >> >> Hello Matthias, >> >> Thanks for your quick response! >> >> I double checked the code to make sure that I am not marking >> messages as persistent and indeed that's the case. The queues and >> the exchanges are marked as durable but the individual messages I >> send are not setting the delivery_mode=2. >> >> I am a little skeptical the issue here is sync on disk because >> adding producers does not change the behavior. I ran a test with 5 >> producers sending 10 messages per second each and I am still seeing >> exactly the same results. Each producer observes latencies that are >> multiple of 31 milliseconds (though based on wireshark capture, this >> latency seems to be dominated by the 25 milliseconds we see in >> rabbitMQ side). Example output of what I am seeing on the producer >> side is below: >> >> 1354633782.0697601 - completing send 15 took 63.736915588378906 >> 1354633782.233757 - completing send 16 took 63.80009651184082 >> 1354633782.3976469 - completing send 17 took 63.717842102050781 >> 1354633782.5615449 - completing send 18 took 63.707828521728516 >> 1354633782.725692 - completing send 19 took 63.929080963134766 >> 1354633782.8579049 - completing send 20 took 31.997919082641602 >> 1354633783.0219419 - completing send 21 took 63.837051391601562 >> 1354633783.1538589 - completing send 22 took 31.718969345092773 >> 1354633783.285862 - completing send 23 took 31.77189826965332 >> 1354633783.4498329 - completing send 24 took 63.776016235351562 >> >> Also, in my previous email I forgot to specify my environment. I am >> running on rabbitMQ 3.0 Erlang R15B02. Python and pika 0.9.8 on the >> client side >> >> Pierpaolo >> >> >> On Tue, Dec 4, 2012 at 1:22 AM, Matthias Radestock >> **> wrote: >> >> On 04/12/12 08:55, Matthias Radestock wrote: >> >> I am guessing your messages are marked as persistent. The >> 25ms is indeed >> an aggregation interval, but for the disk (in particular >> fsyncs) rather >> than the network. >> >> >> However, fsyncs also happen when queues and the storage >> sub-system go idle, so the interval only kicks in when the >> system is busy (thus ensuring that fsyncs aren't delayed >> indefinitely). >> >> So I am pretty sure what you are seeing is simply the cost of >> performing an fsync per message. There's nothing that can be >> done about that except buying faster disks / switching to SSDs. >> >> Regards, >> >> Matthias. >> >> >> >> >> >> ______________________________**_________________ >> rabbitmq-discuss mailing list >> rabbitmq-discuss at lists.**rabbitmq.com >> https://lists.rabbitmq.com/**cgi-bin/mailman/listinfo/**rabbitmq-discuss >> >> > > -- > Simon MacMullen > RabbitMQ, VMware > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruifavas at hotmail.com Tue Dec 4 17:50:44 2012 From: ruifavas at hotmail.com (Rui) Date: Tue, 4 Dec 2012 09:50:44 -0800 (PST) Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs Message-ID: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> Rabbit 3.0 is hanging. We have a number of existing .net applications using Rabbit and when we update the server to 3.0 Rabbit stops responding. Rolling back the server solves the problem. Do we need to upgrade the client library at the same time? Any logs I could look at to try to troubleshoot the problem? -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Tue Dec 4 21:26:46 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Tue, 04 Dec 2012 21:26:46 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs In-Reply-To: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> Message-ID: <50BE6A96.1030109@rabbitmq.com> On 04/12/12 17:50, Rui wrote: > We have a number of existing .net applications using Rabbit and when we > update the server to 3.0 Rabbit stops responding. Rolling back the > server solves the problem. > > Do we need to upgrade the client library at the same time? No. > Any logs I could look at to try to troubleshoot the problem? Check the logs first, in case the problem is something obvious. In particular watch out for any memory or disk space alarms. Regards, Matthias. From carl.hoerberg at gmail.com Wed Dec 5 07:12:30 2012 From: carl.hoerberg at gmail.com (carlhoerberg) Date: Tue, 4 Dec 2012 23:12:30 -0800 (PST) Subject: [rabbitmq-discuss] rabbitmq 3.0 and immediate publish Message-ID: <1354691550807-23861.post@n5.nabble.com> When publishing a message with the immediate=true flag from Ruby AMQP 0.9.8 the servers logs: AMQP connection <0.5302.0> (running), channel 1 - error: {amqp_error,not_implemented,"immediate=true",'basic.publish'} It didn't do that with rabbitmq 2.8.7.. -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/rabbitmq-3-0-and-immediate-publish-tp23861.html Sent from the RabbitMQ mailing list archive at Nabble.com. From matthias at rabbitmq.com Wed Dec 5 07:25:43 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Wed, 05 Dec 2012 07:25:43 +0000 Subject: [rabbitmq-discuss] rabbitmq 3.0 and immediate publish In-Reply-To: <1354691550807-23861.post@n5.nabble.com> References: <1354691550807-23861.post@n5.nabble.com> Message-ID: <50BEF6F7.4060405@rabbitmq.com> On 05/12/12 07:12, carlhoerberg wrote: > When publishing a message with the immediate=true flag from Ruby AMQP 0.9.8 > the servers logs: > > AMQP connection <0.5302.0> (running), channel 1 - error: > {amqp_error,not_implemented,"immediate=true",'basic.publish'} > > It didn't do that with rabbitmq 2.8.7.. From the release notes at http://www.rabbitmq.com/release-notes/README-3.0.0.txt feature removal 23896 remove support for AMQP's "immediate" publish mode Looks like we forgot to include that in http://www.rabbitmq.com/blog/2012/11/19/breaking-things-with-rabbitmq-3-0/ Matthias. From honglilai at gmail.com Wed Dec 5 07:42:27 2012 From: honglilai at gmail.com (Hongli Lai) Date: Tue, 4 Dec 2012 23:42:27 -0800 (PST) Subject: [rabbitmq-discuss] 'rabbitmqctl status' doesn't work in RabbitMQ 3.0.0 Message-ID: I cannot find a bug tracker so I'm posting this here. It appears that the 'rabbitmqctl status' command is broken. I'm on Debian 6 and I installed the Debian package as provided on rabbitmq.com. Here's what happens: # /etc/init.d/rabbitmq-server start Starting message broker: rabbitmq-server. To confirm that RabbitMQ is properly started: # ps auxw | grep rabbitmq rabbitmq 11278 29.4 7.4 64104 37124 ? Sl 02:38 0:01 /usr/lib/erlang/erts-5.8/bin/beam .... But: # rabbitmqctl status Status of node rabbit at web1 ... Error: {{case_clause,{unknown_request}}, [{rabbit_vm,'-sup_memory/1-lc$^0/1-0-',1}, {rabbit_vm,sup_memory,1}, {rabbit_vm,'-sup_memory/1-lc$^0/1-0-',1}, {rabbit_vm,sup_memory,1}, {rabbit_vm,'-plugin_memory/0-lc$^0/1-0-',1}, {rabbit_vm,plugin_memory,0}, {rabbit_vm,memory,0}, {rabbit,status,0}]} # /etc/init.d/rabbitmq-server status Status of node rabbit at web1 ... Error: {{case_clause,{unknown_request}}, [{rabbit_vm,'-sup_memory/1-lc$^0/1-0-',1}, {rabbit_vm,sup_memory,1}, {rabbit_vm,'-sup_memory/1-lc$^0/1-0-',1}, {rabbit_vm,sup_memory,1}, {rabbit_vm,'-plugin_memory/0-lc$^0/1-0-',1}, {rabbit_vm,plugin_memory,0}, {rabbit_vm,memory,0}, {rabbit,status,0}]} This is a big problem because '/etc/init.d/rabbitmq-server stop' also doesn't work anymore. The init script uses 'rabbitmqctl status' to check whether the server needs to be stopped. -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Wed Dec 5 08:08:09 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Wed, 05 Dec 2012 08:08:09 +0000 Subject: [rabbitmq-discuss] 'rabbitmqctl status' doesn't work in RabbitMQ 3.0.0 In-Reply-To: References: Message-ID: <50BF00E9.4020208@rabbitmq.com> On 05/12/12 07:42, Hongli Lai wrote: > I cannot find a bug tracker so I'm posting this here. It appears that > the 'rabbitmqctl status' command is broken. I'm on Debian 6 and I > installed the Debian package as provided on rabbitmq.com. Here's what > happens: > > # /etc/init.d/rabbitmq-server start > Starting message broker: rabbitmq-server. > > > To confirm that RabbitMQ is properly started: > > # ps auxw | grep rabbitmq > rabbitmq 11278 29.4 7.4 64104 37124 ? Sl 02:38 0:01 > /usr/lib/erlang/erts-5.8/bin/beam .... > > > But: > > # rabbitmqctl status > Status of node rabbit at web1 ... > Error: {{case_clause,{unknown_request}}, > [{rabbit_vm,'-sup_memory/1-lc$^0/1-0-',1}, > {rabbit_vm,sup_memory,1}, > {rabbit_vm,'-sup_memory/1-lc$^0/1-0-',1}, > {rabbit_vm,sup_memory,1}, > {rabbit_vm,'-plugin_memory/0-lc$^0/1-0-',1}, > {rabbit_vm,plugin_memory,0}, > {rabbit_vm,memory,0}, > {rabbit,status,0}]} > # /etc/init.d/rabbitmq-server status > Status of node rabbit at web1 ... > Error: {{case_clause,{unknown_request}}, > [{rabbit_vm,'-sup_memory/1-lc$^0/1-0-',1}, > {rabbit_vm,sup_memory,1}, > {rabbit_vm,'-sup_memory/1-lc$^0/1-0-',1}, > {rabbit_vm,sup_memory,1}, > {rabbit_vm,'-plugin_memory/0-lc$^0/1-0-',1}, > {rabbit_vm,plugin_memory,0}, > {rabbit_vm,memory,0}, > {rabbit,status,0}]} > > > This is a big problem because '/etc/init.d/rabbitmq-server stop' also > doesn't work anymore. The init script uses 'rabbitmqctl status' to check > whether the server needs to be stopped. I suspect this might be an unintended version incompatibility. Looks like you are running Erlang R14A. It may be worth trying R15B-3. Before you do that though, please a) post the rabbit at web1.log and rabbit at web1-sasl.log, and b) post the output of rabbitmqctl eval 'application:which_applications().' Regards, Matthias. From walsh.stephen at gmail.com Wed Dec 5 08:58:52 2012 From: walsh.stephen at gmail.com (Stephen Walsh) Date: Wed, 5 Dec 2012 00:58:52 -0800 (PST) Subject: [rabbitmq-discuss] RabbtitMQ and NLB (Network Load Balancer) Message-ID: <6cba07e6-122e-46ef-95cf-9904a1c1dd01@googlegroups.com> hi all, Just wondering if anyone has used windows Server 2008 R2 NLB service as a TCP load balancer with RabbitMQ 3.0.0. I have and can see the CPU spikes on both machine within the NLB and RabbitMQ Cluster. However when i shut down one of the clusters via the NLB Manager. RabbitMQ fails to send any messages at all. "Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.". All messages are going to the Virtual IP of the NLB, Any ideas? Steve W. -------------- next part -------------- An HTML attachment was scrubbed... URL: From walsh.stephen at gmail.com Wed Dec 5 09:33:01 2012 From: walsh.stephen at gmail.com (Stephen Walsh) Date: Wed, 5 Dec 2012 01:33:01 -0800 (PST) Subject: [rabbitmq-discuss] RabbtitMQ and NLB (Network Load Balancer) In-Reply-To: <6cba07e6-122e-46ef-95cf-9904a1c1dd01@googlegroups.com> References: <6cba07e6-122e-46ef-95cf-9904a1c1dd01@googlegroups.com> Message-ID: <6119e4e1-82b9-46ab-b380-e20b85dcda29@googlegroups.com> Ok so a simple reconnect on failure fixed the error, But now i need to find a way to tell it the server is now back up. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Wed Dec 5 10:33:22 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Wed, 05 Dec 2012 10:33:22 +0000 Subject: [rabbitmq-discuss] Latency of publish confirm In-Reply-To: References: <50BDBA71.6010004@rabbitmq.com> <50BDC0CF.4040900@rabbitmq.com> <50BE2248.4070103@rabbitmq.com> Message-ID: <50BF22F2.2070802@rabbitmq.com> On 04/12/12 19:26, Pierpaolo Baccichet wrote: > Do you happen to already know where the timeout is? I would be happy to > change it on my local repo and run a validation on it Sure. The timeout in question is BROADCAST_TIMER here: http://hg.rabbitmq.com/rabbitmq-server/file/stable/src/gm.erl#l394 Just reducing that should improve latency in your case (at the cost of throughput in other cases). The real fix is going to be a tiny bit more involved though. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From emile at rabbitmq.com Wed Dec 5 10:35:33 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Wed, 05 Dec 2012 10:35:33 +0000 Subject: [rabbitmq-discuss] Config rabbitMQ to load balance In-Reply-To: <766f087f-400f-4b8d-a503-6d8b117c753d@googlegroups.com> References: <766f087f-400f-4b8d-a503-6d8b117c753d@googlegroups.com> Message-ID: <50BF2375.70806@rabbitmq.com> Hi, On 04/12/12 13:21, Hadas wrote: > Now I want to use queues with HA parameter but my service don't get > any message from the queue. We do plan to make it possible to exercise more control over the properties of queues in the WCF binding, but this is not possible as a configuration option yet. In the meantime you can modify the library and change the way queues are declared. The declaration is at this location: http://hg.rabbitmq.com/rabbitmq-dotnet-client/file/04c9091a663e/projects/wcf/RabbitMQ.ServiceModel/src/serviceModel/RabbitMQInputChannel.cs#l153 Also bear in mind that from version 3.0.0 you can set policies that control whether queues are HA. Unfortunately queue names are autogenerated, so there is no easy way to make the policy apply only to queues generated by the WCF binding. For more details see http://www.rabbitmq.com/ha.html -Emile From honglilai at gmail.com Wed Dec 5 10:55:48 2012 From: honglilai at gmail.com (Hongli Lai) Date: Wed, 5 Dec 2012 11:55:48 +0100 Subject: [rabbitmq-discuss] 'rabbitmqctl status' doesn't work in RabbitMQ 3.0.0 In-Reply-To: <50BF00E9.4020208@rabbitmq.com> References: <50BF00E9.4020208@rabbitmq.com> Message-ID: On Wed, Dec 5, 2012 at 9:08 AM, Matthias Radestock wrote: > I suspect this might be an unintended version incompatibility. Looks like > you are running Erlang R14A. It may be worth trying R15B-3. Before you do > that though, please > > a) post the rabbit at web1.log and rabbit at web1-sasl.log, and > > b) post the output of > rabbitmqctl eval 'application:which_applications().' I cannot use any other Erlang version. I'm stuck with the Erlang version that Debian provides. I've attached rabbit at web1.log in this email. This is right after starting RabbitMQ and issuing 'rabbitmqctl status'. rabbit at web1-sasl.log is empty so I did not attach it. -------------- next part -------------- A non-text attachment was scrubbed... Name: rabbit at web1.log Type: application/octet-stream Size: 1051 bytes Desc: not available URL: From matthias at rabbitmq.com Wed Dec 5 11:03:07 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Wed, 05 Dec 2012 11:03:07 +0000 Subject: [rabbitmq-discuss] 'rabbitmqctl status' doesn't work in RabbitMQ 3.0.0 In-Reply-To: References: <50BF00E9.4020208@rabbitmq.com> Message-ID: <50BF29EB.7010501@rabbitmq.com> On 05/12/12 10:55, Hongli Lai wrote: >> b) post the output of >> rabbitmqctl eval 'application:which_applications().' Please do that. Matthias. From simlu at su.se Wed Dec 5 11:05:30 2012 From: simlu at su.se (Simon =?iso-8859-1?Q?Lundstr=F6m?=) Date: Wed, 5 Dec 2012 12:05:30 +0100 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <50BC8B53.4050103@rabbitmq.com> References: <20121112114419.GG360@kaka.it.su.se> <50A229F6.1040407@rabbitmq.com> <20121113143505.GL360@kaka.it.su.se> <50A2818F.3090308@rabbitmq.com> <20121129164559.GW335@kaka.it.su.se> <50BC8675.8030702@rabbitmq.com> <50BC8B53.4050103@rabbitmq.com> Message-ID: <20121205110530.GG335@kaka.it.su.se> On Mon, 2012-12-03 at 11:21:55 +0000, Tim Watson wrote: > If you want to avoid getting the exit signals, you can pass 'eof' in > the options which (as per the open_port/2 docs) will change this > behaviour such that: Thanks, this is what I did. Code got much less messy = ) > If you want to avoid blocking (the reader! yes you do I would've > thought) then you might consider using an 'insulator' process in > which to open and interact with the port. This allows you to timeout > and/or terminate the port without blocking the reader process - some > port commands are blocking and if your C code (or external > application or whatever) gets stuck then you could be in trouble. Please elaborate on this. I've tried to find any information about using an 'insulator' process. It's mentioned in the source code of eunit but that's the only relevant hit I got. I understand what you mean by not blocking the read process though but I thought using a port was async? When I tested this, I could authenticate multiple users while authentication was hanging? I thought using would solve all my timeout problems? I'm going to lower timeout though, it's way to high ATM = ) One thing that bothers me though is that if my auth backend refuses a user it takes several seconds for the internal one to respond. Ideas about this and how I can troubleshoot this? =INFO REPORT==== 5-Dec-2012::10:36:54 === accepting AMQP connection <0.492.0> (130.237.95.133:59962 -> 77.238.35.76:5671) =ERROR REPORT==== 5-Dec-2012::10:36:54 === exit_status: 1 =ERROR REPORT==== 5-Dec-2012::10:36:54 === eof: [false] =ERROR REPORT==== 5-Dec-2012::10:36:54 === kinit: false! =ERROR REPORT==== 5-Dec-2012::10:36:57 === closing AMQP connection <0.492.0> (130.237.95.133:59962 -> 77.238.35.76:5671): {channel0_error,starting, {error,function_clause,'connection.start_ok', [{rabbit_auth_backend_internal,check_password,[<<"topsecret_but_wrong_password">>,<<>>]}, {rabbit_auth_backend_internal,internal_check_user_login,2}, {rabbit_access_control,'-check_user_login/2-fun-0-',4}, {lists,foldl,3}, {rabbit_reader,auth_phase,2}, {rabbit_reader,handle_method0,3}, {rabbit_reader,handle_input,3}, {rabbit_reader,recvloop,2}]}} AFAICT, it tries to find the hash in the internal DB but fails because there is no password for that user. Thank you, both Simon and Tim, once again for your time, - Simon From simon at rabbitmq.com Wed Dec 5 11:09:14 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Wed, 05 Dec 2012 11:09:14 +0000 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <20121205110530.GG335@kaka.it.su.se> References: <20121112114419.GG360@kaka.it.su.se> <50A229F6.1040407@rabbitmq.com> <20121113143505.GL360@kaka.it.su.se> <50A2818F.3090308@rabbitmq.com> <20121129164559.GW335@kaka.it.su.se> <50BC8675.8030702@rabbitmq.com> <50BC8B53.4050103@rabbitmq.com> <20121205110530.GG335@kaka.it.su.se> Message-ID: <50BF2B5A.4030409@rabbitmq.com> On 05/12/12 11:05, Simon Lundstr?m wrote: > On Mon, 2012-12-03 at 11:21:55 +0000, Tim Watson wrote: >> If you want to avoid blocking (the reader! yes you do I would've >> thought) then you might consider using an 'insulator' process in >> which to open and interact with the port. This allows you to timeout >> and/or terminate the port without blocking the reader process - some >> port commands are blocking and if your C code (or external >> application or whatever) gets stuck then you could be in trouble. > > Please elaborate on this. I've tried to find any information about using > an 'insulator' process. It's mentioned in the source code of eunit but that's > the only relevant hit I got. I understand what you mean by not blocking > the read process though but I thought using a port was async? > When I tested this, I could authenticate multiple users while > authentication was hanging? I'm not sure Tim's suggestion makes sense in fact. At this point the reader process *has* to block, it has to wait to see if the user can be authenticated before proceeding. And there is one reader per connection. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From simon at rabbitmq.com Wed Dec 5 11:17:43 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Wed, 05 Dec 2012 11:17:43 +0000 Subject: [rabbitmq-discuss] 'rabbitmqctl status' doesn't work in RabbitMQ 3.0.0 In-Reply-To: <50BF29EB.7010501@rabbitmq.com> References: <50BF00E9.4020208@rabbitmq.com> <50BF29EB.7010501@rabbitmq.com> Message-ID: <50BF2D57.80707@rabbitmq.com> On 05/12/12 11:03, Matthias Radestock wrote: > On 05/12/12 10:55, Hongli Lai wrote: >>> b) post the output of >>> rabbitmqctl eval 'application:which_applications().' > > Please do that. No need. I've traced this to the rabbitmq_tracing plugin. To the OP: thank you for the bug report, this will be fixed in 3.0.1. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From matthias at rabbitmq.com Wed Dec 5 11:20:18 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Wed, 05 Dec 2012 11:20:18 +0000 Subject: [rabbitmq-discuss] 'rabbitmqctl status' doesn't work in RabbitMQ 3.0.0 In-Reply-To: <50BF2D57.80707@rabbitmq.com> References: <50BF00E9.4020208@rabbitmq.com> <50BF29EB.7010501@rabbitmq.com> <50BF2D57.80707@rabbitmq.com> Message-ID: <50BF2DF2.10402@rabbitmq.com> On 05/12/12 11:17, Simon MacMullen wrote: > I've traced this to the rabbitmq_tracing plugin. > > To the OP: thank you for the bug report, this will be fixed in 3.0.1. ...meanwhile, if you disable the tracing plugin then 'rabbitmqctl status' should work fine. Matthias. From tim at rabbitmq.com Wed Dec 5 12:01:31 2012 From: tim at rabbitmq.com (Tim Watson) Date: Wed, 5 Dec 2012 12:01:31 +0000 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <50BF2B5A.4030409@rabbitmq.com> References: <20121112114419.GG360@kaka.it.su.se> <50A229F6.1040407@rabbitmq.com> <20121113143505.GL360@kaka.it.su.se> <50A2818F.3090308@rabbitmq.com> <20121129164559.GW335@kaka.it.su.se> <50BC8675.8030702@rabbitmq.com> <50BC8B53.4050103@rabbitmq.com> <20121205110530.GG335@kaka.it.su.se> <50BF2B5A.4030409@rabbitmq.com> Message-ID: <8F6E4796-D862-4305-A256-EE1AC757EF05@rabbitmq.com> Guys On 5 Dec 2012, at 11:09, Simon MacMullen wrote: > On 05/12/12 11:05, Simon Lundstr?m wrote: >> On Mon, 2012-12-03 at 11:21:55 +0000, Tim Watson wrote: >>> If you want to avoid blocking (the reader! yes you do I would've >>> thought) then you might consider using an 'insulator' process in >>> which to open and interact with the port. This allows you to timeout >>> and/or terminate the port without blocking the reader process - some >>> port commands are blocking and if your C code (or external >>> application or whatever) gets stuck then you could be in trouble. >> >> Please elaborate on this. I've tried to find any information about using >> an 'insulator' process. It's mentioned in the source code of eunit but that's >> the only relevant hit I got. I understand what you mean by not blocking >> the read process though but I thought using a port was async? >> When I tested this, I could authenticate multiple users while >> authentication was hanging? > Well, you've solved this in a different way is all. ;) In your code, you do a couple of things that alleviate the need for an insulator. First of all, instead of communicating using stdio, you send your port commands asynchronously using `Port ! Command` which is not blocking. Secondly, in your loop (that gets data back from the port) you use `after 5000 -> [{error,timedout}|Acc]` to terminate the loop, so this won't block indefinitely either. As long as you're happy that authentication always has to work within 5 seconds then this approach is ok and you don't need to do anything else. If you want to allow longer authentication times and still terminate gracefully when, for example, the broker is being shut down, then you've got to do more work. The reason you can authenticate multiple times is because of what Simon says below - there is *one reader (process) per connection* and the auth backend is just a module with functions that get called in the reader process. I hope that makes sense. One thing I would suggest is that if you do hit `after 5000` and time out whilst waiting for the external program to complete, it *might* be a good idea to close the port so as not to leak resources. Check the open_port documentation for details. > I'm not sure Tim's suggestion makes sense in fact. At this point the reader process *has* to block, it has to wait to see if the user can be authenticated before proceeding. And there is one reader per connection. > I'm not suggesting that the reader should *not* block whilst authenticating - of course it should. But what I *am* suggesting is that the way in which it blocks should be controlled carefully. My point was that an external resource such as a port program can potentially block indefinitely (unless an 'after' or similar timeout is in place) and that could make the reader unresponsive even to a supervision tree shutting down. By using an insulator process, you remain 'responsive' when, for example, a supervisor is sending you exit(ReaderPid, shutdown) messages that you *do* want to respond to. If you're stuck in erlang:port_command/2 or erlang:port_call/2 or whatever, then nothing except a brutal_kill will terminate the process, and we don't use brutal_kill to stop our supervision trees. This is the exact problem I've had to solve in systest, where we need to ensure a clean shutdown when a supervision tree is being taken out of action. Anyway, this is not relevant as the OP is using `after 5000` to timeout the external call. > Cheers, Simon > > -- > Simon MacMullen > RabbitMQ, VMware From matthias at rabbitmq.com Wed Dec 5 12:28:31 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Wed, 05 Dec 2012 12:28:31 +0000 Subject: [rabbitmq-discuss] rabbitmq 3.0 and immediate publish In-Reply-To: <50BEF6F7.4060405@rabbitmq.com> References: <1354691550807-23861.post@n5.nabble.com> <50BEF6F7.4060405@rabbitmq.com> Message-ID: <50BF3DEF.3030602@rabbitmq.com> On 05/12/12 07:25, Matthias Radestock wrote: > Looks like we forgot to include that in > http://www.rabbitmq.com/blog/2012/11/19/breaking-things-with-rabbitmq-3-0/ Simon has just added that. Matthias. From michael.s.klishin at gmail.com Wed Dec 5 12:37:48 2012 From: michael.s.klishin at gmail.com (Michael Klishin) Date: Wed, 5 Dec 2012 16:37:48 +0400 Subject: [rabbitmq-discuss] rabbitmq 3.0 and immediate publish In-Reply-To: <1354691550807-23861.post@n5.nabble.com> References: <1354691550807-23861.post@n5.nabble.com> Message-ID: 2012/12/5 carlhoerberg > When publishing a message with the immediate=true flag from Ruby AMQP 0.9.8 > the servers logs: > > AMQP connection <0.5302.0> (running), channel 1 - error: > {amqp_error,not_implemented,"immediate=true",'basic.publish'} > Just in case someone else may hit this: https://twitter.com/rubyamqp/status/276303989996417024 -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Wed Dec 5 12:45:19 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Wed, 05 Dec 2012 12:45:19 +0000 Subject: [rabbitmq-discuss] Latency of publish confirm In-Reply-To: <50BF22F2.2070802@rabbitmq.com> References: <50BDBA71.6010004@rabbitmq.com> <50BDC0CF.4040900@rabbitmq.com> <50BE2248.4070103@rabbitmq.com> <50BF22F2.2070802@rabbitmq.com> Message-ID: <50BF41DF.8040307@rabbitmq.com> On 05/12/12 10:33, Simon MacMullen wrote: > On 04/12/12 19:26, Pierpaolo Baccichet wrote: >> Do you happen to already know where the timeout is? I would be happy to >> change it on my local repo and run a validation on it > > Sure. > > The timeout in question is BROADCAST_TIMER here: > > http://hg.rabbitmq.com/rabbitmq-server/file/stable/src/gm.erl#l394 > > Just reducing that should improve latency in your case (at the cost of > throughput in other cases). The real fix is going to be a tiny bit more > involved though. The real fix is here: http://hg.rabbitmq.com/rabbitmq-server/rev/b1f129a5a85b. This should appear in tonight's nightly build (http://www.rabbitmq.com/nightlies/rabbitmq-server/current/) in about 16 hours. Matthias. From David.Buckingham at cbeyond.net Wed Dec 5 13:07:07 2012 From: David.Buckingham at cbeyond.net (David Buckingham) Date: Wed, 5 Dec 2012 08:07:07 -0500 Subject: [rabbitmq-discuss] RabbtitMQ and NLB (Network Load Balancer) In-Reply-To: <6119e4e1-82b9-46ab-b380-e20b85dcda29@googlegroups.com> References: <6cba07e6-122e-46ef-95cf-9904a1c1dd01@googlegroups.com> <6119e4e1-82b9-46ab-b380-e20b85dcda29@googlegroups.com> Message-ID: In your NLB configuration, it sounds like you may have Single Affinity set for the Port Rules (I believe that this may be the default). Try setting the affinity to none. From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Stephen Walsh Sent: Wednesday, December 05, 2012 4:33 AM To: rabbitmq-discuss at googlegroups.com Subject: Re: [rabbitmq-discuss] RabbtitMQ and NLB (Network Load Balancer) Ok so a simple reconnect on failure fixed the error, But now i need to find a way to tell it the server is now back up. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simlu at su.se Wed Dec 5 13:12:21 2012 From: simlu at su.se (Simon =?iso-8859-1?Q?Lundstr=F6m?=) Date: Wed, 5 Dec 2012 14:12:21 +0100 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <8F6E4796-D862-4305-A256-EE1AC757EF05@rabbitmq.com> References: <20121112114419.GG360@kaka.it.su.se> <50A229F6.1040407@rabbitmq.com> <20121113143505.GL360@kaka.it.su.se> <50A2818F.3090308@rabbitmq.com> <20121129164559.GW335@kaka.it.su.se> <50BC8675.8030702@rabbitmq.com> <50BC8B53.4050103@rabbitmq.com> <20121205110530.GG335@kaka.it.su.se> <50BF2B5A.4030409@rabbitmq.com> <8F6E4796-D862-4305-A256-EE1AC757EF05@rabbitmq.com> Message-ID: <20121205131221.GH335@kaka.it.su.se> On Wed, 2012-12-05 at 12:01:31 +0000, Tim Watson wrote: > In your code, you do a couple of things that alleviate the need for an insulator. First of all, instead of communicating using stdio, you send your port commands asynchronously using `Port ! Command` which is not blocking. Secondly, in your loop (that gets data back from the port) you use `after 5000 -> [{error,timedout}|Acc]` to terminate the loop, so this won't block indefinitely either. As long as you're happy that authentication always has to work within 5 seconds then this approach is ok and you don't need to do anything else. Cool. > If you want to allow longer authentication times and still terminate gracefully when, for example, the broker is being shut down, then you've got to do more work. I'll keep this in mind and deal with it if any problems/issues arise. > One thing I would suggest is that if you do hit `after 5000` and time out whilst waiting for the external program to complete, it *might* be a good idea to close the port so as not to leak resources. Check the open_port documentation for details. Ah, I didn't read the eof documentation good enough it seems. "The port will not be closed at the end of the file and produce an exit signal." Thank you, good catch! Another thing I spotted on the option exit_status was: "If the eof option has been given as well, the eof message and the exit_status message appear in an unspecified order." Suggestions? "It works for me" at the moment ; P How can I keep a "global" (within the same authentication process) state? I belive I have read that records can be used for this? (Or is this another question for erlang-discuss? ; ) What would you recommend? Thank you so much again both of you, - Simon From javiermarcon at gmail.com Wed Dec 5 13:35:53 2012 From: javiermarcon at gmail.com (Javier Marcon) Date: Wed, 05 Dec 2012 10:35:53 -0300 Subject: [rabbitmq-discuss] stomp fanout exchange Message-ID: <50BF4DB9.8000206@gmail.com> Hello I'm using rabbitmq 2.8.7 in Windows and I use the perl stomp clientto comunicate with rabbitmq, and it work perfectly. Now I need to make a new queue but I need it to be a fanout exchange. Does anybody know how to make a fanout exchange with Stomp::Client perl plugin? Thanks, Javier. From simlu at su.se Wed Dec 5 13:42:04 2012 From: simlu at su.se (Simon =?iso-8859-1?Q?Lundstr=F6m?=) Date: Wed, 5 Dec 2012 14:42:04 +0100 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <20121205131221.GH335@kaka.it.su.se> References: <50A229F6.1040407@rabbitmq.com> <20121113143505.GL360@kaka.it.su.se> <50A2818F.3090308@rabbitmq.com> <20121129164559.GW335@kaka.it.su.se> <50BC8675.8030702@rabbitmq.com> <50BC8B53.4050103@rabbitmq.com> <20121205110530.GG335@kaka.it.su.se> <50BF2B5A.4030409@rabbitmq.com> <8F6E4796-D862-4305-A256-EE1AC757EF05@rabbitmq.com> <20121205131221.GH335@kaka.it.su.se> Message-ID: <20121205134204.GK335@kaka.it.su.se> On Wed, 2012-12-05 at 14:12:21 +0100, Simon Lundstr?m wrote: > > One thing I would suggest is that if you do hit `after 5000` and time out whilst waiting for the external program to complete, it *might* be a good idea to close the port so as not to leak resources. Check the open_port documentation for details. > > Ah, I didn't read the eof documentation good enough it seems. > > "The port will not be closed at the end of the file and produce an exit signal." > > Thank you, good catch! Hm, no matter where I put the port_close/1 call (I've tried kinit/2, kinit/3 and loop/2) and even if I receive the {'EXIT'} message in my loop/2 I still get: =CRASH REPORT==== 5-Dec-2012::14:30:43 === crasher: initial call: rabbit_reader:init/4 pid: <0.280.0> registered_name: [] exception exit: {unexpected_message,{'EXIT',#Port<0.6598>,normal}} in function rabbit_reader:handle_other/3 in call from rabbit_reader:start_connection/7 ancestors: [<0.277.0>,rabbit_tcp_client_sup,rabbit_sup,<0.149.0>] messages: [] links: [<0.277.0>] dictionary: [] trap_exit: true status: running heap_size: 2584 stack_size: 24 reductions: 6594 neighbours: =SUPERVISOR REPORT==== 5-Dec-2012::14:30:43 === Supervisor: {<0.277.0>,rabbit_connection_sup} Context: child_terminated Reason: {unexpected_message,{'EXIT',#Port<0.6598>,normal}} Offender: [{pid,<0.280.0>}, {name,reader}, {mfa,{rabbit_reader,start_link, [<0.279.0>,<0.278.0>, #Fun]}}, {restart_type,intrinsic}, {shutdown,4294967295}, {child_type,worker}] =SUPERVISOR REPORT==== 5-Dec-2012::14:30:43 === Supervisor: {<0.277.0>,rabbit_connection_sup} Context: shutdown Reason: reached_max_restart_intensity Offender: [{pid,<0.280.0>}, {name,reader}, {mfa,{rabbit_reader,start_link, [<0.279.0>,<0.278.0>, #Fun]}}, {restart_type,intrinsic}, {shutdown,4294967295}, {child_type,worker}] Must I use my own supervisor (which I have removed before)? How can I check if the Port leakage actually exists? How can I see what ports are open in my process? Thanks, - Simon From srikanthtns at gmail.com Wed Dec 5 14:13:24 2012 From: srikanthtns at gmail.com (srikanth tns) Date: Wed, 5 Dec 2012 06:13:24 -0800 Subject: [rabbitmq-discuss] RabbitMQ 2.3.1 Crashes Message-ID: Hello , we are using rabbitmq 2.3.1 as the queuing mechanism to support the mcollective infrastructure. We see the rabbitmq is crashing frequently when the messages are broadcasted. can someone please here? Thanks Srikanth Here is the crash report: =CRASH REPORT==== 5-Dec-2012::08:05:08 === crasher: pid: <0.13580.6652> registered_name: [] exception error: no case clause matching {error,{bad_character,4}} in function rabbit_stomp_reader:process_received_bytes/2 in call from rabbit_stomp_reader:init/1 initial call: rabbit_stomp_reader:init/1 ancestors: [<0.13578.6652>,rabbit_stomp_client_sup_sup,rabbit_stomp_sup, <0.230.0>] messages: [] links: [<0.13578.6652>,#Port<0.207393>] dictionary: [] trap_exit: false status: running heap_size: 233 stack_size: 23 reductions: 131 neighbours: =SUPERVISOR REPORT==== 5-Dec-2012::08:05:08 === Supervisor: {<0.13578.6652>, rabbit_stomp_client_sup} Context: child_terminated Reason: {case_clause,{error,{bad_character,4}}} Offender: [{pid,<0.13580.6652>}, {name,rabbit_stomp_reader}, {mfa,{rabbit_stomp_reader,start_link,[<0.13579.6652>]}}, {restart_type,intrinsic}, {shutdown,4294967295}, {child_type,worker}] =SUPERVISOR REPORT==== 5-Dec-2012::08:05:08 === Supervisor: {<0.13578.6652>, rabbit_stomp_client_sup} Context: shutdown Reason: reached_max_restart_intensity Offender: [{pid,<0.13580.6652>}, {name,rabbit_stomp_reader}, {mfa,{rabbit_stomp_reader,start_link,[<0.13579.6652>]}}, {restart_type,intrinsic}, {shutdown,4294967295}, {child_type,worker}] =CRASH REPORT==== 5-Dec-2012::08:05:08 === crasher: pid: <0.13579.6652> registered_name: [] exception exit: {noproc, {gen_server,call, [none,{close,200,<<"Goodbye">>},infinity]}} in function gen_server:terminate/6 initial call: rabbit_stomp_processor:init/1 ancestors: [<0.13578.6652>,rabbit_stomp_client_sup_sup,rabbit_stomp_sup, <0.230.0>] messages: [] links: [] dictionary: [] trap_exit: true status: running heap_size: 233 stack_size: 23 reductions: 185 neighbours: =SUPERVISOR REPORT==== 5-Dec-2012::08:05:08 === Supervisor: {<0.13578.6652>, rabbit_stomp_client_sup} Context: shutdown_error Reason: {noproc,{gen_server,call, [none, {close,200,<<"Goodbye">>}, infinity]}} Offender: [{pid,<0.13579.6652>}, {name,rabbit_stomp_processor}, {mfa, {rabbit_stomp_processor,start_link, [#Port<0.207393>, #Fun]}}, {restart_type,intrinsic}, {shutdown,4294967295}, {child_type,worker}] -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Wed Dec 5 14:48:07 2012 From: tim at rabbitmq.com (Tim Watson) Date: Wed, 5 Dec 2012 14:48:07 +0000 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <20121205134204.GK335@kaka.it.su.se> References: <50A229F6.1040407@rabbitmq.com> <20121113143505.GL360@kaka.it.su.se> <50A2818F.3090308@rabbitmq.com> <20121129164559.GW335@kaka.it.su.se> <50BC8675.8030702@rabbitmq.com> <50BC8B53.4050103@rabbitmq.com> <20121205110530.GG335@kaka.it.su.se> <50BF2B5A.4030409@rabbitmq.com> <8F6E4796-D862-4305-A256-EE1AC757EF05@rabbitmq.com> <20121205131221.GH335@kaka.it.su.se> <20121205134204.GK335@kaka.it.su.se> Message-ID: <24509631-CA1C-4A55-8E66-87E11E4E5D83@rabbitmq.com> Simon, This is why I suggested using an insulator process. The process that calls open_port is the controlling process and when the port is closed, it will send the controlling process and exit signal. You override that by passing exit_status, but you also supply 'eof' and the ordering between the eof and exit_status messages is not guaranteed. When you time out in the after clause, you have *no idea* whether or not the port program is still running, which could lead to any of - leaking resources such as file descriptors used for the port - erroneous messages sent to the reader process (such as the 'EXIT' that is arriving when you call port_close) I would strongly suggest considering an insulator process for this. Do you need some pointers to doing that? Let me cook something up for you..... In this code, notice that the command I'm running is guaranteed to finish within the 2000 ms timeout. I don't care about that, because it is only the exit status that matters to me. If you need to examine the stdio, then that's another matter but you aren't currently doing that. Now if you change the command to something that will run for a *long* time such as `ls -laR /` it will *not* finish quickly enough and yes all is still well and there are no stray messages. BUT ..... that command `ls -laR /` will not respond to stdin and will therefore *continue running even AFTER the port is closed* - so you need to be very careful to ensure that your program will actually terminate. I use hack to enforce this sometimes: Cmd = "/usr/bin/env sh -c \"(cat; kill 0) | " ++ Exec ++ " \"" Anyway, here is the module. Note that lots of the wait_for_this and that is just to demonstrate what's going on. Hope this helps. -module(foo). -export([main/1]). main(_) -> Result = run_insulator(), io:format("Result = ~p~n", [Result]), wait_for_stray_messages(). wait_for_stray_messages() -> receive Any -> io:format("got stray message ~p~n", [Any]), wait_for_stray_messages() after 5000 -> io:format("we're done - no stray messages/EXIT's and we're good to go...~n") end. run_insulator() -> {Pid, MRef} = spawn_monitor(fun insulated/0), receive {'DOWN', MRef, process, Pid, Reason} -> case Reason of {done, Result} -> Result; Other -> {error, Other} end after 2000 -> %% get rid of any pending monitor notifications erlang:demonitor(MRef, [flush]), exit(Pid, shutdown), false end. insulated() -> process_flag(trap_exit, true), Port = open_port({spawn, "ls -la"}, [ exit_status, use_stdio, eof, {line, 1024}]), Result = loop(Port), erlang:port_close(Port), exit({done, Result}). loop(Port) -> Self = self(), receive %% we do not appear to care about the stdio {Port, {data, {_, _}}} -> loop(Port); {Port, eof} -> loop(Port); {Port, {exit_status, 0}} -> true; {Port, {exit_status, _N}} -> false; {'EXIT', Self, shutdown} -> false end. Cheers, Tim From tim at rabbitmq.com Wed Dec 5 15:04:42 2012 From: tim at rabbitmq.com (Tim Watson) Date: Wed, 5 Dec 2012 15:04:42 +0000 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <24509631-CA1C-4A55-8E66-87E11E4E5D83@rabbitmq.com> References: <50A229F6.1040407@rabbitmq.com> <20121113143505.GL360@kaka.it.su.se> <50A2818F.3090308@rabbitmq.com> <20121129164559.GW335@kaka.it.su.se> <50BC8675.8030702@rabbitmq.com> <50BC8B53.4050103@rabbitmq.com> <20121205110530.GG335@kaka.it.su.se> <50BF2B5A.4030409@rabbitmq.com> <8F6E4796-D862-4305-A256-EE1AC757EF05@rabbitmq.com> <20121205131221.GH335@kaka.it.su.se> <20121205134204.GK335@kaka.it.su.se> <24509631-CA1C-4A55-8E66-87E11E4E5D83@rabbitmq.com> Message-ID: Simon Personally, I think you should do this another way. Write a Native Implemented Function (NIF) in C and wrap it up as an Erlang module. Then you can just call the NIF directly from your auth module. You don't have to do all this spawning and looping and exit handling and insulating. It's *much* easier. Having said that, I can't help you with writing a NIF at the moment as we're all quite busy getting 3.0.1 ready. I'd suggest going over to the erlang-questions mailing list and saying "I want to do kerberos authentication using a NIF - can somebody point me in the right direction...". Honestly it's much simpler than all this open_port malarky, especially if you're comfortable writing C, which you do seem to be. The erlang part of it is minimal, and the rabbit auth module you've written just calls the NIF stub functions as though they were regular erlang functions. No processes, no message handling: simple. Cheers, Tim On 5 Dec 2012, at 14:48, Tim Watson wrote: > Simon, > > This is why I suggested using an insulator process. The process that calls open_port is the controlling process and when the port is closed, it will send the controlling process and exit signal. You override that by passing exit_status, but you also supply 'eof' and the ordering between the eof and exit_status messages is not guaranteed. When you time out in the after clause, you have *no idea* whether or not the port program is still running, which could lead to any of > > - leaking resources such as file descriptors used for the port > - erroneous messages sent to the reader process (such as the 'EXIT' that is arriving when you call port_close) > > I would strongly suggest considering an insulator process for this. Do you need some pointers to doing that? Let me cook something up for you..... > > In this code, notice that the command I'm running is guaranteed to finish within the 2000 ms timeout. I don't care about that, because it is only the exit status that matters to me. If you need to examine the stdio, then that's another matter but you aren't currently doing that. > > Now if you change the command to something that will run for a *long* time such as `ls -laR /` it will *not* finish quickly enough and yes all is still well and there are no stray messages. BUT ..... that command `ls -laR /` will not respond to stdin and will therefore *continue running even AFTER the port is closed* - so you need to be very careful to ensure that your program will actually terminate. I use hack to enforce this sometimes: > > Cmd = "/usr/bin/env sh -c \"(cat; kill 0) | " ++ Exec ++ " \"" > > Anyway, here is the module. Note that lots of the wait_for_this and that is just to demonstrate what's going on. Hope this helps. > > > > -module(foo). > > -export([main/1]). > > main(_) -> > Result = run_insulator(), > io:format("Result = ~p~n", [Result]), > wait_for_stray_messages(). > > wait_for_stray_messages() -> > receive > Any -> io:format("got stray message ~p~n", [Any]), > wait_for_stray_messages() > after 5000 -> > io:format("we're done - no stray messages/EXIT's and we're good to go...~n") > end. > > run_insulator() -> > {Pid, MRef} = spawn_monitor(fun insulated/0), > receive > {'DOWN', MRef, process, Pid, Reason} -> > case Reason of > {done, Result} -> Result; > Other -> {error, Other} > end > after 2000 -> > %% get rid of any pending monitor notifications > erlang:demonitor(MRef, [flush]), > exit(Pid, shutdown), > false > end. > > insulated() -> > process_flag(trap_exit, true), > Port = open_port({spawn, "ls -la"}, [ > exit_status, use_stdio, eof, > {line, 1024}]), > Result = loop(Port), > erlang:port_close(Port), > exit({done, Result}). > > loop(Port) -> > Self = self(), > receive > %% we do not appear to care about the stdio > {Port, {data, {_, _}}} -> loop(Port); > {Port, eof} -> loop(Port); > {Port, {exit_status, 0}} -> true; > {Port, {exit_status, _N}} -> false; > {'EXIT', Self, shutdown} -> false > end. > > > > Cheers, > > Tim > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From simlu at su.se Wed Dec 5 15:55:30 2012 From: simlu at su.se (Simon =?iso-8859-1?Q?Lundstr=F6m?=) Date: Wed, 5 Dec 2012 16:55:30 +0100 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: References: <20121129164559.GW335@kaka.it.su.se> <50BC8675.8030702@rabbitmq.com> <50BC8B53.4050103@rabbitmq.com> <20121205110530.GG335@kaka.it.su.se> <50BF2B5A.4030409@rabbitmq.com> <8F6E4796-D862-4305-A256-EE1AC757EF05@rabbitmq.com> <20121205131221.GH335@kaka.it.su.se> <20121205134204.GK335@kaka.it.su.se> <24509631-CA1C-4A55-8E66-87E11E4E5D83@rabbitmq.com> Message-ID: <20121205155530.GL335@kaka.it.su.se> On Wed, 2012-12-05 at 15:04:42 +0000, Tim Watson wrote: > Personally, I think you should do this another way. Write a Native Implemented Function (NIF) in C and wrap it up as an Erlang module. Then you can just call the NIF directly from your auth module. You don't have to do all this spawning and looping and exit handling and insulating. It's *much* easier. Looks like that way. "It is a simpler and more efficient way of calling C-code than using port drivers. NIFs are most suitable for synchronous functions like foo and bar in the example, that does some relatively short calculations without side effects and return the result." Since auth is blocking/synchronous this is suitable I'd reckon. > Having said that, I can't help you with writing a NIF at the moment as we're all quite busy getting 3.0.1 ready. No worries! I appreciate all the help you and Simon have given me! http://www.erlang.org/doc/tutorial/nif.html looks like enough to get me going. > I'd suggest going over to the erlang-questions mailing list and saying "I want to do kerberos authentication using a NIF - can somebody point me in the right direction...". Honestly it's much simpler than all this open_port malarky, especially if you're comfortable writing C, which you do seem to be. Oh Tim, you make me blush! ; P Actually, this is only the second C-project that I've done (ever). > The erlang part of it is minimal, and the rabbit auth module you've written just calls the NIF stub functions as though they were regular erlang functions. No processes, no message handling: simple. Yep, looks really simple! What is that saying... "to stumble on the finish line"? = ) Thanks, - Simon From pierpaolo at dropbox.com Wed Dec 5 16:30:44 2012 From: pierpaolo at dropbox.com (Pierpaolo Baccichet) Date: Wed, 5 Dec 2012 08:30:44 -0800 Subject: [rabbitmq-discuss] Latency of publish confirm In-Reply-To: <50BF41DF.8040307@rabbitmq.com> References: <50BDBA71.6010004@rabbitmq.com> <50BDC0CF.4040900@rabbitmq.com> <50BE2248.4070103@rabbitmq.com> <50BF22F2.2070802@rabbitmq.com> <50BF41DF.8040307@rabbitmq.com> Message-ID: Awesome. I'll give it a shot and report back. Pier On Wed, Dec 5, 2012 at 4:45 AM, Matthias Radestock wrote: > On 05/12/12 10:33, Simon MacMullen wrote: > >> On 04/12/12 19:26, Pierpaolo Baccichet wrote: >> >>> Do you happen to already know where the timeout is? I would be happy to >>> change it on my local repo and run a validation on it >>> >> >> Sure. >> >> The timeout in question is BROADCAST_TIMER here: >> >> http://hg.rabbitmq.com/**rabbitmq-server/file/stable/**src/gm.erl#l394 >> >> Just reducing that should improve latency in your case (at the cost of >> throughput in other cases). The real fix is going to be a tiny bit more >> involved though. >> > > The real fix is here: http://hg.rabbitmq.com/**rabbitmq-server/rev/** > b1f129a5a85b . > This should appear in tonight's nightly build (http://www.rabbitmq.com/** > nightlies/rabbitmq-server/**current/) > in about 16 hours. > > Matthias. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From taylste at gmail.com Wed Dec 5 20:29:03 2012 From: taylste at gmail.com (Steven Taylor) Date: Wed, 5 Dec 2012 20:29:03 +0000 Subject: [rabbitmq-discuss] SOA Versioning Message-ID: Hi, just thinking about version control in SOA at the moment + trying to navigate the ideas of immutability, granularity, and a patterns like WebSphere Service Registry and Repository. Judging by the reading material I've turned up, it's turning out to be quite a big topic. Are you aware of any good lightweight techniques, rules of thumb, or open source projects that try to tackle this problem? To borrow from OO, at the moment I'm leaning in favour of coarse grained control that is class based, not method or message based. I'm open to ideas though. Assumptions: a flexible serialization technique is being used such as XML. (for other inflexible formats, perhaps Rabbit header information can be tweaked appropriately. Lets ignore this for the moment though). Do you give this kind of thing much consideration? thanks, -Steven -------------- next part -------------- An HTML attachment was scrubbed... URL: From ctoomey at gmail.com Thu Dec 6 03:00:17 2012 From: ctoomey at gmail.com (Chris Toomey) Date: Wed, 5 Dec 2012 19:00:17 -0800 (PST) Subject: [rabbitmq-discuss] High availability questions In-Reply-To: References: <50B5E7E9.9000003@rabbitmq.com> Message-ID: <1354762817676-23889.post@n5.nabble.com> Belated follow-up on this thread. Can you talk more about how you manage this? E.g., how do you ensure that clients continue consuming from the old cluster until all the messages published to it have been consumed? And during the transition time, consuming clients consume from both old and new cluster, right? What hardware/software do you use to gradually shift publishing from old to new cluster? We're just now designing and implementing our infrastructure and apps so would like to get it as right as possible from the beginning. Anyone else using/recommend other approaches to this problem? thx, Chris Laing, Michael P. wrote > We bring up parallel infrastructure with a complete new cluster and > gradually shift load to it using weighted routing. > > This won't work for everybody, but we have designed our apps with this in > mind. > > Michael > > From: Chris Toomey < > ctoomey@ > <mailto: > ctoomey@ > >> > ... > That's unfortunate about having to shut down the whole cluster to upgrade > it -- it means that our applications will need to have some additional HA > queueing mechanism upstream to buffer up the messages to be published > during the downtime :-(. > > What kinds of solutions are people using for that problem? -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/High-availability-questions-tp23690p23889.html Sent from the RabbitMQ mailing list archive at Nabble.com. From mcintoshj at gmail.com Thu Dec 6 03:19:43 2012 From: mcintoshj at gmail.com (McIntosh Jason) Date: Wed, 5 Dec 2012 21:19:43 -0600 Subject: [rabbitmq-discuss] High availability questions In-Reply-To: <1354762817676-23889.post@n5.nabble.com> References: <50B5E7E9.9000003@rabbitmq.com> <1354762817676-23889.post@n5.nabble.com> Message-ID: <8781D194-67D8-4162-BA59-BB396FC605A8@gmail.com> Design we use: Shovel to a virtual ip rabbit cluster. Rabbit consumers on that cluster. Start new cluster. Can point consumers to hard coded cluster. Shift shovel and/or change VIP to point to new cluster. When all messages on old consumers cleaned, shut them down point em to new cluster. Our consumers are java apps built into rpms we deploy, so updates are just a restart/new rpm deploy This is pretty rough but hope it helps! Jason Sent from my iPhone On Dec 5, 2012, at 9:00 PM, Chris Toomey wrote: > Belated follow-up on this thread. Can you talk more about how you manage > this? E.g., how do you ensure that clients continue consuming from the old > cluster until all the messages published to it have been consumed? And > during the transition time, consuming clients consume from both old and new > cluster, right? What hardware/software do you use to gradually shift > publishing from old to new cluster? > > We're just now designing and implementing our infrastructure and apps so > would like to get it as right as possible from the beginning. Anyone else > using/recommend other approaches to this problem? > > thx, > Chris > > > Laing, Michael P. wrote >> We bring up parallel infrastructure with a complete new cluster and >> gradually shift load to it using weighted routing. >> >> This won't work for everybody, but we have designed our apps with this in >> mind. >> >> Michael >> >> From: Chris Toomey < > >> ctoomey@ > >> <mailto: > >> ctoomey@ > >> >> >> ... >> That's unfortunate about having to shut down the whole cluster to upgrade >> it -- it means that our applications will need to have some additional HA >> queueing mechanism upstream to buffer up the messages to be published >> during the downtime :-(. >> >> What kinds of solutions are people using for that problem? > > > > > > -- > View this message in context: http://rabbitmq.1065348.n5.nabble.com/High-availability-questions-tp23690p23889.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 From ponmuthu at omnesysindia.com Thu Dec 6 10:05:53 2012 From: ponmuthu at omnesysindia.com (PONMUTHU M) Date: Thu, 6 Dec 2012 02:05:53 -0800 (PST) Subject: [rabbitmq-discuss] RabbitMQ - 3.0.0 multi node with detach command Message-ID: <1354788353818-23894.post@n5.nabble.com> hi, i read in website, detached key can used to start multiple nodes in same machine after load the new environment (node & port) but when i use that am getting the following error [root at RMQ-NIV-T2 ~]# RABBITMQ_NODE_PORT=5676 RABBITMQ_NODENAME=rabbit_b at RMQ-NIV-T2 /usr/sbin/rabbitmq-server -detached Warning: PID file not written; -detached was passed. if i use " rabbitmq-server & "(after load new node & port) instead of detached , new node getting started . now my question is . what is the difference between detached & start the rabbitmq service in different environment. if both are same . which types is recommended to follow in server level thanks in advance :) regards, Ponmuthu M -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/RabbitMQ-3-0-0-multi-node-with-detach-command-tp23894.html Sent from the RabbitMQ mailing list archive at Nabble.com. From emile at rabbitmq.com Thu Dec 6 10:30:15 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Thu, 06 Dec 2012 10:30:15 +0000 Subject: [rabbitmq-discuss] stomp fanout exchange In-Reply-To: <50BF4DB9.8000206@gmail.com> References: <50BF4DB9.8000206@gmail.com> Message-ID: <50C073B7.3030900@rabbitmq.com> Hi Javier, On 05/12/12 13:35, Javier Marcon wrote: > Hello I'm using rabbitmq 2.8.7 in Windows and I use the perl stomp > clientto comunicate with rabbitmq, and it work perfectly. Now I need to > make a new queue but I need it to be a fanout exchange. Does anybody > know how to make a fanout exchange with Stomp::Client perl plugin? STOMP does not define a standard way of declaring destinations and the RabbitMQ STOMP adapter does not offer a way of declaring exchanges. It is possible to make use of a pre-existing exchange if you use the "/exchange" prefix, or a pre-existing queue with the "/amq/queue" prefix. Queues will be created for you if you use the "/queue" prefix. See http://www.rabbitmq.com/stomp.html for details. -Emile From simon at rabbitmq.com Thu Dec 6 10:38:05 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Thu, 06 Dec 2012 10:38:05 +0000 Subject: [rabbitmq-discuss] RabbitMQ - 3.0.0 multi node with detach command In-Reply-To: <1354788353818-23894.post@n5.nabble.com> References: <1354788353818-23894.post@n5.nabble.com> Message-ID: <50C0758D.7050703@rabbitmq.com> On 06/12/12 10:05, PONMUTHU M wrote: > hi, > > i read in website, detached key can used to start multiple nodes in same > machine after load the new environment (node & port) > > but when i use that am getting the following error > > [root at RMQ-NIV-T2 ~]# RABBITMQ_NODE_PORT=5676 > RABBITMQ_NODENAME=rabbit_b at RMQ-NIV-T2 > /usr/sbin/rabbitmq-server -detached > Warning: PID file not written; -detached was passed. That's a warning, not an error. It's just telling you that we don't write a PID file when -detached is passed, since we're unable to determine the PID early enough to make it useful. > if i use " rabbitmq-server & "(after load new node & port) instead of > detached , new node getting started . > > > now my question is . > > what is the difference between detached & start the rabbitmq service in > different environment. "-detached" tells Erlang to fork the process. "&" tells the shell to fork the process. > if both are same . which types is recommended to follow in server level The only difference is that you get a PID file with "&", which then lets you use "rabbitmqctl wait" to make sure you know when the server has finished starting. That's what the init.s scripts for our .deb and RPM packages do. Of course, I would recommend that you use those packages rather than sorting this out yourself, if you possibly can. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From simon at rabbitmq.com Thu Dec 6 11:48:20 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Thu, 06 Dec 2012 11:48:20 +0000 Subject: [rabbitmq-discuss] Documentation for 2.8.x Message-ID: <50C08604.4050800@rabbitmq.com> Since some people are still using 2.8.x and have been wondering about where to find documentation about it, we've put a snapshot of its documentation at: http://previous.rabbitmq.com/documentation.html Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From ponmuthu at omnesysindia.com Thu Dec 6 12:23:31 2012 From: ponmuthu at omnesysindia.com (PONMUTHU M) Date: Thu, 6 Dec 2012 04:23:31 -0800 (PST) Subject: [rabbitmq-discuss] RabbitMQ - 3.0.0 multi node with detach command In-Reply-To: <50C0758D.7050703@rabbitmq.com> References: <1354788353818-23894.post@n5.nabble.com> <50C0758D.7050703@rabbitmq.com> Message-ID: <1354796611926-23898.post@n5.nabble.com> thanks . now understood clearly .. !!! -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/RabbitMQ-3-0-0-multi-node-with-detach-command-tp23894p23898.html Sent from the RabbitMQ mailing list archive at Nabble.com. From David.Buckingham at cbeyond.net Thu Dec 6 14:30:51 2012 From: David.Buckingham at cbeyond.net (David Buckingham) Date: Thu, 6 Dec 2012 09:30:51 -0500 Subject: [rabbitmq-discuss] Are parameter names missing from the exported JSON file in 3.0.0.0? Message-ID: I just exported the definitions for a broker and upon inspecting the JSON file it appears as though the parameter names are missing. I've not tried importing a definition file yet. I just happened to catch it. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Thu Dec 6 14:37:37 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Thu, 06 Dec 2012 14:37:37 +0000 Subject: [rabbitmq-discuss] Are parameter names missing from the exported JSON file in 3.0.0.0? In-Reply-To: References: Message-ID: <50C0ADB1.1010404@rabbitmq.com> Damn, yes, you're right. Policies too. Thank you for the bug report. Cheers, Simon On 06/12/12 14:30, David Buckingham wrote: > I just exported the definitions for a broker and upon inspecting the > JSON file it appears as though the parameter names are missing. > > I?ve not tried importing a definition file yet. I just happened to > catch it. > > > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > -- Simon MacMullen RabbitMQ, VMware From matthias at rabbitmq.com Thu Dec 6 16:03:24 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Thu, 06 Dec 2012 16:03:24 +0000 Subject: [rabbitmq-discuss] RabbitMQ 2.3.1 Crashes In-Reply-To: References: Message-ID: <50C0C1CC.80809@rabbitmq.com> On 05/12/12 14:13, srikanth tns wrote: > we are using rabbitmq 2.3.1 as the queuing mechanism to support the > mcollective infrastructure. We see the rabbitmq is crashing frequently > when the messages are broadcasted. 2.3.1 is >18 months old. There have been seventeen RabbitMQ releases since then, so I suggest you upgrade. Regards, Matthias. From jplock at gmail.com Thu Dec 6 16:54:26 2012 From: jplock at gmail.com (Justin Plock) Date: Thu, 6 Dec 2012 11:54:26 -0500 Subject: [rabbitmq-discuss] RabbitMQ 3.0.1? Message-ID: Is there any timeline or date for 3.0.1 to be released? The management console is close to unusable with all of the "ReferenceError: nodes not defined" issues occurring on all of the pages. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Thu Dec 6 18:14:03 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Thu, 06 Dec 2012 18:14:03 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.1? In-Reply-To: References: Message-ID: <50C0E06B.2030404@rabbitmq.com> On 06/12/12 16:54, Justin Plock wrote: > Is there any timeline or date for 3.0.1 to be released? Hopefully early next week. > The management > console is close to unusable with all of the "ReferenceError: nodes not > defined" issues occurring on all of the pages. ...but we've not had any reports of that happening. Can you clear your browser's cache? For some reason the page templates seem to get stuck in there quite enthusiastically. If that does not fix the problem, can you tell us more about your configuration? The output of "rabbitmqctl report" would be useful too. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From ctoomey at gmail.com Thu Dec 6 19:06:12 2012 From: ctoomey at gmail.com (Chris Toomey) Date: Thu, 6 Dec 2012 11:06:12 -0800 Subject: [rabbitmq-discuss] High availability questions In-Reply-To: <8781D194-67D8-4162-BA59-BB396FC605A8@gmail.com> References: <50B5E7E9.9000003@rabbitmq.com> <1354762817676-23889.post@n5.nabble.com> <8781D194-67D8-4162-BA59-BB396FC605A8@gmail.com> Message-ID: So your publishers connect to cluster A, which shovels a VIP that initially points to cluster B, and your consumers connect to B. To upgrade B, you point the shovel VIP to new cluster C and start new consumers on C, then kill off the consumers on B when they've consumed all the messages. Right? How do you upgrade cluster A? We'd like to have a solution that doesn't require our publishers/consumers to be touched/restarted at all; since we're starting with a clean sheet we can build whatever intelligence we need into our publishers/consumers. One idea is to have 2 clusters, a primary A and secondary B, have publishers normally publish to A only, and have consumers consume from both A and B. Then to upgrade A, we would need a way to trigger publishers to start publishing to B, and then once all the queues on A were drained by consumers we'd shut it down and upgrade. Then we'd need a similar trigger to switch the publishers back to A. I think if we define a publishing VIP in our load balancer and have publishers connect to that, we could accomplish the publishing redirection from A to B and back. To switch them to cluster B, we would terminate those VIP connections and point the VIP to cluster B, and then vice-versa after A is upgraded. We'd just need to make sure the publishers automatically reconnect to the VIP after being disconnected. Sound right? thx, Chris On Wed, Dec 5, 2012 at 7:19 PM, McIntosh Jason wrote: > Design we use: > > Shovel to a virtual ip rabbit cluster. > Rabbit consumers on that cluster. > Start new cluster. > Can point consumers to hard coded cluster. > Shift shovel and/or change VIP to point to new cluster. > When all messages on old consumers cleaned, shut them down point em to new > cluster. > > Our consumers are java apps built into rpms we deploy, so updates are just > a restart/new rpm deploy > > This is pretty rough but hope it helps! > Jason > > Sent from my iPhone > > On Dec 5, 2012, at 9:00 PM, Chris Toomey wrote: > > > Belated follow-up on this thread. Can you talk more about how you manage > > this? E.g., how do you ensure that clients continue consuming from the > old > > cluster until all the messages published to it have been consumed? And > > during the transition time, consuming clients consume from both old and > new > > cluster, right? What hardware/software do you use to gradually shift > > publishing from old to new cluster? > > > > We're just now designing and implementing our infrastructure and apps so > > would like to get it as right as possible from the beginning. Anyone > else > > using/recommend other approaches to this problem? > > > > thx, > > Chris > > > > > > Laing, Michael P. wrote > >> We bring up parallel infrastructure with a complete new cluster and > >> gradually shift load to it using weighted routing. > >> > >> This won't work for everybody, but we have designed our apps with this > in > >> mind. > >> > >> Michael > >> > >> From: Chris Toomey < > > > >> ctoomey@ > > > >> <mailto: > > > >> ctoomey@ > > > >> >> > >> ... > >> That's unfortunate about having to shut down the whole cluster to > upgrade > >> it -- it means that our applications will need to have some additional > HA > >> queueing mechanism upstream to buffer up the messages to be published > >> during the downtime :-(. > >> > >> What kinds of solutions are people using for that problem? > > > > > > > > > > > > -- > > View this message in context: > http://rabbitmq.1065348.n5.nabble.com/High-availability-questions-tp23690p23889.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 > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcintoshj at gmail.com Thu Dec 6 20:17:33 2012 From: mcintoshj at gmail.com (Jason McIntosh) Date: Thu, 6 Dec 2012 14:17:33 -0600 Subject: [rabbitmq-discuss] High availability questions In-Reply-To: References: <50B5E7E9.9000003@rabbitmq.com> <1354762817676-23889.post@n5.nabble.com> <8781D194-67D8-4162-BA59-BB396FC605A8@gmail.com> Message-ID: So our "publishers" publish to a local rabbitmq in a remote data center. Then each shovels their messages to a warehousing cluster for consumption. In our case, upgrading a remote system is just pulling that remote system out of the load balancer, waiting for all it's messages to shovel, stopping, upgrading it, then rinse & repeat. In theory, you could do something along the lines of what you're talking about by clustering your publisher rabbit boxes together, just like you'd do for the consumer process. As long as your load balancer stays up reliably (which they're supposed to do). I HAVE had issues with connection resets breaking clients, so like anything else, make sure you test it. Connection resets though when shoveling seem to handle such a situation fine - I'm guessing shovel is designed to work even when it's connection breaks :) Which is AWESOME btw. Jason On Thu, Dec 6, 2012 at 1:06 PM, Chris Toomey wrote: > So your publishers connect to cluster A, which shovels a VIP that > initially points to cluster B, and your consumers connect to B. To upgrade > B, you point the shovel VIP to new cluster C and start new consumers on C, > then kill off the consumers on B when they've consumed all the messages. > Right? How do you upgrade cluster A? > > We'd like to have a solution that doesn't require our publishers/consumers > to be touched/restarted at all; since we're starting with a clean sheet we > can build whatever intelligence we need into our publishers/consumers. One > idea is to have 2 clusters, a primary A and secondary B, have publishers > normally publish to A only, and have consumers consume from both A and B. > Then to upgrade A, we would need a way to trigger publishers to start > publishing to B, and then once all the queues on A were drained by > consumers we'd shut it down and upgrade. Then we'd need a similar trigger > to switch the publishers back to A. > > I think if we define a publishing VIP in our load balancer and have > publishers connect to that, we could accomplish the publishing redirection > from A to B and back. To switch them to cluster B, we would terminate > those VIP connections and point the VIP to cluster B, and then vice-versa > after A is upgraded. We'd just need to make sure the publishers > automatically reconnect to the VIP after being disconnected. > > Sound right? > > thx, > Chris > > On Wed, Dec 5, 2012 at 7:19 PM, McIntosh Jason wrote: > >> Design we use: >> >> Shovel to a virtual ip rabbit cluster. >> Rabbit consumers on that cluster. >> Start new cluster. >> Can point consumers to hard coded cluster. >> Shift shovel and/or change VIP to point to new cluster. >> When all messages on old consumers cleaned, shut them down point em to >> new cluster. >> >> Our consumers are java apps built into rpms we deploy, so updates are >> just a restart/new rpm deploy >> >> This is pretty rough but hope it helps! >> Jason >> >> Sent from my iPhone >> >> On Dec 5, 2012, at 9:00 PM, Chris Toomey wrote: >> >> > Belated follow-up on this thread. Can you talk more about how you >> manage >> > this? E.g., how do you ensure that clients continue consuming from the >> old >> > cluster until all the messages published to it have been consumed? And >> > during the transition time, consuming clients consume from both old and >> new >> > cluster, right? What hardware/software do you use to gradually shift >> > publishing from old to new cluster? >> > >> > We're just now designing and implementing our infrastructure and apps so >> > would like to get it as right as possible from the beginning. Anyone >> else >> > using/recommend other approaches to this problem? >> > >> > thx, >> > Chris >> > >> > >> > Laing, Michael P. wrote >> >> We bring up parallel infrastructure with a complete new cluster and >> >> gradually shift load to it using weighted routing. >> >> >> >> This won't work for everybody, but we have designed our apps with this >> in >> >> mind. >> >> >> >> Michael >> >> >> >> From: Chris Toomey < >> > >> >> ctoomey@ >> > >> >> <mailto: >> > >> >> ctoomey@ >> > >> >> >> >> >> ... >> >> That's unfortunate about having to shut down the whole cluster to >> upgrade >> >> it -- it means that our applications will need to have some additional >> HA >> >> queueing mechanism upstream to buffer up the messages to be published >> >> during the downtime :-(. >> >> >> >> What kinds of solutions are people using for that problem? >> > >> > >> > >> > >> > >> > -- >> > View this message in context: >> http://rabbitmq.1065348.n5.nabble.com/High-availability-questions-tp23690p23889.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 >> _______________________________________________ >> rabbitmq-discuss mailing list >> rabbitmq-discuss at lists.rabbitmq.com >> 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 > > -- Jason McIntosh http://mcintosh.poetshome.com/blog/ 573-424-7612 -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.hoerberg at gmail.com Thu Dec 6 23:56:56 2012 From: carl.hoerberg at gmail.com (carlhoerberg) Date: Thu, 6 Dec 2012 15:56:56 -0800 (PST) Subject: [rabbitmq-discuss] RabbitMQ 3.0.1? In-Reply-To: <50C0E06B.2030404@rabbitmq.com> References: <50C0E06B.2030404@rabbitmq.com> Message-ID: <1354838216458-23906.post@n5.nabble.com> The "ReferenceError: nodes is not defined" occurs for users with the "management" tag. -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/RabbitMQ-3-0-1-tp23902p23906.html Sent from the RabbitMQ mailing list archive at Nabble.com. From matthias at rabbitmq.com Fri Dec 7 00:21:54 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 07 Dec 2012 00:21:54 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.1? In-Reply-To: <1354838216458-23906.post@n5.nabble.com> References: <50C0E06B.2030404@rabbitmq.com> <1354838216458-23906.post@n5.nabble.com> Message-ID: <50C136A2.6070408@rabbitmq.com> On 06/12/12 23:56, carlhoerberg wrote: > The "ReferenceError: nodes is not defined" occurs for users with the > "management" tag. Yep, that's broken. Bug filed. Thanks for tracking down the conditions that trigger this. Matthias. From ponmuthu at omnesysindia.com Fri Dec 7 05:43:03 2012 From: ponmuthu at omnesysindia.com (PONMUTHU M) Date: Thu, 6 Dec 2012 21:43:03 -0800 (PST) Subject: [rabbitmq-discuss] RMQ-3.0.0 clear_federation Message-ID: <1354858983481-23908.post@n5.nabble.com> hi, I am testing Federation between A [ RMQ-3.0.0 (upstream & policy ) ] -> B [ RMQ-2.8.1 (x-federation-Exch) ] upstream defined from broker-A & x-federation exchanges are created in Broker-B. Able to message communication & all but if i do clear_federation in broker-A for that upstream name, it suppose to remove x-federated exchanged in broker-B which is not happening. have to clear those x-federation exchanges in broker-B? -PONMUTHU M -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/RMQ-3-0-0-clear-federation-tp23908.html Sent from the RabbitMQ mailing list archive at Nabble.com. From ponmuthu at omnesysindia.com Fri Dec 7 06:59:13 2012 From: ponmuthu at omnesysindia.com (PONMUTHU M) Date: Thu, 6 Dec 2012 22:59:13 -0800 (PST) Subject: [rabbitmq-discuss] RMQ-3.0.0 clear_federation In-Reply-To: <1354858983481-23908.post@n5.nabble.com> References: <1354858983481-23908.post@n5.nabble.com> Message-ID: <1354863553609-23909.post@n5.nabble.com> ok got it now !!! removing x-federation exhchanges once policy has been removed :) thanks . -PONMUTHU M -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/RMQ-3-0-0-clear-federation-tp23908p23909.html Sent from the RabbitMQ mailing list archive at Nabble.com. From aventurella at gmail.com Fri Dec 7 01:20:49 2012 From: aventurella at gmail.com (Adam Venturella) Date: Thu, 6 Dec 2012 17:20:49 -0800 (PST) Subject: [rabbitmq-discuss] Routing Topologies - Multiple Queues vs One Queue Message-ID: <1d3602ac-c00c-4e38-913c-a2a699b5183f@googlegroups.com> My goal is to segregate tasks to different consumers. My messages are very simple, I just may have a lot of them. Assuming a direct exchange (no topics), is it better to have N queues with 1 routing key per queue: Queue: foo Routing Key: tasks Queue: bar Routing Key: tasks Queue: baz Routing Key: tasks OR Is it better to have 1 queue with N routing keys. Queue: Tasks Routing Key: foo Routing Key: bar Routing Key: baz My assumption is multiple routing keys are better. Any advice? -------------- next part -------------- An HTML attachment was scrubbed... URL: From pingping.s830 at gmail.com Fri Dec 7 07:21:19 2012 From: pingping.s830 at gmail.com (pi) Date: Thu, 6 Dec 2012 23:21:19 -0800 (PST) Subject: [rabbitmq-discuss] rabbitmq nodedown error Message-ID: I tried to stop and start rabbitmq server but keep getting the nodedown error as shown below. I read that we should synchronise Erlang Cookies but how should that be done? running the line below shows cookie that's different from cookie hash, does it mean that's the cause? sudo cat .erlang.cookie GBPITQVDFNVGPPZTDYSS me at myserver:~$ sudo rabbitmqctl stop Stopping and halting node rabbit at myserver ... Error: unable to connect to node rabbit at myserver: nodedown DIAGNOSTICS =========== nodes in question: [rabbit at myserver] hosts, their running nodes and ports: - rhine: [{rabbitmqctl14960,54442}] current node details: - node name: rabbitmqctl14960 at myserver - home dir: /var/lib/rabbitmq - cookie hash: lvB7saJGHhQwcaQeveU/WA== -------------- next part -------------- An HTML attachment was scrubbed... URL: From pingping.s830 at gmail.com Fri Dec 7 07:23:02 2012 From: pingping.s830 at gmail.com (pi) Date: Thu, 6 Dec 2012 23:23:02 -0800 (PST) Subject: [rabbitmq-discuss] rabbitmq nodedown error Message-ID: <49780a75-214c-4d05-a1c3-93803ff46d18@googlegroups.com> I tried to stop and start rabbitmq server but keep getting the nodedown error as shown below. I read that we should synchronise Erlang Cookies but how should that be done? running the line below shows cookie that's different from cookie hash, does it mean that's the cause? sudo cat .erlang.cookie GBPITQVDFNVGPPZTDYSS me at myserver:~$ sudo rabbitmqctl stop Stopping and halting node rabbit at myserver ... Error: unable to connect to node rabbit at myserver: nodedown DIAGNOSTICS =========== nodes in question: [rabbit at myserver] hosts, their running nodes and ports: - myserver: [{rabbitmqctl14960,54442}] current node details: - node name: rabbitmqctl14960 at myserver - home dir: /var/lib/rabbitmq - cookie hash: lvB7saJGHhQwcaQeveU/WA== -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanklijn1976 at gmail.com Fri Dec 7 09:04:40 2012 From: johanklijn1976 at gmail.com (Johan Klijn) Date: Fri, 7 Dec 2012 01:04:40 -0800 (PST) Subject: [rabbitmq-discuss] How to setup dead-letter queue in C# ? Message-ID: <646defc8-5d9c-4eeb-98ae-34e02451a3e7@googlegroups.com> I am trying to setup a dead-letter queue, but when I reject a message it's not passed to the dead-letter queue. Code I use: static void Main(string[] args) { const string deadLetterExchangeName = "DeadLetterExchange"; const string deadLetterQueueName = "DeadLetterQueue"; const string deadLetterRoutingKey = "MessageQueue"; const string defaultExchangeName = "MessagesExchange"; const string defaultQueueName = "MessageQueue"; ConnectionFactory connectionFactory = new ConnectionFactory(); connectionFactory.HostName = "10.5.0.184"; IConnection connection = connectionFactory.CreateConnection(); IModel channel = connection.CreateModel(); //Declare dead-letter exchange channel.ExchangeDeclare(deadLetterExchangeName, ExchangeType.Direct); channel.QueueDeclare(deadLetterQueueName, true, false, false, null); channel.QueueBind(deadLetterQueueName, deadLetterExchangeName, deadLetterRoutingKey, null); //Declare default exchange channel.ExchangeDeclare(defaultExchangeName, ExchangeType.Direct); channel.QueueDeclare(defaultQueueName, true, false, false, null); Hashtable arguments = new Hashtable() { {"x-dead-letter-exchange", "DeadLetterExchange"}, {"x-dead-letter-routing-key", deadLetterRoutingKey} }; channel.QueueBind(defaultQueueName, defaultExchangeName, defaultQueueName, arguments); //Queue message byte[] messageBody; MyMessage message = new MyMessage("ID-1"); DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(MyMessage)); using (MemoryStream memoryStream = new MemoryStream()) { serializer.WriteObject(memoryStream, message); messageBody = memoryStream.ToArray(); } IBasicProperties basicProperties = channel.CreateBasicProperties(); basicProperties.ContentType = "application/json"; basicProperties.DeliveryMode = 2; channel.BasicPublish(defaultExchangeName, defaultQueueName, basicProperties, messageBody); //DeQueue BasicGetResult result = channel.BasicGet(defaultQueueName, false); //Negative Acknowledge channel.BasicNack(result.DeliveryTag, false, false); } } [DataContract]public class MyMessage {public MyMessage(string messageId) { MessageId = messageId; } [DataMember]public string MessageId { get; set; } } Any ideas? -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Fri Dec 7 10:13:24 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 07 Dec 2012 10:13:24 +0000 Subject: [rabbitmq-discuss] How to setup dead-letter queue in C# ? In-Reply-To: <646defc8-5d9c-4eeb-98ae-34e02451a3e7@googlegroups.com> References: <646defc8-5d9c-4eeb-98ae-34e02451a3e7@googlegroups.com> Message-ID: <50C1C144.5060906@rabbitmq.com> On 07/12/12 09:04, Johan Klijn wrote: > I am trying to setup a dead-letter queue, but when I reject a message > it's not passed to the dead-letter queue. The problem is here: > channel.QueueDeclare(defaultQueueName,true,false,false,null); > Hashtable arguments =new Hashtable() > { > {"x-dead-letter-exchange","DeadLetterExchange"}, > {"x-dead-letter-routing-key", deadLetterRoutingKey} > }; > channel.QueueBind(defaultQueueName, defaultExchangeName, defaultQueueName, arguments); The x-dead-letter-* arguments should be associated with the *queue* (during declaration) instead of the binding. Regards, Matthias. From emile at rabbitmq.com Fri Dec 7 10:21:05 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Fri, 07 Dec 2012 10:21:05 +0000 Subject: [rabbitmq-discuss] Timeout during Connection negotiation In-Reply-To: References: Message-ID: <50C1C311.4050007@rabbitmq.com> Hi Richard, On 04/12/12 16:19, Richard Braman wrote: > At some point when you start running the other > clients, one will bomb with this error. What happens when that client attempts to reconnect? Do they then all continue normally or does the timeout error recur? > Caused by: com.rabbitmq.client.ShutdownSignalException: connection > error; reason: java.net.SocketTimeoutException: Timeout during > Connection negotiation > Caused by: java.net.SocketTimeoutException: Timeout during Connection > negotiation Are there any constraints on the number of connections allowed? Is there any evidence to suggest that this is caused by something other than a network timeout? What does the broker log say? Do the connections traverse firewalls that impose relevant restrictions? -Emile From matthias at rabbitmq.com Fri Dec 7 10:25:37 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 07 Dec 2012 10:25:37 +0000 Subject: [rabbitmq-discuss] Timeout during Connection negotiation In-Reply-To: <50C1C311.4050007@rabbitmq.com> References: <50C1C311.4050007@rabbitmq.com> Message-ID: <50C1C421.9030208@rabbitmq.com> On 07/12/12 10:21, Emile Joubert wrote: > What happens when that client attempts to reconnect? Do they then all > continue normally or does the timeout error recur? > [...] > Are there any constraints on the number of connections allowed? Is there > any evidence to suggest that this is caused by something other than a > network timeout? What does the broker log say? Do the connections > traverse firewalls that impose relevant restrictions? A few more questions... - what version of the RabbitMQ server and client libraries are you running? - do the clients have heartbeats enabled? - you say that "This happens with the client that uses Java code and with the client using Spring Integration." - do you have a stack trace from a client that uses the RabbitMQ Java client library directly, rather than Spring Integration? Regards, Matthias. From emile at rabbitmq.com Fri Dec 7 10:41:53 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Fri, 07 Dec 2012 10:41:53 +0000 Subject: [rabbitmq-discuss] Routing Topologies - Multiple Queues vs One Queue In-Reply-To: <1d3602ac-c00c-4e38-913c-a2a699b5183f@googlegroups.com> References: <1d3602ac-c00c-4e38-913c-a2a699b5183f@googlegroups.com> Message-ID: <50C1C7F1.8000006@rabbitmq.com> Hi Adam, On 07/12/12 01:20, Adam Venturella wrote: > is it better to have N queues > with 1 routing key per queue: > Is it better to have 1 queue with N routing keys. These choices produce different results. In the first case (N queues) messages are in different queues based on routing key, while in the second case (N routing keys) all messages end up in the same queue. The choice would depend on whether any consumer can process any message. If it is more convenient to have separate queues of messages with the same routing key then use the first option. If consumers are able to process message regardless of routing key then the second option can work. On multi-core systems the broker might be able to spread the load more evenly across cores if you have more queues rather than one. You might also see better throughput if you had more queues. -Emile From johanklijn_nl at hotmail.com Fri Dec 7 13:03:39 2012 From: johanklijn_nl at hotmail.com (Johan Klijn) Date: Fri, 7 Dec 2012 05:03:39 -0800 (PST) Subject: [rabbitmq-discuss] How to setup dead-letter queue in C# ? In-Reply-To: <50C1C144.5060906@rabbitmq.com> References: <646defc8-5d9c-4eeb-98ae-34e02451a3e7@googlegroups.com> <50C1C144.5060906@rabbitmq.com> Message-ID: <1354885419623-23918.post@n5.nabble.com> When I associated the x-dead-letter-* arguments with the *queue* (during declaration) instead of the binding, it still doesn't work. When I then call channel.BasicGet(defaultQueueName, false); the message is removed from queue and the queue itself is removed. -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/How-to-setup-dead-letter-queue-in-C-tp23913p23918.html Sent from the RabbitMQ mailing list archive at Nabble.com. From matthias.reik at gmail.com Fri Dec 7 14:36:36 2012 From: matthias.reik at gmail.com (Matthias Reik) Date: Fri, 7 Dec 2012 15:36:36 +0100 Subject: [rabbitmq-discuss] High availability questions In-Reply-To: <50B5E7E9.9000003@rabbitmq.com> References: <50B5E7E9.9000003@rabbitmq.com> Message-ID: > In order to update the version of RabbitMQ (or Erlang for that matter) you need to stop the entire cluster I'm afraid. What would it take to allow a rolling update of the cluster? i.e. you take one node out of the cluster, upgrade it (ideally both Erlang as well as RabbitMQ) and bring it back into the cluster, wait until the nodes have fully synchronized and then continue with the next. - database schema fixed? - messages schema between nodes fixed? - ...? According to the philosophy of Erlang it should even be possible to even change version of a running node (at least that was my understanding; upgrade your software with ongoing phone calls are not affected). To bring down a HA cluster is clearly a very big minus for RabbitMQ, even though there are maybe some workarounds. Cheers Maze On Wed, Nov 28, 2012 at 11:31 AM, Simon MacMullen wrote: > On 27/11/12 21:54, Chris Toomey wrote: > >> I'm fairly new to RabbitMQ and we're in the process of setting up our >> production RabbitMQ servers. We're going to set up a server cluster and >> will use mirrored queues for high availability. I've read through the >> great documentation you guys have on these topics but still have some >> questions. >> >> 1) Given the clustered server redundancy and mirrored queues, is there >> any reason to still make exchanges/queues/messages durable? Is it just >> to protect against the case when all nodes in the cluster fail? >> > > Or are deliberately stopped. > > > 2) In order to update the server configuration, it's necessary to >> restart, correct? If so, what's the best way to accomplish config. >> updates across a cluster while minimizing downtime and loss of redundancy? >> > > You can update each node's config one at a time, and restart them all > individually. > > > 3) Same question for upgrading to a newer version of RabbitMQ? >> > > In order to update the version of RabbitMQ (or Erlang for that matter) you > need to stop the entire cluster I'm afraid. > > Cheers, Simon > > -- > Simon MacMullen > RabbitMQ, VMware > ______________________________**_________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.**rabbitmq.com > https://lists.rabbitmq.com/**cgi-bin/mailman/listinfo/**rabbitmq-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Fri Dec 7 14:56:13 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Fri, 07 Dec 2012 14:56:13 +0000 Subject: [rabbitmq-discuss] High availability questions In-Reply-To: References: <50B5E7E9.9000003@rabbitmq.com> Message-ID: <50C2038D.2050400@rabbitmq.com> On 07/12/12 14:36, Matthias Reik wrote: > What would it take to allow a rolling update of the cluster? i.e. you > take one node out of the cluster, upgrade it (ideally both Erlang as > well as RabbitMQ) and bring it back into the cluster, wait until the > nodes have fully synchronized and then continue with the next. > - database schema fixed? > - messages schema between nodes fixed? > - ...? Yes. Starting with 3.0.1 we intend to allow this for patch upgrades (e.g. 3.0.x -> 3.0.y). Unfortunately we had to tweak 3.0.1 a bit versus 3.0.0 to do this, so you won't be able to do a rolling upgrade of 3.0.0 to 3.0.1). > According to the philosophy of Erlang it should even be possible to even > change version of a running node (at least that was my understanding; > upgrade your software with ongoing phone calls are not affected). Erlang gives you the basic tools to do this, yes. But it would make every change we make to the broker really quite a lot more expensive. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From honglilai at gmail.com Fri Dec 7 15:31:57 2012 From: honglilai at gmail.com (Hongli Lai) Date: Fri, 7 Dec 2012 16:31:57 +0100 Subject: [rabbitmq-discuss] 'rabbitmqctl status' doesn't work in RabbitMQ 3.0.0 In-Reply-To: <50BF2DF2.10402@rabbitmq.com> References: <50BF00E9.4020208@rabbitmq.com> <50BF29EB.7010501@rabbitmq.com> <50BF2D57.80707@rabbitmq.com> <50BF2DF2.10402@rabbitmq.com> Message-ID: Confirmed. It was the tracing plugin that was causing the problem. Thanks! On Wed, Dec 5, 2012 at 12:20 PM, Matthias Radestock wrote: > On 05/12/12 11:17, Simon MacMullen wrote: >> >> I've traced this to the rabbitmq_tracing plugin. >> >> To the OP: thank you for the bug report, this will be fixed in 3.0.1. > > > ...meanwhile, if you disable the tracing plugin then 'rabbitmqctl status' > should work fine. > > Matthias. From David.Legg at smithelectric.com Fri Dec 7 17:27:31 2012 From: David.Legg at smithelectric.com (David Legg) Date: Fri, 7 Dec 2012 11:27:31 -0600 Subject: [rabbitmq-discuss] Queue Rates at Zero in Management Interface Message-ID: Hi All, We have a perplexing small problem that's only occurred recently when we restarted both our mirrored Rabbit servers. We're running 2.7.1 by the way (yes I know, an upgrade is on the cards). In the queues section of the management interface we normally see queue rates but for some reason now they are all at zero. The server is otherwise functioning normally and messages are being received and processed. We've restarted the servers several times but this doesn't seem to have remedied it. Has anyone seen this before? Cheers, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Fri Dec 7 19:26:17 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 07 Dec 2012 19:26:17 +0000 Subject: [rabbitmq-discuss] How to setup dead-letter queue in C# ? In-Reply-To: <1354885419623-23918.post@n5.nabble.com> References: <646defc8-5d9c-4eeb-98ae-34e02451a3e7@googlegroups.com> <50C1C144.5060906@rabbitmq.com> <1354885419623-23918.post@n5.nabble.com> Message-ID: <50C242D9.1090403@rabbitmq.com> On 07/12/12 13:03, Johan Klijn wrote: > When I associated the x-dead-letter-* arguments with the *queue* (during > declaration) instead of the binding, it still doesn't work. When I then call > channel.BasicGet(defaultQueueName, false); the message is removed from queue > and the queue itself is removed. There is no way that basic.get would end up removing the queue. I can't see anything obviously wrong with your code, though there probably is. You may want to pare it down to the bare essentials: a) don't create any exchanges - just use the default exchange ("") for publishing to the MessageQueue and use the standard "amq.fanout" exchange for the x-dead-letter-exchange, and b) don't use an x-dead-letter-routing-key. Also, you didn't say what version of the RabbitMQ server you are running. Dead-lettering was introduced in 2.8.0. Regards, Matthias. From geegalrawat at gmail.com Fri Dec 7 19:56:18 2012 From: geegalrawat at gmail.com (Rawat) Date: Fri, 7 Dec 2012 11:56:18 -0800 Subject: [rabbitmq-discuss] Blocked Connections Message-ID: We use RabbitMQ in our production environment. There are 6 publishers and 2 consumers. Suddenly we have seen problems where RabbitMQ blocks the connections from producers as well as consumers. We have 8 GB of RAM on the RabbitMQ host. And our queues are non-persistent. We are using Exchange/Fanout. Our RabbitMQ Server version is 2.8.6 I am wondering : -- Is it a known issue with version 2.8.6 ? -- Do you recommend upgrading to latest 3.0 version ? What is most severe in our case is that when RabbitMQ blocks producer connections, On producer side the thread that was publishing data to rabbitmq, gets blocked. And that thread is a critical thread that does other jobs too in Producer. Is there a way so that when connection is blocked, producer thread gets exception instead of getting infinitely blocked ? Any idea/suggestion is most welcome. From tim at rabbitmq.com Fri Dec 7 21:32:35 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 7 Dec 2012 21:32:35 +0000 Subject: [rabbitmq-discuss] Blocked Connections In-Reply-To: References: Message-ID: <7C8E5605-A544-4A7A-9645-A2029DA6C0AC@rabbitmq.com> On 7 Dec 2012, at 19:56, Rawat wrote: > We use RabbitMQ in our production environment. There are 6 publishers > and 2 consumers. Suddenly we have seen problems where RabbitMQ blocks > the connections from producers as well as consumers. We have 8 GB of > RAM on the RabbitMQ host. And our queues are non-persistent. We are > using Exchange/Fanout. Our RabbitMQ Server version is 2.8.6 > Just because your queues are non-persistent doesn't mean your messages aren't written to disk. Messages can be persistent but even if they're not, the broker may still page to disk if memory becomes scarce. Having 8Gb of RAM on a host does not imply that all 8Gb are available to the broker, and even if it did the default memory_high_watermark is 0.4 % of the available RAM iirc. > I am wondering : > > -- Is it a known issue with version 2.8.6 ? > -- Do you recommend upgrading to latest 3.0 version ? > This is not a known 'issue' as such - it sounds like an example of flow control and you can read about it here: http://www.rabbitmq.com/memory.html - I would recommend upgrading to 3.0.1 (which is out early next week) anyway if you can, as there have been numerous bug fixes and performance improvements. You should be aware that 3.0.0 is a major release away from the 2.8.x series though, and check for breaking changes that may affect you. The blog post at http://www.rabbitmq.com/blog/2012/11/19/breaking-things-with-rabbitmq-3-0/ provides some insight into this. > > What is most severe in our case is that when RabbitMQ blocks producer > connections, On producer side the thread that was publishing data to > rabbitmq, gets blocked. And that thread is a critical thread that does > other jobs too in Producer. Is there a way so that when connection is > blocked, producer thread gets exception instead of getting infinitely > blocked ? > No there isn't a way to get an exception thrown afaik. Even if the broker has a lot of memory available to it, at some point you may still exhaust the server's resources and memory based flow control will *need* to kick in in order to prevent the broker from crashing. You can also run out of file descriptors which can lead to throttling, though this is a bit less specific in its application - unfortunately I'm not an expert in how that presents itself at runtime, but you can check to see if that is happening using `lsof' or some such. The same principle about memory based flow control applies to per-connection flow control, viz producers/connections which are generating traffic faster than the queues can process them are blocked: The broker stops reading from the inbound connections (sort of, roughly) which exerts TCP back-pressure on the producers. Flow control is actually 'credit' based in the broker, but that detail aside the results ought to look pretty much the same from a producer's perspective. > Any idea/suggestion is most welcome. The solution is fairly simple if you ask me: don't do critical work in threads that call out to the network! I would advise the same thing if you were communicating with a relational database, web service or any other external resource accessed over a network link which might take arbitrary time to respond. If you want to avoid this situation, which can happen *any time* BTW in a networked application, even if the external resource is not deliberately applying back pressure, because various bits of network infrastructure or behaviour in the OS networking sub-system can block producers too - I would suggest some simple refactoring such as 1. spawn a new thread for producing messages 2. set up a lightweight channel for communicating with this 'producer thread' - I would suggest one of the Queue data structures in java.util.concurrent or a class from the System.Collections.Concurrent namespace if you're in .NET land. 3. keep the 'critical thread' separate and unblocked, and have it communicate with the producer thread by putting data into the shared (concurrent) data structure 4. put the interaction between the two threads into a class/object so the code the two threads use (and share) to communicate is neatly isolated in one place Then you won't have an issue if the producers get blocked. If you need to become aware that you're blocked then you can use timeouts (either when writing to the shared memory area or by setting up a house-keeping thread to periodically check the last time the producer became available) and most of the data structures I mentioned earlier support 'try-timeout' semantics after some fashion or another. Similar capabilities exist for python/ruby, although I not well versed in the client libraries for those languages so YMMV. HTH Tim > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From prudhviy at gmail.com Sun Dec 9 10:43:45 2012 From: prudhviy at gmail.com (Bhaskar teja) Date: Sun, 9 Dec 2012 16:13:45 +0530 Subject: [rabbitmq-discuss] Need Review - Content Based Routing - Performance Message-ID: Our needs show that for each event type we have multiple consumers like notifications, email, logging, search So we are thinking of using the following approach Exchange type - Web_Events Type - Direct Routing-Key - "Event_Type" Queue - Web_notifications Queue - Search Queue - Logging Queue - email with appropriate multiple bindings of event_type We have approximately ~ 100 event types. So we are afraid the performance may go bad if we bind 100s of routing_keys to a Queue Is it ok if we bind 1000 routing_keys to a Queue? Thank you, Bhaskar teja -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Sun Dec 9 11:48:10 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Sun, 09 Dec 2012 11:48:10 +0000 Subject: [rabbitmq-discuss] Need Review - Content Based Routing - Performance In-Reply-To: References: Message-ID: <50C47A7A.4050307@rabbitmq.com> Bhaskar, On 09/12/12 10:43, Bhaskar teja wrote: > Exchange type - Web_Events > Type - Direct > Routing-Key - "Event_Type" > > Queue - Web_notifications > Queue - Search > Queue - Logging > Queue - email > with appropriate multiple bindings of event_type > > We have approximately ~ 100 event types. So we are afraid the > performance may go bad if we bind 100s of routing_keys to a Queue > Is it ok if we bind 1000 routing_keys to a Queue? Routing performance of direct exchanges is (close to) O(1), so yes, binding a queue to a direct exchange with 1000 routing keys is perfectly fine. Regards, Matthias. From matthias at rabbitmq.com Sun Dec 9 15:33:01 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Sun, 09 Dec 2012 15:33:01 +0000 Subject: [rabbitmq-discuss] rabbitmq nodedown error In-Reply-To: References: Message-ID: <50C4AF2D.1010003@rabbitmq.com> On 07/12/12 07:21, pi wrote: > I tried to stop and start rabbitmq server but keep getting the nodedown > error as shown below. [...] > me at myserver:~$ sudo rabbitmqctl stop > Stopping and halting node rabbit at myserver ... > Error: unable to connect to node rabbit at myserver > : nodedown > > DIAGNOSTICS > =========== > > nodes in question: [rabbit at myserver] > > hosts, their running nodes and ports: > - rhine: [{rabbitmqctl14960,54442}] > > current node details: > - node name: rabbitmqctl14960 at myserver > - home dir: /var/lib/rabbitmq > - cookie hash: lvB7saJGHhQwcaQeveU/WA== Are you sure that rabbit is in fact running? > I read that we should synchronise Erlang Cookies but how should that be > done? There is no need for that if you are on a single machine and consistently use the same set of commands to start/stop the server. > running the line below shows cookie that's different from cookie hash, > does it mean that's the cause? > sudo cat .erlang.cookie > GBPITQVDFNVGPPZTDYSS The diagnostics display the base64 encoded md5 hash of the cookie, rather than the cookie itself. The same information is recorded in the server's startup log, and the two ought to match. Regards, Matthias. From javiermarcon at gmail.com Sun Dec 9 15:41:46 2012 From: javiermarcon at gmail.com (Javier) Date: Sun, 9 Dec 2012 15:41:46 +0000 Subject: [rabbitmq-discuss] Stomp topic perl Message-ID: <793841608-1355067708-cardhu_decombobulator_blackberry.rim.net-1914417441-@b25.c23.bise6.blackberry> Does anybody have an example to use topic subscription with net::stomp perl client ? Thanks, Javier From simon at rabbitmq.com Sun Dec 9 19:14:10 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Sun, 09 Dec 2012 19:14:10 +0000 Subject: [rabbitmq-discuss] Blocked Connections In-Reply-To: <7C8E5605-A544-4A7A-9645-A2029DA6C0AC@rabbitmq.com> References: <7C8E5605-A544-4A7A-9645-A2029DA6C0AC@rabbitmq.com> Message-ID: <50C4E302.9020600@rabbitmq.com> On 07/12/2012 9:32PM, Tim Watson wrote: > even if it did the default > memory_high_watermark is 0.4 % of the available RAM iirc. 0.4 * physical RAM, i.e. 40%. 0.4% would be rather tiny. Cheers, Simon From Clem.Earp at anz.com Mon Dec 10 03:54:48 2012 From: Clem.Earp at anz.com (Earp, Clem) Date: Mon, 10 Dec 2012 14:54:48 +1100 Subject: [rabbitmq-discuss] AMQP protocol header mismatch Message-ID: <3D2571742EC3BD49BE55473100CF8F95080941AF@EXUAU020HWT111.oceania.corp.anz.com> I have just installed the latest .NET and Java RabbitMQ clients on Windows XP to test against a socket program on a Solaris box. The socket program simply echoes back what it received. My reading of the AMQP standards is that the first TCP packet received after the socket connects is the AMQP protocol header, and if the "server" accepts the AMQP connection then it should echo back the same AMQP protocol header as a sign that it can support the protocol version. And this is what I see with a tcpdump (taken at the Windows end i.e. WinDump): 14:47:41.377235 IP mywindows.4828 > sol1.1430: P 1:9(8) ack 1 win 65535 0x0000: 0000 0c07 ac00 5c26 0a17 22b6 0800 4500 ......\&.."...E. 0x0010: 0030 ed44 4000 8006 0519 967a 6828 cf29 .0.D at ......zh(.) 0x0020: 3a9e 12dc 0596 3ca6 e554 29de a04e 5018 :.....<..T)..NP. 0x0030: ffff 0722 0000 414d 5150 0000 0901 ..."..AMQP.... 14:47:41.380038 IP sol1.1430 > mywindows.4828: . ack 9 win 49640 0x0000: 5c26 0a17 22b6 00d0 00fb 4bfc 0800 4500 \&..".....K...E. 0x0010: 0028 b226 4000 3906 873f cf29 3a9e 967a .(.&@.9..?.):..z 0x0020: 6828 0596 12dc 29de a04e 3ca6 e55c 5010 h(....)..N<..\P. 0x0030: c1e8 e0df 0000 0000 0000 0000 ............ 14:47:41.380974 IP sol1.1430 > mywindows.4828: P 1:9(8) ack 9 win 49640 0x0000: 5c26 0a17 22b6 00d0 00fb 4bfc 0800 4500 \&..".....K...E. 0x0010: 0030 b227 4000 3906 8736 cf29 3a9e 967a .0.'@.9..6.):..z 0x0020: 6828 0596 12dc 29de a04e 3ca6 e55c 5018 h(....)..N<..\P. 0x0030: c1e8 4531 0000 414d 5150 0000 0901 ..E1..AMQP.... 14:47:41.382807 IP mywindows.4828 > sol1.1430: F 9:9(0) ack 9 win 65527 0x0000: 0000 0c07 ac00 5c26 0a17 22b6 0800 4500 ......\&.."...E. 0x0010: 0028 ed45 4000 8006 0520 967a 6828 cf29 .(.E at ......zh(.) 0x0020: 3a9e 12dc 0596 3ca6 e55c 29de a056 5011 :.....<..\)..VP. 0x0030: fff7 a2c7 0000 ...... 14:47:41.384136 IP sol1.1430 > mywindows.4828: . ack 10 win 49640 0x0000: 5c26 0a17 22b6 00d0 00fb 4bfc 0800 4500 \&..".....K...E. 0x0010: 0028 b229 4000 3906 873c cf29 3a9e 967a .(.)@.9..<.):..z 0x0020: 6828 0596 12dc 29de a056 3ca6 e55d 5010 h(....)..V<..]P. 0x0030: c1e8 e0d6 0000 0000 0000 0000 ............ The problem is that the client is not accepting what it gets back. For example, with the java client (runjava.bat com.rabbitmq.examples.HelloServer sol1 1430) I get: com.rabbitmq.client.ShutdownSignalException: connection error; reason: com.rabbitmq.client.MalformedFrameException: AMQP protocol version mismatch; we are version 0-9-1, server sent signature 0,0,9,1 What is wrong with this setup? Thanks ... "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ Bank New Zealand Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Mon Dec 10 08:39:06 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Mon, 10 Dec 2012 08:39:06 +0000 Subject: [rabbitmq-discuss] AMQP protocol header mismatch In-Reply-To: <3D2571742EC3BD49BE55473100CF8F95080941AF@EXUAU020HWT111.oceania.corp.anz.com> References: <3D2571742EC3BD49BE55473100CF8F95080941AF@EXUAU020HWT111.oceania.corp.anz.com> Message-ID: <50C59FAA.50501@rabbitmq.com> On 10/12/12 03:54, Earp, Clem wrote: > The socket > program simply echoes back what it received. My reading of the AMQP > standards is that the first TCP packet received after the socket > connects is the AMQP protocol header, and if the "server" accepts the > AMQP connection then it should echo back the same AMQP protocol header > as a sign that it can support the protocol version. No, that's not what the spec says. See AMQP 0-9-1 s2.2.4 (The Connection Class): - The client opens a TCP/IP connection to the server and sends a protocol header. This is the only data the client sends that is not formatted as a method. - The server responds with its protocol version and other properties, including a list of the security mechanisms that it supports (the Start method). and AMQP 0-9-1 s4.2.2 (Protocol Header): The client and server agree on a protocol and version as follows: - The client opens a new socket connection to the AMQP server and sends the protocol header. - The server either accepts or rejects the protocol header. If it rejects the protocol header writes a valid protocol header to the socket and then closes the socket. - Otherwise it leaves the socket open and implements the protocol accordingly. [...] - If the server does not recognise the first 5 octets of data on the socket, or does not support the specific protocol version that the client requests, it MUST write a valid protocol header to the socket, then flush the socket (to ensure the client application will receive the data) and then close the socket connection. References: <3D2571742EC3BD49BE55473100CF8F95080941AF@EXUAU020HWT111.oceania.corp.anz.com> Message-ID: <50C5A9AA.6060808@rabbitmq.com> Hi! On 10/12/2012 3:54AM, Earp, Clem wrote: > I have just installed the latest .NET and Java RabbitMQ clients on > Windows XP to test against a socket program on a Solaris box. The socket > program simply echoes back what it received. My reading of the AMQP > standards is that the first TCP packet received after the socket > connects is the AMQP protocol header, and if the "server" accepts the > AMQP connection then it should echo back the same AMQP protocol header > as a sign that it can support the protocol version. No. If the server accepts the protocol version it should respond by speaking the protocol (starting with a connection.start method). It will only respond with "AMQPabcd" if it does *not* support the version the client asked for, to let the client know what it does support. > The problem is that the client is not accepting what it gets back. For > example, with the java client (runjava.bat > com.rabbitmq.examples.HelloServer sol1 1430) I get: > > com.rabbitmq.client.ShutdownSignalException: connection error; reason: > com.rabbitmq.client.MalformedFrameException: AMQP protocol version > mismatch; we are version 0-9-1, server sent signature 0,0,9,1 > > What is wrong with this setup? Thanks ...**** The problem is that we treat getting an "AMQPabcd" header back as meaning there must be a protocol version mismatch. We hven't explicitly coded for the case where the client says "I want 0-9-1" and the server says "sorry, I only support 0-9-1"... Cheers, Simon From simon at rabbitmq.com Mon Dec 10 09:36:15 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Mon, 10 Dec 2012 09:36:15 +0000 Subject: [rabbitmq-discuss] Queue Rates at Zero in Management Interface In-Reply-To: References: Message-ID: <50C5AD0F.9020302@rabbitmq.com> Hmm. Do you mean it is explicitly displaying "0 msg/s" or that it is just not showing message rates at all? There are some bugs that have been fixed since 2.7.1 that might lead to the statistics database crashing, and thus not showing message rates, but nothing that I'm aware of that would lead to "0 msg/s" displaying. Cheers, Simon On 07/12/2012 5:27PM, David Legg wrote: > Hi All, > > We have a perplexing small problem that's only occurred recently when we > restarted both our mirrored Rabbit servers. We're running 2.7.1 by the > way (yes I know, an upgrade is on the cards). > > In the queues section of the management interface we normally see queue > rates but for some reason now they are all at zero. The server is > otherwise functioning normally and messages are being received and > processed. We've restarted the servers several times but this doesn't > seem to have remedied it. > > Has anyone seen this before? > > Cheers, > > David > > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > From emile at rabbitmq.com Mon Dec 10 09:47:18 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Mon, 10 Dec 2012 09:47:18 +0000 Subject: [rabbitmq-discuss] Stomp topic perl In-Reply-To: <793841608-1355067708-cardhu_decombobulator_blackberry.rim.net-1914417441-@b25.c23.bise6.blackberry> References: <793841608-1355067708-cardhu_decombobulator_blackberry.rim.net-1914417441-@b25.c23.bise6.blackberry> Message-ID: <50C5AFA6.5090701@rabbitmq.com> Hi Javier, On 09/12/12 15:41, Javier wrote: > Does anybody have an example to use topic subscription with net::stomp perl client ? You should be able to accomplish this by subscribing to a destination starting with "/topic/". This will declare a new queue and bind it to amq.topic using as the routing key. For more details see http://www.rabbitmq.com/stomp.html#d.td -Emile From fenghe at nsbeta.info Mon Dec 10 10:15:45 2012 From: fenghe at nsbeta.info (Feng He) Date: Mon, 10 Dec 2012 18:15:45 +0800 Subject: [rabbitmq-discuss] Stomp topic perl In-Reply-To: <793841608-1355067708-cardhu_decombobulator_blackberry.rim.net-1914417441-@b25.c23.bise6.blackberry> References: <793841608-1355067708-cardhu_decombobulator_blackberry.rim.net-1914417441-@b25.c23.bise6.blackberry> Message-ID: <50C5B651.1070904@nsbeta.info> ? 2012-12-9 23:41, Javier ??: > Does anybody have an example to use topic subscription with net::stomp perl client ? I have been using Net::RabbitMQ for that. From tim at rabbitmq.com Mon Dec 10 10:55:25 2012 From: tim at rabbitmq.com (Tim Watson) Date: Mon, 10 Dec 2012 10:55:25 +0000 Subject: [rabbitmq-discuss] Blocked Connections In-Reply-To: <50C4E302.9020600@rabbitmq.com> References: <7C8E5605-A544-4A7A-9645-A2029DA6C0AC@rabbitmq.com> <50C4E302.9020600@rabbitmq.com> Message-ID: lol On 9 Dec 2012, at 19:14, Simon MacMullen wrote: > On 07/12/2012 9:32PM, Tim Watson wrote: >> even if it did the default >> memory_high_watermark is 0.4 % of the available RAM iirc. > > 0.4 * physical RAM, i.e. 40%. 0.4% would be rather tiny. > Yes, I did *mean* 40% but wrote 0.4% which is obviously a bit on the small side - I imagine there would be many users struggling with that kind of setting! :) > Cheers, Simon From tuure.laurinolli at portalify.com Mon Dec 10 11:12:01 2012 From: tuure.laurinolli at portalify.com (Tuure Laurinolli) Date: Mon, 10 Dec 2012 13:12:01 +0200 Subject: [rabbitmq-discuss] RabbitMQ and network partitions Message-ID: <95E7354D-5E58-465A-BF57-690BF322012E@portalify.com> Hi, After reading http://www.rabbitmq.com/partitions.html I'm somewhat concerned about behavior of RabbitMQ upon network partitions. It appears that the basic issue is that Mnesia itself prefers availability over consistency, and allows update operations even when a node is in minority and knows it. It seems that others were concerned about this too, and Mnesia now includes "majority" option on tables, which disables updates in minority partitions. Are there other problems besides Mnesia that cause RabbitMQ to continue to operate even in minority partition? If not, would enabling the "majority" option on necessary tables in RabbitMQ cause it to continue operations in the majority partition and to fail in the minority partition, and to keep members of the previous minority partition down when connectivity is restored? Presumably the previous minority nodes could then be rejoined to the cluster with similar actions as currently. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at ericswann.org Mon Dec 10 14:10:21 2012 From: eric at ericswann.org (Eric Swann) Date: Mon, 10 Dec 2012 06:10:21 -0800 (PST) Subject: [rabbitmq-discuss] Get message "ApiGen has stopped working" when attempt to compile C# client in release mode. Message-ID: When compiling the C# client in release config, I get a popup that states: "ApiGen has stopped working" and the build fails. Does anybody have insight on why this occurs? If I build in debug it runs fine. Thanks! Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From emile at rabbitmq.com Mon Dec 10 14:20:12 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Mon, 10 Dec 2012 14:20:12 +0000 Subject: [rabbitmq-discuss] Get message "ApiGen has stopped working" when attempt to compile C# client in release mode. In-Reply-To: References: Message-ID: <50C5EF9C.5010004@rabbitmq.com> Hi Eric, On 10/12/12 14:10, Eric Swann wrote: > When compiling the C# client in release config, I get a popup that > states: "ApiGen has stopped working" and the build fails. Does anybody > have insight on why this occurs? If I build in debug it runs fine. Can you provide any further diagnostic information? The parameters to ApiGen as well as any output it produced will be helpful, as well as versions of RabbitMQ and .NET . I assume you are not changing ApiGen or the code generation, because that can obviously cause errors. -Emile From eric at ericswann.org Mon Dec 10 14:22:51 2012 From: eric at ericswann.org (Eric Swann) Date: Mon, 10 Dec 2012 06:22:51 -0800 (PST) Subject: [rabbitmq-discuss] C# client publisher confirm bug under load (2.8.7) Message-ID: <9092b42e-94de-4f8f-87a9-daa2024cef5b@googlegroups.com> When using publisher confirms with the C# code, there is a bug in the client when experiencing any significant load. The offending code is in the client "RabbitMQ.Client.Impl.ModelBase" class in the "BasicPublish" method. if (m_nextPubSeqNo > 0) { m_unconfirmedSet.*Add*(m_nextPubSeqNo, null); m_nextPubSeqNo++; } It looks like there are multiple threads hitting the bolded "*Add*" method before the sequence number is incremented in the next line leading to duplicate key exceptions being thrown by the "m_unconfirmedSet" sorted list. This code either needs to have a lock around it or have m_nextPubSeqNo change to a long so that "Interlocked.Increment" can be used in the assignment. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at ericswann.org Mon Dec 10 14:33:05 2012 From: eric at ericswann.org (Eric Swann) Date: Mon, 10 Dec 2012 06:33:05 -0800 (PST) Subject: [rabbitmq-discuss] Get message "ApiGen has stopped working" when attempt to compile C# client in release mode. In-Reply-To: References: Message-ID: <13b212a6-c310-4e60-91e3-8f577ec79f09@googlegroups.com> Hmmmm.....Seems like this just went away, maybe I just had something locking a file.... On Monday, December 10, 2012 8:10:21 AM UTC-6, Eric Swann wrote: > > When compiling the C# client in release config, I get a popup that states: > "ApiGen has stopped working" and the build fails. Does anybody have > insight on why this occurs? If I build in debug it runs fine. > > Thanks! > Eric > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emile at rabbitmq.com Mon Dec 10 14:34:38 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Mon, 10 Dec 2012 14:34:38 +0000 Subject: [rabbitmq-discuss] C# client publisher confirm bug under load (2.8.7) In-Reply-To: <9092b42e-94de-4f8f-87a9-daa2024cef5b@googlegroups.com> References: <9092b42e-94de-4f8f-87a9-daa2024cef5b@googlegroups.com> Message-ID: <50C5F2FE.5000702@rabbitmq.com> Hi Eric, On 10/12/12 14:22, Eric Swann wrote: > It looks like there are multiple threads hitting the bolded "*Add*" > method The library warns about concurrent access to the Model though. Section 2.10 in the User Guide explains: "If more than one thread needs to access a particular IModel instances, the application should enforce mutual exclusion itself." Failure to follow this advice can lead to the problem you describe and it could also lead to framing errors. Your suggested fix will not solve all the problems, so it is suggested that you do not share Model among threads. -Emile User Guide for v3.0.0: http://www.rabbitmq.com/releases/rabbitmq-dotnet-client/v3.0.0/rabbitmq-dotnet-client-3.0.0-user-guide.pdf From johanklijn_nl at hotmail.com Mon Dec 10 16:11:55 2012 From: johanklijn_nl at hotmail.com (Johan Klijn) Date: Mon, 10 Dec 2012 08:11:55 -0800 (PST) Subject: [rabbitmq-discuss] How to setup dead-letter queue in C# ? In-Reply-To: <50C242D9.1090403@rabbitmq.com> References: <646defc8-5d9c-4eeb-98ae-34e02451a3e7@googlegroups.com> <50C1C144.5060906@rabbitmq.com> <1354885419623-23918.post@n5.nabble.com> <50C242D9.1090403@rabbitmq.com> Message-ID: <1355155915304-23944.post@n5.nabble.com> I changed the code at some places, without any luck. static void Main(string[] args) { ConnectionFactory connectionFactory = new ConnectionFactory(); connectionFactory.HostName = "10.57.244.205"; IConnection connection = connectionFactory.CreateConnection(); IModel channel = connection.CreateModel(); //Declare default exchange channel.ExchangeDeclare("MessageQueueExchange", ExchangeType.Direct); Hashtable arguments = new Hashtable() { {"x-dead-letter-exchange", "amq.fanout"} }; channel.QueueDeclare("MessageQueue", true, false, false, arguments); channel.QueueBind("MessageQueue", "MessageQueueExchange", "MessageQueue", null); //Queue message byte[] messageBody; MyMessage message = new MyMessage("ID-1"); DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof (MyMessage)); using (MemoryStream memoryStream = new MemoryStream()) { serializer.WriteObject(memoryStream, message); messageBody = memoryStream.ToArray(); } IBasicProperties basicProperties = channel.CreateBasicProperties(); basicProperties.ContentType = "application/json"; basicProperties.DeliveryMode = 2; channel.BasicPublish("MessageQueueExchange", "MessageQueue", basicProperties, messageBody); //DeQueue BasicGetResult result = channel.BasicGet("MessageQueue", false); //Negative Acknowledge channel.BasicNack(result.DeliveryTag, false, false); } Attached some screenshots with the exchanges/queues. amq.fanout_Exchange.png CustomQueue1_Queue.png MessageQueue_Exchange.png MessageQueue_Queue.png -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/How-to-setup-dead-letter-queue-in-C-tp23913p23944.html Sent from the RabbitMQ mailing list archive at Nabble.com. From mpietrek at skytap.com Mon Dec 10 19:00:13 2012 From: mpietrek at skytap.com (Matt Pietrek) Date: Mon, 10 Dec 2012 11:00:13 -0800 Subject: [rabbitmq-discuss] RabbitMQ very slow (or never) shuts down In-Reply-To: <952567CC-38E4-48AB-882D-37A44F027AF9@rabbitmq.com> References: <5051BD53.3000401@rabbitmq.com> <49F9DCE2-2ED2-4791-94FC-1FB57D237A8C@rabbitmq.com> <9BD373B8-8A11-45CA-8CE4-A0AD7EC5F29C@rabbitmq.com> <952567CC-38E4-48AB-882D-37A44F027AF9@rabbitmq.com> Message-ID: Quick follow up on this - Was this bug fix implemented in 2.8.7 or something later, i.e. 3.0? I think I'm running into this again when shutting down a set of bi-directionally federated brokers. It appears when a broker shuts down, it wants to reach over to the other broker to clean up something (federation queue?) If the other broker has already shut down, the currently shutting-down broker will stall for a very long time (e.g. 15 minutes or more.) Thanks, Matt On Fri, Oct 5, 2012 at 1:33 PM, Tim Watson wrote: > Quick update for you Matt. I was able to fully reproduce the behaviour you > saw by dropping certain packets sent from the downstream federation client > to the upstream broker during connection.close. We filed a bug and have > implemented a fix, which should appear in a forthcoming release! > > Cheers, > Tim > > On 19 Sep 2012, at 22:17, Tim Watson wrote: > > > Hi Matt > > > > On 19 Sep 2012, at 20:21, Matt Pietrek wrote: > > > >> Excellent. Thanks for the update. I really do appreciate it. > >> > >> Just for my own curiosity, do you have any sort of local repro, or are > you still just trying to make sense of my logs? > >> > > > > Very much the latter at the moment. We've filed a bug to investigate and > I'm going to apply some specific packet filtering during shutdown to see > what kind of impact a lost FIN/SYN might make. I'm also going to be > reviewing the supervision hierarchy in the erlang client (which federation > uses) to see if there's and shutdown/timeout choices that aren't quite > right. > > _______________________________________________ > > rabbitmq-discuss mailing list > > rabbitmq-discuss at lists.rabbitmq.com > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Mon Dec 10 19:12:23 2012 From: tim at rabbitmq.com (Tim Watson) Date: Mon, 10 Dec 2012 19:12:23 +0000 Subject: [rabbitmq-discuss] RabbitMQ very slow (or never) shuts down In-Reply-To: References: <5051BD53.3000401@rabbitmq.com> <49F9DCE2-2ED2-4791-94FC-1FB57D237A8C@rabbitmq.com> <9BD373B8-8A11-45CA-8CE4-A0AD7EC5F29C@rabbitmq.com> <952567CC-38E4-48AB-882D-37A44F027AF9@rabbitmq.com> Message-ID: Hi Matt, On 10 Dec 2012, at 19:00, Matt Pietrek wrote: > Quick follow up on this - Was this bug fix implemented in 2.8.7 or something later, i.e. 3.0? > According to the bug tracker, the fix for this was included in the 3.0.0 release. > I think I'm running into this again when shutting down a set of bi-directionally federated brokers. It appears when a broker shuts down, it wants to reach over to the other broker to clean up something (federation queue?) > > If the other broker has already shut down, the currently shutting-down broker will stall for a very long time (e.g. 15 minutes or more.) > Yeah that sounds like the canonical scenario. You will need to plan an upgrade to 3.0.0 to see the benefits of this fix I'm afraid. Please make sure you plan your upgrade carefully as there are breaking changes between the 2.8.x series and 3.0.0. Cheers, Tim From eric at ericswann.org Mon Dec 10 19:13:56 2012 From: eric at ericswann.org (Eric Swann) Date: Mon, 10 Dec 2012 11:13:56 -0800 (PST) Subject: [rabbitmq-discuss] C# client publisher confirm bug under load (2.8.7) In-Reply-To: <9092b42e-94de-4f8f-87a9-daa2024cef5b@googlegroups.com> References: <9092b42e-94de-4f8f-87a9-daa2024cef5b@googlegroups.com> Message-ID: <37f7548c-790f-4f16-8c88-be3d4a05800d@googlegroups.com> Added a fix into the 2.8.x branch and did a pull request. Same is needed in 3.0.0 trunk -------------- next part -------------- An HTML attachment was scrubbed... URL: From mpietrek at skytap.com Mon Dec 10 19:18:04 2012 From: mpietrek at skytap.com (Matt Pietrek) Date: Mon, 10 Dec 2012 11:18:04 -0800 Subject: [rabbitmq-discuss] RabbitMQ very slow (or never) shuts down In-Reply-To: References: <5051BD53.3000401@rabbitmq.com> <49F9DCE2-2ED2-4791-94FC-1FB57D237A8C@rabbitmq.com> <9BD373B8-8A11-45CA-8CE4-A0AD7EC5F29C@rabbitmq.com> <952567CC-38E4-48AB-882D-37A44F027AF9@rabbitmq.com> Message-ID: Thanks for the confirmation Tim. > Please make sure you plan your upgrade carefully as there are breaking changes between the 2.8.x series and 3.0.0. Oh yeah. I'm very aware of that. That's one reason we haven't jumped to 3.0 already. I've already got time allotted for reworking our tooling to work with the new 3.0 goodness. On Mon, Dec 10, 2012 at 11:12 AM, Tim Watson wrote: > Hi Matt, > > On 10 Dec 2012, at 19:00, Matt Pietrek wrote: > > > Quick follow up on this - Was this bug fix implemented in 2.8.7 or > something later, i.e. 3.0? > > > > According to the bug tracker, the fix for this was included in the 3.0.0 > release. > > > I think I'm running into this again when shutting down a set of > bi-directionally federated brokers. It appears when a broker shuts down, it > wants to reach over to the other broker to clean up something (federation > queue?) > > > > If the other broker has already shut down, the currently shutting-down > broker will stall for a very long time (e.g. 15 minutes or more.) > > > > Yeah that sounds like the canonical scenario. You will need to plan an > upgrade to 3.0.0 to see the benefits of this fix I'm afraid. Please make > sure you plan your upgrade carefully as there are breaking changes between > the 2.8.x series and 3.0.0. > > Cheers, > Tim > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Mon Dec 10 19:18:02 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Mon, 10 Dec 2012 19:18:02 +0000 Subject: [rabbitmq-discuss] C# client publisher confirm bug under load (2.8.7) In-Reply-To: <37f7548c-790f-4f16-8c88-be3d4a05800d@googlegroups.com> References: <9092b42e-94de-4f8f-87a9-daa2024cef5b@googlegroups.com> <37f7548c-790f-4f16-8c88-be3d4a05800d@googlegroups.com> Message-ID: <50C6356A.10206@rabbitmq.com> Eric, On 10/12/12 19:13, Eric Swann wrote: > Added a fix into the 2.8.x branch and did a pull request. Same is > needed in 3.0.0 trunk I see the google group is lagging behind again *sigh*.... See Emile's reply to your original post at http://rabbitmq.1065348.n5.nabble.com/C-client-publisher-confirm-bug-under-load-2-8-7-tp23941p23943.html Regards, Matthias. From kaushalshriyan at gmail.com Mon Dec 10 15:31:05 2012 From: kaushalshriyan at gmail.com (Kaushal Shriyan) Date: Mon, 10 Dec 2012 21:01:05 +0530 Subject: [rabbitmq-discuss] RabbitMQ Server on CentOS 5.8 Message-ID: Hi, I am not able to install rabbitmq server on CentOS 5.8 server. Detailed issue is explained here -> fpaste.org/7KwZ/ Please let me know if anyone needs more information Regards, Kaushal -------------- next part -------------- An HTML attachment was scrubbed... URL: From alan.antonuk at gmail.com Mon Dec 10 19:39:50 2012 From: alan.antonuk at gmail.com (Alan Antonuk) Date: Mon, 10 Dec 2012 14:39:50 -0500 Subject: [rabbitmq-discuss] RabbitMQ Server on CentOS 5.8 In-Reply-To: References: Message-ID: This is not a server issue. This is an issue building the rabbitmq-c client library. I think your set of autotools (autoconf, automake, libtool) installed are too old. You need to either upgrade to something newer than what your distribution provides, or build the library with CMake. Someone else had a similar issue to you with CentOS 5.x: https://github.com/alanxz/rabbitmq-c/issues/83 -Alan On Mon, Dec 10, 2012 at 10:31 AM, Kaushal Shriyan wrote: > Hi, > > I am not able to install rabbitmq server on CentOS 5.8 server. Detailed > issue is explained here -> fpaste.org/7KwZ/ > > Please let me know if anyone needs more information > > Regards, > > Kaushal > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Mon Dec 10 19:40:06 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Mon, 10 Dec 2012 19:40:06 +0000 Subject: [rabbitmq-discuss] RabbitMQ Server on CentOS 5.8 In-Reply-To: References: Message-ID: <50C63A96.5050404@rabbitmq.com> On 10/12/12 15:31, Kaushal Shriyan wrote: > I am not able to install rabbitmq server on CentOS 5.8 server. Detailed > issue is explained here -> fpaste.org/7KwZ/ It looks like you are attempting to install the RabbitMQ *C client* rather than *server*. Is that what you want? For installing the server on CentOS please follow the instructions at http://www.rabbitmq.com/install-rpm.html Regards, Matthias. From matthias at rabbitmq.com Mon Dec 10 19:57:25 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Mon, 10 Dec 2012 19:57:25 +0000 Subject: [rabbitmq-discuss] How to setup dead-letter queue in C# ? In-Reply-To: <1355155915304-23944.post@n5.nabble.com> References: <646defc8-5d9c-4eeb-98ae-34e02451a3e7@googlegroups.com> <50C1C144.5060906@rabbitmq.com> <1354885419623-23918.post@n5.nabble.com> <50C242D9.1090403@rabbitmq.com> <1355155915304-23944.post@n5.nabble.com> Message-ID: <50C63EA5.1040600@rabbitmq.com> On 10/12/12 16:11, Johan Klijn wrote: > I changed the code at some places, without any luck. This isn't quite as minimal as I suggested. The following works fine for me: public static void Main(string[] args) { ConnectionFactory cf = new ConnectionFactory(); using (IConnection conn = cf.CreateConnection()) { using (IModel ch = conn.CreateModel()) { ch.QueueDeclare("DeadLetterQueue", true, false, false, null); ch.QueueBind("DeadLetterQueue", "amq.fanout", ""); Hashtable arguments = new Hashtable() { {"x-dead-letter-exchange", "amq.fanout"} }; ch.QueueDeclare("MessageQueue", true, false, false, arguments); ch.BasicPublish("", "MessageQueue", null, new byte[0]); BasicGetResult result = ch.BasicGet("MessageQueue", false); ch.BasicNack(result.DeliveryTag, false, false); } } } Also, as I asked in my previous email, are you definitely running RabbitMQ >= 2.8.0 (since that is when dead-lettering was introduced)? Regards, Matthias. From roanoketech at yahoo.com Mon Dec 10 20:49:59 2012 From: roanoketech at yahoo.com (John Smith) Date: Mon, 10 Dec 2012 12:49:59 -0800 (PST) Subject: [rabbitmq-discuss] Can no longer start RabbitMQ service Message-ID: <1355172599.17308.YahooMailNeo@web165005.mail.bf1.yahoo.com> I isntalled erlang and RabbitMQ on my Windows machine I setup the variables and was able to get RabbitMQ working successfully I started and stopped a few times since then, but now I get the following error when I try to start it How can I results this Where are the log files I should review (In what path, and under what name) Thanks in advance Then I ran into this issue C:\Program Files (x86)\erl5.9.3\erts-5.9.3\bin\erlsrv: Failed to start service R abbitMQ. Error: The process terminated unexpectedly. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Mon Dec 10 21:11:23 2012 From: tim at rabbitmq.com (Tim Watson) Date: Mon, 10 Dec 2012 21:11:23 +0000 Subject: [rabbitmq-discuss] Can no longer start RabbitMQ service In-Reply-To: <1355172599.17308.YahooMailNeo@web165005.mail.bf1.yahoo.com> References: <1355172599.17308.YahooMailNeo@web165005.mail.bf1.yahoo.com> Message-ID: Hi John, On 10 Dec 2012, at 20:49, John Smith wrote: > I isntalled erlang and RabbitMQ on my Windows machine > > I setup the variables and was able to get RabbitMQ working successfully > > I started and stopped a few times since then, but now I get the following error when I try to start it > > How can I results this > > Where are the log files I should review (In what path, and under what name) > Sorry to hear you've run into trouble. The default locations for the log files are listed in http://www.rabbitmq.com/relocate.html. From mpietrek at skytap.com Mon Dec 10 21:17:02 2012 From: mpietrek at skytap.com (Matt Pietrek) Date: Mon, 10 Dec 2012 13:17:02 -0800 Subject: [rabbitmq-discuss] Federation connections, VIPs, and queues Message-ID: I realize this is a somewhat esoteric question and apologize for the complexity. We're still on 2.8.7 for a while, although my guess is that federation in 3.0 won't drastically change the answer. In our setup, we have bidirectionally federated nodes, i.e. 'slave' <-> 'master' with an exchange named 'skytap'. To this mix I add a set of alternate nodes to enable non-stopping upgrades: 'master-alternate' and 'slave-alternate'. The primary and alternate nodes are identically configured. I'm using VIPs (keepalive based) for connections between nodes. There's a vip-master and a vip-slave. Most of the time vip-master points at the 'master" node, but occasionally points at the 'master-alternate" node. In the rabbitmq.config, I specify the VIP names everywhere (i.e vip-master, vip-alternate), and never mention the actual node names. When I first start this up, I see a federation support queue like this: federation: skytap -> rabbit at master This is what I'd expect based on my understanding of federation. However, after doing an upgrade process (i.e., vip-master goes from 'master' to 'master-alternate' and back to 'master'), I have two queues now: federation: skytap -> rabbit at slave federation: skytap -> rabbit at slave-alternate This isn't so good. The vast majority of the time the slave-alternate node isn't around. Messages sent to the skytap exchange just pile up in the second queue. (The do of course get delivered to the non-alternate slave node.) *Question 1:* I'm trying to understand this behavior. It's almost as if the federation logic is burrowing underneath my VIP and discovering the actual node names. In my naive understanding, I'd expect that the use of VIPs would hide away the primary/alternate nodes. That said, I do notice in the connections list that incoming connections come from the 'regular' node IP, not from the VIP that's assigned to the same node. Not sure if this is relevant or not. *Question 2:* In a related vein, looking at the Exchanges I see exchanges like this: federation: skytap -> rabbit at slave A federation: skytap -> rabbit at slave-alternate B What do the A/B signify? Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From uusiddiqui at yahoo.com Mon Dec 10 22:19:37 2012 From: uusiddiqui at yahoo.com (uusiddiqui) Date: Mon, 10 Dec 2012 14:19:37 -0800 (PST) Subject: [rabbitmq-discuss] RabbitMQ 3.0.1? In-Reply-To: References: Message-ID: <1355177977398-23957.post@n5.nabble.com> Hi, It would be really appreciated to know the time line for it. I just installed rabbitmq v 3.0 on one of our dev machines and checked via the management console that i am not even able to add any user. It comes out as 404 when you add a user. Regards, Usman -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/RabbitMQ-3-0-1-tp23902p23957.html Sent from the RabbitMQ mailing list archive at Nabble.com. From roanoketech at yahoo.com Mon Dec 10 23:02:40 2012 From: roanoketech at yahoo.com (John Smith) Date: Mon, 10 Dec 2012 15:02:40 -0800 (PST) Subject: [rabbitmq-discuss] Can no longer start RabbitMQ service In-Reply-To: <1355172599.17308.YahooMailNeo@web165005.mail.bf1.yahoo.com> References: <1355172599.17308.YahooMailNeo@web165005.mail.bf1.yahoo.com> Message-ID: <1355180560.9407.YahooMailNeo@web165002.mail.bf1.yahoo.com> I found the log in Appdata, however, everytime I try to start RabbitMQ, I do NOT see an increase of the size of the rabbit at mach2.log file. I still get the error C:\Program Files (x86)\erl5.9.3\erts-5.9.3\bin\erlsrv: Failed to start service R abbitMQ. Error: The process terminated unexpectedly. But I do not see an increase in the log size, and there are no errors in the llog There is however a warning =WARNING REPORT==== 10-Dec-2012::10:27:32 === Only 2048MB of 8180MB memory usable due to limited address space. =INFO REPORT==== 10-Dec-2012::10:27:32 === Memory limit set to 819MB of 8180MB total. =INFO REPORT==== 10-Dec-2012::10:27:32 === Disk free limit set to 1000MB =INFO REPORT==== 10-Dec-2012::10:27:32 === msg_store_transient: using rabbit_msg_store_ets_index to provide index =INFO REPORT==== 10-Dec-2012::10:27:32 === msg_store_persistent: using rabbit_msg_store_ets_index to provide index =INFO REPORT==== 10-Dec-2012::10:27:32 === started TCP Listener on [::]:5672 =INFO REPORT==== 10-Dec-2012::10:27:32 === started TCP Listener on 0.0.0.0:5672 How should I proceed from this point ? Thanks in advance ________________________________ From: John Smith To: "rabbitmq-discuss at lists.rabbitmq.com" Sent: Monday, December 10, 2012 3:49 PM Subject: Can no longer start RabbitMQ service I isntalled erlang and RabbitMQ on my Windows machine I setup the variables and was able to get RabbitMQ working successfully I started and stopped a few times since then, but now I get the following error when I try to start it How can I results this Where are the log files I should review (In what path, and under what name) Thanks in advance Then I ran into this issue C:\Program Files (x86)\erl5.9.3\erts-5.9.3\bin\erlsrv: Failed to start service R abbitMQ. Error: The process terminated unexpectedly. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim+rabbitmq.com at coote.org Mon Dec 10 21:26:16 2012 From: tim+rabbitmq.com at coote.org (Tim Coote) Date: Mon, 10 Dec 2012 21:26:16 +0000 Subject: [rabbitmq-discuss] rabbitmq on yocto/openembedded Message-ID: Hullo Has anyone got any insights into getting rabbitmq onto an open embedded/yocto linux build? I can see that there are some oldish Erlang recipes for oe, but I cannot see anything for rabbitmq itself. I'd have expected that these were increasingly attractive platforms and I'd rather not reinvent the wheel. The system under consideration isn't really embedded, but it does drive some specialist hardware that's most easily supported on yocto. tia Ti From andnrk at gmail.com Mon Dec 10 23:02:27 2012 From: andnrk at gmail.com (Andrius Norkaitis) Date: Tue, 11 Dec 2012 01:02:27 +0200 Subject: [rabbitmq-discuss] RabbitMQ 3.0.1? In-Reply-To: <1355177977398-23957.post@n5.nabble.com> References: <1355177977398-23957.post@n5.nabble.com> Message-ID: Does anybody knows is that bug or something changed in v3 that causes such error: The AMQP operation was interrupted at RabbitMQ.Client.Impl.ConnectionBase.System.IDisposable.Dispose() in Windows Service with .NET RabbitMQ Client v3. Service code hasn't changed and all previous versions of Rabbit .Net client worked without such error event. BR, Andrius 2012/12/11 uusiddiqui > Hi, > > It would be really appreciated to know the time line for it. > > I just installed rabbitmq v 3.0 on one of our dev machines and checked via > the management console that i am not even able to add any user. It comes > out > as 404 when you add a user. > > Regards, > Usman > > > > -- > View this message in context: > http://rabbitmq.1065348.n5.nabble.com/RabbitMQ-3-0-1-tp23902p23957.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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From roanoketech at yahoo.com Mon Dec 10 23:59:35 2012 From: roanoketech at yahoo.com (John Smith) Date: Mon, 10 Dec 2012 15:59:35 -0800 (PST) Subject: [rabbitmq-discuss] Cant start RabbitMQ from Menu In-Reply-To: <1355180560.9407.YahooMailNeo@web165002.mail.bf1.yahoo.com> References: <1355172599.17308.YahooMailNeo@web165005.mail.bf1.yahoo.com> <1355180560.9407.YahooMailNeo@web165002.mail.bf1.yahoo.com> Message-ID: <1355183975.99507.YahooMailNeo@web165005.mail.bf1.yahoo.com> I can start the RabbitMQ to work manually by starting a command prompt in "Run as Administer" mode,? and I proceed as follow:? Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation.? All rights reserved. C:\Windows\system32>cd "C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3 .0.0\sbin" C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.0.0\sbin>rabbitmq-servi ce.bat start C:\Program Files (x86)\erl5.9.3\erts-5.9.3\bin\erlsrv: Service RabbitMQ started. C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.0.0\sbin> However, I can not start Rabbit form the Menu (I get a flash of a command prompt) When I go to the RabbitMQ? Command Prompt, I get the following C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.0.0\sbin>rabbitmq-serv ce.bat start C:\Program Files (x86)\erl5.9.3\erts-5.9.3\bin\erlsrv: Failed to start service abbitMQ. Error: Access is denied. C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.0.0\sbin> How can I get the menu option to work ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Tue Dec 11 00:44:59 2012 From: tim at rabbitmq.com (Tim Watson) Date: Tue, 11 Dec 2012 00:44:59 +0000 Subject: [rabbitmq-discuss] Can no longer start RabbitMQ service In-Reply-To: <1355180560.9407.YahooMailNeo@web165002.mail.bf1.yahoo.com> References: <1355172599.17308.YahooMailNeo@web165005.mail.bf1.yahoo.com> <1355180560.9407.YahooMailNeo@web165002.mail.bf1.yahoo.com> Message-ID: Hi John, Can you start RabbitMQ normally from the command prompt (there is a start menu item that opens the sbin directory where the rabbitmq-server startup script resides? Have you tried re-installing the rabbitmq service using the service-reinstall script in that same sbin directory? Cheers, Tim On 10 Dec 2012, at 23:02, John Smith wrote: > I found the log in Appdata, however, everytime I try to start RabbitMQ, I do NOT see an increase of the size of the rabbit at mach2.log file. > > I still get the error > > C:\Program Files (x86)\erl5.9.3\erts-5.9.3\bin\erlsrv: Failed to start service R > abbitMQ. > Error: The process terminated unexpectedly. > > But I do not see an increase in the log size, and there are no errors in the llog > > There is however a warning > > > > =WARNING REPORT==== 10-Dec-2012::10:27:32 === > Only 2048MB of 8180MB memory usable due to limited address space. > > =INFO REPORT==== 10-Dec-2012::10:27:32 === > Memory limit set to 819MB of 8180MB total. > > =INFO REPORT==== 10-Dec-2012::10:27:32 === > Disk free limit set to 1000MB > > =INFO REPORT==== 10-Dec-2012::10:27:32 === > msg_store_transient: using rabbit_msg_store_ets_index to provide index > > =INFO REPORT==== 10-Dec-2012::10:27:32 === > msg_store_persistent: using rabbit_msg_store_ets_index to provide index > > =INFO REPORT==== 10-Dec-2012::10:27:32 === > started TCP Listener on [::]:5672 > > =INFO REPORT==== 10-Dec-2012::10:27:32 === > started TCP Listener on 0.0.0.0:5672 > > How should I proceed from this point ? > > Thanks in advance > > > From: John Smith > To: "rabbitmq-discuss at lists.rabbitmq.com" > Sent: Monday, December 10, 2012 3:49 PM > Subject: Can no longer start RabbitMQ service > > I isntalled erlang and RabbitMQ on my Windows machine > > I setup the variables and was able to get RabbitMQ working successfully > > I started and stopped a few times since then, but now I get the following error when I try to start it > > How can I results this > > Where are the log files I should review (In what path, and under what name) > > Thanks in advance > > > > Then I ran into this issue > > C:\Program Files (x86)\erl5.9.3\erts-5.9.3\bin\erlsrv: Failed to start service R > abbitMQ. > Error: The process terminated unexpectedly. > > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From tim at rabbitmq.com Tue Dec 11 00:57:32 2012 From: tim at rabbitmq.com (Tim Watson) Date: Tue, 11 Dec 2012 00:57:32 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.1? In-Reply-To: References: <1355177977398-23957.post@n5.nabble.com> Message-ID: <57175A0B-F6B6-4CF3-8132-AB8E9347A063@rabbitmq.com> Guys, can we try and keep from mixing up the threads please? It makes it really hard to track what we're responding to when you suddenly switch context from one question to another. Andrius - I realise you *are* asking whether something was changed in 3.0... On 10 Dec 2012, at 23:02, Andrius Norkaitis wrote: > Does anybody knows is that bug or something changed in v3 that causes such error: > > The AMQP operation was interrupted at RabbitMQ.Client.Impl.ConnectionBase.System.IDisposable.Dispose() > Can you provide a tiny bit more detail than that? Does the broker see the connection dropping - in the logs for example? Some changes were made to the .NET client in 3.0.0, but these should not cause unexpected breakages. You haven't mentioned whether this happened immediately after upgrading, or some time later? > in Windows Service with .NET RabbitMQ Client v3. > And you are presumably running a 3.0.0 broker too right? Not that it should make much difference (with one or two caveats), but just want to check. > Service code hasn't changed and all previous versions of Rabbit .Net client worked without such error event. > If you need to roll back to an earlier version of the client, it should (in theory) still work fine. The protocol hasn't changed after all. Having said that, there *are* breaking changes in 3.0.0 that could affect clients using certain APIs, so it's worth double checking you're not running into one of these. See http://www.rabbitmq.com/blog/2012/11/19/breaking-things-with-rabbitmq-3-0/ for a good overview. HTH to get started figuring out what's wrong. Tim From antony.pulicken at gmail.com Tue Dec 11 03:35:05 2012 From: antony.pulicken at gmail.com (antonypulicken) Date: Mon, 10 Dec 2012 19:35:05 -0800 (PST) Subject: [rabbitmq-discuss] Unable to read the last published message Message-ID: <1355196905004-23964.post@n5.nabble.com> Hi, I have a configured a fanout exchange for broadcasting the messages. In want to achieve the following in my use case: 1) A 'code' (message) will be broadcasted to the exchange occasionally and that needs to be consumed by all the subscribers. In some cases the subscriber will be started after the code is published and it should still be able to read the current code from the queue. It could be because of a re-start or because it's a new subscriber 2) Now, if it's possible achieve the above scenario, then the current code should be discarded once the next code is published I tried setting autodelete to false, sending a Nack with requeue as 'true', but then it gets in to a infinite loop..Please let me know your thoughts... Thanks, Antony. -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/Unable-to-read-the-last-published-message-tp23964.html Sent from the RabbitMQ mailing list archive at Nabble.com. From antony.pulicken at gmail.com Tue Dec 11 03:41:36 2012 From: antony.pulicken at gmail.com (antonypulicken) Date: Mon, 10 Dec 2012 19:41:36 -0800 (PST) Subject: [rabbitmq-discuss] Installing & initializing rabbitmq when the application is installed Message-ID: <1355197296782-23965.post@n5.nabble.com> Hi, We would like to automate the installation of rabbitmq message broker along with our application installation. Also, we want to configure some default exchanges/queues and initialize the same with certain values as part of our application installation? Please let me know in case there are any limitations, considerations, guidelines, documentation on this topic. Thanks & Regards, Antony. -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/Installing-initializing-rabbitmq-when-the-application-is-installed-tp23965.html Sent from the RabbitMQ mailing list archive at Nabble.com. From ninuhadida at gmail.com Tue Dec 11 08:48:36 2012 From: ninuhadida at gmail.com (Jean Paul Galea) Date: Tue, 11 Dec 2012 09:48:36 +0100 Subject: [rabbitmq-discuss] Installing & initializing rabbitmq when the application is installed In-Reply-To: <1355197296782-23965.post@n5.nabble.com> References: <1355197296782-23965.post@n5.nabble.com> Message-ID: <50C6F364.9010708@gmail.com> Hi Anthony, We are in the process of doing something similar. We decided to use ansible (webpage at http://ansible.cc/) to automate installation and deployment of a RabbitMQ cluster. The playbook (an ansible script to automate some tasks) is pretty simple; it adds external repositories (erlang, rabbitmq), installs the packages, writes some configuration files (e.g. same cookie for the whole cluster) and then starts up the daemons. Since exchanges/queues/users/vhosts/policies cannot be configured in the standard conf files, we're written a bash script to invoke rabbitmqctl and does these kind of things. There are other automation tools (puppet, cfengine, salt, etc) but I found ansible to be the right balance in being simple to set up without limiting what it can achieve. Jean Paul On 12/11/2012 04:41 AM, antonypulicken wrote: > Hi, > > We would like to automate the installation of rabbitmq message broker along > with our application installation. Also, we want to configure some default > exchanges/queues and initialize the same with certain values as part of our > application installation? Please let me know in case there are any > limitations, considerations, guidelines, documentation on this topic. > > Thanks& Regards, > Antony. > > > > -- > View this message in context: http://rabbitmq.1065348.n5.nabble.com/Installing-initializing-rabbitmq-when-the-application-is-installed-tp23965.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 From emile at rabbitmq.com Tue Dec 11 10:00:22 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Tue, 11 Dec 2012 10:00:22 +0000 Subject: [rabbitmq-discuss] rabbitmq on yocto/openembedded In-Reply-To: References: Message-ID: <50C70436.6010006@rabbitmq.com> Hi Tim, On 10/12/12 21:26, Tim Coote wrote: > Has anyone got any insights into getting rabbitmq onto an open > embedded/yocto linux build? I suspect the biggest challenge will be to get a sufficiently recent version of Erlang installed. Once you have that the generic Unix binary should run just fine. For details about the generic Unix tarball: http://www.rabbitmq.com/install-generic-unix.html For details about required versions of Erlang for various features: http://www.rabbitmq.com/which-erlang.html -Emile From videlalvaro at gmail.com Tue Dec 11 10:07:08 2012 From: videlalvaro at gmail.com (Alvaro Videla) Date: Tue, 11 Dec 2012 11:07:08 +0100 Subject: [rabbitmq-discuss] rabbitmq on yocto/openembedded In-Reply-To: <50C70436.6010006@rabbitmq.com> References: <50C70436.6010006@rabbitmq.com> Message-ID: Hi, I know the Erlang Solutions guys have been playing with Erlang Embedded, you can find more info here: https://www.erlang-solutions.com/downloads/download-erlang-otp I know they also have a github repo for it somewhere. Regards, Alvaro On Tue, Dec 11, 2012 at 11:00 AM, Emile Joubert wrote: > > Hi Tim, > > On 10/12/12 21:26, Tim Coote wrote: > > Has anyone got any insights into getting rabbitmq onto an open > > embedded/yocto linux build? > > I suspect the biggest challenge will be to get a sufficiently recent > version of Erlang installed. Once you have that the generic Unix binary > should run just fine. > > For details about the generic Unix tarball: > http://www.rabbitmq.com/install-generic-unix.html > > For details about required versions of Erlang for various features: > http://www.rabbitmq.com/which-erlang.html > > > > -Emile > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emile at rabbitmq.com Tue Dec 11 10:17:10 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Tue, 11 Dec 2012 10:17:10 +0000 Subject: [rabbitmq-discuss] Unable to read the last published message In-Reply-To: <1355196905004-23964.post@n5.nabble.com> References: <1355196905004-23964.post@n5.nabble.com> Message-ID: <50C70826.8010001@rabbitmq.com> Hi Antony, On 11/12/12 03:35, antonypulicken wrote: > I tried setting autodelete to false, sending a Nack with requeue as 'true', > but then it gets in to a infinite loop..Please let me know your thoughts... You could inspect the "redelivered" flag of the message. If this flag is set then the message may have been delivered before. Adding this ingredient to your logic may allow you to escape the infinite loop. -Emile From simon at rabbitmq.com Tue Dec 11 10:32:20 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Tue, 11 Dec 2012 10:32:20 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.1? In-Reply-To: <1355177977398-23957.post@n5.nabble.com> References: <1355177977398-23957.post@n5.nabble.com> Message-ID: <50C70BB4.9070609@rabbitmq.com> On 10/12/12 22:19, uusiddiqui wrote: > It would be really appreciated to know the time line for it. Later today hopefully. We're just conducting some final tests. > I just installed rabbitmq v 3.0 on one of our dev machines and checked via > the management console that i am not even able to add any user. It comes out > as 404 when you add a user. Hmm. I can't replicate that with either 3.0.0 or the 3.0.1 prerelease. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From emile at rabbitmq.com Tue Dec 11 10:36:56 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Tue, 11 Dec 2012 10:36:56 +0000 Subject: [rabbitmq-discuss] Installing & initializing rabbitmq when the application is installed In-Reply-To: <50C6F364.9010708@gmail.com> References: <1355197296782-23965.post@n5.nabble.com> <50C6F364.9010708@gmail.com> Message-ID: <50C70CC8.3040109@rabbitmq.com> On 11/12/12 08:48, Jean Paul Galea wrote: > Since exchanges/queues/users/vhosts/policies cannot be configured in the > standard conf files If you have the management plugin installed then you can load definitions for all those objects at start-up. See http://www.rabbitmq.com/management.html#load-definitions -Emile From tim at rabbitmq.com Tue Dec 11 10:37:21 2012 From: tim at rabbitmq.com (Tim Watson) Date: Tue, 11 Dec 2012 10:37:21 +0000 Subject: [rabbitmq-discuss] Can no longer start RabbitMQ service In-Reply-To: References: <1355172599.17308.YahooMailNeo@web165005.mail.bf1.yahoo.com> <1355180560.9407.YahooMailNeo@web165002.mail.bf1.yahoo.com> Message-ID: Hi John, A colleague has just pointed out that there is another possibility. Have you attempted to mix the installer with manual installation of the windows zip file? Because that is known not to work. If you have done that then the only way to recover is to uninstall the broker and erlang completely (including registry keys) and install the zipfile xor the windows installer. Cheers, Tim On 11 Dec 2012, at 00:44, Tim Watson wrote: > Hi John, > > Can you start RabbitMQ normally from the command prompt (there is a start menu item that opens the sbin directory where the rabbitmq-server startup script resides? Have you tried re-installing the rabbitmq service using the service-reinstall script in that same sbin directory? > > Cheers, > Tim > > On 10 Dec 2012, at 23:02, John Smith wrote: > >> I found the log in Appdata, however, everytime I try to start RabbitMQ, I do NOT see an increase of the size of the rabbit at mach2.log file. >> >> I still get the error >> >> C:\Program Files (x86)\erl5.9.3\erts-5.9.3\bin\erlsrv: Failed to start service R >> abbitMQ. >> Error: The process terminated unexpectedly. >> >> But I do not see an increase in the log size, and there are no errors in the llog >> >> There is however a warning >> >> >> >> =WARNING REPORT==== 10-Dec-2012::10:27:32 === >> Only 2048MB of 8180MB memory usable due to limited address space. >> >> =INFO REPORT==== 10-Dec-2012::10:27:32 === >> Memory limit set to 819MB of 8180MB total. >> >> =INFO REPORT==== 10-Dec-2012::10:27:32 === >> Disk free limit set to 1000MB >> >> =INFO REPORT==== 10-Dec-2012::10:27:32 === >> msg_store_transient: using rabbit_msg_store_ets_index to provide index >> >> =INFO REPORT==== 10-Dec-2012::10:27:32 === >> msg_store_persistent: using rabbit_msg_store_ets_index to provide index >> >> =INFO REPORT==== 10-Dec-2012::10:27:32 === >> started TCP Listener on [::]:5672 >> >> =INFO REPORT==== 10-Dec-2012::10:27:32 === >> started TCP Listener on 0.0.0.0:5672 >> >> How should I proceed from this point ? >> >> Thanks in advance >> >> >> From: John Smith >> To: "rabbitmq-discuss at lists.rabbitmq.com" >> Sent: Monday, December 10, 2012 3:49 PM >> Subject: Can no longer start RabbitMQ service >> >> I isntalled erlang and RabbitMQ on my Windows machine >> >> I setup the variables and was able to get RabbitMQ working successfully >> >> I started and stopped a few times since then, but now I get the following error when I try to start it >> >> How can I results this >> >> Where are the log files I should review (In what path, and under what name) >> >> Thanks in advance >> >> >> >> Then I ran into this issue >> >> C:\Program Files (x86)\erl5.9.3\erts-5.9.3\bin\erlsrv: Failed to start service R >> abbitMQ. >> Error: The process terminated unexpectedly. >> >> >> _______________________________________________ >> rabbitmq-discuss mailing list >> rabbitmq-discuss at lists.rabbitmq.com >> 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 From simon at rabbitmq.com Tue Dec 11 10:41:49 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Tue, 11 Dec 2012 10:41:49 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.1? In-Reply-To: <50C70BB4.9070609@rabbitmq.com> References: <1355177977398-23957.post@n5.nabble.com> <50C70BB4.9070609@rabbitmq.com> Message-ID: <50C70DED.8050303@rabbitmq.com> On 11/12/12 10:32, Simon MacMullen wrote: > On 10/12/12 22:19, uusiddiqui wrote: >> I just installed rabbitmq v 3.0 on one of our dev machines and checked >> via >> the management console that i am not even able to add any user. It >> comes out >> as 404 when you add a user. > > Hmm. I can't replicate that with either 3.0.0 or the 3.0.1 prerelease. ...and then I tried again with Microsoft Internet Explorer. I see now. Thank you. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From simon at rabbitmq.com Tue Dec 11 10:44:39 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Tue, 11 Dec 2012 10:44:39 +0000 Subject: [rabbitmq-discuss] RabbitMQ and network partitions In-Reply-To: <95E7354D-5E58-465A-BF57-690BF322012E@portalify.com> References: <95E7354D-5E58-465A-BF57-690BF322012E@portalify.com> Message-ID: <50C70E97.3090805@rabbitmq.com> On 10/12/12 11:12, Tuure Laurinolli wrote: > Hi, Hi. > After reading http://www.rabbitmq.com/partitions.html I'm somewhat > concerned about behavior of RabbitMQ upon network partitions. It appears > that the basic issue is that Mnesia itself prefers availability over > consistency, and allows update operations even when a node is in > minority and knows it. It seems that others were concerned about this > too, and Mnesia now includes "majority" option on tables, which disables > updates in minority partitions. > > Are there other problems besides Mnesia that cause RabbitMQ to continue > to operate even in minority partition? If not, would enabling the > "majority" option on necessary tables in RabbitMQ cause it to continue > operations in the majority partition and to fail in the minority > partition, and to keep members of the previous minority partition down > when connectivity is restored? Presumably the previous minority nodes > could then be rejoined to the cluster with similar actions as currently. That's something that we're looking at for a future release. I don't think we could enable it by default (lots of people have two node clusters) but it might be helpful for some people. The question of what the minority partition should do when Mnesia refuses to perform updates is unclear. Probably it should just shut down altogether. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From ninuhadida at gmail.com Tue Dec 11 10:48:08 2012 From: ninuhadida at gmail.com (Jean Paul Galea) Date: Tue, 11 Dec 2012 11:48:08 +0100 Subject: [rabbitmq-discuss] Installing & initializing rabbitmq when the application is installed In-Reply-To: <50C70CC8.3040109@rabbitmq.com> References: <1355197296782-23965.post@n5.nabble.com> <50C6F364.9010708@gmail.com> <50C70CC8.3040109@rabbitmq.com> Message-ID: <50C70F68.6040300@gmail.com> On 12/11/2012 11:36 AM, Emile Joubert wrote: > If you have the management plugin installed then you can load > definitions for all those objects at start-up. See > > http://www.rabbitmq.com/management.html#load-definitions I haven't thought about this one. It could be a very neat way of applying definitions rather than writing a script to invoke rabbitmqctl. From matthias at rabbitmq.com Tue Dec 11 11:08:27 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Tue, 11 Dec 2012 11:08:27 +0000 Subject: [rabbitmq-discuss] RabbitMQ and network partitions In-Reply-To: <50C70E97.3090805@rabbitmq.com> References: <95E7354D-5E58-465A-BF57-690BF322012E@portalify.com> <50C70E97.3090805@rabbitmq.com> Message-ID: <50C7142B.2090202@rabbitmq.com> On 11/12/12 10:44, Simon MacMullen wrote: > On 10/12/12 11:12, Tuure Laurinolli wrote: > Mnesia now includes "majority" option on tables, which disables >> updates in minority partitions. > > That's something that we're looking at for a future release. I don't > think we could enable it by default (lots of people have two node > clusters) but it might be helpful for some people. One additional complication is that the 'majority' table option was introduced in Erlang/OTP R14B03, but rabbit is meant to be running on versions as old as R12. > The question of what the minority partition should do when Mnesia > refuses to perform updates is unclear. Probably it should just shut down > altogether. The state of partitions can diverge even in the absence of mnesia writes since not all of Rabbit's state is kept in mnesia. So we would probably have to shut down minority partitions regardless of whether they are performing mnesia updates. Matthias. From johanklijn_nl at hotmail.com Tue Dec 11 12:10:26 2012 From: johanklijn_nl at hotmail.com (Johan Klijn) Date: Tue, 11 Dec 2012 04:10:26 -0800 (PST) Subject: [rabbitmq-discuss] How to setup dead-letter queue in C# ? In-Reply-To: <50C63EA5.1040600@rabbitmq.com> References: <646defc8-5d9c-4eeb-98ae-34e02451a3e7@googlegroups.com> <50C1C144.5060906@rabbitmq.com> <1354885419623-23918.post@n5.nabble.com> <50C242D9.1090403@rabbitmq.com> <1355155915304-23944.post@n5.nabble.com> <50C63EA5.1040600@rabbitmq.com> Message-ID: <1355227826618-23977.post@n5.nabble.com> I am using RabbitMQ v2.8.1. your sample is working, and I managed to declare the exchange also, using the code below. When I specify the exchange type of Direct for the dead-letter-exchange it is not working. That's probably the reason why it was not working for me. ConnectionFactory cf = new ConnectionFactory(); cf.HostName = "10.57.244.205"; using (IConnection conn = cf.CreateConnection()) { using (IModel ch = conn.CreateModel()) { ch.ExchangeDeclare("DeadLetterQueue2Exchange", ExchangeType.Fanout); ch.QueueDeclare("DeadLetterQueue2", true, false, false, null); ch.QueueBind("DeadLetterQueue2", "DeadLetterQueue2Exchange", ""); Hashtable arguments = new Hashtable() { {"x-dead-letter-exchange", "DeadLetterQueue2Exchange"} }; ch.QueueDeclare("MessageQueue2", true, false, false, arguments); ch.BasicPublish("", "MessageQueue2", null, new byte[0]); BasicGetResult result = ch.BasicGet("MessageQueue2", false); ch.BasicNack(result.DeliveryTag, false, false); } } -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/How-to-setup-dead-letter-queue-in-C-tp23913p23977.html Sent from the RabbitMQ mailing list archive at Nabble.com. From matthias at rabbitmq.com Tue Dec 11 12:25:25 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Tue, 11 Dec 2012 12:25:25 +0000 Subject: [rabbitmq-discuss] How to setup dead-letter queue in C# ? In-Reply-To: <1355227826618-23977.post@n5.nabble.com> References: <646defc8-5d9c-4eeb-98ae-34e02451a3e7@googlegroups.com> <50C1C144.5060906@rabbitmq.com> <1354885419623-23918.post@n5.nabble.com> <50C242D9.1090403@rabbitmq.com> <1355155915304-23944.post@n5.nabble.com> <50C63EA5.1040600@rabbitmq.com> <1355227826618-23977.post@n5.nabble.com> Message-ID: <50C72635.5000907@rabbitmq.com> On 11/12/12 12:10, Johan Klijn wrote: > your sample is working [...] When I specify the exchange type of > Direct for the dead-letter-exchange it is not working. When routing via a direct exchange you need to make sure that the routing key in the message matches the key in the binding, e.g. by supplying a x-dead-letter-routing-key argument on queue declaration. Matthias. From simon at rabbitmq.com Tue Dec 11 12:46:16 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Tue, 11 Dec 2012 12:46:16 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.1 released Message-ID: <50C72B18.3040403@rabbitmq.com> The RabbitMQ team is pleased to announce the release of RabbitMQ 3.0.1. This release fixes a number of bugs in 3.0.0 and earlier versions. See the release notes at: http://www.rabbitmq.com/release-notes/README-3.0.1.txt for more information. The new release can be downloaded from: http://www.rabbitmq.com/download.html As always, we welcome any questions, bug reports, and other feedback on this release, as well as general suggestions for features and enhancements in future releases. Mail us via the RabbitMQ discussion list. Regards, The RabbitMQ Team (http://www.rabbitmq.com) _______________________________________________ rabbitmq-announce mailing list rabbitmq-announce at lists.rabbitmq.com https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-announce From antony.pulicken at gmail.com Tue Dec 11 14:40:51 2012 From: antony.pulicken at gmail.com (antony) Date: Tue, 11 Dec 2012 06:40:51 -0800 (PST) Subject: [rabbitmq-discuss] Unable to read the last published message In-Reply-To: <50C70826.8010001@rabbitmq.com> References: <1355196905004-23964.post@n5.nabble.com> <50C70826.8010001@rabbitmq.com> Message-ID: <1355236851444-23980.post@n5.nabble.com> Thanks Emile. That was not required as I was doing something wrong. The message is retained in the queue as I have set the 'auto-delete' flag to false and the new subscriber is also able to consume the message. Now what I need is a way to remove the existing message from the queue when a new message arrives. Any thoughts ? Thanks, Antony. -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/Unable-to-read-the-last-published-message-tp23964p23980.html Sent from the RabbitMQ mailing list archive at Nabble.com. From antony.pulicken at gmail.com Tue Dec 11 14:43:27 2012 From: antony.pulicken at gmail.com (antony) Date: Tue, 11 Dec 2012 06:43:27 -0800 (PST) Subject: [rabbitmq-discuss] Unable to read the last published message In-Reply-To: <50C70826.8010001@rabbitmq.com> References: <1355196905004-23964.post@n5.nabble.com> <50C70826.8010001@rabbitmq.com> Message-ID: <1355237007579-23981.post@n5.nabble.com> Thanks Emile. That was not required as I was doing something wrong. The message is retained in the queue as I have set the 'auto-delete' flag to false and the new subscriber is also able to consume the message. Now what I need is a way to remove the existing message from the queue when a new message arrives. Any thoughts ? Thanks, Antony. -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/Unable-to-read-the-last-published-message-tp23964p23981.html Sent from the RabbitMQ mailing list archive at Nabble.com. From simlu at su.se Tue Dec 11 16:20:45 2012 From: simlu at su.se (Simon =?iso-8859-1?Q?Lundstr=F6m?=) Date: Tue, 11 Dec 2012 17:20:45 +0100 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <20121205155530.GL335@kaka.it.su.se> References: <50BC8675.8030702@rabbitmq.com> <50BC8B53.4050103@rabbitmq.com> <20121205110530.GG335@kaka.it.su.se> <50BF2B5A.4030409@rabbitmq.com> <8F6E4796-D862-4305-A256-EE1AC757EF05@rabbitmq.com> <20121205131221.GH335@kaka.it.su.se> <20121205134204.GK335@kaka.it.su.se> <24509631-CA1C-4A55-8E66-87E11E4E5D83@rabbitmq.com> <20121205155530.GL335@kaka.it.su.se> Message-ID: <20121211162045.GE754@kaka.it.su.se> That was easy. The only hard thing was to get it to compile correctly on OS X = ). (Note to future readers see ) The NIF needs to be loaded at some point and from the examples and documentation I've found that it's done via -on_load, like this: However, I've tried using -on_load before in my plugin and it didn't work. I suspected that the -behaviour had some magic which involved -on_load and using -on_load in your model bricks that. I worked around needing -on_load and forgot about it. However, now I need it again. This is from the error log: When logging in via AMQP: =ERROR REPORT==== 11-Dec-2012::09:57:02 === closing AMQP connection <0.287.0> (130.237.168.221:48736 -> 77.238.35.76:5671): {channel0_error,starting, {error,undef,'connection.start_ok', [{rabbit_auth_backend_kerberos,check_user_login, [<<"simlu">>,[{password,<<"notmypassword">>}]]}, {rabbit_access_control,'-check_user_login/2-fun-0-',4}, {lists,foldl,3}, {rabbit_reader,auth_phase,2}, {rabbit_reader,handle_method0,3}, {rabbit_reader,handle_input,3}, {rabbit_reader,recvloop,2}, {rabbit_reader,start_connection,7}]}} when using the API (this is in the sasl log): =CRASH REPORT==== 11-Dec-2012::11:51:04 === crasher: initial call: mochiweb_acceptor:init/3 pid: <0.256.0> registered_name: [] exception error: undefined function rabbit_auth_backend_kerberos:check_user_login/2 in function rabbit_access_control:'-check_user_login/2-fun-0-'/4 in call from lists:foldl/3 in call from rabbit_mgmt_app:'-make_loop/0-fun-0-'/4 in call from mochiweb_http:headers/5 ancestors: [rabbit_mochiweb_web_mgmt,rabbit_mochiweb_sup,<0.132.0>] messages: [] links: [<0.252.0>] dictionary: [] trap_exit: false status: running heap_size: 4181 stack_size: 24 reductions: 1467 neighbours: Thanks, - Simon From eric at ericswann.org Tue Dec 11 16:38:24 2012 From: eric at ericswann.org (eric_swann) Date: Tue, 11 Dec 2012 08:38:24 -0800 (PST) Subject: [rabbitmq-discuss] C# client publisher confirm bug under load (2.8.7) In-Reply-To: <50C6356A.10206@rabbitmq.com> References: <9092b42e-94de-4f8f-87a9-daa2024cef5b@googlegroups.com> <37f7548c-790f-4f16-8c88-be3d4a05800d@googlegroups.com> <50C6356A.10206@rabbitmq.com> Message-ID: <1355243904786-23983.post@n5.nabble.com> OK, thanks for the info, I'm using MassTransit on top of Rabbit, so I'll delve into the code here and see what can be done. -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/C-client-publisher-confirm-bug-under-load-2-8-7-tp23941p23983.html Sent from the RabbitMQ mailing list archive at Nabble.com. From emile at rabbitmq.com Tue Dec 11 16:55:12 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Tue, 11 Dec 2012 16:55:12 +0000 Subject: [rabbitmq-discuss] Unable to read the last published message In-Reply-To: <1355236851444-23980.post@n5.nabble.com> References: <1355196905004-23964.post@n5.nabble.com> <50C70826.8010001@rabbitmq.com> <1355236851444-23980.post@n5.nabble.com> Message-ID: <50C76570.2020802@rabbitmq.com> Hi Anthony, On 11/12/12 14:40, antony wrote: > Now what I need is a way to remove the existing message from the queue when > a new message arrives. Any thoughts ? If such messages are not mixed with other messages then you could emulate that in the client. Message consumers can obtain the queue length (e.g. by using basic.get or queue.declare). This information can be used to ignore older messages and only act on the most recent message. This won't work if the relevant messages are mixed in with other messages, and you will need to be careful if there are multiple consumers reading from the same queue. -Emile From tim at rabbitmq.com Tue Dec 11 17:07:02 2012 From: tim at rabbitmq.com (Tim Watson) Date: Tue, 11 Dec 2012 17:07:02 +0000 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <20121211162045.GE754@kaka.it.su.se> References: <50BC8675.8030702@rabbitmq.com> <50BC8B53.4050103@rabbitmq.com> <20121205110530.GG335@kaka.it.su.se> <50BF2B5A.4030409@rabbitmq.com> <8F6E4796-D862-4305-A256-EE1AC757EF05@rabbitmq.com> <20121205131221.GH335@kaka.it.su.se> <20121205134204.GK335@kaka.it.su.se> <24509631-CA1C-4A55-8E66-87E11E4E5D83@rabbitmq.com> <20121205155530.GL335@kaka.it.su.se> <20121211162045.GE754@kaka.it.su.se> Message-ID: On 11 Dec 2012, at 16:20, Simon Lundstr?m wrote: > That was easy. The only hard thing was to get it to compile correctly on > OS X = ). Glad it was, and *not at all surprised* it's a pain on OSX - I frequently have issues there as well with .dylib vs .so and whatnot when making linked-in drivers. > (Note to future readers see > ) > Thanks for sharing that with the list! > The NIF needs to be loaded at some point and from the examples and > documentation I've found that it's done via -on_load, like this: > > That *is* the correct way to load a NIF. > However, I've tried using -on_load before in my plugin and it didn't > work. I suspected that the -behaviour had some magic which involved > -on_load and using -on_load in your model bricks that. I worked around > needing -on_load and forgot about it. However, now I need it again. This > is from the error log: > -behaviour doesn't affect NIFs at all AFAIK - that behaviour attribute just tells the compiler to puke unless certain functions are defined and exported, and generates a behaviour_info/2 function. Hmn, perhaps that latter part *does* interfere with NIFs, but I've never heard of that before. > When logging in via AMQP: > > =ERROR REPORT==== 11-Dec-2012::09:57:02 === > closing AMQP connection <0.287.0> (130.237.168.221:48736 -> 77.238.35.76:5671): > {channel0_error,starting, > {error,undef,'connection.start_ok', > [{rabbit_auth_backend_kerberos,check_user_login, > [<<"simlu">>,[{password,<<"notmypassword">>}]]}, That's not saying check_user_login is undefined. In fact, check_user_login is not even part of the NIF infrastructure. It looks like it's saying 'connection.start_ok' is undefined. Hmn - doesn't make much sense to me I'm afraid. What happens if you move the NIF part out into another module, using the -on_load attribute there and then just call that utility module from your plugin? -module(kinit). -export([init/0, kinit/2]). -on_load(init/0). init() -> Kinit = code:priv_dir(?APPLICATION) ++ "/kinit.so", erlang:load_nif(Kinit, 0). kinit(User, Password) -> exit(nif_library_not_loaded). And then in rabbit_auth_backend_kerberos just call: case kinit:kinit(User, PassWd) of ..... Anyway, if you put the NIF part into another module, you *should* be able to test it outside of rabbit my doing something like: $ erl -sname foo banner. ..... % ok = application:start(rabbit_auth_backend_kerberos). ok % X = kinit:kinit("auser", "password"). << a term >> % io:format("~p~n", [X]). Then if it *still* doesn't work when you're running it inside rabbit we might need to consider other things that could be going wrong (such as the NIF init magic). Cheers, Tim > {rabbit_access_control,'-check_user_login/2-fun-0-',4}, > {lists,foldl,3}, > {rabbit_reader,auth_phase,2}, > {rabbit_reader,handle_method0,3}, > {rabbit_reader,handle_input,3}, > {rabbit_reader,recvloop,2}, > {rabbit_reader,start_connection,7}]}} > > when using the API (this is in the sasl log): > > =CRASH REPORT==== 11-Dec-2012::11:51:04 === > crasher: > initial call: mochiweb_acceptor:init/3 > pid: <0.256.0> > registered_name: [] > exception error: undefined function rabbit_auth_backend_kerberos:check_user_login/2 > in function rabbit_access_control:'-check_user_login/2-fun-0-'/4 > in call from lists:foldl/3 > in call from rabbit_mgmt_app:'-make_loop/0-fun-0-'/4 > in call from mochiweb_http:headers/5 > ancestors: [rabbit_mochiweb_web_mgmt,rabbit_mochiweb_sup,<0.132.0>] > messages: [] > links: [<0.252.0>] > dictionary: [] > trap_exit: false > status: running > heap_size: 4181 > stack_size: 24 > reductions: 1467 > neighbours: > > > Thanks, > - Simon > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From tim at rabbitmq.com Tue Dec 11 17:13:50 2012 From: tim at rabbitmq.com (Tim Watson) Date: Tue, 11 Dec 2012 17:13:50 +0000 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: References: <50BC8675.8030702@rabbitmq.com> <50BC8B53.4050103@rabbitmq.com> <20121205110530.GG335@kaka.it.su.se> <50BF2B5A.4030409@rabbitmq.com> <8F6E4796-D862-4305-A256-EE1AC757EF05@rabbitmq.com> <20121205131221.GH335@kaka.it.su.se> <20121205134204.GK335@kaka.it.su.se> <24509631-CA1C-4A55-8E66-87E11E4E5D83@rabbitmq.com> <20121205155530.GL335@kaka.it.su.se> <20121211162045.GE754@kaka.it.su.se> Message-ID: HOLD ON. If your plugin is packaged as an .ez file (which rabbit plugins usually are) then I wonder if the .so file is not accessible? This is a known issue with drivers, as no operating system I know of will allow dynamic loading from a non file system location. On the other hand, I think rabbit unpacks plugins that are enabled into RABBITMQ_PLUGINS_EXPAND_DIR - can you see the dynamic library (.so or .dylib) file in there? Anyway, my suspicion is that when you're loading the NIF, it is not in the file system location you think it is. This could be because of the way plugins are expanded, but I'm just guessing there TBH. More likely perhaps, the name that you pass to code:priv_dir/1 is wrong. You're currently using `begin {ok, A} = application:get_application(?MODULE), A end` and I wonder if that's returning what you think it is? And *also* do you know if the application is actually fully loaded (and its environment setup correctly in the erlang node's application controller) at the time which the on_load target is being called? Perhaps calling application:get_env/1 is not such a good idea when initialising a NIF. Instead of doing that, try hard coding it: init() -> Kinit = filename:join(code:priv_dir(rabbit_auth_backend_kerberos), "/kinit.so"), erlang:load_nif(Kinit, 0). On 11 Dec 2012, at 17:07, Tim Watson wrote: > > On 11 Dec 2012, at 16:20, Simon Lundstr?m wrote: > >> That was easy. The only hard thing was to get it to compile correctly on >> OS X = ). > > Glad it was, and *not at all surprised* it's a pain on OSX - I frequently have issues there as well with .dylib vs .so and whatnot when making linked-in drivers. > >> (Note to future readers see >> ) >> > > Thanks for sharing that with the list! > >> The NIF needs to be loaded at some point and from the examples and >> documentation I've found that it's done via -on_load, like this: >> >> > > That *is* the correct way to load a NIF. > >> However, I've tried using -on_load before in my plugin and it didn't >> work. I suspected that the -behaviour had some magic which involved >> -on_load and using -on_load in your model bricks that. I worked around >> needing -on_load and forgot about it. However, now I need it again. This >> is from the error log: >> > > -behaviour doesn't affect NIFs at all AFAIK - that behaviour attribute just tells the compiler to puke unless certain functions are defined and exported, and generates a behaviour_info/2 function. Hmn, perhaps that latter part *does* interfere with NIFs, but I've never heard of that before. > >> When logging in via AMQP: >> >> =ERROR REPORT==== 11-Dec-2012::09:57:02 === >> closing AMQP connection <0.287.0> (130.237.168.221:48736 -> 77.238.35.76:5671): >> {channel0_error,starting, >> {error,undef,'connection.start_ok', >> [{rabbit_auth_backend_kerberos,check_user_login, >> [<<"simlu">>,[{password,<<"notmypassword">>}]]}, > > > That's not saying check_user_login is undefined. In fact, check_user_login is not even part of the NIF infrastructure. It looks like it's saying 'connection.start_ok' is undefined. Hmn - doesn't make much sense to me I'm afraid. What happens if you move the NIF part out into another module, using the -on_load attribute there and then just call that utility module from your plugin? > > -module(kinit). > > -export([init/0, kinit/2]). > -on_load(init/0). > > init() -> > Kinit = code:priv_dir(?APPLICATION) ++ "/kinit.so", > erlang:load_nif(Kinit, 0). > > kinit(User, Password) -> exit(nif_library_not_loaded). > > > And then in rabbit_auth_backend_kerberos just call: > > case kinit:kinit(User, PassWd) of ..... > > Anyway, if you put the NIF part into another module, you *should* be able to test it outside of rabbit my doing something like: > > $ erl -sname foo > banner. ..... > % ok = application:start(rabbit_auth_backend_kerberos). > ok > % X = kinit:kinit("auser", "password"). > << a term >> > % io:format("~p~n", [X]). > > > Then if it *still* doesn't work when you're running it inside rabbit we might need to consider other things that could be going wrong (such as the NIF init magic). > > Cheers, > Tim > >> {rabbit_access_control,'-check_user_login/2-fun-0-',4}, >> {lists,foldl,3}, >> {rabbit_reader,auth_phase,2}, >> {rabbit_reader,handle_method0,3}, >> {rabbit_reader,handle_input,3}, >> {rabbit_reader,recvloop,2}, >> {rabbit_reader,start_connection,7}]}} >> >> when using the API (this is in the sasl log): >> >> =CRASH REPORT==== 11-Dec-2012::11:51:04 === >> crasher: >> initial call: mochiweb_acceptor:init/3 >> pid: <0.256.0> >> registered_name: [] >> exception error: undefined function rabbit_auth_backend_kerberos:check_user_login/2 >> in function rabbit_access_control:'-check_user_login/2-fun-0-'/4 >> in call from lists:foldl/3 >> in call from rabbit_mgmt_app:'-make_loop/0-fun-0-'/4 >> in call from mochiweb_http:headers/5 >> ancestors: [rabbit_mochiweb_web_mgmt,rabbit_mochiweb_sup,<0.132.0>] >> messages: [] >> links: [<0.252.0>] >> dictionary: [] >> trap_exit: false >> status: running >> heap_size: 4181 >> stack_size: 24 >> reductions: 1467 >> neighbours: >> >> >> Thanks, >> - Simon >> _______________________________________________ >> rabbitmq-discuss mailing list >> rabbitmq-discuss at lists.rabbitmq.com >> 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 From matthias at rabbitmq.com Tue Dec 11 18:49:32 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Tue, 11 Dec 2012 18:49:32 +0000 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: References: <50BC8675.8030702@rabbitmq.com> <50BC8B53.4050103@rabbitmq.com> <20121205110530.GG335@kaka.it.su.se> <50BF2B5A.4030409@rabbitmq.com> <8F6E4796-D862-4305-A256-EE1AC757EF05@rabbitmq.com> <20121205131221.GH335@kaka.it.su.se> <20121205134204.GK335@kaka.it.su.se> <24509631-CA1C-4A55-8E66-87E11E4E5D83@rabbitmq.com> <20121205155530.GL335@kaka.it.su.se> <20121211162045.GE754@kaka.it.su.se> Message-ID: <50C7803C.6020006@rabbitmq.com> On 11/12/12 17:07, Tim Watson wrote: > On 11 Dec 2012, at 16:20, Simon Lundstr?m wrote: >> =ERROR REPORT==== 11-Dec-2012::09:57:02 === >> closing AMQP connection <0.287.0> (130.237.168.221:48736 -> 77.238.35.76:5671): >> {channel0_error,starting, >> {error,undef,'connection.start_ok', >> [{rabbit_auth_backend_kerberos,check_user_login, >> [<<"simlu">>,[{password,<<"notmypassword">>}]]}, > > > That's not saying check_user_login is undefined. Actually that *is* what it is saying. > It looks like it's saying 'connection.start_ok' is undefined. Nah, that's just reader associating every error with the AMQP method that triggered it, which in this case is connection.start_ok. Regards, Matthias. From simlu at su.se Tue Dec 11 18:50:19 2012 From: simlu at su.se (Simon =?iso-8859-1?Q?Lundstr=F6m?=) Date: Tue, 11 Dec 2012 19:50:19 +0100 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: References: <50BF2B5A.4030409@rabbitmq.com> <8F6E4796-D862-4305-A256-EE1AC757EF05@rabbitmq.com> <20121205131221.GH335@kaka.it.su.se> <20121205134204.GK335@kaka.it.su.se> <24509631-CA1C-4A55-8E66-87E11E4E5D83@rabbitmq.com> <20121205155530.GL335@kaka.it.su.se> <20121211162045.GE754@kaka.it.su.se> Message-ID: <20121211185019.GF754@kaka.it.su.se> On Tue, 2012-12-11 at 17:13:50 +0000, Tim Watson wrote: > HOLD ON. > > If your plugin is packaged as an .ez file (which rabbit plugins usually are) then I wonder if the .so file is not accessible? I don't think this is it, because... > This is a known issue with drivers, as no operating system I know of will allow dynamic loading from a non file system location. On the other hand, I think rabbit unpacks plugins that are enabled into RABBITMQ_PLUGINS_EXPAND_DIR - can you see the dynamic library (.so or .dylib) file in there? ..I see my .so there and if I use a static path it "works". > Anyway, my suspicion is that when you're loading the NIF, it is not in the file system location you think it is. This could be because of the way plugins are expanded, but I'm just guessing there TBH. More likely perhaps, the name that you pass to code:priv_dir/1 is wrong. You're currently using `begin {ok, A} = application:get_application(?MODULE), A end` and I wonder if that's returning what you think it is? And *also* do you know if the application is actually fully loaded (and its environment setup correctly in the erlang node's application controller) at the time which the on_load target is being called? Perhaps calling application:get_env/1 is not such a good idea when initialising a NIF. This is almost what I suspect happens, but... > Instead of doing that, try hard coding it: > > init() -> > Kinit = filename:join(code:priv_dir(rabbit_auth_backend_kerberos), "/kinit.so"), > erlang:load_nif(Kinit, 0). ..this code how ever doesn't work. It gives me: =ERROR REPORT==== 11-Dec-2012::19:42:17 === NEIN: {error,bad_name} =ERROR REPORT==== 11-Dec-2012::19:42:17 === Error in process <0.346.0> on node 'rabbit at rabbitmq-test-disk01.it.su.se' with exit value: {function_clause,[{filename,join,[{error,bad_na me},"/kinit.so"]},{rabbit_auth_backend_kerberos,init,0},{code_server,'-handle_on_load/4-fun-0-',1}]} when I use the following code: I'm thinking my module isn't loaded yet and so that's why it doesn't appear in the list of loaded apps/modules. If I use a static path I get the same error message(s) as I said before ("undefined function rabbit_auth_backend_kerberos:check_user_login/2"). I'll try your other suggestion to put kinit in a seperate module. Thanks, - Simon From simlu at su.se Tue Dec 11 19:38:03 2012 From: simlu at su.se (Simon =?iso-8859-1?Q?Lundstr=F6m?=) Date: Tue, 11 Dec 2012 20:38:03 +0100 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: References: <20121205110530.GG335@kaka.it.su.se> <50BF2B5A.4030409@rabbitmq.com> <8F6E4796-D862-4305-A256-EE1AC757EF05@rabbitmq.com> <20121205131221.GH335@kaka.it.su.se> <20121205134204.GK335@kaka.it.su.se> <24509631-CA1C-4A55-8E66-87E11E4E5D83@rabbitmq.com> <20121205155530.GL335@kaka.it.su.se> <20121211162045.GE754@kaka.it.su.se> Message-ID: <20121211193803.GG754@kaka.it.su.se> On Tue, 2012-12-11 at 17:07:02 +0000, Tim Watson wrote: > That's not saying check_user_login is undefined. In fact, check_user_login is not even part of the NIF infrastructure. It looks like it's saying 'connection.start_ok' is undefined. Hmn - doesn't make much sense to me I'm afraid. What happens if you move the NIF part out into another module, using the -on_load attribute there and then just call that utility module from your plugin? > > -module(kinit). > > -export([init/0, kinit/2]). > -on_load(init/0). > > init() -> > Kinit = code:priv_dir(?APPLICATION) ++ "/kinit.so", > erlang:load_nif(Kinit, 0). > > kinit(User, Password) -> exit(nif_library_not_loaded). I just did this (browse here ) and now I get: =INFO REPORT==== 11-Dec-2012::20:09:32 === Management agent started. =ERROR REPORT==== 11-Dec-2012::20:09:32 === WAT: {error,upgrade,"Upgrade not supported by this NIF library."} =ERROR REPORT==== 11-Dec-2012::20:09:32 === WAT: ok =INFO REPORT==== 11-Dec-2012::20:09:32 === Management plugin started. Port: 443, path: / =INFO REPORT==== 11-Dec-2012::20:09:32 === Statistics database started. =INFO REPORT==== 11-Dec-2012::20:09:46 === accepting AMQP connection <0.287.0> (130.237.168.221:48918 -> 77.238.35.76:5671) =ERROR REPORT==== 11-Dec-2012::20:09:46 === WAT: {error,upgrade,"Upgrade not supported by this NIF library."} =ERROR REPORT==== 11-Dec-2012::20:09:49 === closing AMQP connection <0.287.0> (130.237.168.221:48918 -> 77.238.35.76:5671): {channel0_error,starting, {error,undef,'connection.start_ok', [{kinit,kinit,[<<"simlu">>,<<"not_my_password">>]}, {rabbit_auth_backend_kerberos,check_user_login,2}, {rabbit_access_control,'-check_user_login/2-fun-0-',4}, {lists,foldl,3}, {rabbit_reader,auth_phase,2}, {rabbit_reader,handle_method0,3}, {rabbit_reader,handle_input,3}, {rabbit_reader,recvloop,2}]}} when using AMQP login and this when I make an API call: =CRASH REPORT==== 11-Dec-2012::20:10:27 === crasher: initial call: mochiweb_acceptor:init/3 pid: <0.252.0> registered_name: [] exception error: undefined function kinit:kinit/2 in function rabbit_auth_backend_kerberos:check_user_login/2 in call from rabbit_access_control:'-check_user_login/2-fun-0-'/4 in call from lists:foldl/3 in call from rabbit_mgmt_app:'-make_loop/0-fun-0-'/4 in call from mochiweb_http:headers/5 ancestors: [rabbit_mochiweb_web_mgmt,rabbit_mochiweb_sup,<0.131.0>] messages: [] links: [<0.251.0>] dictionary: [] trap_exit: false status: running heap_size: 4181 stack_size: 24 reductions: 1488 neighbours: How bad are those upgrade errors? AFAIK, I could just add an empty function in kinit.c and use them as load, reload, upgrade and unload when doing ERL_NIF_INIT since I don't really need to keep any "state"(?). > Anyway, if you put the NIF part into another module, you *should* be able to test it outside of rabbit my doing something like: > > $ erl -sname foo > banner. ..... > % ok = application:start(rabbit_auth_backend_kerberos). > ok > % X = kinit:kinit("auser", "password"). > << a term >> > % io:format("~p~n", [X]). I couldn't get that to work = / I'm probably doing it wrong, but here's what I did: kaka:~/scm/rabbitmq-public-umbrella/rabbitmq-auth-backend-kerberos$ LDFLAGS="-L/usr/heimdal/lib -undefined dynamic_lookup -dynamiclib" CFLAGS="-I/usr/heimdal/include -I/usr/local/Cellar/erlang/R15B02/lib/erlang/usr/include/" make dist [elided] generate deps [elided] fix test deps sed -e 's|build/deps.mk|$(DEPS_FILE)|' build/deps.mk > build/deps.mk.tmp && mv build/deps.mk.tmp build/deps.mk ERL_LIBS=./build/dep-apps erlc -Wall +debug_info -I ./include -pa ebin -o ebin src/kinit.erl src/kinit.erl:14: Warning: variable 'Password' is unused src/kinit.erl:14: Warning: variable 'User' is unused escript ../generate_app src/rabbitmq_auth_backend_kerberos.app.src ebin/rabbitmq_auth_backend_kerberos.app ./src sed -e 's|{vsn, *\"[^\"]*\"|{vsn,\"0.0.0\"|' build/rabbitmq_auth_backend_kerberos.app.0.0.0 rm -rf build/app mkdir -p ./build/app/rabbitmq_auth_backend_kerberos-0.0.0/ebin ./build/app/rabbitmq_auth_backend_kerberos-0.0.0/include [elided] copy beams to ebin cp -p ./build/rabbitmq_auth_backend_kerberos.app.0.0.0 ./build/app/rabbitmq_auth_backend_kerberos-0.0.0/ebin/rabbitmq_auth_backend_kerberos.app mkdir -p ./build/app/rabbitmq_auth_backend_kerberos-0.0.0/priv cp ./c_src/kinit.so ./build/app/rabbitmq_auth_backend_kerberos-0.0.0/priv touch build/app/.done.0.0.0 rm -rf dist mkdir -p dist cd ./build/app/ && zip -q -r /Users/simlu/scm/rabbitmq-public-umbrella/rabbitmq-auth-backend-kerberos/dist/rabbitmq_auth_backend_kerberos-0.0.0.ez rabbitmq_auth_backend_kerberos-0.0.0 cp -r build/dep-ezs/amqp_client-0.0.0.ez build/dep-ezs/rabbit_common-0.0.0.ez ./dist touch dist/.done.0.0.0 touch dist/.done $ cd ebin $ erl -sname `hostname -s` Erlang R15B02 (erts-5.9.2) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false] [dtrace] Eshell V5.9.2 (abort with ^G) (kaka at kaka)1> ok = application:start(rabbitmq_auth_backend_kerberos). ** exception error: no match of right hand side value {error,{not_started,inets}} (kaka at kaka)2> kinit:kinit("auser", "password"). WAT: ok true This doesn't really test the whole thing since rabbitmq isn't really involved or even loaded. Kind of feels like cheating = ) I have had this NIF-code to work outside of RabbitMQ, that's how I wrote it originally. (also, do get it working I changed the hardencoded path to match the path on my Mac and I changed "rabbit_log:error" to "io:fwrite" since RabbitMQ wasn't loaded correctly in my erl. > Then if it *still* doesn't work when you're running it inside rabbit we might need to consider other things that could be going wrong (such as the NIF init magic). I have no idea, but this seems more and more likely. Thanks, - Simon From tim at rabbitmq.com Tue Dec 11 20:30:24 2012 From: tim at rabbitmq.com (Tim Watson) Date: Tue, 11 Dec 2012 20:30:24 +0000 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <20121211193803.GG754@kaka.it.su.se> References: <20121205110530.GG335@kaka.it.su.se> <50BF2B5A.4030409@rabbitmq.com> <8F6E4796-D862-4305-A256-EE1AC757EF05@rabbitmq.com> <20121205131221.GH335@kaka.it.su.se> <20121205134204.GK335@kaka.it.su.se> <24509631-CA1C-4A55-8E66-87E11E4E5D83@rabbitmq.com> <20121205155530.GL335@kaka.it.su.se> <20121211162045.GE754@kaka.it.su.se> <20121211193803.GG754@kaka.it.su.se> Message-ID: <4D859580-D762-4BFA-A759-43F94B500FC7@rabbitmq.com> Hey Simon On 11 Dec 2012, at 19:38, Simon Lundstr?m wrote: > > =INFO REPORT==== 11-Dec-2012::20:09:32 === Management agent started. > > =ERROR REPORT==== 11-Dec-2012::20:09:32 === > WAT: {error,upgrade,"Upgrade not supported by this NIF library."} > > > =ERROR REPORT==== 11-Dec-2012::20:09:49 === > closing AMQP connection <0.287.0> (130.237.168.221:48918 -> 77.238.35.76:5671): > {channel0_error,starting, > {error,undef,'connection.start_ok', > [{kinit,kinit,[<<"simlu">>,<<"not_my_password">>]}, > {rabbit_auth_backend_kerberos,check_user_login,2}, > {rabbit_access_control,'-check_user_login/2-fun-0-',4}, > {lists,foldl,3}, > {rabbit_reader,auth_phase,2}, > {rabbit_reader,handle_method0,3}, > {rabbit_reader,handle_input,3}, > {rabbit_reader,recvloop,2}]}} > > when using AMQP login and this when I make an API call: > I'm not sure why that is, but it looks like the NIF module isn't loaded properly for some reason. > How bad are those upgrade errors? > AFAIK, I could just add an empty function in kinit.c and use them as > load, reload, upgrade and unload when doing ERL_NIF_INIT since I don't > really need to keep any "state"(?). > Yeah so if you don't want all that noise in your logs, just export empty definitions for them. >> Anyway, if you put the NIF part into another module, you *should* be able to test it outside of rabbit my doing something like: >> >> $ erl -sname foo >> banner. ..... >> % ok = application:start(rabbit_auth_backend_kerberos). >> ok >> % X = kinit:kinit("auser", "password"). >> << a term >> >> % io:format("~p~n", [X]). > > I couldn't get that to work = / I'm probably doing it wrong, but here's what I did: > > $ erl -sname `hostname -s` > Erlang R15B02 (erts-5.9.2) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false] [dtrace] > > Eshell V5.9.2 (abort with ^G) > (kaka at kaka)1> ok = application:start(rabbitmq_auth_backend_kerberos). > ** exception error: no match of right hand side value {error,{not_started,inets}} Ok well that's just complaining that your .app resource file states that inets is required by your application and you've not started it first is all. Nothing to worry about there, as rabbit deals with that kind of thing *BUT* why are you depending on inets? Is your application doing erlang network related stuff? > (kaka at kaka)2> kinit:kinit("auser", "password"). > WAT: ok > true > > This doesn't really test the whole thing since rabbitmq isn't really > involved or even loaded. Kind of feels like cheating = ) > It's not cheating, it's isolating where the problem is. :) > I have had this NIF-code to work outside of RabbitMQ, that's how I wrote > it originally. > > Yeah so that was what I wanted to check. >> Then if it *still* doesn't work when you're running it inside rabbit we might need to consider other things that could be going wrong (such as the NIF init magic). > > I have no idea, but this seems more and more likely. > Hmn seems so. It's getting on a bit now, but I'll poke around in the broker code tomorrow and see if anything stands out. The really interesting point is that the kinit:kinit call (which is oddly named IMHO btw) works *regardless* of whether or not the application is loaded, so it's unlikely to be that which is at fault afaict. From pierpaolo at dropbox.com Wed Dec 12 01:32:44 2012 From: pierpaolo at dropbox.com (Pierpaolo Baccichet) Date: Tue, 11 Dec 2012 17:32:44 -0800 Subject: [rabbitmq-discuss] Latency of publish confirm In-Reply-To: <50BF41DF.8040307@rabbitmq.com> References: <50BDBA71.6010004@rabbitmq.com> <50BDC0CF.4040900@rabbitmq.com> <50BE2248.4070103@rabbitmq.com> <50BF22F2.2070802@rabbitmq.com> <50BF41DF.8040307@rabbitmq.com> Message-ID: I waited for 3.0.1 to come out to run the validation only once and looks good. Thanks for the fix guys! Pier On Wed, Dec 5, 2012 at 4:45 AM, Matthias Radestock wrote: > On 05/12/12 10:33, Simon MacMullen wrote: > >> On 04/12/12 19:26, Pierpaolo Baccichet wrote: >> >>> Do you happen to already know where the timeout is? I would be happy to >>> change it on my local repo and run a validation on it >>> >> >> Sure. >> >> The timeout in question is BROADCAST_TIMER here: >> >> http://hg.rabbitmq.com/**rabbitmq-server/file/stable/**src/gm.erl#l394 >> >> Just reducing that should improve latency in your case (at the cost of >> throughput in other cases). The real fix is going to be a tiny bit more >> involved though. >> > > The real fix is here: http://hg.rabbitmq.com/**rabbitmq-server/rev/** > b1f129a5a85b . > This should appear in tonight's nightly build (http://www.rabbitmq.com/** > nightlies/rabbitmq-server/**current/) > in about 16 hours. > > Matthias. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simlu at su.se Wed Dec 12 09:31:15 2012 From: simlu at su.se (Simon =?iso-8859-1?Q?Lundstr=F6m?=) Date: Wed, 12 Dec 2012 10:31:15 +0100 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <4D859580-D762-4BFA-A759-43F94B500FC7@rabbitmq.com> References: <8F6E4796-D862-4305-A256-EE1AC757EF05@rabbitmq.com> <20121205131221.GH335@kaka.it.su.se> <20121205134204.GK335@kaka.it.su.se> <24509631-CA1C-4A55-8E66-87E11E4E5D83@rabbitmq.com> <20121205155530.GL335@kaka.it.su.se> <20121211162045.GE754@kaka.it.su.se> <20121211193803.GG754@kaka.it.su.se> <4D859580-D762-4BFA-A759-43F94B500FC7@rabbitmq.com> Message-ID: <20121212093115.GH754@kaka.it.su.se> On Tue, 2012-12-11 at 20:30:24 +0000, Tim Watson wrote: > On 11 Dec 2012, at 19:38, Simon Lundstr?m wrote: > > > > =INFO REPORT==== 11-Dec-2012::20:09:32 === Management agent started. > > > > =ERROR REPORT==== 11-Dec-2012::20:09:32 === > > WAT: {error,upgrade,"Upgrade not supported by this NIF library."} > > > > > > =ERROR REPORT==== 11-Dec-2012::20:09:49 === > > closing AMQP connection <0.287.0> (130.237.168.221:48918 -> 77.238.35.76:5671): > > {channel0_error,starting, > > {error,undef,'connection.start_ok', > > [{kinit,kinit,[<<"simlu">>,<<"not_my_password">>]}, > > {rabbit_auth_backend_kerberos,check_user_login,2}, > > {rabbit_access_control,'-check_user_login/2-fun-0-',4}, > > {lists,foldl,3}, > > {rabbit_reader,auth_phase,2}, > > {rabbit_reader,handle_method0,3}, > > {rabbit_reader,handle_input,3}, > > {rabbit_reader,recvloop,2}]}} > > > > when using AMQP login and this when I make an API call: > > > > I'm not sure why that is, but it looks like the NIF module isn't loaded properly for some reason. That is what it looks like, yes. > > How bad are those upgrade errors? > > AFAIK, I could just add an empty function in kinit.c and use them as > > load, reload, upgrade and unload when doing ERL_NIF_INIT since I don't > > really need to keep any "state"(?). > Yeah so if you don't want all that noise in your logs, just export empty definitions for them. I did that, error/warning went away but it's still not working. > >> Anyway, if you put the NIF part into another module, you *should* be able to test it outside of rabbit my doing something like: > >> > >> $ erl -sname foo > >> banner. ..... > >> % ok = application:start(rabbit_auth_backend_kerberos). > >> ok > >> % X = kinit:kinit("auser", "password"). > >> << a term >> > >> % io:format("~p~n", [X]). > > > > I couldn't get that to work = / I'm probably doing it wrong, but here's what I did: > > > > $ erl -sname `hostname -s` > > Erlang R15B02 (erts-5.9.2) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false] [dtrace] > > > > Eshell V5.9.2 (abort with ^G) > > (kaka at kaka)1> ok = application:start(rabbitmq_auth_backend_kerberos). > > ** exception error: no match of right hand side value {error,{not_started,inets}} > > Ok well that's just complaining that your .app resource file states that inets is required by your application and you've not started it first is all. Nothing to worry about there, as rabbit deals with that kind of thing *BUT* why are you depending on inets? Is your application doing erlang network related stuff? Not at all, I removed it, thanks. > >> Then if it *still* doesn't work when you're running it inside rabbit we might need to consider other things that could be going wrong (such as the NIF init magic). > > > > I have no idea, but this seems more and more likely. > > Hmn seems so. It's getting on a bit now, but I'll poke around in the broker code tomorrow and see if anything stands out. The really interesting point is that the kinit:kinit call (which is oddly named IMHO btw) works *regardless* of whether or not the application is loaded, so it's unlikely to be that which is at fault afaict. I'm interested to hear what you have found. Many thanks, - Simon From balteo at gmail.com Wed Dec 12 12:01:22 2012 From: balteo at gmail.com (Julien Martin) Date: Wed, 12 Dec 2012 13:01:22 +0100 Subject: [rabbitmq-discuss] Producing an amqp message using python and consuming that same message using java Message-ID: Hello, *I am trying to produce an amqp message from python and consume that same message from java/spring.* Here is my *producer* code (python): import pika, sys, pickle sys.path.append("trc/suivi/amqp") from Person import Person connection = pika.BlockingConnection() channel = connection.channel() me = Person("Juliano", 38) pickled_me = pickle.dumps(me) channel.basic_publish(exchange='', routing_key="myqueue", body=pickled_me, properties=pika.BasicProperties(delivery_mode=1)) Here is my *consumer* code (java): ApplicationContext context = new GenericXmlApplicationContext("classpath:/applicationContext.xml");AmqpTemplate template = context.getBean(AmqpTemplate.class);Person me = (Person) template.receiveAndConvert("myqueue");System.out.println("Me: " + me.getName() + ":" + me.getAge()); Here is the java class for Person: package trc.suivi.amqp; import java.io.Serializable; public class Person implements Serializable { private static final long serialVersionUID = 1L; private String name; private int age; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } } and the corresponding python class: class Person: def __init__(self, name, age): self.name = name self.age = age (located in *trc/suivi/amqp* directory structure) I get a *class cast exception*. I am pretty sure this has to do either with the package/module name or with some serialization issue... Can anyone please help? Regards, Julien. -------------- next part -------------- An HTML attachment was scrubbed... URL: From emile at rabbitmq.com Wed Dec 12 12:39:26 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Wed, 12 Dec 2012 12:39:26 +0000 Subject: [rabbitmq-discuss] Producing an amqp message using python and consuming that same message using java In-Reply-To: References: Message-ID: <50C87AFE.7060604@rabbitmq.com> Hi Julien, On 12/12/12 12:01, Julien Martin wrote: > pickled_me = pickle.dumps(me) > Person me = (Person) template.receiveAndConvert("myqueue"); > I get a *class cast exception* It looks like you are attempting to mix Python and Java serialisation formats. RabbitMQ does not modify or process the message payload in any way, so if you use incompatible formats then the broker won't solve that problem for you. I suggest you select a serialisation format that is supported by all languages that need to interoperate. JSON, XML, Protocol Buffers and YAML are popular choices, but there are many more, e.g. see http://en.wikipedia.org/wiki/Category:Data_serialization_formats Once you have selected and implemented a compatible serialisation format you should test it by serialising to and deserialising from files. Once you have that working you can use a broker to pass messages in your chosen serialisation format between clients. -Emile From robmalko at gmail.com Wed Dec 12 11:02:02 2012 From: robmalko at gmail.com (Robert Malko) Date: Wed, 12 Dec 2012 03:02:02 -0800 (PST) Subject: [rabbitmq-discuss] "rabbitmqctl status" hangs Message-ID: <34c25610-e1f5-4110-bc20-49306d7910fa@googlegroups.com> ubuntu 10.04, happens on both 3.0.0 and 3.0.1 (just upgraded). Erlang R15B02 plugins: rabbitmq_management/rabbitmq_web_stomp/rabbitmq_web_stomp_examples just hangs after "Status of node rabbit at messaging01 ..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From robmalko at gmail.com Wed Dec 12 11:03:56 2012 From: robmalko at gmail.com (Robert Malko) Date: Wed, 12 Dec 2012 03:03:56 -0800 (PST) Subject: [rabbitmq-discuss] "rabbitmqctl status" hangs In-Reply-To: <34c25610-e1f5-4110-bc20-49306d7910fa@googlegroups.com> References: <34c25610-e1f5-4110-bc20-49306d7910fa@googlegroups.com> Message-ID: <5a60a5b2-50da-4001-aff9-aaf489a5a27c@googlegroups.com> also service rabbitmq-server restart/stop hangs. rabbitmqctl stop however works On Wednesday, December 12, 2012 6:02:02 AM UTC-5, Robert Malko wrote: > > ubuntu 10.04, happens on both 3.0.0 and 3.0.1 (just upgraded). > Erlang R15B02 > plugins: rabbitmq_management/rabbitmq_web_stomp/rabbitmq_web_stomp_examples > > just hangs after "Status of node rabbit at messaging01 ..." > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robmalko at gmail.com Wed Dec 12 11:05:12 2012 From: robmalko at gmail.com (Robert Malko) Date: Wed, 12 Dec 2012 03:05:12 -0800 (PST) Subject: [rabbitmq-discuss] "rabbitmqctl status" hangs In-Reply-To: <5a60a5b2-50da-4001-aff9-aaf489a5a27c@googlegroups.com> References: <34c25610-e1f5-4110-bc20-49306d7910fa@googlegroups.com> <5a60a5b2-50da-4001-aff9-aaf489a5a27c@googlegroups.com> Message-ID: <552e58b4-6bea-47d5-9fe9-5fa695f62a77@googlegroups.com> figured this out. having the "rabbitmq_web_stomp_examples" plugin installed causes the hang On Wednesday, December 12, 2012 6:03:56 AM UTC-5, Robert Malko wrote: > > also service rabbitmq-server restart/stop hangs. > > rabbitmqctl stop however works > > On Wednesday, December 12, 2012 6:02:02 AM UTC-5, Robert Malko wrote: >> >> ubuntu 10.04, happens on both 3.0.0 and 3.0.1 (just upgraded). >> Erlang R15B02 >> >> plugins: rabbitmq_management/rabbitmq_web_stomp/rabbitmq_web_stomp_examples >> >> just hangs after "Status of node rabbit at messaging01 ..." >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Wed Dec 12 13:28:25 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Wed, 12 Dec 2012 13:28:25 +0000 Subject: [rabbitmq-discuss] "rabbitmqctl status" hangs In-Reply-To: <552e58b4-6bea-47d5-9fe9-5fa695f62a77@googlegroups.com> References: <34c25610-e1f5-4110-bc20-49306d7910fa@googlegroups.com> <5a60a5b2-50da-4001-aff9-aaf489a5a27c@googlegroups.com> <552e58b4-6bea-47d5-9fe9-5fa695f62a77@googlegroups.com> Message-ID: <50C88679.8090507@rabbitmq.com> On 12/12/12 11:05, Robert Malko wrote: > figured this out. having the "rabbitmq_web_stomp_examples" plugin > installed causes the hang You're right. We had in fact fixed this, but the fix didn't make it in to 3.0.1 I'm afraid. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From balteo at gmail.com Wed Dec 12 13:30:33 2012 From: balteo at gmail.com (Julien Martin) Date: Wed, 12 Dec 2012 14:30:33 +0100 Subject: [rabbitmq-discuss] Producing an amqp message using python and consuming that same message using java In-Reply-To: <50C87AFE.7060604@rabbitmq.com> References: <50C87AFE.7060604@rabbitmq.com> Message-ID: Hi Emile, You put me in the right direction. Thanks! Using JSon I now get this from Spring: Exception in thread "main" org.springframework.amqp.support.converter.MessageConversionException: failed to convert Message content. Could not resolve __TypeId__ in header at org.springframework.amqp.support.converter.DefaultJavaTypeMapper.retrieveHeader(DefaultJavaTypeMapper.java:104) at org.springframework.amqp.support.converter.DefaultJavaTypeMapper.toJavaType(DefaultJavaTypeMapper.java:53) at org.springframework.amqp.support.converter.JsonMessageConverter.fromMessage(JsonMessageConverter.java:118) at org.springframework.amqp.rabbit.core.RabbitTemplate.receiveAndConvert(RabbitTemplate.java:425) at trc.suivi.amqp.Consumer.main(Consumer.java:12) Do you have any idea what this means? Regards, J. 2012/12/12 Emile Joubert > > Hi Julien, > > On 12/12/12 12:01, Julien Martin wrote: > > pickled_me = pickle.dumps(me) > > > Person me = (Person) template.receiveAndConvert("myqueue"); > > > I get a *class cast exception* > > It looks like you are attempting to mix Python and Java serialisation > formats. RabbitMQ does not modify or process the message payload in any > way, so if you use incompatible formats then the broker won't solve that > problem for you. > > I suggest you select a serialisation format that is supported by all > languages that need to interoperate. JSON, XML, Protocol Buffers and > YAML are popular choices, but there are many more, e.g. see > http://en.wikipedia.org/wiki/Category:Data_serialization_formats > > Once you have selected and implemented a compatible serialisation format > you should test it by serialising to and deserialising from files. Once > you have that working you can use a broker to pass messages in your > chosen serialisation format between clients. > > > > -Emile > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Wed Dec 12 13:32:18 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Wed, 12 Dec 2012 13:32:18 +0000 Subject: [rabbitmq-discuss] "rabbitmqctl status" hangs In-Reply-To: <50C88679.8090507@rabbitmq.com> References: <34c25610-e1f5-4110-bc20-49306d7910fa@googlegroups.com> <5a60a5b2-50da-4001-aff9-aaf489a5a27c@googlegroups.com> <552e58b4-6bea-47d5-9fe9-5fa695f62a77@googlegroups.com> <50C88679.8090507@rabbitmq.com> Message-ID: <50C88762.4060503@rabbitmq.com> On 12/12/12 13:28, Simon MacMullen wrote: > On 12/12/12 11:05, Robert Malko wrote: >> figured this out. having the "rabbitmq_web_stomp_examples" plugin >> installed causes the hang > > You're right. We had in fact fixed this, but the fix didn't make it in > to 3.0.1 I'm afraid. The latest nightly (http://www.rabbitmq.com/nightlies/rabbitmq-server/current/) should have the fix. Matthias. From emile at rabbitmq.com Wed Dec 12 13:57:35 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Wed, 12 Dec 2012 13:57:35 +0000 Subject: [rabbitmq-discuss] Producing an amqp message using python and consuming that same message using java In-Reply-To: References: <50C87AFE.7060604@rabbitmq.com> Message-ID: <50C88D4F.3090807@rabbitmq.com> Hi Julien, On 12/12/12 13:30, Julien Martin wrote: > failed to convert Message content. Could not resolve > __TypeId__ in header I see you asked the same question on the spring-amqp forum, which is focussed on Spring and more likely to know the answer. -Emile From javiermarcon at gmail.com Wed Dec 12 16:47:56 2012 From: javiermarcon at gmail.com (Javier Marcon) Date: Wed, 12 Dec 2012 13:47:56 -0300 Subject: [rabbitmq-discuss] virtualhost in stomp Message-ID: <50C8B53C.5000503@gmail.com> I have a working perl application (with Net::STOMP plugin) that sends messages with normal queues and also with topic, that uses the default virtualhost. I am triying to move that application to a virtualhost. I created the virtualhost and the user (assigning the tag Admin and regexp .* to all permissions) from rabbitmq web interface but I have some problems: 1) When I try to create the queues for the new virtualhost, the web interface asks me the user and password and even putting the right user/password combination (with new user or with guest), it keeps asking me the user/password. How can I solve it? 2) when I try to connect send a message with the scrpts listed below, I get the "You must log in using CONNECT first" error. (but connecting returns an object). What am I doing wrong? send: #!/usr/bin/perl -w # send a message to the queue 'foo' use Net::Stomp; my $stomp = Net::Stomp->new({hostname=>'localhost', port=>'61613'}); $stomp->connect({login=>'miusuario', passcode=>'mipass', "virtual-host"=>'/mihost'}); $stomp->send({destination=>'/queue/foo', bytes_message=>1, body=>($ARGV[0] or "test\0message")}); $stomp->disconnect; recive: #!/usr/bin/perl -w # subscribe to messages from the queue 'foo' use Net::Stomp; my $stomp = Net::Stomp->new({hostname=>'localhost', port=>'61613'}); $stomp->connect({login=>'miusuario', passcode=>'mipass', "virtual-host"=>'/mihost'}); $stomp->subscribe({'destination'=>'/queue/foo', 'ack'=>'client'}); while (1) { my $frame = $stomp->receive_frame; print $frame->body . "\n"; $stomp->ack({frame=>$frame}); last if $frame->body eq 'QUIT'; } $stomp->disconnect; Thanks, Javier. From mpietrek at skytap.com Wed Dec 12 17:06:23 2012 From: mpietrek at skytap.com (Matt Pietrek) Date: Wed, 12 Dec 2012 09:06:23 -0800 Subject: [rabbitmq-discuss] Federation connections, VIPs, and queues In-Reply-To: References: Message-ID: Ping on this question - My guess it that it just got lost in the shuffle. Also, just realized in the above question that I transposed something. The two lines that say: federation: skytap -> rabbit at slave federation: skytap -> rabbit at slave-alternate Should instead be: federation: skytap -> rabbit at master federation: skytap -> rabbit at master-alternate Thanks, Matt On Mon, Dec 10, 2012 at 1:17 PM, Matt Pietrek wrote: > I realize this is a somewhat esoteric question and apologize for the > complexity. We're still on 2.8.7 for a while, although my guess is that > federation in 3.0 won't drastically change the answer. > > In our setup, we have bidirectionally federated nodes, i.e. 'slave' <-> > 'master' with an exchange named 'skytap'. To this mix I add a set of > alternate nodes to enable non-stopping upgrades: 'master-alternate' and > 'slave-alternate'. The primary and alternate nodes are identically > configured. > > I'm using VIPs (keepalive based) for connections between nodes. There's a > vip-master and a vip-slave. Most of the time vip-master points at the > 'master" node, but occasionally points at the 'master-alternate" node. In > the rabbitmq.config, I specify the VIP names everywhere (i.e vip-master, > vip-alternate), and never mention the actual node names. > > When I first start this up, I see a federation support queue like this: > > federation: skytap -> rabbit at master > > This is what I'd expect based on my understanding of federation. > > However, after doing an upgrade process (i.e., vip-master goes from > 'master' to 'master-alternate' and back to 'master'), I have two queues now: > > federation: skytap -> rabbit at slave > federation: skytap -> rabbit at slave-alternate > > This isn't so good. The vast majority of the time the slave-alternate node > isn't around. Messages sent to the skytap exchange just pile up in the > second queue. (The do of course get delivered to the non-alternate slave > node.) > > *Question 1:* > I'm trying to understand this behavior. It's almost as if the federation > logic is burrowing underneath my VIP and discovering the actual node names. > In my naive understanding, I'd expect that the use of VIPs would hide away > the primary/alternate nodes. > > That said, I do notice in the connections list that incoming connections > come from the 'regular' node IP, not from the VIP that's assigned to the > same node. Not sure if this is relevant or not. > > *Question 2:* > In a related vein, looking at the Exchanges I see exchanges like this: > > federation: skytap -> rabbit at slave A > federation: skytap -> rabbit at slave-alternate B > > What do the A/B signify? > > Thanks, > > Matt > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.justin at gmx.net Wed Dec 12 17:06:07 2012 From: michael.justin at gmx.net (Michael Justin) Date: Wed, 12 Dec 2012 18:06:07 +0100 Subject: [rabbitmq-discuss] ANN: Habari Client for RabbitMQ - Delphi and Free Pascal client Message-ID: December 12, 2012 - Habarisoft today released version 1.5 of Habari Client for RabbitMQ, a Delphi and Free Pascal client library for the RabbitMQ open source message broker. The main new feature introduced in release 1.5 is support for temporary queues. Temporary queues are managed by the server, exist only for the duration of a connection, and can be used for RPC style message processing. For more information and code examples please visit the blog page: http://mikejustin.wordpress.com/2012/12/02/temporary-queue-support-in-habari-client-libraries/ Home page and demo download: http://www.habarisoft.com/habari_rabbitmq.html Getting Started Guide (PDF): http://www.habarisoft.com/download/HabariRabbitMQGettingStarted.pdf Online API documentation: http://www.habarisoft.com/habari_rabbitmq/1.5/docs/api Regards -- Michael Justin habarisoft - Enterprise Messaging Software for Delphi http://www.habarisoft.com/ -- Michael Justin habarisoft - Enterprise Messaging Software for Delphi http://www.habarisoft.com/ From simon at rabbitmq.com Wed Dec 12 17:29:14 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Wed, 12 Dec 2012 17:29:14 +0000 Subject: [rabbitmq-discuss] Federation connections, VIPs, and queues In-Reply-To: References: Message-ID: <50C8BEEA.8040203@rabbitmq.com> On 10/12/12 21:17, Matt Pietrek wrote: > I realize this is a somewhat esoteric question and apologize for the > complexity. I don't think it's too bad. At least you're clear :-) > We're still on 2.8.7 for a while, although my guess is that > federation in 3.0 won't drastically change the answer. Correct. > I'm trying to understand this behavior. It's almost as if the federation > logic is burrowing underneath my VIP and discovering the actual node > names. In my naive understanding, I'd expect that the use of VIPs would > hide away the primary/alternate nodes. This is the "local_nodename". See the documentation at: http://previous.rabbitmq.com/federation.html#configuration ...in particular "The default is constructed from the Erlang node and the machine's fully-qualified domain name". So it has no idea about the VIP. But just setting local_nodename explicitly on all your nodes should sort you out. > *Question 2:* > In a related vein, looking at the Exchanges I see exchanges like this: > > federation: skytap -> rabbit at slave A > federation: skytap -> rabbit at slave-alternate B > > What do the A/B signify? Internal workings of the federation mechanism ;-) See http://hg.rabbitmq.com/rabbitmq-federation/file/d64c99562b9a/README-hacking#l40 for a brief explanation. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From mpietrek at skytap.com Wed Dec 12 18:19:53 2012 From: mpietrek at skytap.com (Matt Pietrek) Date: Wed, 12 Dec 2012 10:19:53 -0800 Subject: [rabbitmq-discuss] Federation connections, VIPs, and queues In-Reply-To: <50C8BEEA.8040203@rabbitmq.com> References: <50C8BEEA.8040203@rabbitmq.com> Message-ID: So much zen in so little space. Thanks! On Wed, Dec 12, 2012 at 9:29 AM, Simon MacMullen wrote: > On 10/12/12 21:17, Matt Pietrek wrote: > >> I realize this is a somewhat esoteric question and apologize for the >> complexity. >> > > I don't think it's too bad. At least you're clear :-) > > > We're still on 2.8.7 for a while, although my guess is that >> federation in 3.0 won't drastically change the answer. >> > > Correct. > > > > > I'm trying to understand this behavior. It's almost as if the federation >> logic is burrowing underneath my VIP and discovering the actual node >> names. In my naive understanding, I'd expect that the use of VIPs would >> hide away the primary/alternate nodes. >> > > This is the "local_nodename". See the documentation at: > > http://previous.rabbitmq.com/**federation.html#configuration > > ...in particular "The default is constructed from the Erlang node and the > machine's fully-qualified domain name". So it has no idea about the VIP. > > But just setting local_nodename explicitly on all your nodes should sort > you out. > > *Question 2:* >> >> In a related vein, looking at the Exchanges I see exchanges like this: >> >> federation: skytap -> rabbit at slave A >> federation: skytap -> rabbit at slave-alternate B >> >> What do the A/B signify? >> > > Internal workings of the federation mechanism ;-) > > See > > http://hg.rabbitmq.com/**rabbitmq-federation/file/** > d64c99562b9a/README-hacking#**l40 > > for a brief explanation. > > Cheers, Simon > > -- > Simon MacMullen > RabbitMQ, VMware > -------------- next part -------------- An HTML attachment was scrubbed... URL: From prabodh.upreti at vce.com Wed Dec 12 20:51:13 2012 From: prabodh.upreti at vce.com (Prabodh Upreti) Date: Wed, 12 Dec 2012 12:51:13 -0800 (PST) Subject: [rabbitmq-discuss] Restrict resources to virtual hosts/exchanges Message-ID: <1355345473411-24007.post@n5.nabble.com> Hello I have some additional challenges now as I get more used to rabbit. There are other groups who want to use the system to publish/consume events. I am afraid that they could adversely affect the system. I was thinking maybe they can have a different virtual host/exchange and publish/consume in their own space. My problem is now what if they hog the resources by consuming tons of messages and affect my application. Is there any way I can allow them to play in the same space but really control their activities, i.e. memory/cpu usage etc. I have my custom authentication handler so based which virtual host they are connecting to I could put in additional restriction(i don't know what I could do here). Hope I am making myself clear and asking the right questions. I would appreciate your feedback. Thank you. regards -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/Restrict-resources-to-virtual-hosts-exchanges-tp24007.html Sent from the RabbitMQ mailing list archive at Nabble.com. From shanyu.zhao at intel.com Wed Dec 12 23:00:47 2012 From: shanyu.zhao at intel.com (Zhao, Shanyu) Date: Wed, 12 Dec 2012 23:00:47 +0000 Subject: [rabbitmq-discuss] auto upgrade rabbitmq Message-ID: Hi Is there any document on how to upgrade rabbitmq server on Ubuntu and how to configure the auto-upgrade feature on the server? I found that our rabbitmq server upgrades automatically without anybody running any command on the server. Here is the relevant part of rabbitmq log (the time is in GMT): =INFO REPORT==== 30-Nov-2012::04:54:46 === mnesia upgrades: 6 to apply =INFO REPORT==== 30-Nov-2012::04:54:46 === mnesia upgrades: Breaking cluster =INFO REPORT==== 30-Nov-2012::04:54:46 === mnesia upgrades: Applying rabbit_upgrade_functions:runtime_parameters Thanks, Shanyu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "I always like to point out that it isn't methodologies that succeed or fail, it's teams that succeed or fail. Taking on a process can help a team raise its game, but in the end it's the team that matters and carries the responsibility to do what works for them." --by Martin Fowler -------------- next part -------------- An HTML attachment was scrubbed... URL: From vikrantsayeewal at gmail.com Thu Dec 13 08:15:32 2012 From: vikrantsayeewal at gmail.com (Vikrant Sayeewal) Date: Thu, 13 Dec 2012 13:45:32 +0530 Subject: [rabbitmq-discuss] Query related to Rabbitmq Clustering. Message-ID: Could you please let me know if in any of the cluster 2 rabbitmq are running and suddenly both the rabbitmq node are down and then any of the node come back then there will be a messages loss or data loss? Or application become down until we restart the whole cluster? Please provide me an answer of my query? -------------- next part -------------- An HTML attachment was scrubbed... URL: From emile at rabbitmq.com Thu Dec 13 10:36:30 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Thu, 13 Dec 2012 10:36:30 +0000 Subject: [rabbitmq-discuss] Restrict resources to virtual hosts/exchanges In-Reply-To: <1355345473411-24007.post@n5.nabble.com> References: <1355345473411-24007.post@n5.nabble.com> Message-ID: <50C9AFAE.9000706@rabbitmq.com> Hi, On 12/12/12 20:51, Prabodh Upreti wrote: > I was thinking maybe they can have a different virtual host/exchange and > publish/consume in their own space. My problem is now what if they hog the > resources by consuming tons of messages and affect my application. Is there > any way I can allow them to play in the same space but really control their > activities, i.e. memory/cpu usage etc. Virtual hosts create an administrative partition, but ignores resource use. So this can't be used to allocate resources fairly. If that's what you need then one approach is to use virtualisation and install brokers in separate virtual machines. This will allow you to allocate resources to each virtual machine and protect different groups of users from each other. Another option is to run separate broker instances of RabbitMQ on the same OS, but make use of the OS features to place limits on resource use. You should use a separate node name, TCP port, disk partition and ulimits for each broker. -Emile From wangjunbo924 at gmail.com Thu Dec 13 10:44:07 2012 From: wangjunbo924 at gmail.com (=?GB2312?B?zfW/obKo?=) Date: Thu, 13 Dec 2012 18:44:07 +0800 Subject: [rabbitmq-discuss] RabbitMQ Cluster On AWS VPC Message-ID: We are going to build RabbitMQ cluster with HA on AWS VPC. Suppose there are two subnets in the VPC, and they are in different available zones( for more info about AWS available zone, please visit: http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html). Then I launch instances in both subnets: instance X in subnet1(in AWS zone us-east-1a) instance Y in subnet2(in AWS zone us-east-1b) So can I create a RabbitMQ cluster with HA consisting of both X and Y? Another question is about federation plugin. If I build federation links for X and Y symmetrically with max-hop=1, is there any way that whenever a message is consumed from node X then the corresponding one in node Y is dequeued automatically with no client actually consuming it? -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Thu Dec 13 10:48:54 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Thu, 13 Dec 2012 10:48:54 +0000 Subject: [rabbitmq-discuss] RabbitMQ Cluster On AWS VPC In-Reply-To: References: Message-ID: <50C9B296.4010306@rabbitmq.com> On 13/12/12 10:44, ??? wrote: > We are going to build RabbitMQ cluster with HA on AWS VPC. Suppose there > are two subnets in the VPC, and they are in different available zones( > for more info about AWS available zone, please visit: > http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html). > Then I launch instances in both subnets: > instance X in subnet1(in AWS zone us-east-1a) > instance Y in subnet2(in AWS zone us-east-1b) > > So can I create a RabbitMQ cluster with HA consisting of both X and Y? This is a bad idea - RabbitMQ clusters do not tolerate network partitions well. Read http://www.rabbitmq.com/partitions.html for more information. > Another question is about federation plugin. If I build federation links > for X and Y symmetrically with max-hop=1, is there any way that whenever > a message is consumed from node X then the corresponding one in node Y > is dequeued automatically with no client actually consuming it? No, I'm afraid not. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From simon at rabbitmq.com Thu Dec 13 10:59:13 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Thu, 13 Dec 2012 10:59:13 +0000 Subject: [rabbitmq-discuss] auto upgrade rabbitmq In-Reply-To: References: Message-ID: <50C9B501.7050006@rabbitmq.com> On 12/12/12 23:00, Zhao, Shanyu wrote: > Hi > > Is there any document on how to upgrade rabbitmq server on Ubuntu and > how to configure the auto-upgrade feature on the server? I found that > our rabbitmq server upgrades automatically without anybody running any > command on the server. Hi. The only thing that RabbitMQ does about upgrades is update its own data structures when the server installation has already been upgraded. That's what you're seeing in the log. So the question you need to answer is "what is upgrading the installed server?" I'm afraid I can't help you there, but I promise it is not RabbitMQ itself. Probably some script is running "apt-get dist-upgrade" or similar. Cheers, Simon > Here is the relevant part of rabbitmq log (the time is in GMT): > > *=INFO REPORT==== 30-Nov-2012::04:54:46 ===* > > *mnesia upgrades: 6 to apply* > > ** > > *=INFO REPORT==== 30-Nov-2012::04:54:46 ===* > > *mnesia upgrades: Breaking cluster* > > ** > > *=INFO REPORT==== 30-Nov-2012::04:54:46 ===* > > *mnesia upgrades: Applying rabbit_upgrade_functions:runtime_parameters* > > Thanks, > > Shanyu > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > ?I always like to point out that it isn't methodologies that succeed or > fail, _it's teams that succeed or fail. _Taking on a process can help a > team raise its game, but in the end it's the team that matters and > carries the responsibility to do what works for them.? > > --by Martin Fowler > > > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > -- Simon MacMullen RabbitMQ, VMware From simon at rabbitmq.com Thu Dec 13 11:04:48 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Thu, 13 Dec 2012 11:04:48 +0000 Subject: [rabbitmq-discuss] Query related to Rabbitmq Clustering. In-Reply-To: References: Message-ID: <50C9B650.4030607@rabbitmq.com> On 13/12/12 08:15, Vikrant Sayeewal wrote: > Could you please let me know if in any of the cluster 2 rabbitmq are > running and suddenly both the rabbitmq node are down and then any of the > node come back then there will be a messages loss or data loss? Assuming that you have published persistent messages to durable queues, you will not lose any messages for which your publisher has received confirmations. Non-persistent messages and non-durable queues will be lost, and any messages which were in flight (i.e. you have not received confirmations) may or may not be lost depending on where they were when the cluster went down. Note also that if node B goes down first, *then* node A, then node A will have to come back before node B will work (since node B cannot trust its copy of the cluster state; other things may have happened while it was down). If node A is not going to come back you can use "rabbitmqctl forget_cluster_node". > Or application become down until we restart the whole cluster? Not quite sure what you mean here, hopefully my answer above helps. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From vikrantsayeewal at gmail.com Thu Dec 13 11:10:14 2012 From: vikrantsayeewal at gmail.com (Vikrant Sayeewal) Date: Thu, 13 Dec 2012 16:40:14 +0530 Subject: [rabbitmq-discuss] Query related to Rabbitmq Clustering. In-Reply-To: References: Message-ID: If both the available rabbitmq nodes goes down then it means, I need to restart whole cluster in place of restarting those nodes?? And there might be a chance of messeges loss?? Is this is what you try explain? On Thu, Dec 13, 2012 at 1:45 PM, Vikrant Sayeewal wrote: > Could you please let me know if in any of the cluster 2 rabbitmq are > running and suddenly both the rabbitmq node are down and then any of the > node come back then there will be a messages loss or data loss? > > Or application become down until we restart the whole cluster? > > Please provide me an answer of my query? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Thu Dec 13 11:18:17 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Thu, 13 Dec 2012 11:18:17 +0000 Subject: [rabbitmq-discuss] virtualhost in stomp In-Reply-To: <50C8B53C.5000503@gmail.com> References: <50C8B53C.5000503@gmail.com> Message-ID: <50C9B979.8000301@rabbitmq.com> On 12/12/12 16:47, Javier Marcon wrote: > I have a working perl application (with Net::STOMP plugin) that sends > messages with normal queues and also with topic, that uses the default > virtualhost. I am triying to move that application to a virtualhost. I > created the virtualhost and the user (assigning the tag Admin and regexp > .* to all permissions) from rabbitmq web interface but I have some problems: > > 1) When I try to create the queues for the new virtualhost, the web > interface asks me the user and password and even putting the right > user/password combination (with new user or with guest), it keeps asking > me the user/password. How can I solve it? I'm afraid that does suggest that you haven't created the permissions that you think you have. The logs may give some clue as to what is going on. > 2) when I try to connect send a message with the scrpts listed below, I > get the "You must log in using CONNECT first" error. (but connecting > returns an object). What am I doing wrong? I don't know Net::Stomp, but I assume that the parameters to $stomp->connect() are extra headers to send. > $stomp->connect({login=>'miusuario', passcode=>'mipass', "virtual-host"=>'/mihost'}); So in that case you should be aware that STOMP defines a "host" header (which we use to determine the virtual host to authenticate against), *not* "virtual-host". Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From DWise at capulaglobal.com Thu Dec 13 11:38:56 2012 From: DWise at capulaglobal.com (Dan Wise) Date: Thu, 13 Dec 2012 11:38:56 +0000 Subject: [rabbitmq-discuss] RabbitMQ 2.8.2 crashing with VMWare Message-ID: Hi, We have recently encountered an issue where RabbitMQ (2.8.2, Erlang R15B01) crashes when logging off the VMWare console (Guest OS Windows Server 2003 32bit), using ESXi 5.0.0. We can reproduce this, seems to happen every time. Has anyone else encountered such as issue? Many thanks, Dan. ________________________________ This email and any attachments are confidential, for the exclusive attention of the recipient and may also be legally privileged or otherwise protected from disclosure. No information contained herein shall be disclosed to any other person without our written consent unless it is clearly publicly available or otherwise specified by us for onward transmission. If you received this email in error, please notify the sender by return email or by telephone on +44 (0)20 7071 0900; do not duplicate or redistribute it by any means; and delete or otherwise destroy all copies whether in electronic or hard copy form. Any views contained in this email are those of the author and may not reflect those of any Capula entity. We reserve the right to monitor and review all emails within our network to ensure compliance with our policies and to protect our business. Emails are not secure and are not warranted by us to be free of errors nor of viruses nor of other defects which may affect a computer system. Anyone who communicates with us by email is taken to accept these risks. Unless specifically indicated, this email is not an offer or solicitation to buy or sell any investment product. Any information regarding investment products is subject to change without notice. Capula Investment Management LLP is registered in England no. OC313398 and is authorised and regulated by the Financial Services Authority. Capula Investment Services Ltd is registered in England no. 05460265. The registered office of both companies is 4th Floor Reading Bridge House, George Street, Reading, RG1 8LS. The principal place of business of both companies is 8 Lancelot Place, London SW7 1DR. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fred at dushin.net Thu Dec 13 12:54:21 2012 From: fred at dushin.net (Dushin Fred) Date: Thu, 13 Dec 2012 07:54:21 -0500 Subject: [rabbitmq-discuss] Shovel restart options Message-ID: I am using the shovel plugin to move messages from several queues on one broker to corresponding exchanges on another, and for the most part this works beautifully. I would like to be able to reconfigure the shovel plugin without restarting the message broker, however, as I want as high uptime on the broker as possible (and in some scenarios I do not want to mandate use of persistent messages (performance, I/O subsystem already under pressure, etc.). Semantically, on the broker, I want to be able to do the following (given a set of terms bound to Shovel): application:stop(rabbitmq_shovel). application:set_env(rabbitmq_shovel, shovels, Shovels). application:start(rabbitmq_shovel). (I can also persist the changes in rabbitmq.config for subsequent restarts) As far as I can see, my options are to: 1. Invoke the above commands through rabbitctl eval 'term', or a sequence thereof; 2. Implement a plugin which invokes the above, and communicate to the plugin through some mechanism (mochiweb, AMQP, etc). 3. Deploy the shovel plugin in a separate abstract machine (beam) and simply restart that VM. The first option has obvious drawbacks and is almost a non-starter (though of course it is the first thing I have prototyped :) -- the default limit on a command line argument on most of the platforms I am using is something like 250k, and I have no control over the size of the Shovels term. The second is better, as the plumbing is all there to do it, and it seems like the most robust solution. The third is viable, but it requires a separate point of management. Have others on this list come up with any alternatives? Thanks, Fred Dushin From balteo at gmail.com Thu Dec 13 14:17:52 2012 From: balteo at gmail.com (Julien Martin) Date: Thu, 13 Dec 2012 15:17:52 +0100 Subject: [rabbitmq-discuss] Configuring persistence in RabbitMQ on windows 7 Message-ID: Hello, I am trying to figure out where rabbitmq stores durable messages (mnsesia database) on windows 7. Here is what I have done so far: - Created a durable exchange - Set the delivery mode property to true in my basic publish - Created a durable queue - In a rabbitmq.config file (added to an environment variable) I have the following content: - - MNESIA_BASE=C:\system\rabbitmq\mnesia - MNESIA_DIR=C:\system\rabbitmq\mnesia The result is that I don't see any file in the mnsesia directory but messages are indeed in the queue as testified by a "rabbitmqctl list_queues".... Can anyone please help? Regards, Julien. -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Thu Dec 13 15:32:41 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Thu, 13 Dec 2012 15:32:41 +0000 Subject: [rabbitmq-discuss] Configuring persistence in RabbitMQ on windows 7 In-Reply-To: References: Message-ID: <50C9F519.6020904@rabbitmq.com> Julien, On 13/12/12 14:17, Julien Martin wrote: > * In a rabbitmq.config file (added to an environment variable) I have > the following content: > o > o MNESIA_BASE=C:\system\rabbitmq\mnesia > o MNESIA_DIR=C:\system\rabbitmq\mnesia Environment variables are set in rabbitmq-env.conf, not rabbitmq.config. See http://www.rabbitmq.com/configure.html Regards, Matthias From Michael.Laing at nytimes.com Thu Dec 13 15:52:59 2012 From: Michael.Laing at nytimes.com (Laing, Michael P.) Date: Thu, 13 Dec 2012 10:52:59 -0500 Subject: [rabbitmq-discuss] RabbitMQ Cluster On AWS VPC In-Reply-To: <50C9B296.4010306@rabbitmq.com> Message-ID: Clustering across AWS availability zones works fine in our experience so far. ml On 12/13/12 5:48 AM, "Simon MacMullen" wrote: >On 13/12/12 10:44, ??? wrote: >> We are going to build RabbitMQ cluster with HA on AWS VPC. Suppose there >> are two subnets in the VPC, and they are in different available zones( >> for more info about AWS available zone, please visit: >> >>http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/using-regions-a >>vailability-zones.html). >> Then I launch instances in both subnets: >> instance X in subnet1(in AWS zone us-east-1a) >> instance Y in subnet2(in AWS zone us-east-1b) >> >> So can I create a RabbitMQ cluster with HA consisting of both X and Y? > >This is a bad idea - RabbitMQ clusters do not tolerate network >partitions well. Read http://www.rabbitmq.com/partitions.html for more >information. > >> Another question is about federation plugin. If I build federation links >> for X and Y symmetrically with max-hop=1, is there any way that whenever >> a message is consumed from node X then the corresponding one in node Y >> is dequeued automatically with no client actually consuming it? > >No, I'm afraid not. > >Cheers, Simon > >-- >Simon MacMullen >RabbitMQ, VMware >_______________________________________________ >rabbitmq-discuss mailing list >rabbitmq-discuss at lists.rabbitmq.com >https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From rtrlists at googlemail.com Thu Dec 13 18:58:00 2012 From: rtrlists at googlemail.com (Robert Raschke) Date: Thu, 13 Dec 2012 18:58:00 +0000 Subject: [rabbitmq-discuss] RabbitMQ 2.8.2 crashing with VMWare In-Reply-To: References: Message-ID: How are you running RabbitMQ? Manually or as service? Just asking to rule out the reasonably obvious issue of any tasks you may have started manually not surviving session ends or log outs. You'll want to run RabbitMQ as a proper windows service. Robby On Dec 13, 2012 11:40 AM, "Dan Wise" wrote: > Hi,**** > > ** ** > > We have recently encountered an issue where RabbitMQ (2.8.2, Erlang > R15B01) crashes when logging off the VMWare console (Guest OS Windows > Server 2003 32bit), using ESXi 5.0.0. We can reproduce this, seems to > happen every time.**** > > ** ** > > Has anyone else encountered such as issue?**** > > ** ** > > Many thanks,**** > > ** ** > > Dan.**** > > ** ** > > ------------------------------ > This email and any attachments are confidential, for the exclusive > attention of the recipient and may also be legally privileged or otherwise > protected from disclosure. No information contained herein shall be > disclosed to any other person without our written consent unless it is > clearly publicly available or otherwise specified by us for onward > transmission. If you received this email in error, please notify the sender > by return email or by telephone on +44 (0)20 7071 0900; do not duplicate or > redistribute it by any means; and delete or otherwise destroy all copies > whether in electronic or hard copy form. > > Any views contained in this email are those of the author and may not > reflect those of any Capula entity. We reserve the right to monitor and > review all emails within our network to ensure compliance with our policies > and to protect our business. Emails are not secure and are not warranted by > us to be free of errors nor of viruses nor of other defects which may > affect a computer system. Anyone who communicates with us by email is taken > to accept these risks. Unless specifically indicated, this email is not an > offer or solicitation to buy or sell any investment product. Any > information regarding investment products is subject to change without > notice. > > Capula Investment Management LLP is registered in England no. OC313398 and > is authorised and regulated by the Financial Services Authority. Capula > Investment Services Ltd is registered in England no. 05460265. The > registered office of both companies is 4th Floor Reading Bridge House, > George Street, Reading, RG1 8LS. The principal place of business of both > companies is 8 Lancelot Place, London SW7 1DR. > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rasmus.d.johansson at gmail.com Thu Dec 13 14:39:08 2012 From: rasmus.d.johansson at gmail.com (Rasmus Johansson) Date: Thu, 13 Dec 2012 06:39:08 -0800 (PST) Subject: [rabbitmq-discuss] Expanding "disk space" on local RabbitMQ Message-ID: Hello. Im working on a localhost rabbitmq on a centos vmware which doesnt recieve any docs, and when I push documents then the connection gets locked. The disk space is red-marked and under the low-mark (by default, very strange). Ive looked through all of internet but have not found an answer that solved it. It says I should enter something like: [{rabbit, [{disk_free_limit, 2500000000}]}]. On the properties-file at ${install_prefix}/etc/rabbitmq/rabbitmq/ RABBITMQ_CONFIG_FILE But that didnt work after restarting the rabbit. So, how do I up the disk space? Best regards, R -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Thu Dec 13 19:13:34 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Thu, 13 Dec 2012 19:13:34 +0000 Subject: [rabbitmq-discuss] Expanding "disk space" on local RabbitMQ In-Reply-To: References: Message-ID: <50CA28DE.6090808@rabbitmq.com> Rasmus, On 13/12/12 14:39, Rasmus Johansson wrote: > It says I should enter something like: [{rabbit, [{disk_free_limit, > 2500000000}]}]. > On the properties-file at > ${install_prefix}/etc/rabbitmq/rabbitmq/RABBITMQ_CONFIG_FILE Where do the docs mention that location? The default location for the config file on CentOS should be ${install_prefix}/etc/rabbitmq/rabbitmq.config > So, how do I up the disk space? It's the other way round. As the docs say When available disk space falls below this limit, flow control is triggered. i.e. you must have *at least* that much disk space available on the partition in which RabbitMQ is storing data. So, if you are seeing rabbit block due to a disk space alarm then you must *lower* the limit (which will make rabbit more fragile in general, but may be ok in your case), or increase the partition size, or configure rabbit to put the data on a different, bigger partition. Regards, Matthias. From jerryk at rbcon.com Thu Dec 13 20:17:12 2012 From: jerryk at rbcon.com (Jerry Kuch) Date: Thu, 13 Dec 2012 12:17:12 -0800 Subject: [rabbitmq-discuss] RabbitMQ 2.8.2 crashing with VMWare In-Reply-To: References: Message-ID: Hi, Dan: How did Rabbit come to start running in these scenarios? As a service or an app? When you describe it crashing what leads you to believe it died in an ugly way? Are there horrors in the logs indicating things went awry? Best regards, Jerry On Thu, Dec 13, 2012 at 3:38 AM, Dan Wise wrote: > Hi,**** > > ** ** > > We have recently encountered an issue where RabbitMQ (2.8.2, Erlang > R15B01) crashes when logging off the VMWare console (Guest OS Windows > Server 2003 32bit), using ESXi 5.0.0. We can reproduce this, seems to > happen every time.**** > > ** ** > > Has anyone else encountered such as issue?**** > > ** ** > > Many thanks,**** > > ** ** > > Dan.**** > > ** ** > > ------------------------------ > This email and any attachments are confidential, for the exclusive > attention of the recipient and may also be legally privileged or otherwise > protected from disclosure. No information contained herein shall be > disclosed to any other person without our written consent unless it is > clearly publicly available or otherwise specified by us for onward > transmission. If you received this email in error, please notify the sender > by return email or by telephone on +44 (0)20 7071 0900; do not duplicate > or redistribute it by any means; and delete or otherwise destroy all copies > whether in electronic or hard copy form. > > Any views contained in this email are those of the author and may not > reflect those of any Capula entity. We reserve the right to monitor and > review all emails within our network to ensure compliance with our policies > and to protect our business. Emails are not secure and are not warranted by > us to be free of errors nor of viruses nor of other defects which may > affect a computer system. Anyone who communicates with us by email is taken > to accept these risks. Unless specifically indicated, this email is not an > offer or solicitation to buy or sell any investment product. Any > information regarding investment products is subject to change without > notice. > > Capula Investment Management LLP is registered in England no. OC313398 and > is authorised and regulated by the Financial Services Authority. Capula > Investment Services Ltd is registered in England no. 05460265. The > registered office of both companies is 4th Floor Reading Bridge House, > George Street, Reading, RG1 8LS. The principal place of business of both > companies is 8 Lancelot Place, London SW7 1DR. > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wangjunbo924 at gmail.com Fri Dec 14 01:14:09 2012 From: wangjunbo924 at gmail.com (=?GB2312?B?zfW/obKo?=) Date: Fri, 14 Dec 2012 09:14:09 +0800 Subject: [rabbitmq-discuss] RabbitMQ Cluster On AWS VPC In-Reply-To: References: <50C9B296.4010306@rabbitmq.com> Message-ID: Hi Laing, Is there any performance issue? And I believe that it's much more expensive to build cluster across AWS zones. Does it? One another question, I'm wondering how to connect to the cluster in your experience? A Load Balancer before cluster or DNS Round Robin or the Java Client Libraries only? 2012/12/13 Laing, Michael P. > Clustering across AWS availability zones works fine in our experience so > far. > > ml > > On 12/13/12 5:48 AM, "Simon MacMullen" wrote: > > >On 13/12/12 10:44, ??? wrote: > >> We are going to build RabbitMQ cluster with HA on AWS VPC. Suppose there > >> are two subnets in the VPC, and they are in different available zones( > >> for more info about AWS available zone, please visit: > >> > >> > http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/using-regions-a > >>vailability-zones.html). > >> Then I launch instances in both subnets: > >> instance X in subnet1(in AWS zone us-east-1a) > >> instance Y in subnet2(in AWS zone us-east-1b) > >> > >> So can I create a RabbitMQ cluster with HA consisting of both X and Y? > > > >This is a bad idea - RabbitMQ clusters do not tolerate network > >partitions well. Read http://www.rabbitmq.com/partitions.html for more > >information. > > > >> Another question is about federation plugin. If I build federation links > >> for X and Y symmetrically with max-hop=1, is there any way that whenever > >> a message is consumed from node X then the corresponding one in node Y > >> is dequeued automatically with no client actually consuming it? > > > >No, I'm afraid not. > > > >Cheers, Simon > > > >-- > >Simon MacMullen > >RabbitMQ, VMware > >_______________________________________________ > >rabbitmq-discuss mailing list > >rabbitmq-discuss at lists.rabbitmq.com > >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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simlu at su.se Fri Dec 14 09:13:35 2012 From: simlu at su.se (Simon =?iso-8859-1?Q?Lundstr=F6m?=) Date: Fri, 14 Dec 2012 10:13:35 +0100 Subject: [rabbitmq-discuss] Management/API mochiweb SSL error from BIG-IP loadbalancer Message-ID: <20121214091335.GJ754@kaka.it.su.se> Morning! We're trying to loadbalance the RabbitMQ Management and API with our F5 BIG-IP loadbalancer but can't get it to work. We have setup a "monitor" which monitors a "pool" of servers. The monitor claims that the request is "successful" but we get this in the rabbitmq log AND when I try to surf to the virtual IP that the loadbalancer uses to loadbalance the management/IP it just times out after a while (it sends Client hello and then I get: "curl: (35) Unknown SSL protocol error in connection to"). Error in log: =ERROR REPORT==== 14-Dec-2012::09:48:57 === SSL: abbreviated: ./ssl_connection.erl:1415:Fatal error: unexpected_message =ERROR REPORT==== 14-Dec-2012::09:48:57 === application: mochiweb "Accept failed error" "{error,esslerrssl}" =ERROR REPORT==== 14-Dec-2012::09:48:57 === {mochiweb_socket_server,297,{acceptor_error,{error,accept_failed}}} From luhao.whu at gmail.com Fri Dec 14 05:53:47 2012 From: luhao.whu at gmail.com (Hugo) Date: Thu, 13 Dec 2012 21:53:47 -0800 (PST) Subject: [rabbitmq-discuss] Rabbitmq-c - message type Message-ID: What kind of message is rabbitmq suitable for? As far as I know, rabbitmq is more used in areas of message notification. How about pushing video advertisements(in type of binary stream) to terminals which have subscribed related topics? The message size is seemingly not limited in AMQP. -------------- next part -------------- An HTML attachment was scrubbed... URL: From emile at rabbitmq.com Fri Dec 14 10:04:48 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Fri, 14 Dec 2012 10:04:48 +0000 Subject: [rabbitmq-discuss] Rabbitmq-c - message type In-Reply-To: References: Message-ID: <50CAF9C0.8030604@rabbitmq.com> Hi, On 14/12/12 05:53, Hugo wrote: > What kind of message is rabbitmq suitable for? As far as I know, > rabbitmq is more used in areas of message notification. How about > pushing video advertisements(in type of binary stream) to terminals > which have subscribed related topics? The message size is seemingly not > limited in AMQP. Depending on the filesizes and the required latency you could send an entire video as a message. Rabbit does not impose a limit on message size, but your server must appropriately resourced to send very large messages. Message with payloads in the hundreds of megabytes and gigabyte range have successfully been tested. Another option is to send messages at the natural frame size of your video container format. This project might also be of interest: https://github.com/tonyg/camstream -Emile From emile at rabbitmq.com Fri Dec 14 10:27:03 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Fri, 14 Dec 2012 10:27:03 +0000 Subject: [rabbitmq-discuss] Shovel restart options In-Reply-To: References: Message-ID: <50CAFEF7.1010109@rabbitmq.com> Hi, On 13/12/12 12:54, Dushin Fred wrote: > application:set_env(rabbitmq_shovel, shovels, Shovels). > the default limit on a command line argument on most of the platforms > I am using is something like 250k, and I have no control over the > size of the Shovels term. I assume you are quoting the entire shovel config as "Shovels" in the above command. You could instead read the config from a file. That will fit in the character limit imposed by the shell. -Emile From David.Legg at smithelectric.com Fri Dec 14 11:28:27 2012 From: David.Legg at smithelectric.com (David Legg) Date: Fri, 14 Dec 2012 05:28:27 -0600 Subject: [rabbitmq-discuss] Queue Rates at Zero in Management Interface In-Reply-To: <50C5AD0F.9020302@rabbitmq.com> Message-ID: On 10/12/2012 09:36, "Simon MacMullen" wrote: >Hmm. Do you mean it is explicitly displaying "0 msg/s" or that it is >just not showing message rates at all? I've attached what we're showing on the management interface. Queues are being processed and we have queue amounts, but no message rates. Cheers, David -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2012-12-14 at 10.51.46.png Type: image/png Size: 81922 bytes Desc: Screen Shot 2012-12-14 at 10.51.46.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2012-12-14 at 10.51.27.png Type: image/png Size: 70606 bytes Desc: Screen Shot 2012-12-14 at 10.51.27.png URL: From simon at rabbitmq.com Fri Dec 14 11:44:55 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Fri, 14 Dec 2012 11:44:55 +0000 Subject: [rabbitmq-discuss] Management/API mochiweb SSL error from BIG-IP loadbalancer In-Reply-To: <20121214091335.GJ754@kaka.it.su.se> References: <20121214091335.GJ754@kaka.it.su.se> Message-ID: <50CB1137.8070009@rabbitmq.com> On 14/12/12 09:13, Simon Lundstr?m wrote: > The RabbitMQ machine runs on Ubuntu 10.04.4 LTS and uses Erlang R13B03 > (ancient, I know). If you can upgrade your Erlang installation that might help - the quality of the SSL implementation has come on considerably since then. (Note that we don't recommend using SSL on less than R14B: http://www.rabbitmq.com/which-erlang.html). The debs published by Erlang Solutions may be of help here: https://www.erlang-solutions.com/downloads/download-erlang-otp Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From sanjiv.kumar.jha at accenture.com Fri Dec 14 12:30:03 2012 From: sanjiv.kumar.jha at accenture.com (sanjiv.kumar.jha at accenture.com) Date: Fri, 14 Dec 2012 12:30:03 +0000 Subject: [rabbitmq-discuss] RabbitMQ C client - RPC Support (reply_to, correlation_id) Message-ID: Hi, We are planning to use RabbitMQ for building RPC client server application using C client (RabbitMQ C client). Just wanted to check if this feature is supported or not? Also, if you have any sample program to achieve this, then please share the same which would be of great help. Thanks, Sanjiv ________________________________ This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. ______________________________________________________________________________________ www.accenture.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Fri Dec 14 12:39:00 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Fri, 14 Dec 2012 12:39:00 +0000 Subject: [rabbitmq-discuss] Queue Rates at Zero in Management Interface In-Reply-To: References: Message-ID: <50CB1DE4.8000105@rabbitmq.com> On 14/12/12 11:28, David Legg wrote: > On 10/12/2012 09:36, "Simon MacMullen" wrote: >> Hmm. Do you mean it is explicitly displaying "0 msg/s" or that it is >> just not showing message rates at all? > > > I've attached what we're showing on the management interface. Queues are > being processed and we have queue amounts, but no message rates. So are your channels / connections short-lived? (i.e. connect, publish or consume a message, disconnect) Or do they tend to stay open for at least a few seconds at a time? If the former then you should be aware that the management plugin only shows rates for currently open channels (we intend to fix this in a future release). If the latter, I'm really not sure how this could be happening. Is the management agent installed on all nodes? Do exchanges and channels show the message rates you'd expect? (and do you see all the channels you would expect?) Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From DWise at capulaglobal.com Fri Dec 14 13:21:36 2012 From: DWise at capulaglobal.com (Dan Wise) Date: Fri, 14 Dec 2012 13:21:36 +0000 Subject: [rabbitmq-discuss] RabbitMQ 2.8.2 crashing with VMWare In-Reply-To: References: Message-ID: Hiya, We are running as a process, not a service, which is being run by a service-based wrapper. We do this so we have better control over the environment variables we use to configure the broker. Do you think running as a service may not be susceptible to this issue? It should be noted that we do not get the problem when running Windows Server 2008, only 2003. By the way, the process just dies suddenly, there is no exception in the logs. Dan. From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Jerry Kuch Sent: 13 December 2012 20:17 To: Discussions about RabbitMQ Subject: Re: [rabbitmq-discuss] RabbitMQ 2.8.2 crashing with VMWare Hi, Dan: How did Rabbit come to start running in these scenarios? As a service or an app? When you describe it crashing what leads you to believe it died in an ugly way? Are there horrors in the logs indicating things went awry? Best regards, Jerry On Thu, Dec 13, 2012 at 3:38 AM, Dan Wise > wrote: Hi, We have recently encountered an issue where RabbitMQ (2.8.2, Erlang R15B01) crashes when logging off the VMWare console (Guest OS Windows Server 2003 32bit), using ESXi 5.0.0. We can reproduce this, seems to happen every time. Has anyone else encountered such as issue? Many thanks, Dan. ________________________________ This email and any attachments are confidential, for the exclusive attention of the recipient and may also be legally privileged or otherwise protected from disclosure. No information contained herein shall be disclosed to any other person without our written consent unless it is clearly publicly available or otherwise specified by us for onward transmission. If you received this email in error, please notify the sender by return email or by telephone on +44 (0)20 7071 0900; do not duplicate or redistribute it by any means; and delete or otherwise destroy all copies whether in electronic or hard copy form. Any views contained in this email are those of the author and may not reflect those of any Capula entity. We reserve the right to monitor and review all emails within our network to ensure compliance with our policies and to protect our business. Emails are not secure and are not warranted by us to be free of errors nor of viruses nor of other defects which may affect a computer system. Anyone who communicates with us by email is taken to accept these risks. Unless specifically indicated, this email is not an offer or solicitation to buy or sell any investment product. Any information regarding investment products is subject to change without notice. Capula Investment Management LLP is registered in England no. OC313398 and is authorised and regulated by the Financial Services Authority. Capula Investment Services Ltd is registered in England no. 05460265. The registered office of both companies is 4th Floor Reading Bridge House, George Street, Reading, RG1 8LS. The principal place of business of both companies is 8 Lancelot Place, London SW7 1DR. _______________________________________________ rabbitmq-discuss mailing list rabbitmq-discuss at lists.rabbitmq.com https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From simlu at su.se Fri Dec 14 13:37:19 2012 From: simlu at su.se (Simon =?iso-8859-1?Q?Lundstr=F6m?=) Date: Fri, 14 Dec 2012 14:37:19 +0100 Subject: [rabbitmq-discuss] Management/API mochiweb SSL error from BIG-IP loadbalancer In-Reply-To: <50CB1137.8070009@rabbitmq.com> References: <20121214091335.GJ754@kaka.it.su.se> <50CB1137.8070009@rabbitmq.com> Message-ID: <20121214133718.GK754@kaka.it.su.se> On Fri, 2012-12-14 at 11:44:55 +0000, Simon MacMullen wrote: > On 14/12/12 09:13, Simon Lundstr?m wrote: > >The RabbitMQ machine runs on Ubuntu 10.04.4 LTS and uses Erlang R13B03 > >(ancient, I know). > > If you can upgrade your Erlang installation that might help - the > quality of the SSL implementation has come on considerably since > then. (Note that we don't recommend using SSL on less than R14B: > http://www.rabbitmq.com/which-erlang.html). Ah, thanks! I hadn't seen that page. > The debs published by Erlang Solutions may be of help here: > > https://www.erlang-solutions.com/downloads/download-erlang-otp Thanks, will do that. Have a great weekend! - Simon From David.Legg at smithelectric.com Fri Dec 14 13:39:58 2012 From: David.Legg at smithelectric.com (David Legg) Date: Fri, 14 Dec 2012 07:39:58 -0600 Subject: [rabbitmq-discuss] Queue Rates at Zero in Management Interface In-Reply-To: <50CB1DE4.8000105@rabbitmq.com> Message-ID: On 14/12/2012 12:39, "Simon MacMullen" wrote: >So are your channels / connections short-lived? (i.e. connect, publish >or consume a message, disconnect) Or do they tend to stay open for at >least a few seconds at a time? They are open for long periods. >If the former then you should be aware that the management plugin only >shows rates for currently open channels (we intend to fix this in a >future release). This worked for a long time before we rebooted the servers and we always had message rates in at least the single digits. >Is the management agent installed on all nodes? Yes, nothing has changed: [E] rabbitmq_management 2.7.1 [e] rabbitmq_management_agent 2.7.1 [E] rabbitmq_management_visualiser 2.7.1 >Do exchanges and channels show the message rates you'd expect? (and do >you see all the channels you would expect?) No, nothing within the management interface shows any message rates other than 0. The channels that we expect to be open are and they show the same message rate of 0/s. Cheers, David From alan.antonuk at gmail.com Fri Dec 14 15:50:14 2012 From: alan.antonuk at gmail.com (Alan Antonuk) Date: Fri, 14 Dec 2012 10:50:14 -0500 Subject: [rabbitmq-discuss] RabbitMQ C client - RPC Support (reply_to, correlation_id) In-Reply-To: References: Message-ID: Yes the rabbitmq-c client library can be used to build RPC-style client and server applications. An example you could use to get started with on the client side: https://github.com/alanxz/rabbitmq-c/blob/master/examples/amqp_rpc_sendstring_client.c HTH -Alan On Fri, Dec 14, 2012 at 7:30 AM, wrote: > Hi,**** > > ** ** > > We are planning to use RabbitMQ for building RPC client server application > using C client (RabbitMQ C client).**** > > ** ** > > Just wanted to check if this feature is supported or not? Also, if you > have any sample program to achieve this, then please share the same which > would be of great help.**** > > ** ** > > Thanks,**** > > ** ** > > Sanjiv**** > > ------------------------------ > This message is for the designated recipient only and may contain > privileged, proprietary, or otherwise private information. If you have > received it in error, please notify the sender immediately and delete the > original. Any other use of the e-mail by you is prohibited. > > Where allowed by local law, electronic communications with Accenture and > its affiliates, including e-mail and instant messaging (including content), > may be scanned by our systems for the purposes of information security and > assessment of internal compliance with Accenture policy. > > > ______________________________________________________________________________________ > > www.accenture.com > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Fri Dec 14 16:37:27 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Fri, 14 Dec 2012 16:37:27 +0000 Subject: [rabbitmq-discuss] Queue Rates at Zero in Management Interface In-Reply-To: References: Message-ID: <50CB55C7.6000609@rabbitmq.com> I'm not sure what I can suggest then. This all sounds like it should be working. If you could post the output of "rabbitmqctl report" that might give me some sort of a clue in case something odd leaps out. But apart from that I'm rather stuck. Would you be prepared to run some patched version of the management plugin so I can see what's going on? Cheers, Simon On 14/12/12 13:39, David Legg wrote: > On 14/12/2012 12:39, "Simon MacMullen" wrote: > > >> So are your channels / connections short-lived? (i.e. connect, publish >> or consume a message, disconnect) Or do they tend to stay open for at >> least a few seconds at a time? > > They are open for long periods. > >> If the former then you should be aware that the management plugin only >> shows rates for currently open channels (we intend to fix this in a >> future release). > > This worked for a long time before we rebooted the servers and we always > had message rates in at least the single digits. > >> Is the management agent installed on all nodes? > > Yes, nothing has changed: > > [E] rabbitmq_management 2.7.1 > [e] rabbitmq_management_agent 2.7.1 > [E] rabbitmq_management_visualiser 2.7.1 > > >> Do exchanges and channels show the message rates you'd expect? (and do >> you see all the channels you would expect?) > > No, nothing within the management interface shows any message rates other > than 0. The channels that we expect to be open are and they show the same > message rate of 0/s. > > Cheers, > > David > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > -- Simon MacMullen RabbitMQ, VMware From michael.s.klishin at gmail.com Fri Dec 14 16:46:24 2012 From: michael.s.klishin at gmail.com (Michael Klishin) Date: Fri, 14 Dec 2012 20:46:24 +0400 Subject: [rabbitmq-discuss] ANN RabbitMQ HTTP API client for Ruby Message-ID: I am happy to announce initial release of a RabbitMQ HTTP API [1] client for Ruby [2]. The client is not yet 100% feature complete but already covers most of the API. It supports * Getting cluster overview information * Getting cluster nodes status (# file descriptors used, RAM consumption and so on) * Getting information about exchanges, queues, bindings * Closing client connections * Getting information about vhosts, users, permissions You can use the client to monitor and automate administration of RabbitMQ from Ruby. The client requires RabbitMQ Management plugin to be enabled. Documentation [3] provides code examples for supported API operations. 1. http://hg.rabbitmq.com/rabbitmq-management/raw-file/3646dee55e02/priv/www-api/help.html 2. https://github.com/ruby-amqp/rabbitmq_http_api_client 3. https://github.com/ruby-amqp/rabbitmq_http_api_client#usage -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -------------- next part -------------- An HTML attachment was scrubbed... URL: From Michael.Laing at nytimes.com Fri Dec 14 17:27:05 2012 From: Michael.Laing at nytimes.com (Laing, Michael P.) Date: Fri, 14 Dec 2012 12:27:05 -0500 Subject: [rabbitmq-discuss] RabbitMQ Cluster On AWS VPC In-Reply-To: Message-ID: We have not yet seen any performance issues. All traffic between instances in different availability zones within a region is charged: $.01/GB in us-east-1. So there is a cost, and the volume of traffic through your HA queues has an impact. In us-east-1, the increase in latency by going across zones is < 10ms, in our small sample. We will add some continuous testing of this in the future across all zones. Regions may vary in the amount of latency. And latency may vary (jitter). *Rather then LAN vs WAN, it would be useful to know the design envelope for rabbitmq clusters in terms of latency and jitter, as these are measurable. Also if there is tuning that can be done. All that said, I may choose to use federation rather than clustering across zones, because the rabbitmq response to a net split is so catastrophic, apparently, and I am not sure I want to live with that uncertainty in production. We are architected in such a way that we can do either with minor modifications. We would run a cluster in each zone and federate the clusters. It's more expensive though and more moving parts. We use DynamoDB and Riak as reliable KV stores, as well as s3. Riak seems to have good tolerance of net splits. (*Why is it better than rabbitmq in this respect?) The 'usual' failure mode in an AWS region is that a zone becomes 'compromised', meaning that some or all instances become unreachable and/or unresponsive. We would normally have 3 clustered nodes in different zones in the region. In this scenario, we would expect to lose a node completely and have it drop from the 'wholesale' Elastic Load Balancers. We would also lose all the other instances in that zone depending upon that node ? they would drop from the 'retail' Elastic Load Balancers. An often under-reported syndrome of zone failure in a region is that the regional 'control plane' is usually compromised as well. This means that one cannot create new instances, load balancers, volumes, etc. across the entire region (all zones). Hence you cannot rely on being able to add new resources to the zones that have not failed. This affects your capacity planning etc. Hence, in the 'short' term, both wholesale and client apps reconnect via the ELBs to existing resources in the 'good' zones, which have been sized to handle this scenario. At the same time, we start re-routing new connections to other healthy regions by automatically adjusting Route 53 weighted routing parameters, which are normally set to route only using least latency. The other regions will autoscale resources to handle the load. For example, us-east-1 is backed up by splitting its load between us-west-2 and eu-west-1. If necessary, we will also gradually shed the existing load from the compromised region by causing clients to reconnect. Best regards, Michael From: ??? > Reply-To: rabbitmq > Date: Thu, 13 Dec 2012 20:14:09 -0500 To: rabbitmq > Subject: Re: [rabbitmq-discuss] RabbitMQ Cluster On AWS VPC Hi Laing, Is there any performance issue? And I believe that it's much more expensive to build cluster across AWS zones. Does it? One another question, I'm wondering how to connect to the cluster in your experience? A Load Balancer before cluster or DNS Round Robin or the Java Client Libraries only? 2012/12/13 Laing, Michael P. > Clustering across AWS availability zones works fine in our experience so far. ml On 12/13/12 5:48 AM, "Simon MacMullen" > wrote: >On 13/12/12 10:44, ??? wrote: >> We are going to build RabbitMQ cluster with HA on AWS VPC. Suppose there >> are two subnets in the VPC, and they are in different available zones( >> for more info about AWS available zone, please visit: >> >>http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/using-regions-a >>vailability-zones.html). >> Then I launch instances in both subnets: >> instance X in subnet1(in AWS zone us-east-1a) >> instance Y in subnet2(in AWS zone us-east-1b) >> >> So can I create a RabbitMQ cluster with HA consisting of both X and Y? > >This is a bad idea - RabbitMQ clusters do not tolerate network >partitions well. Read http://www.rabbitmq.com/partitions.html for more >information. > >> Another question is about federation plugin. If I build federation links >> for X and Y symmetrically with max-hop=1, is there any way that whenever >> a message is consumed from node X then the corresponding one in node Y >> is dequeued automatically with no client actually consuming it? > >No, I'm afraid not. > >Cheers, Simon > >-- >Simon MacMullen >RabbitMQ, VMware >_______________________________________________ >rabbitmq-discuss mailing list >rabbitmq-discuss at lists.rabbitmq.com >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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruifavas at hotmail.com Fri Dec 14 18:34:07 2012 From: ruifavas at hotmail.com (Rui) Date: Fri, 14 Dec 2012 10:34:07 -0800 (PST) Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs In-Reply-To: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> Message-ID: <09fd72fb-6849-4f42-a9b0-f7c0aff4d41e@googlegroups.com> I've upgraded to 3.0.1 and still get the problem - Looks like the disabling the rabbitmq_management plug-in stops the issue. Any pointers? On Tuesday, 4 December 2012 17:50:44 UTC, Rui wrote: > > Rabbit 3.0 is hanging. > > We have a number of existing .net applications using Rabbit and when we > update the server to 3.0 Rabbit stops responding. Rolling back the server > solves the problem. > > Do we need to upgrade the client library at the same time? > > Any logs I could look at to try to troubleshoot the problem? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rui.favas at barclays.com Fri Dec 14 18:35:09 2012 From: rui.favas at barclays.com (rui.favas at barclays.com) Date: Fri, 14 Dec 2012 18:35:09 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs In-Reply-To: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> Message-ID: <1308E5CFD51CA14DA7B024A689B8B1680288BD981A@LDNPCMMGMB01.INTRANET.BARCAPINT.COM> I've upgraded to 3.0.1 and still get the problem - Looks like disabling the rabbitmq_management plug-in stops the issue. Any pointers? From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Rui Sent: Tuesday, December 04, 2012 5:51 PM To: rabbitmq-discuss at googlegroups.com Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs Rabbit 3.0 is hanging. We have a number of existing .net applications using Rabbit and when we update the server to 3.0 Rabbit stops responding. Rolling back the server solves the problem. Do we need to upgrade the client library at the same time? Any logs I could look at to try to troubleshoot the problem? _______________________________________________ This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barclays.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing. Barclays offers premier investment banking products and services to its clients through Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays Group. _______________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From watson.timothy at gmail.com Fri Dec 14 19:27:04 2012 From: watson.timothy at gmail.com (Tim Watson) Date: Fri, 14 Dec 2012 19:27:04 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs In-Reply-To: <1308E5CFD51CA14DA7B024A689B8B1680288BD981A@LDNPCMMGMB01.INTRANET.BARCAPINT.COM> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <1308E5CFD51CA14DA7B024A689B8B1680288BD981A@LDNPCMMGMB01.INTRANET.BARCAPINT.COM> Message-ID: Exactly how are you performing the upgrade. What do the server logs and rabbitmqctl report look like? On 14 Dec 2012, at 18:35, wrote: > I've upgraded to 3.0.1 and still get the problem - Looks like disabling the rabbitmq_management plug-in stops the issue. Any pointers? > > > From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Rui > Sent: Tuesday, December 04, 2012 5:51 PM > To: rabbitmq-discuss at googlegroups.com > Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs > > Rabbit 3.0 is hanging. > We have a number of existing .net applications using Rabbit and when we update the server to 3.0 Rabbit stops responding. Rolling back the server solves the problem. > Do we need to upgrade the client library at the same time? > Any logs I could look at to try to troubleshoot the problem? > _______________________________________________ > This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barclays.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing. Barclays offers premier investment banking products and services to its clients through Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays Group. > _______________________________________________ > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From watson.timothy at gmail.com Fri Dec 14 19:28:24 2012 From: watson.timothy at gmail.com (Tim Watson) Date: Fri, 14 Dec 2012 19:28:24 +0000 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <20121212093115.GH754@kaka.it.su.se> References: <8F6E4796-D862-4305-A256-EE1AC757EF05@rabbitmq.com> <20121205131221.GH335@kaka.it.su.se> <20121205134204.GK335@kaka.it.su.se> <24509631-CA1C-4A55-8E66-87E11E4E5D83@rabbitmq.com> <20121205155530.GL335@kaka.it.su.se> <20121211162045.GE754@kaka.it.su.se> <20121211193803.GG754@kaka.it.su.se> <4D859580-D762-4BFA-A759-43F94B500FC7@rabbitmq.com> <20121212093115.GH754@kaka.it.su.se> Message-ID: <8D205910-A3E3-472D-A7AA-8D5737812DC4@rabbitmq.com> Sorry I haven't managed to look at this yet. I will take a look at some point soon and see if I can debug the problem though. On 12 Dec 2012, at 09:31, Simon Lundstr?m wrote: > On Tue, 2012-12-11 at 20:30:24 +0000, Tim Watson wrote: >> On 11 Dec 2012, at 19:38, Simon Lundstr?m wrote: >>> >>> =INFO REPORT==== 11-Dec-2012::20:09:32 === Management agent started. >>> >>> =ERROR REPORT==== 11-Dec-2012::20:09:32 === >>> WAT: {error,upgrade,"Upgrade not supported by this NIF library."} >>> >>> >>> =ERROR REPORT==== 11-Dec-2012::20:09:49 === >>> closing AMQP connection <0.287.0> (130.237.168.221:48918 -> 77.238.35.76:5671): >>> {channel0_error,starting, >>> {error,undef,'connection.start_ok', >>> [{kinit,kinit,[<<"simlu">>,<<"not_my_password">>]}, >>> {rabbit_auth_backend_kerberos,check_user_login,2}, >>> {rabbit_access_control,'-check_user_login/2-fun-0-',4}, >>> {lists,foldl,3}, >>> {rabbit_reader,auth_phase,2}, >>> {rabbit_reader,handle_method0,3}, >>> {rabbit_reader,handle_input,3}, >>> {rabbit_reader,recvloop,2}]}} >>> >>> when using AMQP login and this when I make an API call: >>> >> >> I'm not sure why that is, but it looks like the NIF module isn't loaded properly for some reason. > > That is what it looks like, yes. > >>> How bad are those upgrade errors? >>> AFAIK, I could just add an empty function in kinit.c and use them as >>> load, reload, upgrade and unload when doing ERL_NIF_INIT since I don't >>> really need to keep any "state"(?). >> Yeah so if you don't want all that noise in your logs, just export empty definitions for them. > > I did that, error/warning went away but it's still not working. > >>>> Anyway, if you put the NIF part into another module, you *should* be able to test it outside of rabbit my doing something like: >>>> >>>> $ erl -sname foo >>>> banner. ..... >>>> % ok = application:start(rabbit_auth_backend_kerberos). >>>> ok >>>> % X = kinit:kinit("auser", "password"). >>>> << a term >> >>>> % io:format("~p~n", [X]). >>> >>> I couldn't get that to work = / I'm probably doing it wrong, but here's what I did: >>> >>> $ erl -sname `hostname -s` >>> Erlang R15B02 (erts-5.9.2) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false] [dtrace] >>> >>> Eshell V5.9.2 (abort with ^G) >>> (kaka at kaka)1> ok = application:start(rabbitmq_auth_backend_kerberos). >>> ** exception error: no match of right hand side value {error,{not_started,inets}} >> >> Ok well that's just complaining that your .app resource file states that inets is required by your application and you've not started it first is all. Nothing to worry about there, as rabbit deals with that kind of thing *BUT* why are you depending on inets? Is your application doing erlang network related stuff? > > Not at all, I removed it, thanks. > >>>> Then if it *still* doesn't work when you're running it inside rabbit we might need to consider other things that could be going wrong (such as the NIF init magic). >>> >>> I have no idea, but this seems more and more likely. >> >> Hmn seems so. It's getting on a bit now, but I'll poke around in the broker code tomorrow and see if anything stands out. The really interesting point is that the kinit:kinit call (which is oddly named IMHO btw) works *regardless* of whether or not the application is loaded, so it's unlikely to be that which is at fault afaict. > > I'm interested to hear what you have found. > > Many thanks, > - Simon > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From michael.dyer at digitaleragroup.com Fri Dec 14 22:12:17 2012 From: michael.dyer at digitaleragroup.com (austinnichols) Date: Fri, 14 Dec 2012 14:12:17 -0800 (PST) Subject: [rabbitmq-discuss] Can delivery mode be changed by an exchange or queue? Message-ID: Is it possible for an exchange or queue to alter the delivery mode for a given message? I've done quite a bit of searching but so far haven't been able to turn up a direct answer to the question... Thanks all! -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Fri Dec 14 22:46:36 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 14 Dec 2012 22:46:36 +0000 Subject: [rabbitmq-discuss] Can delivery mode be changed by an exchange or queue? In-Reply-To: References: Message-ID: <50CBAC4C.2020407@rabbitmq.com> On 14/12/12 22:12, austinnichols wrote: > Is it possible for an exchange or queue to alter the delivery mode for a > given message? No, but shovel (http://www.rabbitmq.com/shovel.html) can. Matthias. From email.abhishekchordia at gmail.com Sat Dec 15 12:56:01 2012 From: email.abhishekchordia at gmail.com (Abhishek Chordia) Date: Sat, 15 Dec 2012 18:26:01 +0530 Subject: [rabbitmq-discuss] Not able to install erlang and rabbitMQ on my virtual machine Message-ID: Hi, I am getting error while installing the Erlang & RabbitMQ on my virtual machine, screen show attached. Please help me on this. -- Thanks & Regards, Abhishek Chordia M : +91-8802042181 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ERROR_WHILE_INSTALLING_ERLANG_&_RABBITMQ.jpg Type: image/jpeg Size: 126681 bytes Desc: not available URL: From matthias at rabbitmq.com Sat Dec 15 13:13:35 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Sat, 15 Dec 2012 13:13:35 +0000 Subject: [rabbitmq-discuss] Not able to install erlang and rabbitMQ on my virtual machine In-Reply-To: References: Message-ID: <50CC777F.1010109@rabbitmq.com> Abhishek, On 15/12/12 12:56, Abhishek Chordia wrote: > I am getting error while installing the Erlang & RabbitMQ on my virtual > machine, screen show attached. Please help me on this. The contents of your /etc/yum.repos.d/epel-erlang.repo appear to contain the log output of wget rather than the actual file that was fetched. As per http://www.rabbitmq.com/install-rpm.html, the command to fetch the file is wget -O /etc/yum.repos.d/epel-erlang.repo http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo Note the *upper case* "-O"; I reckon if you accidentally used lower case then you'd get the result you are seeing. Regards, Matthias. From email.abhishekchordia at gmail.com Sat Dec 15 13:39:24 2012 From: email.abhishekchordia at gmail.com (Abhishek Chordia) Date: Sat, 15 Dec 2012 19:09:24 +0530 Subject: [rabbitmq-discuss] Not able to install erlang and rabbitMQ on my virtual machine In-Reply-To: <50CC777F.1010109@rabbitmq.com> References: <50CC777F.1010109@rabbitmq.com> Message-ID: Dear Matthias, Now i am getting attached error, please help. On Sat, Dec 15, 2012 at 6:43 PM, Matthias Radestock wrote: > Abhishek, > > > On 15/12/12 12:56, Abhishek Chordia wrote: > >> I am getting error while installing the Erlang & RabbitMQ on my virtual >> machine, screen show attached. Please help me on this. >> > > The contents of your /etc/yum.repos.d/epel-erlang.**repo appear to > contain the log output of wget rather than the actual file that was fetched. > > As per http://www.rabbitmq.com/**install-rpm.html, > the command to fetch the file is > > wget -O /etc/yum.repos.d/epel-erlang.**repo http://repos.fedorapeople.org/ > **repos/peter/erlang/epel-**erlang.repo > > Note the *upper case* "-O"; I reckon if you accidentally used lower case > then you'd get the result you are seeing. > > Regards, > > Matthias. > -- Thanks & Regards, Abhishek Chordia M : +91-8802042181 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: error.jpg Type: image/jpeg Size: 123632 bytes Desc: not available URL: From matthias at rabbitmq.com Sat Dec 15 15:01:40 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Sat, 15 Dec 2012 15:01:40 +0000 Subject: [rabbitmq-discuss] Not able to install erlang and rabbitMQ on my virtual machine In-Reply-To: References: <50CC777F.1010109@rabbitmq.com> Message-ID: <50CC90D4.60705@rabbitmq.com> Abhishek, On 15/12/12 13:39, Abhishek Chordia wrote: > Now i am getting attached error, please help. Looks like you are on EPEL 6. From http://www.rabbitmq.com/install-rpm.html Enable Erlang repository (RHEL 5 and derived, including Fedora 6 and CentOS 5) If you are on a later version of RHEL (or derived) you should skip this step. So please remove /etc/yum.repos.d/epel-erlang.repo and commence step 3 of the instructions. Regards, Matthias. From wangjunbo924 at gmail.com Sat Dec 15 15:07:42 2012 From: wangjunbo924 at gmail.com (=?GB2312?B?zfW/obKo?=) Date: Sat, 15 Dec 2012 23:07:42 +0800 Subject: [rabbitmq-discuss] How to synchronize the RabbitMQ exchanges? Message-ID: Hi, Suppose I have created two or more RabbitMQ nodes. For simplicity two nodes: X and Y. And they are NOT within the same cluster due to the WAN. Now our applications will declare exchanges dynamically via Java client libraries on node X. Is there any way that the same exchanges are declared on Y automatically? Maybe the queues as well. a constraint: no messages sent to X are copied to Y because we cannot handle duplicate messages up to now. The federation plugin seems be a choice, but I'm not sure weather it works. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Sat Dec 15 15:31:30 2012 From: tim at rabbitmq.com (Tim Watson) Date: Sat, 15 Dec 2012 15:31:30 +0000 Subject: [rabbitmq-discuss] The rabbitmq-server stop command hangs In-Reply-To: <46529D56-45A1-4E48-9DFB-0FFFAE796D3D@rabbitmq.com> References: <509AAE8A.9020106@rabbitmq.com> <02E660AA-BA62-4D5F-B223-9D626DC8301F@rabbitmq.com> <47999408-04FF-44D0-811A-54D53423B838@rabbitmq.com> <640C384F-B664-4C8A-9228-DFDED5E197D8@rabbitmq.com> <50A231B8.5000800@rabbitmq.com> <6DFABACD-A960-4D14-9D7D-B670F5FEECEF@rabbitmq.com> , , <50B4000E.8060507@rabbitmq.com> <3AB49965-C52F-4B59-82F2-E7007E450D9F@rabbitmq.com> <50B5F8BF.5030300@rabbitmq.com>, <2B2DD48B-0154-4574-872C-C50813598DDE@rabbi t mq.co m > , <7F08A616-2B51-43A6-B3B7-E3CFA76A67DD@rabbitmq.com>, , <46529D56-45A1-4E48-9DFB-0FFFAE796D3D@rabbitmq.com> Message-ID: <262F47E4-F3D8-49EE-A170-B622605A76DD@rabbitmq.com> Hi Liz, This should hopefully be fixed in 3.0.1 - are you able to test that and see if it works for you? Cheers, Tim On 30 Nov 2012, at 16:46, Tim Watson wrote: > Actually the problem is in the AMQP client that shovel uses - in fact the scenario which triggers this behaviour is rather obscure. From your rabbit-sasl.log we can see that the shovelB and its _realtime friend are not fully operational at the time you're shutting down. This is evident because in the trace, we can see that the shovel are workers are still in the connection establishment phase: > > stacktrace: [{gen,do_call,4,[{file,"gen.erl"},{line,217}]}, > {gen_server,call,3,[{file,"gen_server.erl"},{line,184}]}, > {application,load1,2,[{file,"application.erl"},{line,95}]}, > {application,start,2,[{file,"application.erl"},{line,129}]}, > {amqp_connection,start,1,[]}, > {rabbit_shovel_worker,make_conn_and_chan,1,[]}, > {rabbit_shovel_worker,handle_cast,2,[]}, > {gen_server2,handle_msg,2,[]}] > > In the sasl logs we see repeated entries indicating that there is a problem identifying the host, which is preventing the workers from establishing the shovel connection properly: > > =CRASH REPORT==== 28-Nov-2012::14:07:52 === > crasher: > initial call: amqp_gen_connection:init/1 > pid: <0.579.0> > registered_name: [] > exception exit: {unexpected_msg, > {'EXIT',<0.573.0>, > {{badmatch,{error,unknown_host}}, > [{rabbit_shovel_worker,make_conn_and_chan,1,[]}, > {rabbit_shovel_worker,handle_cast,2,[]}, > {gen_server2,handle_msg,2,[]}, > {proc_lib,init_p_do_apply,3, > [{file,"proc_lib.erl"},{line,227}]}]}}} > in function gen_server:terminate/6 (gen_server.erl, line 737) > ancestors: [<0.577.0>,amqp_sup,<0.52.0>] > messages: [] > links: [<0.577.0>] > dictionary: [] > trap_exit: true > status: running > heap_size: 2584 > stack_size: 24 > reductions: 974 > neighbours: > > > Now what is actually happening is this: the application controller for the node (which is part of the Erlang/OTP runtime system) is busy shutting down all the rabbit plugins and the rabbit application itself. Whilst this is happening however, the rabbit_shovel_worker is attempting to connect to 'server.local' and failing. Each time it fails, the shovel supervisor restarts it and tries again to establish an AMQP connection. This connection startup routine, specifically the amqp_connection:start function, contains code that calls the application controller to check if the required client infrastructure (i.e., the amqp_client application) is already running, and that call into the OTP application management APIs actually deadlocks when it is run inside an application shutdown sequence. > > So to see this happen, you have to have an AMQP connection attempt that fails and is restarted by its supervisor *just before* the application controller starts shutting down, *and* then attempts to start *just after* the application controller has entered the shutdown phase. The shovel configuration, reconnect_delay and non-availability of the source host (or other network oddities) all play a part here. > > Cheers, > Tim > > On 30 Nov 2012, at 15:57, Elizabeth Liao wrote: > >> Thanks for all your help as well. Just one question, was the problem just in the shovel plugin? >> ________________________________________ >> From: rabbitmq-discuss-bounces at lists.rabbitmq.com [rabbitmq-discuss-bounces at lists.rabbitmq.com] on behalf of Tim Watson [tim at rabbitmq.com] >> Sent: Friday, November 30, 2012 10:35 AM >> To: Discussions about RabbitMQ >> Subject: Re: [rabbitmq-discuss] The rabbitmq-server stop command hangs >> >> Thank you Liz, >> >> We've now found the problem, filed a bug and fixed it. Hopefully the fix will be released in 3.0.1 in the very near future. :) >> >> Thanks again for reporting this, and providing us with all the information that has helped us track it down! >> >> Tim >> >> On 30 Nov 2012, at 15:18, Elizabeth Liao wrote: >> >>>> One more question please. Is the node that you're trying to shut down hanging *indefinitely* or for a very long time, or for a minute or so? >>> >>> In all cases for which I've sent logs/trace outputs, the shutdown hangs indefinitely. I've also seen instances where it hangs for a very long time (~5 minutes) but those were not reproducible. >>> >>>> When the rabbit is stuck shutting down, is the source host for shovelB and shovelB_realtime (server.local) accessible - i.e., you can ping it, telnet to the amqp port, etc? It seems these two shovels have never got properly started, and they're hung (still trying to establish connections/channels) when you're trying to shut down. We are filing a bug and looking at how to fix this, but it would be helpful for me to understand the topology so I can simulate this bug when producing a fix. >>> >>> I checked the connections to and from server.local using ping and telneting to the amqp port and both look okay at the time the shutdown is hanging. >>> >>> Other information that may be of use: >>> * server.local does not have any special configuration (no rabbitmq.config file) >>> * I can reproduce this more reliably with 2.8.7 than 3.0.0 >>> * We're initiating the shutdown shortly after bootup >>> >>> Liz >>> >>> >>> Email Confidentiality Notice >>> >>> The information contained in this transmission is confidential, proprietary or privileged and may be subject to protection under the law. This message is intended for the sole use of the individual or entity to whom it's addressed. If you are not the intended recipient, you are notified that any use, distribution or copying of the message is strictly prohibited and may subject you to criminal or civil penalties. If you received this transmission in error, please contact the sender immediately by replying to this email and delete the material from any computer. >>> _______________________________________________ >>> rabbitmq-discuss mailing list >>> rabbitmq-discuss at lists.rabbitmq.com >>> 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 >> Email Confidentiality Notice >> >> The information contained in this transmission is confidential, proprietary or privileged and may be subject to protection under the law. This message is intended for the sole use of the individual or entity to whom it's addressed. If you are not the intended recipient, you are notified that any use, distribution or copying of the message is strictly prohibited and may subject you to criminal or civil penalties. If you received this transmission in error, please contact the sender immediately by replying to this email and delete the material from any computer. >> _______________________________________________ >> rabbitmq-discuss mailing list >> rabbitmq-discuss at lists.rabbitmq.com >> 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 From tim at rabbitmq.com Sat Dec 15 15:44:46 2012 From: tim at rabbitmq.com (Tim Watson) Date: Sat, 15 Dec 2012 15:44:46 +0000 Subject: [rabbitmq-discuss] Crash when purging or deleting a queue with 10k messages In-Reply-To: References: <04beae11-2bb1-4578-8a70-1653648441e8@googlegroups.com> <50AE4A32.2060606@rabbitmq.com> Message-ID: <2A8515A2-38FF-4751-8740-5721AB52E19B@rabbitmq.com> Hi Sidnei, Did you try upgrading in the end? You can, of course, copy the mnesia directory to another box and test the upgrade there. Cheers, Tim On 22 Nov 2012, at 16:02, Sidnei da Silva wrote: > On Thu, Nov 22, 2012 at 1:52 PM, Matthias Radestock > wrote: >> On 22/11/12 15:06, Sidnei da Silva wrote: >>> >>> We're currently experiencing a crash while trying to either purge or >>> delete a persistent queue that's not in use anymore but contains about >>> 10k messages still. >> >> Thanks for reporting this and including all the logs etc. This looks like a >> bug - the queue asks the message store to remove its messages but for some >> reason the message store knows nothing about them. > > Ah, very interesting. > >>> I'm tempted to upgrade to 3.0.x to see if the problem goes away >> >> We haven't seen this bug before. Nor have we touched the code in that area >> since 2.8.4. So I'm afraid an upgrade is unlikely to improve matters. >> >> Btw, are you saying that after restarting the broker, a renewed attempt at >> purging the queue fails again? If so then it would be incredibly useful if >> you sent us a copy of the entire rabbitmq mnesia dir (usually under >> /var/lib/rabbitmq/mnesia/) since that should allow us to reproduce >> the problem. > > I'm afraid that wouldn't be possible due to queued messages containing > private information, but if you have any debugging script to collect > only the information needed to diagnose the issue, I might be able to > get that run for you. > > -- Sidnei > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From email.abhishekchordia at gmail.com Sat Dec 15 17:10:23 2012 From: email.abhishekchordia at gmail.com (Abhishek Chordia) Date: Sat, 15 Dec 2012 22:40:23 +0530 Subject: [rabbitmq-discuss] Not able to install erlang and rabbitMQ on my virtual machine In-Reply-To: <50CC90D4.60705@rabbitmq.com> References: <50CC777F.1010109@rabbitmq.com> <50CC90D4.60705@rabbitmq.com> Message-ID: Hi Matthias, Still not able to install the erlang. On Sat, Dec 15, 2012 at 8:31 PM, Matthias Radestock wrote: > Abhishek, > > > On 15/12/12 13:39, Abhishek Chordia wrote: > >> Now i am getting attached error, please help. >> > > Looks like you are on EPEL 6. > > From http://www.rabbitmq.com/**install-rpm.html > > > Enable Erlang repository (RHEL 5 and derived, including Fedora 6 and > CentOS 5) > If you are on a later version of RHEL (or derived) you should skip this > step. > > > So please remove /etc/yum.repos.d/epel-erlang.**repo and commence step 3 > of the instructions. > > Regards, > > Matthias. > -- Thanks & Regards, Abhishek Chordia M : +91-8802042181 -------------- next part -------------- An HTML attachment was scrubbed... URL: From email.abhishekchordia at gmail.com Sat Dec 15 17:25:53 2012 From: email.abhishekchordia at gmail.com (Abhishek Chordia) Date: Sat, 15 Dec 2012 22:55:53 +0530 Subject: [rabbitmq-discuss] Not able to install erlang and rabbitMQ on my virtual machine In-Reply-To: References: <50CC777F.1010109@rabbitmq.com> <50CC90D4.60705@rabbitmq.com> Message-ID: Also not erlang list : [image: Inline image 1] On Sat, Dec 15, 2012 at 10:40 PM, Abhishek Chordia < email.abhishekchordia at gmail.com> wrote: > Hi Matthias, > > Still not able to install the erlang. > > > > On Sat, Dec 15, 2012 at 8:31 PM, Matthias Radestock > wrote: > >> Abhishek, >> >> >> On 15/12/12 13:39, Abhishek Chordia wrote: >> >>> Now i am getting attached error, please help. >>> >> >> Looks like you are on EPEL 6. >> >> From http://www.rabbitmq.com/**install-rpm.html >> >> >> Enable Erlang repository (RHEL 5 and derived, including Fedora 6 and >> CentOS 5) >> If you are on a later version of RHEL (or derived) you should skip this >> step. >> >> >> So please remove /etc/yum.repos.d/epel-erlang.**repo and commence step 3 >> of the instructions. >> >> Regards, >> >> Matthias. >> > > > > -- > Thanks & Regards, > Abhishek Chordia > M : +91-8802042181 > > -- Thanks & Regards, Abhishek Chordia M : +91-8802042181 -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Sat Dec 15 17:49:27 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Sat, 15 Dec 2012 17:49:27 +0000 Subject: [rabbitmq-discuss] Not able to install erlang and rabbitMQ on my virtual machine In-Reply-To: References: <50CC777F.1010109@rabbitmq.com> <50CC90D4.60705@rabbitmq.com> Message-ID: <50CCB827.7000200@rabbitmq.com> Abhishek, On 15/12/12 17:10, Abhishek Chordia wrote: > Still not able to install the erlang. It looks like you still had the /etc/yum.repos.d/epel-erlang.repo lying around. If so, please delete it. Also, did you in fact enable EPEL on your machine, as noted in step 1 of http://www.rabbitmq.com/install-rpm.html? Overall it is really hard to figure out what is going wrong from fragments. If you still encounter problems then please post a complete transcript of all the steps you executed when following http://www.rabbitmq.com/install-rpm.html from a fresh RHEL installation. Regards, Matthias. From aravindh86 at gmail.com Sat Dec 15 20:22:05 2012 From: aravindh86 at gmail.com (Aravindh S) Date: Sat, 15 Dec 2012 12:22:05 -0800 (PST) Subject: [rabbitmq-discuss] crash in a two node RabbitMQ cluster Message-ID: <5501b8bb-06f0-44a4-bde9-673525540668@googlegroups.com> Hi we are running RabbitMQ v 2.8.4 in a two node cluster configuration. we had an unplanned power outage and both the servers went down. when we tried to restart the rabbitmq servers, only rabbit2 node starts up and the node rabbit1 crashes on start. we are running several mirrored queues between these nodes.one such queue "Aiken" contained more than 65K messages before the outage.Now rabbit1 wont start and rabbit2 starts fine but shows that there are only 109 old messages in the "Aiken" Queue.We are afraid if we have lost the messages from the rabbit1 crash. Rabbit1 node crashes on startup on both conditions where rabbit2 was down and also when rabbit2 was up. we could see the following message in the startup log, BOOT FAILED =========== Error description: {badmatch,{error,{"/var/lib/rabbitmq/mnesia/rabbit at rabbit1/queues/1NGZF3JZJR0SU2C0VE2S25JRP/clean.dot", eacces}}} but could not understand what it actually means. But I am guessing rabbit1 and rabbit2 went out of sync. rabbitmqctl status would yield the following message. [root at rabbit1 ~]# rabbitmqctl status Status of node rabbit at rabbit1 ... Error: unable to connect to node rabbit at rabbit1: nodedown DIAGNOSTICS =========== nodes in question: [rabbit at rabbit1] hosts, their running nodes and ports: - rabbit1: [{rabbitmqctl7856,46808}] current node details: - node name: rabbitmqctl7856 at rabbit1 - home dir: /var/lib/rabbitmq - cookie hash: WYsTAr/DZ8KD7QQhMu5SSg== logs are available here: rabbit at rabbit1-sasl.log --> https://docs.google.com/open?id=0B2mCr6qtz2xOS01YZndfTy1DWms rabbit at rabbit1.log --> https://docs.google.com/open?id=0B2mCr6qtz2xOcEYwcWl2RDV3YTg startup_log --> https://docs.google.com/open?id=0B2mCr6qtz2xOOHI2bXQ5OWw4TUE Can anyone help me with ideas to recover rabbit1 ?? Is there a way to tweak the startup of Rabbit1 so that it would start as an independent node ? The data in stake is really important. I would appreciate any help. - Aravindh -------------- next part -------------- An HTML attachment was scrubbed... URL: From self.username at gmail.com Sat Dec 15 18:57:31 2012 From: self.username at gmail.com (Paan Singh) Date: Sun, 16 Dec 2012 00:27:31 +0530 Subject: [rabbitmq-discuss] Not able to install erlang and rabbitMQ on my virtual machine In-Reply-To: <50CCB827.7000200@rabbitmq.com> References: <50CC777F.1010109@rabbitmq.com> <50CC90D4.60705@rabbitmq.com> <50CCB827.7000200@rabbitmq.com> Message-ID: You can also install erlang by source from http://www.erlang.org/download_release/8 . This is version 14B, which I have found to be the most stable till now (I had some problems with RabbitMQ message consumption with erlang 15 ). Installation by source should be pretty easy, download the tarball, unzip it, ./configure; make; sudo make install. Thanks, Paan On Sat, Dec 15, 2012 at 11:19 PM, Matthias Radestock wrote: > Abhishek, > > > On 15/12/12 17:10, Abhishek Chordia wrote: > >> Still not able to install the erlang. >> > > It looks like you still had the /etc/yum.repos.d/epel-erlang.**repo lying > around. If so, please delete it. Also, did you in fact enable EPEL on your > machine, as noted in step 1 of http://www.rabbitmq.com/**install-rpm.html > ? > > Overall it is really hard to figure out what is going wrong from > fragments. If you still encounter problems then please post a complete > transcript of all the steps you executed when following > http://www.rabbitmq.com/**install-rpm.htmlfrom a fresh RHEL installation. > > > Regards, > > Matthias. > ______________________________**_________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.**rabbitmq.com > https://lists.rabbitmq.com/**cgi-bin/mailman/listinfo/**rabbitmq-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From email.abhishekchordia at gmail.com Sun Dec 16 02:48:57 2012 From: email.abhishekchordia at gmail.com (Abhishek Chordia) Date: Sun, 16 Dec 2012 08:18:57 +0530 Subject: [rabbitmq-discuss] Not able to install erlang and rabbitMQ on my virtual machine In-Reply-To: References: <50CC777F.1010109@rabbitmq.com> <50CC90D4.60705@rabbitmq.com> <50CCB827.7000200@rabbitmq.com> Message-ID: Thanks all, now rabbitMQ and erlang both are running fine on my system. :) On Sun, Dec 16, 2012 at 12:27 AM, Paan Singh wrote: > You can also install erlang by source from > http://www.erlang.org/download_release/8 . This is version 14B, which I > have found to be the most stable till now (I had some problems with > RabbitMQ message consumption with erlang 15 ). > > Installation by source should be pretty easy, download the tarball, unzip > it, ./configure; make; sudo make install. > > Thanks, > Paan > > > > On Sat, Dec 15, 2012 at 11:19 PM, Matthias Radestock < > matthias at rabbitmq.com> wrote: > >> Abhishek, >> >> >> On 15/12/12 17:10, Abhishek Chordia wrote: >> >>> Still not able to install the erlang. >>> >> >> It looks like you still had the /etc/yum.repos.d/epel-erlang.**repo >> lying around. If so, please delete it. Also, did you in fact enable EPEL on >> your machine, as noted in step 1 of http://www.rabbitmq.com/** >> install-rpm.html ? >> >> Overall it is really hard to figure out what is going wrong from >> fragments. If you still encounter problems then please post a complete >> transcript of all the steps you executed when following >> http://www.rabbitmq.com/**install-rpm.htmlfrom a fresh RHEL installation. >> >> >> Regards, >> >> Matthias. >> ______________________________**_________________ >> rabbitmq-discuss mailing list >> rabbitmq-discuss at lists.**rabbitmq.com >> https://lists.rabbitmq.com/**cgi-bin/mailman/listinfo/**rabbitmq-discuss >> > > -- Thanks & Regards, Abhishek Chordia M : +91-8802042181 -------------- next part -------------- An HTML attachment was scrubbed... URL: From uusiddiqui at yahoo.com Mon Dec 17 04:03:23 2012 From: uusiddiqui at yahoo.com (uusiddiqui) Date: Sun, 16 Dec 2012 20:03:23 -0800 (PST) Subject: [rabbitmq-discuss] Backup message and state at a point of time Message-ID: <1355717003892-24061.post@n5.nabble.com> Hi, We are trying to think of a potential problem in our production enviornment and looking to see what options do we have. Our current setup is based on 2 nodes in a cluster running v 3.0.1 of rabbitmq. Potential probelm: For any reason for e.g upgrade on software or on hardware side or any wiered reason if we have to bring both the servers down and there would be a chance of our disk data to be deleted ( unfortunately in real life bad things do happen). Now is there a way we can export the configuration + backup and restore it. Potentail resolution. Take the backup of dirs (/var/lib/rabbitmq) by shutting the nodes down ( not accepting any new connections via LB and then stopping rabbitmq). Question: Is the potential resolution i have stated above is a standard way to go with Rabbitmq. Is there any way i can export the message and import the messages( i saw in admin console that if we go to each queue we can dump the message) ( i have seen in the management console that we can export/import broker configuration but it doesn't contain messages) How should we normally handle backup messages for rabbitmq? -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/Backup-message-and-state-at-a-point-of-time-tp24061.html Sent from the RabbitMQ mailing list archive at Nabble.com. From saurabh256 at yahoo.com Mon Dec 17 05:49:30 2012 From: saurabh256 at yahoo.com (saurabh256) Date: Sun, 16 Dec 2012 21:49:30 -0800 (PST) Subject: [rabbitmq-discuss] binary data corrupts when transferring on Rabbitmq Message-ID: <1355723370888-24062.post@n5.nabble.com> I am new to RabbitMQ and tried to transfer a word document but seems when recieving or sending something happened during encoding or character set and output file gets corrupted. Below is the code for consumer and publisher. Can someone tell me where I am wrong? I am using RabbitMQ Version 3.0.0 on windows machine (if the information helps). I created one word doc manually and exported locally using the producer which is working fine but document created by the consumer is corrupt and word opens that asking for fix. This small sample is vey important for me as my all other use cases are based on same foundation. -------------------------------- Publisher----------------------- import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import com.rabbitmq.client.AMQP; import com.rabbitmq.client.Channel; import com.rabbitmq.client.Connection; import com.rabbitmq.client.ConnectionFactory; public class BaseProducer { private final static String QUEUE_NAME = "hello"; public static void main(String[] argv) throws Exception { ConnectionFactory factory = new ConnectionFactory(); factory.setHost("localhost"); Connection connection = factory.newConnection(); Channel channel = connection.createChannel(); channel.queueDeclare(QUEUE_NAME, false, false, false, null); String message = "Hello World!"; String INPUT_FILE_NAME = "C:\\Folder\\Saurabh\\BSM\\video\\test.docx"; byte[] fileContents = read(INPUT_FILE_NAME); AMQP.BasicProperties.Builder bob = new AMQP.BasicProperties.Builder(); AMQP.BasicProperties persistentBasic = bob.priority(0).contentType("application/octet-stream").contentEncoding("UTF-8").build(); channel.basicPublish("", QUEUE_NAME, persistentBasic,fileContents); System.out.println(" [x] Sent '" + message + "'"); writeFile(fileContents); channel.close(); connection.close(); } static byte[] read(String aInputFileName){ //log("Reading in binary file named : " + aInputFileName); File file = new File(aInputFileName); //log("File size: " + file.length()); byte[] result = new byte[(int)file.length()]; try { InputStream input = null; int totalBytesRead = 0; input = new FileInputStream(aInputFileName); input.read(result); input.close(); } catch (FileNotFoundException ex) { // log("File not found."); } catch (IOException ex) { // log(ex); } return result; } static void writeFile(byte[] result){ // write file from here only and see if working FileOutputStream out; try { out = new FileOutputStream("C:\\Folder\\Saurabh\\BSM\\video\\test-local.docx"); out.write(result); out.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException ex) { // log(ex); ex.printStackTrace(); } } } ------------------------------------------------- Consumer ----------------------------- import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectOutputStream; import com.rabbitmq.client.ConnectionFactory; import com.rabbitmq.client.Connection; import com.rabbitmq.client.Channel; import com.rabbitmq.client.QueueingConsumer; public class BaseConsumer { private final static String QUEUE_NAME = "hello"; public static void main(String[] argv) throws Exception { ConnectionFactory factory = new ConnectionFactory(); factory.setHost("localhost"); Connection connection = factory.newConnection(); Channel channel = connection.createChannel(); channel.queueDeclare(QUEUE_NAME, false, false, false, null); System.out.println(" [*] Waiting for messages. To exit press CTRL+C"); QueueingConsumer consumer = new QueueingConsumer(channel); channel.basicConsume(QUEUE_NAME, true, consumer); Object fileObj = null; while (true) { QueueingConsumer.Delivery delivery = consumer.nextDelivery(); //String message = new String(delivery.getBody()); FileOutputStream out =null; try { out = new FileOutputStream("C:\\Folder\\Saurabh\\BSM\\video\\test-output.docx"); ObjectOutputStream save = new ObjectOutputStream(out); save.writeObject(delivery.getBody()); save.close(); out.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println(" [x] Received '" ); } } } -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/binary-data-corrupts-when-transferring-on-Rabbitmq-tp24062.html Sent from the RabbitMQ mailing list archive at Nabble.com. From matthias at rabbitmq.com Mon Dec 17 08:08:36 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Mon, 17 Dec 2012 08:08:36 +0000 Subject: [rabbitmq-discuss] binary data corrupts when transferring on Rabbitmq In-Reply-To: <1355723370888-24062.post@n5.nabble.com> References: <1355723370888-24062.post@n5.nabble.com> Message-ID: <50CED304.1090009@rabbitmq.com> On 17/12/12 05:49, saurabh256 wrote: > I am new to RabbitMQ and tried to transfer a word document but seems when > recieving or sending something happened during encoding or character set and > output file gets corrupted. This has nothing to do with rabbit. I suggest you first try to make the encoding and decoding work w/o involving RabbitMQ. E.g. take the fileContents var from your producer and feed it into the consumer in place of delivery.getBody(). FWIW, the problem is that you are reading the file as a byte stream but writing it as an object stream. It shouldn't be hard to find examples on the internet for how to read/write files into/from a byte array. Worst case ask for help in some Java forums or stackoverflow. Or take a peek at the File{Producer,Consumer}.java example code that ships with the java client. Regards, Matthias. From saurabh256 at yahoo.com Mon Dec 17 08:31:12 2012 From: saurabh256 at yahoo.com (saurabh256) Date: Mon, 17 Dec 2012 00:31:12 -0800 (PST) Subject: [rabbitmq-discuss] binary data corrupts when transferring on Rabbitmq In-Reply-To: <50CED304.1090009@rabbitmq.com> References: <1355723370888-24062.post@n5.nabble.com> <50CED304.1090009@rabbitmq.com> Message-ID: <1355733072413-24064.post@n5.nabble.com> Thanks a lot Matthias, I totally overlooked the aspect of ByteStream and ObjectStream. That resolved. Really sorry for troubling you all on this trivial issue but at the same time I really appreciate your prompt response. This is first time for me posting on nabble, is there a way to provide "solution accepted" kind of closer of this thread. Thanks a lot again ... -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/binary-data-corrupts-when-transferring-on-Rabbitmq-tp24062p24064.html Sent from the RabbitMQ mailing list archive at Nabble.com. From wangjunbo924 at gmail.com Mon Dec 17 08:58:37 2012 From: wangjunbo924 at gmail.com (=?GB2312?B?zfW/obKo?=) Date: Mon, 17 Dec 2012 16:58:37 +0800 Subject: [rabbitmq-discuss] How to synchronize the RabbitMQ exchanges? In-Reply-To: References: Message-ID: any suggestion? 2012/12/15 ??? > Hi, > Suppose I have created two or more RabbitMQ nodes. For simplicity two > nodes: X and Y. And they are NOT within the same cluster due to the > WAN. Now our applications will declare exchanges dynamically via Java > client libraries on node X. Is there any way that the same exchanges are > declared on Y automatically? Maybe the queues as well. > a constraint: no messages sent to X are copied to Y because we cannot > handle duplicate messages up to now. > > The federation plugin seems be a choice, but I'm not sure weather it works. > > Thanks. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Mon Dec 17 09:27:03 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Mon, 17 Dec 2012 09:27:03 +0000 Subject: [rabbitmq-discuss] How to synchronize the RabbitMQ exchanges? In-Reply-To: References: Message-ID: <50CEE567.2010102@rabbitmq.com> On 15/12/2012 3:07PM, ??? wrote: > Hi, > Suppose I have created two or more RabbitMQ nodes. For simplicity two > nodes: X and Y. And they are NOT within the same cluster due to the > WAN. Now our applications will declare exchanges dynamically via Java > client libraries on node X. Is there any way that the same exchanges are > declared on Y automatically? Maybe the queues as well. > a constraint: no messages sent to X are copied to Y because we cannot > handle duplicate messages up to now. > > The federation plugin seems be a choice, but I'm not sure weather it works. Hi! The federation plugin definitely works :-) but I don't think it's what you want; it will transfer messages... If you want to sync two brokers without transferring messages at all then your best bet is to write a script to export definitions at X (using the mgmt plugin /api/definitions), transfer the config JSON to Y, and reapply it at Y. Cheers, Simon From emile at rabbitmq.com Mon Dec 17 09:57:00 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Mon, 17 Dec 2012 09:57:00 +0000 Subject: [rabbitmq-discuss] Backup message and state at a point of time In-Reply-To: <1355717003892-24061.post@n5.nabble.com> References: <1355717003892-24061.post@n5.nabble.com> Message-ID: <50CEEC6C.2030203@rabbitmq.com> Hi, On 17/12/12 04:03, uusiddiqui wrote: > Is the potential resolution i have stated above is a standard way to go with > Rabbitmq. Taking a snapshot of the $RABBITMQ_MNESIA_BASE and /etc/rabbitmq directories after the broker has completed an orderly shutdown is the standard way of making a backup on Unix. Keep in mind that only persistent messages published to durable queues will survive a broker restart. You can test this by supplying these directories after a clean installation of the broker on the same server. In a clustered environment make sure you stop and start nodes in the correct order as per the clustering guide: http://www.rabbitmq.com/clustering.html > Is there any way i can export the message and import the messages( i saw in > admin console that if we go to each queue we can dump the message) ( i have > seen in the management console that we can export/import broker > configuration but it doesn't contain messages) You can backup the broker configuration separately using the management interface, but there is no automated way of backing up the contents of queues. You can write such a procedure suitable for your environment in terms of consumers and publishers though. -Emile From wangjunbo924 at gmail.com Mon Dec 17 10:35:42 2012 From: wangjunbo924 at gmail.com (=?GB2312?B?zfW/obKo?=) Date: Mon, 17 Dec 2012 18:35:42 +0800 Subject: [rabbitmq-discuss] How to synchronize the RabbitMQ exchanges? In-Reply-To: <50CEE567.2010102@rabbitmq.com> References: <50CEE567.2010102@rabbitmq.com> Message-ID: Hi Simon, Thanks for your reply. I'm looking for any plugin meeting requirements but no lucky. So it seems that we have to sync two brokers without transferring messages by ourselves by api. The worst thing is that we may have to sync definitions whenever we declare a new exchange ,queue or binding. 2012/12/17 Simon MacMullen > On 15/12/2012 3:07PM, ??? wrote: > >> Hi, >> Suppose I have created two or more RabbitMQ nodes. For simplicity two >> nodes: X and Y. And they are NOT within the same cluster due to the >> WAN. Now our applications will declare exchanges dynamically via Java >> client libraries on node X. Is there any way that the same exchanges are >> declared on Y automatically? Maybe the queues as well. >> a constraint: no messages sent to X are copied to Y because we cannot >> handle duplicate messages up to now. >> >> The federation plugin seems be a choice, but I'm not sure weather it >> works. >> > > Hi! The federation plugin definitely works :-) but I don't think it's what > you want; it will transfer messages... > > If you want to sync two brokers without transferring messages at all then > your best bet is to write a script to export definitions at X (using the > mgmt plugin /api/definitions), transfer the config JSON to Y, and reapply > it at Y. > > Cheers, Simon > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Mon Dec 17 10:43:16 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Mon, 17 Dec 2012 10:43:16 +0000 Subject: [rabbitmq-discuss] RabbitMQ Cluster On AWS VPC In-Reply-To: References: Message-ID: <50CEF744.6020501@rabbitmq.com> On 14/12/2012 5:27PM, Laing, Michael P. wrote: > We have not yet seen any performance issues. All traffic between > instances in different availability zones within a region is charged: > $.01/GB in us-east-1. So there is a cost, and the volume of traffic > through your HA queues has an impact. > > In us-east-1, the increase in latency by going across zones is < 10ms, > in our small sample. We will add some continuous testing of this in the > future across all zones. > > Regions may vary in the amount of latency. And latency may vary (jitter). > > *Rather then LAN vs WAN, it would be useful to know the design envelope > for rabbitmq clusters in terms of latency and jitter, as these are > measurable. Also if there is tuning that can be done. We talk about LAN vs WAN because of the different probability of partitions rather than because of performance. Having said that: Resource creation and deletion (exchanges / queues / bindings / users / vhosts / permissions) is synchronous across the cluster (in fact a 2PC). Messaging (publish / confirm / deliver / ack) is async (although there were some synchronous bits publishing in mirrored queues in 2.x). And it's the synchrony that hurts performance as latency goes up obviously. > All that said, I may choose to use federation rather than clustering > across zones, because the rabbitmq response to a net split is so > catastrophic, apparently, and I am not sure I want to live with that > uncertainty in production. We are architected in such a way that we can > do either with minor modifications. We would run a cluster in each zone > and federate the clusters. It's more expensive though and more moving parts. I would recommend that you federate across zones. > We use DynamoDB and Riak as reliable KV stores, as well as s3. Riak > seems to have good tolerance of net splits. (*Why is it better than > rabbitmq in this respect?) Based on a quick reading of their docs, Riak clusters are eventually consistent, like RabbitMQ federation. Cheers, Simon From simon at rabbitmq.com Mon Dec 17 10:59:02 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Mon, 17 Dec 2012 10:59:02 +0000 Subject: [rabbitmq-discuss] crash in a two node RabbitMQ cluster In-Reply-To: <5501b8bb-06f0-44a4-bde9-673525540668@googlegroups.com> References: <5501b8bb-06f0-44a4-bde9-673525540668@googlegroups.com> Message-ID: <50CEFAF6.9090104@rabbitmq.com> On 15/12/2012 8:22PM, Aravindh S wrote: > Hi Hi. > we are running RabbitMQ v 2.8.4 in a two node cluster configuration. > > we had an unplanned power outage and both the servers went down. when we > tried to restart the rabbitmq servers, only rabbit2 node starts up and > the node rabbit1 crashes on start. > we are running several mirrored queues between these nodes.one such > queue "Aiken" contained more than 65K messages before the outage.Now > rabbit1 wont start and rabbit2 starts fine but shows that there are only > 109 old messages in the "Aiken" Queue.We are afraid if we have lost the > messages from the rabbit1 crash. At the risk of asking something obvious: were all the messages published to "Aiken" published with delivery_mode=2 (persistent)? And non-persistent messages will be removed from the queue after restart. > Rabbit1 node crashes on startup on both conditions where rabbit2 was > down and also when rabbit2 was up. > > we could see the following message in the startup log, > > BOOT FAILED > =========== > > Error description: > > {badmatch,{error,{"/var/lib/rabbitmq/mnesia/rabbit at rabbit1/queues/1NGZF3JZJR0SU2C0VE2S25JRP/clean.dot", > eacces}}} "eacces" is the key here - for some reason the server is not being permitted to read the file by the operating system. Assuming you have installed via debs / RPMs, all files under /var/lib/rabbitmq/mnesia should be owned by the "rabbitmq" user - are they? > logs are available here: Looking at the logs it looks like you had several attempts to start rabbit1 before that error message showed up, but they were stymied by a bug in the management plugin startup code that had been fixed since 2.8.4... > Can anyone help me with ideas to recover rabbit1 ?? > Is there a way to tweak the startup of Rabbit1 so that it would start as > an independent node ? ...however, even if you start rabbit1 as part of the cluster it will start its mirrored queues from scratch (see http://www.rabbitmq.com/ha.html#unsynchronised-slaves). It's not easy to start such a node independently in 2.x I'm afraid (this was improved in 3.0). I wrote some rather ad-hoc instructions here: http://rabbitmq.1065348.n5.nabble.com/Repairing-a-a-crashed-cluster-td22466.html But I'm afraid that if the messages were originally published in non-persistent mode you won't get them back - they would never even have made it to disc. Cheers, Simon From simon at rabbitmq.com Mon Dec 17 11:00:04 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Mon, 17 Dec 2012 11:00:04 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0 Policy ha-all delete issue In-Reply-To: <50ABBBC9.9000303@rabbitmq.com> References: <1353429487353-23527.post@n5.nabble.com> <1353430965372-23530.post@n5.nabble.com> <50ABBBC9.9000303@rabbitmq.com> Message-ID: <50CEFB34.3080205@rabbitmq.com> On 20/11/2012 5:20PM, Simon MacMullen wrote: > So it seems like there's a race involving queues being deleted and > having the message sent to them to start / stop mirroring. Hopefully > this shouldn't be too big a deal to fix. I'll keep you informed. ...which I'm bad at remembering to do. This was fixed in 3.0.1. Cheers, Simon From aravindan.santharam at accenture.com Mon Dec 17 10:52:48 2012 From: aravindan.santharam at accenture.com (aravindan.santharam at accenture.com) Date: Mon, 17 Dec 2012 10:52:48 +0000 Subject: [rabbitmq-discuss] Sending HTTP Request in Rabbit-MQ Message-ID: Hi, I'm trying to send the instances of HTTPServletRequest, HTTPServletResponse and HttpMethod in rabbitmq(in Java). At present, we are sending this request using executeMethod() of HTTPClient. It is very obvious that we cannot serialize the above mentioned classes. I want to know is there a way to send the HTTP Request via rabbitmq and to invoke that in tomcat. Aravind ________________________________ This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. ______________________________________________________________________________________ www.accenture.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.Legg at smithelectric.com Mon Dec 17 11:21:46 2012 From: David.Legg at smithelectric.com (David Legg) Date: Mon, 17 Dec 2012 05:21:46 -0600 Subject: [rabbitmq-discuss] Queue Rates at Zero in Management Interface In-Reply-To: <50CB55C7.6000609@rabbitmq.com> Message-ID: On 14/12/2012 16:37, "Simon MacMullen" wrote: >I'm not sure what I can suggest then. This all sounds like it should be >working. If you could post the output of "rabbitmqctl report" that might >give me some sort of a clue in case something odd leaps out. But apart >from that I'm rather stuck. Would you be prepared to run some patched >version of the management plugin so I can see what's going on? The output of 'rabbitmqctl report' is pretty hefty. Is there anything in there that we should be looking out for? I've turned on fine grained statistics and increased the interval to 10000ms but this hasn't had any effect. This did seem to start occurring after we changed the IP addresses of our two Rabbit servers. What effect would this have? Cheers, David From ruifavas at hotmail.com Mon Dec 17 11:35:04 2012 From: ruifavas at hotmail.com (Rui) Date: Mon, 17 Dec 2012 03:35:04 -0800 (PST) Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs In-Reply-To: <09fd72fb-6849-4f42-a9b0-f7c0aff4d41e@googlegroups.com> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <09fd72fb-6849-4f42-a9b0-f7c0aff4d41e@googlegroups.com> Message-ID: <4561f600-e96b-4550-8c98-0537f5a87548@googlegroups.com> The upgrade was simple - We just uninstalled the previous version and delete all the previous files (including the rabbit db) and installed the new version. We are running: RabbitMQ : 3.0.1 Erlang : 5.9.3 OS : Windows Server 2008 64-bit Here?s what we get on the logs:- Rabbit Log =ERROR REPORT==== 17-Dec-2012::11:00:00 === ** Generic server <0.28.0> terminating ** Last message in was {'EXIT',<0.29.0>,einval} ** When Server state == {state,user_sup,undefined,<0.29.0>, {<0.28.0>,user_sup}} ** Reason for termination == ** einval Rabbit SASL Log =SUPERVISOR REPORT==== 17-Dec-2012::11:00:00 === Supervisor: {<0.28.0>,user_sup} Context: child_terminated Reason: einval Offender: [{pid,<0.29.0>},{mod,user_sup}] =CRASH REPORT==== 17-Dec-2012::11:00:00 === crasher: initial call: supervisor_bridge:user_sup/1 pid: <0.28.0> registered_name: [] exception exit: einval in function gen_server:terminate/6 (gen_server.erl, line 747) ancestors: [kernel_sup,<0.10.0>] messages: [] links: [<0.11.0>] dictionary: [] trap_exit: true status: running heap_size: 377 stack_size: 24 reductions: 337 neighbours: =SUPERVISOR REPORT==== 17-Dec-2012::11:00:00 === Supervisor: {local,kernel_sup} Context: child_terminated Reason: einval Offender: [{pid,<0.28.0>}, {name,user}, {mfargs,{user_sup,start,[]}}, {restart_type,temporary}, {shutdown,2000}, {child_type,supervisor}] -------------- next part -------------- An HTML attachment was scrubbed... URL: From rui.favas at barclays.com Mon Dec 17 11:37:24 2012 From: rui.favas at barclays.com (rui.favas at barclays.com) Date: Mon, 17 Dec 2012 11:37:24 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs In-Reply-To: References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <1308E5CFD51CA14DA7B024A689B8B1680288BD981A@LDNPCMMGMB01.INTRANET.BARCAPINT.COM> Message-ID: <1308E5CFD51CA14DA7B024A689B8B1680288BD9820@LDNPCMMGMB01.INTRANET.BARCAPINT.COM> Hi Tim, The upgrade was simple - We just uninstalled the previous version and delete all the previous files (including the rabbit db) and installed the new version. We are running: RabbitMQ : 3.0.1 Erlang : 5.9.3 OS : Windows Server 2008 64-bit Here?s what we get on the logs:- Rabbit Log =ERROR REPORT==== 17-Dec-2012::11:00:00 === ** Generic server <0.28.0> terminating ** Last message in was {'EXIT',<0.29.0>,einval} ** When Server state == {state,user_sup,undefined,<0.29.0>, {<0.28.0>,user_sup}} ** Reason for termination == ** einval Rabbit SASL Log =SUPERVISOR REPORT==== 17-Dec-2012::11:00:00 === Supervisor: {<0.28.0>,user_sup} Context: child_terminated Reason: einval Offender: [{pid,<0.29.0>},{mod,user_sup}] =CRASH REPORT==== 17-Dec-2012::11:00:00 === crasher: initial call: supervisor_bridge:user_sup/1 pid: <0.28.0> registered_name: [] exception exit: einval in function gen_server:terminate/6 (gen_server.erl, line 747) ancestors: [kernel_sup,<0.10.0>] messages: [] links: [<0.11.0>] dictionary: [] trap_exit: true status: running heap_size: 377 stack_size: 24 reductions: 337 neighbours: =SUPERVISOR REPORT==== 17-Dec-2012::11:00:00 === Supervisor: {local,kernel_sup} Context: child_terminated Reason: einval Offender: [{pid,<0.28.0>}, {name,user}, {mfargs,{user_sup,start,[]}}, {restart_type,temporary}, {shutdown,2000}, {child_type,supervisor}] From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Tim Watson Sent: Friday, December 14, 2012 7:27 PM To: Discussions about RabbitMQ Cc: ; Subject: Re: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs Exactly how are you performing the upgrade. What do the server logs and rabbitmqctl report look like? On 14 Dec 2012, at 18:35, > wrote: I've upgraded to 3.0.1 and still get the problem - Looks like disabling the rabbitmq_management plug-in stops the issue. Any pointers? From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Rui Sent: Tuesday, December 04, 2012 5:51 PM To: rabbitmq-discuss at googlegroups.com Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs Rabbit 3.0 is hanging. We have a number of existing .net applications using Rabbit and when we update the server to 3.0 Rabbit stops responding. Rolling back the server solves the problem. Do we need to upgrade the client library at the same time? Any logs I could look at to try to troubleshoot the problem? _______________________________________________ This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barclays.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing. Barclays offers premier investment banking products and services to its clients through Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays Group. _______________________________________________ _______________________________________________ rabbitmq-discuss mailing list rabbitmq-discuss at lists.rabbitmq.com https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From watson.timothy at gmail.com Mon Dec 17 12:01:09 2012 From: watson.timothy at gmail.com (Tim Watson) Date: Mon, 17 Dec 2012 12:01:09 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs In-Reply-To: <1308E5CFD51CA14DA7B024A689B8B1680288BD9820@LDNPCMMGMB01.INTRANET.BARCAPINT.COM> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <1308E5CFD51CA14DA7B024A689B8B1680288BD981A@LDNPCMMGMB01.INTRANET.BARCAPINT.COM> <1308E5CFD51CA14DA7B024A689B8B1680288BD9820@LDNPCMMGMB01.INTRANET.BARCAPINT.COM> Message-ID: Can you start erlang by itself? On 17 Dec 2012, at 11:37, wrote: > Hi Tim, > The upgrade was simple - We just uninstalled the previous version and delete all the previous files (including the rabbit db) and installed the new version. > We are running: > RabbitMQ : 3.0.1 > Erlang : 5.9.3 > OS : Windows Server 2008 64-bit > Here?s what we get on the logs:- > Rabbit Log > =ERROR REPORT==== 17-Dec-2012::11:00:00 === > ** Generic server <0.28.0> terminating > ** Last message in was {'EXIT',<0.29.0>,einval} > ** When Server state == {state,user_sup,undefined,<0.29.0>, > {<0.28.0>,user_sup}} > ** Reason for termination == > ** einval > > > Rabbit SASL Log > > > =SUPERVISOR REPORT==== 17-Dec-2012::11:00:00 === > Supervisor: {<0.28.0>,user_sup} > Context: child_terminated > Reason: einval > Offender: [{pid,<0.29.0>},{mod,user_sup}] > > > =CRASH REPORT==== 17-Dec-2012::11:00:00 === > crasher: > initial call: supervisor_bridge:user_sup/1 > pid: <0.28.0> > registered_name: [] > exception exit: einval > in function gen_server:terminate/6 (gen_server.erl, line 747) > ancestors: [kernel_sup,<0.10.0>] > messages: [] > links: [<0.11.0>] > dictionary: [] > trap_exit: true > status: running > heap_size: 377 > stack_size: 24 > reductions: 337 > neighbours: > > =SUPERVISOR REPORT==== 17-Dec-2012::11:00:00 === > Supervisor: {local,kernel_sup} > Context: child_terminated > Reason: einval > Offender: [{pid,<0.28.0>}, > {name,user}, > {mfargs,{user_sup,start,[]}}, > {restart_type,temporary}, > {shutdown,2000}, > {child_type,supervisor}] > > > > From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Tim Watson > Sent: Friday, December 14, 2012 7:27 PM > To: Discussions about RabbitMQ > Cc: ; > Subject: Re: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs > > Exactly how are you performing the upgrade. What do the server logs and rabbitmqctl report look like? > > On 14 Dec 2012, at 18:35, wrote: > > I've upgraded to 3.0.1 and still get the problem - Looks like disabling the rabbitmq_management plug-in stops the issue. Any pointers? > > > From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Rui > Sent: Tuesday, December 04, 2012 5:51 PM > To: rabbitmq-discuss at googlegroups.com > Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs > > Rabbit 3.0 is hanging. > We have a number of existing .net applications using Rabbit and when we update the server to 3.0 Rabbit stops responding. Rolling back the server solves the problem. > Do we need to upgrade the client library at the same time? > Any logs I could look at to try to troubleshoot the problem? > _______________________________________________ > This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barclays.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing. Barclays offers premier investment banking products and services to its clients through Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays Group. > _______________________________________________ > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From rui.favas at barclays.com Mon Dec 17 12:57:35 2012 From: rui.favas at barclays.com (rui.favas at barclays.com) Date: Mon, 17 Dec 2012 12:57:35 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs In-Reply-To: References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <1308E5CFD51CA14DA7B024A689B8B1680288BD981A@LDNPCMMGMB01.INTRANET.BARCAPINT.COM> <1308E5CFD51CA14DA7B024A689B8B1680288BD9820@LDNPCMMGMB01.INTRANET.BARCAPINT.COM> Message-ID: <1308E5CFD51CA14DA7B024A689B8B1680288BD9825@LDNPCMMGMB01.INTRANET.BARCAPINT.COM> Erlang starts fine ? Both work fine for a period of time (I can acess rabbit and management console fine for an hour or so) See full log below:- =INFO REPORT==== 17-Dec-2012::10:00:44 === Starting RabbitMQ 3.0.1 on Erlang R15B03 =INFO REPORT==== 17-Dec-2012::10:00:46 === Limiting to approx 65436 file handles (58890 sockets) =INFO REPORT==== 17-Dec-2012::10:00:46 === application: mnesia exited: stopped type: temporary =INFO REPORT==== 17-Dec-2012::10:00:47 === Memory limit set to 9826MB of 24565MB total. =INFO REPORT==== 17-Dec-2012::10:00:47 === Disk free limit set to 1000MB =INFO REPORT==== 17-Dec-2012::10:00:47 === Management plugin upgraded statistics to coarse. =INFO REPORT==== 17-Dec-2012::10:00:47 === msg_store_transient: using rabbit_msg_store_ets_index to provide index =INFO REPORT==== 17-Dec-2012::10:00:47 === msg_store_persistent: using rabbit_msg_store_ets_index to provide index =WARNING REPORT==== 17-Dec-2012::10:00:47 === msg_store_persistent: rebuilding indices from scratch =INFO REPORT==== 17-Dec-2012::10:00:47 === Adding vhost '/test' =INFO REPORT==== 17-Dec-2012::10:00:47 === Creating user 'testadmin' =INFO REPORT==== 17-Dec-2012::10:00:47 === Setting user tags for user 'testadmin' to [administrator] =INFO REPORT==== 17-Dec-2012::10:00:47 === Setting permissions for 'testadmin' in '/bcfs' to '.*', '.*', '.*' =INFO REPORT==== 17-Dec-2012::10:00:47 === started TCP Listener on [::]:5672 =INFO REPORT==== 17-Dec-2012::10:00:47 === started TCP Listener on 0.0.0.0:5672 =INFO REPORT==== 17-Dec-2012::10:00:47 === Management agent started. =INFO REPORT==== 17-Dec-2012::10:00:47 === Management plugin started. Port: 15672 =INFO REPORT==== 17-Dec-2012::10:00:47 === Statistics database started. =INFO REPORT==== 17-Dec-2012::10:00:47 === accepting AMQP connection <0.362.0> (10.74.59.91:51986 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:00:47 === accepting AMQP connection <0.372.0> (10.74.59.91:51985 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:00:47 === accepting AMQP connection <0.387.0> (10.74.59.91:51988 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:00:47 === accepting AMQP connection <0.391.0> (10.74.59.91:51987 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:04:01 === accepting AMQP connection <0.549.0> (30.254.43.157:62861 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:04:16 === closing AMQP connection <0.549.0> (30.254.43.157:62861 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:04:29 === accepting AMQP connection <0.562.0> (30.254.43.157:62865 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:04:33 === accepting AMQP connection <0.575.0> (30.254.43.157:62866 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:21:57 === closing AMQP connection <0.575.0> (30.254.43.157:62866 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:21:58 === closing AMQP connection <0.562.0> (30.254.43.157:62865 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:47:31 === accepting AMQP connection <0.1467.0> (30.254.43.157:51530 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:47:38 === accepting AMQP connection <0.1480.0> (30.254.43.157:51533 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:47:43 === accepting AMQP connection <0.1491.0> (30.254.43.157:51535 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:47:49 === accepting AMQP connection <0.1502.0> (30.254.43.157:51536 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:48:00 === accepting AMQP connection <0.1513.0> (30.254.43.157:51539 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:48:08 === accepting AMQP connection <0.1524.0> (30.254.43.157:51543 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:49:24 === accepting AMQP connection <0.1536.0> (30.254.43.157:51565 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:49:31 === accepting AMQP connection <0.1547.0> (30.254.43.157:51567 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:53:04 === closing AMQP connection <0.1536.0> (30.254.43.157:51565 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:53:06 === closing AMQP connection <0.1524.0> (30.254.43.157:51543 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:53:11 === closing AMQP connection <0.1502.0> (30.254.43.157:51536 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:53:19 === closing AMQP connection <0.1513.0> (30.254.43.157:51539 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:53:20 === closing AMQP connection <0.1547.0> (30.254.43.157:51567 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:53:22 === closing AMQP connection <0.1491.0> (30.254.43.157:51535 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:53:57 === closing AMQP connection <0.1480.0> (30.254.43.157:51533 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:54:00 === closing AMQP connection <0.1467.0> (30.254.43.157:51530 -> 10.74.59.91:5672) =ERROR REPORT==== 17-Dec-2012::11:00:00 === ** Generic server <0.28.0> terminating ** Last message in was {'EXIT',<0.29.0>,einval} ** When Server state == {state,user_sup,undefined,<0.29.0>, {<0.28.0>,user_sup}} ** Reason for termination == ** einval From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Tim Watson Sent: Monday, December 17, 2012 12:01 PM To: Discussions about RabbitMQ Cc: ; rabbitmq-discuss at googlegroups.com Subject: Re: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs Can you start erlang by itself? On 17 Dec 2012, at 11:37, > wrote: Hi Tim, The upgrade was simple - We just uninstalled the previous version and delete all the previous files (including the rabbit db) and installed the new version. We are running: RabbitMQ : 3.0.1 Erlang : 5.9.3 OS : Windows Server 2008 64-bit Here?s what we get on the logs:- Rabbit Log =ERROR REPORT==== 17-Dec-2012::11:00:00 === ** Generic server <0.28.0> terminating ** Last message in was {'EXIT',<0.29.0>,einval} ** When Server state == {state,user_sup,undefined,<0.29.0>, {<0.28.0>,user_sup}} ** Reason for termination == ** einval Rabbit SASL Log =SUPERVISOR REPORT==== 17-Dec-2012::11:00:00 === Supervisor: {<0.28.0>,user_sup} Context: child_terminated Reason: einval Offender: [{pid,<0.29.0>},{mod,user_sup}] =CRASH REPORT==== 17-Dec-2012::11:00:00 === crasher: initial call: supervisor_bridge:user_sup/1 pid: <0.28.0> registered_name: [] exception exit: einval in function gen_server:terminate/6 (gen_server.erl, line 747) ancestors: [kernel_sup,<0.10.0>] messages: [] links: [<0.11.0>] dictionary: [] trap_exit: true status: running heap_size: 377 stack_size: 24 reductions: 337 neighbours: =SUPERVISOR REPORT==== 17-Dec-2012::11:00:00 === Supervisor: {local,kernel_sup} Context: child_terminated Reason: einval Offender: [{pid,<0.28.0>}, {name,user}, {mfargs,{user_sup,start,[]}}, {restart_type,temporary}, {shutdown,2000}, {child_type,supervisor}] From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Tim Watson Sent: Friday, December 14, 2012 7:27 PM To: Discussions about RabbitMQ Cc: >; > Subject: Re: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs Exactly how are you performing the upgrade. What do the server logs and rabbitmqctl report look like? On 14 Dec 2012, at 18:35, > wrote: I've upgraded to 3.0.1 and still get the problem - Looks like disabling the rabbitmq_management plug-in stops the issue. Any pointers? From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Rui Sent: Tuesday, December 04, 2012 5:51 PM To: rabbitmq-discuss at googlegroups.com Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs Rabbit 3.0 is hanging. We have a number of existing .net applications using Rabbit and when we update the server to 3.0 Rabbit stops responding. Rolling back the server solves the problem. Do we need to upgrade the client library at the same time? Any logs I could look at to try to troubleshoot the problem? _______________________________________________ This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barclays.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing. Barclays offers premier investment banking products and services to its clients through Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays Group. _______________________________________________ _______________________________________________ rabbitmq-discuss mailing list rabbitmq-discuss at lists.rabbitmq.com 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruifavas at hotmail.com Mon Dec 17 13:15:59 2012 From: ruifavas at hotmail.com (Rui) Date: Mon, 17 Dec 2012 05:15:59 -0800 (PST) Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs In-Reply-To: <4561f600-e96b-4550-8c98-0537f5a87548@googlegroups.com> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <09fd72fb-6849-4f42-a9b0-f7c0aff4d41e@googlegroups.com> <4561f600-e96b-4550-8c98-0537f5a87548@googlegroups.com> Message-ID: <3d6fb186-1011-4538-815b-52578930eff2@googlegroups.com> Erlang starts fine ? Both work fine for a period of time (I can acess rabbit and management console fine for an hour or so) See full log below:- =INFO REPORT==== 17-Dec-2012::10:00:44 === Starting RabbitMQ 3.0.1 on Erlang R15B03 =INFO REPORT==== 17-Dec-2012::10:00:46 === Limiting to approx 65436 file handles (58890 sockets) =INFO REPORT==== 17-Dec-2012::10:00:46 === application: mnesia exited: stopped type: temporary =INFO REPORT==== 17-Dec-2012::10:00:47 === Memory limit set to 9826MB of 24565MB total. =INFO REPORT==== 17-Dec-2012::10:00:47 === Disk free limit set to 1000MB =INFO REPORT==== 17-Dec-2012::10:00:47 === Management plugin upgraded statistics to coarse. =INFO REPORT==== 17-Dec-2012::10:00:47 === msg_store_transient: using rabbit_msg_store_ets_index to provide index =INFO REPORT==== 17-Dec-2012::10:00:47 === msg_store_persistent: using rabbit_msg_store_ets_index to provide index =WARNING REPORT==== 17-Dec-2012::10:00:47 === msg_store_persistent: rebuilding indices from scratch =INFO REPORT==== 17-Dec-2012::10:00:47 === Adding vhost '/test' =INFO REPORT==== 17-Dec-2012::10:00:47 === Creating user 'testadmin' =INFO REPORT==== 17-Dec-2012::10:00:47 === Setting user tags for user 'testadmin' to [administrator] =INFO REPORT==== 17-Dec-2012::10:00:47 === Setting permissions for 'testadmin' in '/bcfs' to '.*', '.*', '.*' =INFO REPORT==== 17-Dec-2012::10:00:47 === started TCP Listener on [::]:5672 =INFO REPORT==== 17-Dec-2012::10:00:47 === started TCP Listener on 0.0.0.0:5672 =INFO REPORT==== 17-Dec-2012::10:00:47 === Management agent started. =INFO REPORT==== 17-Dec-2012::10:00:47 === Management plugin started. Port: 15672 =INFO REPORT==== 17-Dec-2012::10:00:47 === Statistics database started. =INFO REPORT==== 17-Dec-2012::10:00:47 === accepting AMQP connection <0.362.0> (10.74.59.91:51986 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:00:47 === accepting AMQP connection <0.372.0> (10.74.59.91:51985 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:00:47 === accepting AMQP connection <0.387.0> (10.74.59.91:51988 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:00:47 === accepting AMQP connection <0.391.0> (10.74.59.91:51987 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:04:01 === accepting AMQP connection <0.549.0> (30.254.43.157:62861 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:04:16 === closing AMQP connection <0.549.0> (30.254.43.157:62861 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:04:29 === accepting AMQP connection <0.562.0> (30.254.43.157:62865 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:04:33 === accepting AMQP connection <0.575.0> (30.254.43.157:62866 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:21:57 === closing AMQP connection <0.575.0> (30.254.43.157:62866 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:21:58 === closing AMQP connection <0.562.0> (30.254.43.157:62865 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:47:31 === accepting AMQP connection <0.1467.0> (30.254.43.157:51530 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:47:38 === accepting AMQP connection <0.1480.0> (30.254.43.157:51533 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:47:43 === accepting AMQP connection <0.1491.0> (30.254.43.157:51535 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:47:49 === accepting AMQP connection <0.1502.0> (30.254.43.157:51536 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:48:00 === accepting AMQP connection <0.1513.0> (30.254.43.157:51539 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:48:08 === accepting AMQP connection <0.1524.0> (30.254.43.157:51543 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:49:24 === accepting AMQP connection <0.1536.0> (30.254.43.157:51565 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:49:31 === accepting AMQP connection <0.1547.0> (30.254.43.157:51567 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:53:04 === closing AMQP connection <0.1536.0> (30.254.43.157:51565 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:53:06 === closing AMQP connection <0.1524.0> (30.254.43.157:51543 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:53:11 === closing AMQP connection <0.1502.0> (30.254.43.157:51536 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:53:19 === closing AMQP connection <0.1513.0> (30.254.43.157:51539 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:53:20 === closing AMQP connection <0.1547.0> (30.254.43.157:51567 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:53:22 === closing AMQP connection <0.1491.0> (30.254.43.157:51535 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:53:57 === closing AMQP connection <0.1480.0> (30.254.43.157:51533 -> 10.74.59.91:5672) =INFO REPORT==== 17-Dec-2012::10:54:00 === closing AMQP connection <0.1467.0> (30.254.43.157:51530 -> 10.74.59.91:5672) =ERROR REPORT==== 17-Dec-2012::11:00:00 === ** Generic server <0.28.0> terminating ** Last message in was {'EXIT',<0.29.0>,einval} ** When Server state == {state,user_sup,undefined,<0.29.0>, {<0.28.0>,user_sup}} ** Reason for termination == ** einval On Monday, 17 December 2012 11:35:04 UTC, Rui wrote: > > The upgrade was simple - We just uninstalled the previous version and > delete all the previous files (including the rabbit db) and installed the > new version. > > > > We are running: > > > > RabbitMQ : 3.0.1 > > Erlang : 5.9.3 > > OS : Windows Server 2008 64-bit > > > > > > Here?s what we get on the logs:- > > > > Rabbit Log > > > > =ERROR REPORT==== 17-Dec-2012::11:00:00 === > > ** Generic server <0.28.0> terminating > > ** Last message in was {'EXIT',<0.29.0>,einval} > > ** When Server state == {state,user_sup,undefined,<0.29.0>, > > {<0.28.0>,user_sup}} > > ** Reason for termination == > > ** einval > > > > > > Rabbit SASL Log > > > > > > =SUPERVISOR REPORT==== 17-Dec-2012::11:00:00 === > > Supervisor: {<0.28.0>,user_sup} > > Context: child_terminated > > Reason: einval > > Offender: [{pid,<0.29.0>},{mod,user_sup}] > > > > > > =CRASH REPORT==== 17-Dec-2012::11:00:00 === > > crasher: > > initial call: supervisor_bridge:user_sup/1 > > pid: <0.28.0> > > registered_name: [] > > exception exit: einval > > in function gen_server:terminate/6 (gen_server.erl, line 747) > > ancestors: [kernel_sup,<0.10.0>] > > messages: [] > > links: [<0.11.0>] > > dictionary: [] > > trap_exit: true > > status: running > > heap_size: 377 > > stack_size: 24 > > reductions: 337 > > neighbours: > > > > =SUPERVISOR REPORT==== 17-Dec-2012::11:00:00 === > > Supervisor: {local,kernel_sup} > > Context: child_terminated > > Reason: einval > > Offender: [{pid,<0.28.0>}, > > {name,user}, > > {mfargs,{user_sup,start,[]}}, > > {restart_type,temporary}, > > {shutdown,2000}, > > {child_type,supervisor}] > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Mon Dec 17 14:08:39 2012 From: tim at rabbitmq.com (Tim Watson) Date: Mon, 17 Dec 2012 14:08:39 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs In-Reply-To: <3d6fb186-1011-4538-815b-52578930eff2@googlegroups.com> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <09fd72fb-6849-4f42-a9b0-f7c0aff4d41e@googlegroups.com> <4561f600-e96b-4550-8c98-0537f5a87548@googlegroups.com> <3d6fb186-1011-4538-815b-52578930eff2@googlegroups.com> Message-ID: <6FE17E0A-BFCE-4DBA-A291-1566D46647A6@rabbitmq.com> Rui, this is very odd. The crash appears to occur because the user_drv i/o management process is crashing. How are you starting your rabbit? Is it running as a windows service, or being started some other way? On 17 Dec 2012, at 13:15, Rui wrote: > Erlang starts fine ? Both work fine for a period of time (I can acess rabbit and management console fine for an hour or so) > ------------- > > We are running: > > > RabbitMQ : 3.0.1 > > Erlang : 5.9.3 > > OS : Windows Server 2008 64-bit > > > > Here?s what we get on the logs:- > > > Rabbit Log > > > =ERROR REPORT==== 17-Dec-2012::11:00:00 === > > ** Generic server <0.28.0> terminating > > ** Last message in was {'EXIT',<0.29.0>,einval} > > ** When Server state == {state,user_sup,undefined,<0.29.0>, > > {<0.28.0>,user_sup}} > > ** Reason for termination == > > ** einval > > ---------- > > =SUPERVISOR REPORT==== 17-Dec-2012::11:00:00 === > > Supervisor: {<0.28.0>,user_sup} > > Context: child_terminated > > Reason: einval > > Offender: [{pid,<0.29.0>},{mod,user_sup}] > ---------- > > =SUPERVISOR REPORT==== 17-Dec-2012::11:00:00 === > > Supervisor: {local,kernel_sup} > > Context: child_terminated > > Reason: einval > > Offender: [{pid,<0.28.0>}, > > {name,user}, > > {mfargs,{user_sup,start,[]}}, > > {restart_type,temporary}, > > {shutdown,2000}, > > {child_type,supervisor}] > From ruifavas at hotmail.com Mon Dec 17 14:59:04 2012 From: ruifavas at hotmail.com (Rui) Date: Mon, 17 Dec 2012 06:59:04 -0800 (PST) Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs In-Reply-To: <3d6fb186-1011-4538-815b-52578930eff2@googlegroups.com> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <09fd72fb-6849-4f42-a9b0-f7c0aff4d41e@googlegroups.com> <4561f600-e96b-4550-8c98-0537f5a87548@googlegroups.com> <3d6fb186-1011-4538-815b-52578930eff2@googlegroups.com> Message-ID: <0258b37c-fa3b-4375-8ee9-fe943a76cc8c@googlegroups.com> Hello Tim, We use a .Net process which runs Rabbit using ?sbin\rabbitmq-server?. This has been running in prod with previous versions of rabbitmq for a while with no problems ? have you changed the way the Management Plug-in runs? On Monday, 17 December 2012 13:15:59 UTC, Rui wrote: > > Erlang starts fine ? Both work fine for a period of time (I can acess > rabbit and management console fine for an hour or so) > > > > See full log below:- > > > > =INFO REPORT==== 17-Dec-2012::10:00:44 === > > Starting RabbitMQ 3.0.1 on Erlang R15B03 > > > > =INFO REPORT==== 17-Dec-2012::10:00:46 === > > Limiting to approx 65436 file handles (58890 sockets) > > > > =INFO REPORT==== 17-Dec-2012::10:00:46 === > > application: mnesia > > exited: stopped > > type: temporary > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > Memory limit set to 9826MB of 24565MB total. > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > Disk free limit set to 1000MB > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > Management plugin upgraded statistics to coarse. > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > msg_store_transient: using rabbit_msg_store_ets_index to provide index > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > msg_store_persistent: using rabbit_msg_store_ets_index to provide index > > > > =WARNING REPORT==== 17-Dec-2012::10:00:47 === > > msg_store_persistent: rebuilding indices from scratch > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > Adding vhost '/test' > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > Creating user 'testadmin' > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > Setting user tags for user 'testadmin' to [administrator] > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > Setting permissions for 'testadmin' in '/bcfs' to '.*', '.*', '.*' > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > started TCP Listener on [::]:5672 > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > started TCP Listener on 0.0.0.0:5672 > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > Management agent started. > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > Management plugin started. Port: 15672 > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > Statistics database started. > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > accepting AMQP connection <0.362.0> (10.74.59.91:51986 -> 10.74.59.91:5672 > ) > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > accepting AMQP connection <0.372.0> (10.74.59.91:51985 -> 10.74.59.91:5672 > ) > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > accepting AMQP connection <0.387.0> (10.74.59.91:51988 -> 10.74.59.91:5672 > ) > > > > =INFO REPORT==== 17-Dec-2012::10:00:47 === > > accepting AMQP connection <0.391.0> (10.74.59.91:51987 -> 10.74.59.91:5672 > ) > > > > =INFO REPORT==== 17-Dec-2012::10:04:01 === > > accepting AMQP connection <0.549.0> (30.254.43.157:62861 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:04:16 === > > closing AMQP connection <0.549.0> (30.254.43.157:62861 -> 10.74.59.91:5672 > ) > > > > =INFO REPORT==== 17-Dec-2012::10:04:29 === > > accepting AMQP connection <0.562.0> (30.254.43.157:62865 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:04:33 === > > accepting AMQP connection <0.575.0> (30.254.43.157:62866 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:21:57 === > > closing AMQP connection <0.575.0> (30.254.43.157:62866 -> 10.74.59.91:5672 > ) > > > > =INFO REPORT==== 17-Dec-2012::10:21:58 === > > closing AMQP connection <0.562.0> (30.254.43.157:62865 -> 10.74.59.91:5672 > ) > > > > =INFO REPORT==== 17-Dec-2012::10:47:31 === > > accepting AMQP connection <0.1467.0> (30.254.43.157:51530 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:47:38 === > > accepting AMQP connection <0.1480.0> (30.254.43.157:51533 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:47:43 === > > accepting AMQP connection <0.1491.0> (30.254.43.157:51535 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:47:49 === > > accepting AMQP connection <0.1502.0> (30.254.43.157:51536 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:48:00 === > > accepting AMQP connection <0.1513.0> (30.254.43.157:51539 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:48:08 === > > accepting AMQP connection <0.1524.0> (30.254.43.157:51543 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:49:24 === > > accepting AMQP connection <0.1536.0> (30.254.43.157:51565 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:49:31 === > > accepting AMQP connection <0.1547.0> (30.254.43.157:51567 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:53:04 === > > closing AMQP connection <0.1536.0> (30.254.43.157:51565 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:53:06 === > > closing AMQP connection <0.1524.0> (30.254.43.157:51543 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:53:11 === > > closing AMQP connection <0.1502.0> (30.254.43.157:51536 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:53:19 === > > closing AMQP connection <0.1513.0> (30.254.43.157:51539 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:53:20 === > > closing AMQP connection <0.1547.0> (30.254.43.157:51567 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:53:22 === > > closing AMQP connection <0.1491.0> (30.254.43.157:51535 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:53:57 === > > closing AMQP connection <0.1480.0> (30.254.43.157:51533 -> > 10.74.59.91:5672) > > > > =INFO REPORT==== 17-Dec-2012::10:54:00 === > > closing AMQP connection <0.1467.0> (30.254.43.157:51530 -> > 10.74.59.91:5672) > > > > =ERROR REPORT==== 17-Dec-2012::11:00:00 === > > ** Generic server <0.28.0> terminating > > ** Last message in was {'EXIT',<0.29.0>,einval} > > ** When Server state == {state,user_sup,undefined,<0.29.0>, > > {<0.28.0>,user_sup}} > > ** Reason for termination == > > ** einval > > > > On Monday, 17 December 2012 11:35:04 UTC, Rui wrote: >> >> The upgrade was simple - We just uninstalled the previous version and >> delete all the previous files (including the rabbit db) and installed the >> new version. >> >> >> >> We are running: >> >> >> >> RabbitMQ : 3.0.1 >> >> Erlang : 5.9.3 >> >> OS : Windows Server 2008 64-bit >> >> >> >> >> >> Here?s what we get on the logs:- >> >> >> >> Rabbit Log >> >> >> >> =ERROR REPORT==== 17-Dec-2012::11:00:00 === >> >> ** Generic server <0.28.0> terminating >> >> ** Last message in was {'EXIT',<0.29.0>,einval} >> >> ** When Server state == {state,user_sup,undefined,<0.29.0>, >> >> {<0.28.0>,user_sup}} >> >> ** Reason for termination == >> >> ** einval >> >> >> >> >> >> Rabbit SASL Log >> >> >> >> >> >> =SUPERVISOR REPORT==== 17-Dec-2012::11:00:00 === >> >> Supervisor: {<0.28.0>,user_sup} >> >> Context: child_terminated >> >> Reason: einval >> >> Offender: [{pid,<0.29.0>},{mod,user_sup}] >> >> >> >> >> >> =CRASH REPORT==== 17-Dec-2012::11:00:00 === >> >> crasher: >> >> initial call: supervisor_bridge:user_sup/1 >> >> pid: <0.28.0> >> >> registered_name: [] >> >> exception exit: einval >> >> in function gen_server:terminate/6 (gen_server.erl, line 747) >> >> ancestors: [kernel_sup,<0.10.0>] >> >> messages: [] >> >> links: [<0.11.0>] >> >> dictionary: [] >> >> trap_exit: true >> >> status: running >> >> heap_size: 377 >> >> stack_size: 24 >> >> reductions: 337 >> >> neighbours: >> >> >> >> =SUPERVISOR REPORT==== 17-Dec-2012::11:00:00 === >> >> Supervisor: {local,kernel_sup} >> >> Context: child_terminated >> >> Reason: einval >> >> Offender: [{pid,<0.28.0>}, >> >> {name,user}, >> >> {mfargs,{user_sup,start,[]}}, >> >> {restart_type,temporary}, >> >> {shutdown,2000}, >> >> {child_type,supervisor}] >> >> >> >> >> >> >> >> >> >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From roanoketech at yahoo.com Mon Dec 17 15:31:09 2012 From: roanoketech at yahoo.com (John Smith) Date: Mon, 17 Dec 2012 07:31:09 -0800 (PST) Subject: [rabbitmq-discuss] Java queueDeclare statement In-Reply-To: <1355180560.9407.YahooMailNeo@web165002.mail.bf1.yahoo.com> References: <1355172599.17308.YahooMailNeo@web165005.mail.bf1.yahoo.com> <1355180560.9407.YahooMailNeo@web165002.mail.bf1.yahoo.com> Message-ID: <1355758269.50486.YahooMailNeo@web165003.mail.bf1.yahoo.com> Maybe its just that my Java is very rusty, but I see a difference bewtween the AQPI guide and the ... ? I am using the following link to the API guide ? http://www.rabbitmq.com/api-guide.html ? The API Guide uses the following (and I can get this command to work) ? channel.queueDeclare(queueName, true, false, false, null); However, in the in the Java Interface I found in this page http://www.rabbitmq.com/releases/rabbitmq-java-client/v1.7.0/rabbitmq-java-client-javadoc-1.7.0/com/rabbitmq/client/Channel.html I see the following: ?AMQP.Queue.DeclareOk queueDeclare() ??????????Actively declare a server-named exclusive, autodelete, non-durable queue. ?AMQP.Queue.DeclareOk queueDeclare(java.lang.String?queue) ??????????Actively declare a non-exclusive, non-autodelete, non-durable queue ?AMQP.Queue.DeclareOk queueDeclare(java.lang.String?queue, boolean?durable) ??????????Actively declare a non-exclusive, non-autodelete queue The name of the new queue is held in the "queue" field of the AMQP.Queue.DeclareOk result. ?AMQP.Queue.DeclareOk queueDeclare(java.lang.String?queue, boolean?passive, boolean?durable, boolean?exclusive, boolean?autoDelete, java.util.Map?arguments) ??????????Declare a queue None of these match the one I found in the API guide.? The closest is the last one in the table, but that includes? a reference to the 'passive' prameter that is?aparently not included in?the reference I found in the API guide ? What am I missing, or is my Java simply weak ? ? Thanks??? -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Mon Dec 17 15:42:43 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Mon, 17 Dec 2012 15:42:43 +0000 Subject: [rabbitmq-discuss] Java queueDeclare statement In-Reply-To: <1355758269.50486.YahooMailNeo@web165003.mail.bf1.yahoo.com> References: <1355172599.17308.YahooMailNeo@web165005.mail.bf1.yahoo.com> <1355180560.9407.YahooMailNeo@web165002.mail.bf1.yahoo.com> <1355758269.50486.YahooMailNeo@web165003.mail.bf1.yahoo.com> Message-ID: <50CF3D73.30409@rabbitmq.com> On 17/12/12 15:31, John Smith wrote: > Maybe its just that my Java is very rusty, but I see a difference > bewtween the AQPI guide and the ... > I am using the following link to the API guide > http://www.rabbitmq.com/api-guide.html > The API Guide uses the following (and I can get this command to work) > > channel.queueDeclare(*queueName*,*true*,*false*,*false*,*null*); That's correct. > However, in the in the Java Interface I found in this page > http://www.rabbitmq.com/releases/rabbitmq-java-client/v1.7.0/rabbitmq-java-client-javadoc-1.7.0/com/rabbitmq/client/Channel.html That's a very old version of the Java API - it's changed since. Check http://www.rabbitmq.com/releases/rabbitmq-java-client/current-javadoc/ for an up to date version. In terms of this specific difference, we moved the passive=true case into a different Java method, since its semantics are so different. (People kept talking about "passive queues" as if that meant something like "durable queues".) Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From tim at rabbitmq.com Mon Dec 17 16:37:12 2012 From: tim at rabbitmq.com (Tim Watson) Date: Mon, 17 Dec 2012 16:37:12 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs In-Reply-To: <0258b37c-fa3b-4375-8ee9-fe943a76cc8c@googlegroups.com> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <09fd72fb-6849-4f42-a9b0-f7c0aff4d41e@googlegroups.com> <4561f600-e96b-4550-8c98-0537f5a87548@googlegroups.com> <3d6fb186-1011-4538-815b-52578930eff2@googlegroups.com> <0258b37c-fa3b-4375-8ee9-fe943a76cc8c@googlegroups.com> Message-ID: <96B8FB28-E161-48FD-973F-B6EFEE439347@rabbitmq.com> On 17 Dec 2012, at 14:59, Rui wrote: > Hello Tim, > > We use a .Net process which runs Rabbit using ?sbin\rabbitmq-server?. This has been running in prod with previous versions of rabbitmq for a while with no problems ? have you changed the way the Management Plug-in runs? > > I don't think so, but the problem here doesn't appear to be anything to do with the management plugin - it is an error indicating that the stdio management has run into a bad input/argument. So you're launching rabbit from inside another operating system process? Are you sure you're not closing the pipe or something like that? I suppose it's possible that some open_port call that results from running management could be to blame, but it sounds unlikely to me. I'll have a go at reproducing this in a Windows machine tomorrow, but it *looks* like the kind of thing that's tricky to reproduce. Another colleague has suggested that it might be worth trying to re-install both rabbitmq *and* erlang completely on the machine and trying again. Cheers, Tim From prabodh.upreti at vce.com Mon Dec 17 17:54:32 2012 From: prabodh.upreti at vce.com (Prabodh Upreti) Date: Mon, 17 Dec 2012 09:54:32 -0800 (PST) Subject: [rabbitmq-discuss] rabbitmq exchange missing after reboot Message-ID: <1355766872754-24084.post@n5.nabble.com> Hello I am using rabbitmq 2.8.6. I am able to create an exchange using rabbitmqadmin rabbitmqadmin declare exchange name=xxx type=topic and everything is fine. When I reboot my VM my exhange is missing. Is there something missing as part of exchange creation that is making it temporary. I would appreciate your feedback. Thank you. -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/rabbitmq-exchange-missing-after-reboot-tp24084.html Sent from the RabbitMQ mailing list archive at Nabble.com. From simon at rabbitmq.com Mon Dec 17 17:59:34 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Mon, 17 Dec 2012 17:59:34 +0000 Subject: [rabbitmq-discuss] rabbitmq exchange missing after reboot In-Reply-To: <1355766872754-24084.post@n5.nabble.com> References: <1355766872754-24084.post@n5.nabble.com> Message-ID: <50CF5D86.6040100@rabbitmq.com> On 17/12/12 17:54, Prabodh Upreti wrote: > Hello > > I am using rabbitmq 2.8.6. I am able to create an exchange using > rabbitmqadmin > > rabbitmqadmin declare exchange name=xxx type=topic > > and everything is fine. When I reboot my VM my exhange is missing. Is there > something missing as part of exchange creation that is making it temporary. > I would appreciate your feedback. Thank you. Sure. Exchanges and queues can either be durable or transient - the latter type do not survive broker restarts (but are slightly less expensive to create). The HTTP API (and hence rabbitmqadmin) defaults to declaring transient exchanges / queues (hmm, maybe it shouldn't - but it does). To ask for a durable exchange: $ rabbitmqadmin declare exchange name=xxx type=topic durable=true Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From watson.timothy at gmail.com Mon Dec 17 18:38:37 2012 From: watson.timothy at gmail.com (Tim Watson) Date: Mon, 17 Dec 2012 18:38:37 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs In-Reply-To: <3d6fb186-1011-4538-815b-52578930eff2@googlegroups.com> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <09fd72fb-6849-4f42-a9b0-f7c0aff4d41e@googlegroups.com> <4561f600-e96b-4550-8c98-0537f5a87548@googlegroups.com> <3d6fb186-1011-4538-815b-52578930eff2@googlegroups.com> Message-ID: <0E287CD4-BD16-4F0D-A929-8127D2B32A3A@rabbitmq.com> On 17 Dec 2012, at 13:15, Rui wrote: > Erlang starts fine ? Both work fine for a period of time (I can acess rabbit and management console fine for an hour or so) > > > What .NET class do you use to launch them and how does it interact with the stdin/stout of the external process? -------------- next part -------------- An HTML attachment was scrubbed... URL: From roanoketech at yahoo.com Mon Dec 17 19:15:41 2012 From: roanoketech at yahoo.com (John Smith) Date: Mon, 17 Dec 2012 11:15:41 -0800 (PST) Subject: [rabbitmq-discuss] Transactions In-Reply-To: <1355758269.50486.YahooMailNeo@web165003.mail.bf1.yahoo.com> References: <1355172599.17308.YahooMailNeo@web165005.mail.bf1.yahoo.com> <1355180560.9407.YahooMailNeo@web165002.mail.bf1.yahoo.com> <1355758269.50486.YahooMailNeo@web165003.mail.bf1.yahoo.com> Message-ID: <1355771741.55347.YahooMailNeo@web165001.mail.bf1.yahoo.com> Am I correctly interpreting the following link: ? http://www.rabbitmq.com/semantics.html ? I can have publish inside a transaction, but not receive inside a tx,?and the transaction is not atomic ? ? Could someone please post a link to where I can view an example of a transaction in Rabbit ? ? Thanks ________________________________ From: John Smith To: "rabbitmq-discuss at lists.rabbitmq.com" Sent: Monday, December 17, 2012 10:31 AM Subject: [rabbitmq-discuss] Java queueDeclare statement Maybe its just that my Java is very rusty, but I see a difference bewtween the AQPI guide and the ... I am using the following link to the API guide http://www.rabbitmq.com/api-guide.html The API Guide uses the following (and I can get this command to work) channel.queueDeclare(queueName, true, false, false, null); However, in the in the Java Interface I found in this page http://www.rabbitmq.com/releases/rabbitmq-java-client/v1.7.0/rabbitmq-java-client-javadoc-1.7.0/com/rabbitmq/client/Channel.html I see the following: ?AMQP.Queue.DeclareOk queueDeclare() ??????????Actively declare a server-named exclusive, autodelete, non-durable queue. ?AMQP.Queue.DeclareOk queueDeclare(java.lang.String?queue) ??????????Actively declare a non-exclusive, non-autodelete, non-durable queue ?AMQP.Queue.DeclareOk queueDeclare(java.lang.String?queue, boolean?durable) ??????????Actively declare a non-exclusive, non-autodelete queue The name of the new queue is held in the "queue" field of the AMQP.Queue.DeclareOk result. ?AMQP.Queue.DeclareOk queueDeclare(java.lang.String?queue, boolean?passive, boolean?durable, boolean?exclusive, boolean?autoDelete, java.util.Map?arguments) ??????????Declare a queue None of these match the one I found in the API guide.? The closest is the last one in the table, but that includes? a reference to the 'passive' prameter that is?aparently not included in?the reference I found in the API guide What am I missing, or is my Java simply weak ? Thanks??? _______________________________________________rabbitmq-discuss mailing listrabbitmq-discuss at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From roanoketech at yahoo.com Mon Dec 17 19:15:41 2012 From: roanoketech at yahoo.com (John Smith) Date: Mon, 17 Dec 2012 11:15:41 -0800 (PST) Subject: [rabbitmq-discuss] Transactions In-Reply-To: <1355758269.50486.YahooMailNeo@web165003.mail.bf1.yahoo.com> References: <1355172599.17308.YahooMailNeo@web165005.mail.bf1.yahoo.com> <1355180560.9407.YahooMailNeo@web165002.mail.bf1.yahoo.com> <1355758269.50486.YahooMailNeo@web165003.mail.bf1.yahoo.com> Message-ID: <1355771741.55347.YahooMailNeo@web165001.mail.bf1.yahoo.com> Am I correctly interpreting the following link: ? http://www.rabbitmq.com/semantics.html ? I can have publish inside a transaction, but not receive inside a tx,?and the transaction is not atomic ? ? Could someone please post a link to where I can view an example of a transaction in Rabbit ? ? Thanks ________________________________ From: John Smith To: "rabbitmq-discuss at lists.rabbitmq.com" Sent: Monday, December 17, 2012 10:31 AM Subject: [rabbitmq-discuss] Java queueDeclare statement Maybe its just that my Java is very rusty, but I see a difference bewtween the AQPI guide and the ... I am using the following link to the API guide http://www.rabbitmq.com/api-guide.html The API Guide uses the following (and I can get this command to work) channel.queueDeclare(queueName, true, false, false, null); However, in the in the Java Interface I found in this page http://www.rabbitmq.com/releases/rabbitmq-java-client/v1.7.0/rabbitmq-java-client-javadoc-1.7.0/com/rabbitmq/client/Channel.html I see the following: ?AMQP.Queue.DeclareOk queueDeclare() ??????????Actively declare a server-named exclusive, autodelete, non-durable queue. ?AMQP.Queue.DeclareOk queueDeclare(java.lang.String?queue) ??????????Actively declare a non-exclusive, non-autodelete, non-durable queue ?AMQP.Queue.DeclareOk queueDeclare(java.lang.String?queue, boolean?durable) ??????????Actively declare a non-exclusive, non-autodelete queue The name of the new queue is held in the "queue" field of the AMQP.Queue.DeclareOk result. ?AMQP.Queue.DeclareOk queueDeclare(java.lang.String?queue, boolean?passive, boolean?durable, boolean?exclusive, boolean?autoDelete, java.util.Map?arguments) ??????????Declare a queue None of these match the one I found in the API guide.? The closest is the last one in the table, but that includes? a reference to the 'passive' prameter that is?aparently not included in?the reference I found in the API guide What am I missing, or is my Java simply weak ? Thanks??? _______________________________________________rabbitmq-discuss mailing listrabbitmq-discuss at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcintoshj at gmail.com Mon Dec 17 22:53:01 2012 From: mcintoshj at gmail.com (Jason McIntosh) Date: Mon, 17 Dec 2012 16:53:01 -0600 Subject: [rabbitmq-discuss] BIGIP/F5 and Connection resets Message-ID: So we're doing some active investigation regarding connection resets in Rabbit connections. It turns out that the F5 load balancers we use have been configured with a tcp idle timeout at 300 seconds, causing connection reset warnings every 5 minutes for our connections to the rabbit boxes. The F5 load balancers act as a proxy, not a router/gateway on TCP/IP connections and so have some pretty specific timeouts and rules. The question comes in has anyone else been using F5 boxes to virtualize their connections to a Rabbit cluster, and if so what settings do you use including monitors/resets/etc.? From what I've been told, most network devices drop TCP/IP connections after an hour automatically (i.e. switches, routers, etc.) and force a reconnect - not sure if Rabbit handles this? There is a work around at the moment we're looking into. It looks like most (if not all) Rabbit interfaces have a heartbeat setting that would allow connections to be maintained with that reset still on, but that means setting every client and server would need to be configured with a heartbeat to generate at least some traffic. I'd have figured if nothing else there would have been some messages going back and forth between a client and server, if nothing else to say "Still no new messages - no one loves you." Other questions related to the above: Is the AMQP protocol designed to have the clients just sit idle, no communication with the servers until a message comes in (which from TCP Dumps appears to be what's happening though perhaps I've not waited long enough)? How long would they sit idle by default before asking "hey, server, you still alive and connected to me?" If there is no check, and the client hasn't received a message in a day at what point do you retry your connection to verify you're even still connected? It sounds like in this case you could have a consumer of a queue lose it's connection and never realize that it's lost, because it's just sitting idle waiting for responses. Then you'd have a server just sitting backlogging messages waiting for a client (or worse depending on configuration, just dropping all the messages). Just trying to get a low level idea of how the TCP/IP communications work between clients and the rabbit servers and configuration ideas and how to setup load balancers to work with Rabbit. Looked at the AMQP 0-9-1 specifications and not seeing a whole lot defined on how AMQP implementers are supposed to work with TCP/IP traffic (other than some heartbeat definitions). Thanks! Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt at crocodoc.com Mon Dec 17 23:09:28 2012 From: matt at crocodoc.com (Matt Long) Date: Mon, 17 Dec 2012 15:09:28 -0800 (PST) Subject: [rabbitmq-discuss] Crash Report Message-ID: Using RabbitMQ v2.8.5 on Ubuntu 11.10. Yes, I'm aware that version 3.0+ is now available...I'm just a bit behind in staying up to date :-) RabbitMQ suddenly became unreachable by my clients. In particular, the amqp Python package raised ConnectionError: 541: (INTERNAL_ERROR, (0, 0), None). First thing I did was attempting to list the queues: $ sudo rabbitmqctl list_queues Listing queues ... Error: {aborted,{no_exists,[rabbit_queue, {amqqueue,{resource,<<"/">>,queue,'_'}, '_','_','_','_','_','_','_'}]}} This was fairly cryptic to me since I'm not too familiar with the innards of RabbitMQ. Next I checked the status: $ sudo service rabbitmq-server status Status of node 'rabbit at ip-10-100-105-118' ... [{pid,879}, {running_applications,[{rabbit,"RabbitMQ","2.8.5"}, {os_mon,"CPO CXC 138 46","2.2.5"}, {sasl,"SASL CXC 138 11","2.1.9.3"}, {stdlib,"ERTS CXC 138 10","1.17.3"}, {kernel,"ERTS CXC 138 10","2.14.3"}]}, {os,{unix,linux}}, {erlang_version,"Erlang R14B02 (erts-5.8.3) [source] [64-bit] [smp:8:8] [rq:8] [async-threads:30] [kernel-poll:true]\n"}, {memory,[{total,128970944}, {processes,49035088}, {processes_used,36245608}, {system,79935856}, {atom,1182377}, {atom_used,1157674}, {binary,17554600}, {code,11329658}, {ets,47162232}]}, {vm_memory_high_watermark,0.4}, {vm_memory_limit,2920456192}, {disk_free_limit,1000000000}, {disk_free,6324633600}, {file_descriptors,[{total_limit,924}, {total_used,186}, {sockets_limit,829}, {sockets_used,128}]}, {processes,[{limit,1048576},{used,1235}]}, {run_queue,0}, {uptime,4829636}] ...done. The error logs contain quite a bit of information related to the crash. Here are links to excerpts from the main RabbitMQ log and the sasl log: rabbit at myhostname.log: http://pastebin.com/1CBjmbGb rabbit at myhostname-sasl.log: http://pastebin.com/8qZas7hA Stopping and then starting the rabbitmq-server daemon luckily fixed the problem and seemed to maintain at least most of Rabbit's state. Can someone help me interpret what happened and what I can do to prevent this in the future? Many thanks in advance! Cheers, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashley at adamashley.name Tue Dec 18 05:34:13 2012 From: aashley at adamashley.name (Adam Ashley) Date: Mon, 17 Dec 2012 21:34:13 -0800 (PST) Subject: [rabbitmq-discuss] rabbitmqctl status terminates all Web-STOMP client connections Message-ID: We're using RabbitMQ 3.0.1 from the RabbitMQ supplied Debian packages to provide a link to a HTML based application. This takes advantage of the Web-STOMP plugin. Currently the client is making use of the iframe-xhr capabilities of the SockJS library when connecting. Connections work successfully and will stay up for days at a time until "rabbitmqctl status" is run on the rabbitmq server. At that point all connections are terminated and due to the iframe-xhr in sockjs the client doesn't always see this disconnect. When rabbitmqctl status is run the following appears within the log files: =ERROR REPORT==== 18-Dec-2012::13:16:52 === ** Generic server <0.1627.0> terminating ** Last message in was which_children ** When Server state == {state, {sockjs_session, {<0.1624.0>, [{peername,{{10,253,16,101},57724}}, {sockname,{{10,253,14,30},15674}}, {path,"/stomp/062/bv649208/xhr"}, {headers, [{'Referer', "http://mq:15674/stomp/iframe.html?t=1355807743929"}]}]}}, <0.1626.0>, {resume,#Fun}} ** Reason for termination == ** {{case_clause,{odd_request,which_children}}, [{rabbit_ws_client,terminate,2}, {gen_server,terminate,6}, {proc_lib,init_p_do_apply,3}]} And this is output at the console where the command was run: root at mq01:~# rabbitmqctl status Status of node rabbit at mq01 ... Error: {{{case_clause,{odd_request,which_children}}, [{rabbit_ws_client,terminate,2}, {gen_server,terminate,6}, {proc_lib,init_p_do_apply,3}]}, {gen_server,call,[<4974.1627.0>,which_children,infinity]}} This only occurs when a Web-STOMP client is connected. Normal STOMP clients do not have an issue. Adam Ashley -------------- next part -------------- An HTML attachment was scrubbed... URL: From prabodh.upreti at vce.com Tue Dec 18 07:53:50 2012 From: prabodh.upreti at vce.com (Prabodh Upreti) Date: Mon, 17 Dec 2012 23:53:50 -0800 (PST) Subject: [rabbitmq-discuss] custom plugin causing problems Message-ID: <1355817230309-24091.post@n5.nabble.com> Hello I am not sure what is going on with my system. I created a custom plugin for authentication which is working fine. As part of that setup, I had to delete the guest user to make it secure. Now I need to use the rabbitmqadmin command to create an exchange because the original one was not created as durable=true, hence I disabled my plugin and enabled rabbitmq_management. When I execute rabbitmqadmin -f long -d 3 list queues I see [root at fm11deploy02 rabbitmq]# rabbitmqadmin -f long -d 3 list queues Traceback (most recent call last): File "/usr/local/bin/rabbitmqadmin", line 828, in main() File "/usr/local/bin/rabbitmqadmin", line 325, in main method() File "/usr/local/bin/rabbitmqadmin", line 456, in invoke_list format_list(self.get(uri), cols, self.options) File "/usr/local/bin/rabbitmqadmin", line 348, in get return self.http("GET", path, "") File "/usr/local/bin/rabbitmqadmin", line 377, in http resp = conn.getresponse() File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse response.begin() File "/usr/lib64/python2.6/httplib.py", line 391, in begin version, status, reason = self._read_status() File "/usr/lib64/python2.6/httplib.py", line 355, in _read_status raise BadStatusLine(line) httplib.BadStatusLine In the log file I see ASH REPORT==== 18-Dec-2012::08:36:03 === crasher: initial call: mochiweb_acceptor:init/3 pid: <0.3908.0> registered_name: [] exception error: undefined function rabbitmq_cas_authen:check_user_login/2 in function rabbit_access_control:'-check_user_login/2-fun-0-'/4 in call from lists:foldl/3 (lists.erl, line 1197) in call from rabbit_mgmt_app:'-make_loop/0-fun-0-'/4 in call from mochiweb_http:headers/5 ancestors: [rabbit_mochiweb_web_mgmt,rabbit_mochiweb_sup,<0.127.0>] messages: [] links: [<0.228.0>,#Port<0.12917>] dictionary: [] trap_exit: false status: running heap_size: 4181 stack_size: 24 reductions: 3638 neighbours: looks like the management plugin is trying to use my custom plugin rabbitmq_cas_plugin even though I have disabled it. part of my custom plugin setup I had something like this in rabbitmq.config which I took out for management plugin: {rabbit, [{auth_backends, [rabbitmq_cas_authen, rabbit_auth_backend_inter nal]}, {vm_memory_high_watermark, 0.1} ] }, I would appreciate any insight. thank you. -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/custom-plugin-causing-problems-tp24091.html Sent from the RabbitMQ mailing list archive at Nabble.com. From tim at rabbitmq.com Tue Dec 18 08:39:54 2012 From: tim at rabbitmq.com (Tim Watson) Date: Tue, 18 Dec 2012 08:39:54 +0000 Subject: [rabbitmq-discuss] custom plugin causing problems In-Reply-To: <1355817230309-24091.post@n5.nabble.com> References: <1355817230309-24091.post@n5.nabble.com> Message-ID: Did you restart your broker after running `rabbitmqctl disable ` at all? That's necessary, as the output of rabbitmq-plugins states. Cheers, Tim On 18 Dec 2012, at 07:53, Prabodh Upreti wrote: > Hello > > I am not sure what is going on with my system. > > I created a custom plugin for authentication which is working fine. As part > of that setup, I had to delete the guest user to make it secure. > > Now I need to use the rabbitmqadmin command to create an exchange because > the original one was not created as durable=true, hence I disabled my plugin > and enabled rabbitmq_management. When I execute > > rabbitmqadmin -f long -d 3 list queues > > I see > > [root at fm11deploy02 rabbitmq]# rabbitmqadmin -f long -d 3 list queues > Traceback (most recent call last): > File "/usr/local/bin/rabbitmqadmin", line 828, in > main() > File "/usr/local/bin/rabbitmqadmin", line 325, in main > method() > File "/usr/local/bin/rabbitmqadmin", line 456, in invoke_list > format_list(self.get(uri), cols, self.options) > File "/usr/local/bin/rabbitmqadmin", line 348, in get > return self.http("GET", path, "") > File "/usr/local/bin/rabbitmqadmin", line 377, in http > resp = conn.getresponse() > File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse > response.begin() > File "/usr/lib64/python2.6/httplib.py", line 391, in begin > version, status, reason = self._read_status() > File "/usr/lib64/python2.6/httplib.py", line 355, in _read_status > raise BadStatusLine(line) > httplib.BadStatusLine > > > > In the log file I see > > ASH REPORT==== 18-Dec-2012::08:36:03 === > crasher: > initial call: mochiweb_acceptor:init/3 > pid: <0.3908.0> > registered_name: [] > exception error: undefined function > rabbitmq_cas_authen:check_user_login/2 > in function rabbit_access_control:'-check_user_login/2-fun-0-'/4 > in call from lists:foldl/3 (lists.erl, line 1197) > in call from rabbit_mgmt_app:'-make_loop/0-fun-0-'/4 > in call from mochiweb_http:headers/5 > ancestors: [rabbit_mochiweb_web_mgmt,rabbit_mochiweb_sup,<0.127.0>] > messages: [] > links: [<0.228.0>,#Port<0.12917>] > dictionary: [] > trap_exit: false > status: running > heap_size: 4181 > stack_size: 24 > reductions: 3638 > neighbours: > > > looks like the management plugin is trying to use my custom plugin > rabbitmq_cas_plugin even though I have disabled it. > > part of my custom plugin setup I had something like this in rabbitmq.config > which I took out for management plugin: > > {rabbit, > [{auth_backends, [rabbitmq_cas_authen, > rabbit_auth_backend_inter > nal]}, > {vm_memory_high_watermark, 0.1} > ] > }, > > > I would appreciate any insight. thank you. > > > > -- > View this message in context: http://rabbitmq.1065348.n5.nabble.com/custom-plugin-causing-problems-tp24091.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 From tim at rabbitmq.com Tue Dec 18 08:43:19 2012 From: tim at rabbitmq.com (Tim Watson) Date: Tue, 18 Dec 2012 08:43:19 +0000 Subject: [rabbitmq-discuss] custom plugin causing problems In-Reply-To: References: <1355817230309-24091.post@n5.nabble.com> Message-ID: > after running `rabbitmqctl disable ` Of course I mean `rabbitmq-plugins disable`. > > Cheers, > Tim > > On 18 Dec 2012, at 07:53, Prabodh Upreti wrote: > >> Hello >> >> I am not sure what is going on with my system. >> >> I created a custom plugin for authentication which is working fine. As part >> of that setup, I had to delete the guest user to make it secure. >> >> Now I need to use the rabbitmqadmin command to create an exchange because >> the original one was not created as durable=true, hence I disabled my plugin >> and enabled rabbitmq_management. When I execute >> >> rabbitmqadmin -f long -d 3 list queues >> >> I see >> >> [root at fm11deploy02 rabbitmq]# rabbitmqadmin -f long -d 3 list queues >> Traceback (most recent call last): >> File "/usr/local/bin/rabbitmqadmin", line 828, in >> main() >> File "/usr/local/bin/rabbitmqadmin", line 325, in main >> method() >> File "/usr/local/bin/rabbitmqadmin", line 456, in invoke_list >> format_list(self.get(uri), cols, self.options) >> File "/usr/local/bin/rabbitmqadmin", line 348, in get >> return self.http("GET", path, "") >> File "/usr/local/bin/rabbitmqadmin", line 377, in http >> resp = conn.getresponse() >> File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse >> response.begin() >> File "/usr/lib64/python2.6/httplib.py", line 391, in begin >> version, status, reason = self._read_status() >> File "/usr/lib64/python2.6/httplib.py", line 355, in _read_status >> raise BadStatusLine(line) >> httplib.BadStatusLine >> >> >> >> In the log file I see >> >> ASH REPORT==== 18-Dec-2012::08:36:03 === >> crasher: >> initial call: mochiweb_acceptor:init/3 >> pid: <0.3908.0> >> registered_name: [] >> exception error: undefined function >> rabbitmq_cas_authen:check_user_login/2 >> in function rabbit_access_control:'-check_user_login/2-fun-0-'/4 >> in call from lists:foldl/3 (lists.erl, line 1197) >> in call from rabbit_mgmt_app:'-make_loop/0-fun-0-'/4 >> in call from mochiweb_http:headers/5 >> ancestors: [rabbit_mochiweb_web_mgmt,rabbit_mochiweb_sup,<0.127.0>] >> messages: [] >> links: [<0.228.0>,#Port<0.12917>] >> dictionary: [] >> trap_exit: false >> status: running >> heap_size: 4181 >> stack_size: 24 >> reductions: 3638 >> neighbours: >> >> >> looks like the management plugin is trying to use my custom plugin >> rabbitmq_cas_plugin even though I have disabled it. >> >> part of my custom plugin setup I had something like this in rabbitmq.config >> which I took out for management plugin: >> >> {rabbit, >> [{auth_backends, [rabbitmq_cas_authen, >> rabbit_auth_backend_inter >> nal]}, >> {vm_memory_high_watermark, 0.1} >> ] >> }, >> >> >> I would appreciate any insight. thank you. >> >> >> >> -- >> View this message in context: http://rabbitmq.1065348.n5.nabble.com/custom-plugin-causing-problems-tp24091.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 > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From alex at zadarastorage.com Tue Dec 18 08:54:49 2012 From: alex at zadarastorage.com (Alex Lyakas) Date: Tue, 18 Dec 2012 10:54:49 +0200 Subject: [rabbitmq-discuss] AMQPChannelException: (404, u"NOT_FOUND - no exchange '4042acd4bbec471aafc557af39ee0efe' in vhost '/'", (60, 40), 'Channel.basic_publish') Message-ID: Greetings all, I am using rabbitmq server + kombu + pyamqplib on a stock Ubuntu-Precise. Below are the versions of the components: rabbitmq-server 2.7.1-0ubuntu4 python-amqplib 1.0.0+ds-1 python-kombu 1.4.3-1 The issue I am seeing is the ?no exchange? exception, which I hit when opening a new channel on an existing connection. Here is a typical crash stack: TRACE: File "/usr/lib/python2.7/dist-packages/kombu/connection.py", line 159, in channel TRACE: chan = self.transport.create_channel(self.connection) TRACE: File "/usr/lib/python2.7/dist-packages/kombu/transport/pyamqplib.py", line 235, in create_channel TRACE: return connection.channel() TRACE: File "/usr/lib/python2.7/dist-packages/kombu/transport/pyamqplib.py", line 144, in channel TRACE: return Channel(self, channel_id) TRACE: File "/usr/lib/python2.7/dist-packages/kombu/transport/pyamqplib.py", line 183, in init TRACE: super(Channel, self).__init__(*args, **kwargs) TRACE: File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/channel.py", line 82, in init TRACE: self._x_open() TRACE: File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/channel.py", line 471, in _x_open TRACE: (20, 11), # Channel.open_ok TRACE: File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/abstract_channel.py", line 97, in wait TRACE: return self.dispatch_method(method_sig, args, content) TRACE: File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/abstract_channel.py", line 115, in dispatch_method TRACE: return amqp_method(self, args) TRACE: File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/channel.py", line 273, in _close TRACE: (class_id, method_id)) TRACE: AMQPChannelException: (404, u"NOT_FOUND - no exchange '4042acd4bbec471aafc557af39ee0efe' in vhost '/'", (60, 40), 'Channel.basic_publish') I hit this only with direct exchanges, with ?auto-delete? = True. The flow that I have is like follows: - node A declares a direct exchange and declares a queue - node A sends message to node B using a topic exchange, and embeds direct exchange name in the message - node B parses the message, prepares the reply, declares the (same) direct exchange and a producer - node B sends reply message on the producer - node A and node B close their channels - several seconds after that, when node B tries to create a new channel on the same connection (using the same channel_id), it hits this exception. I am trying to debug this for some time, but do not have a clear way to repro this. It happens occasionally. I understand, that since I open the channel with the same channel_id, I may receive some stale message from the server (for the same channel_id) regarding failure to publish. However, several things confuse me: 1) The only code, which publishes to a direct exchange is as follows: self.exchange = kombu.entity.Exchange(name=self.exchange_name, **self.kwargs) self.producer = kombu.messaging.Producer(exchange=self.exchange, channel=channel, routing_key=self.routing_key) self.producer.publish(msg) How can exchange not being present here? 2) Even though all exchanges have auto-delete=True, I see more than 3000 existing direct exchanges on the rabbitmqctl list_exchanges output. The queues that used these exchanges (also auto-delete=True) do not exist anymore. When auto-delete=True exchanges are deleted? Is there some timeout on their deletion? The documentation says that there SHOULD be a reasonable timeout. What is this timeout? Can it be configured? Is exchange auto-deletion supposed to work in my version? 3) The exchanges that I receive exceptions about do not exist indeed. How can I debug the rabbitmq server and understand why it decides to delete some exchanges, but not the other ones? Thanks, Alex. From patryk.moura at gmail.com Mon Dec 17 17:05:46 2012 From: patryk.moura at gmail.com (Patryk Moura) Date: Mon, 17 Dec 2012 09:05:46 -0800 (PST) Subject: [rabbitmq-discuss] list queued messages? Message-ID: <74784dd5-b502-4dd3-8a91-ceed69cbbf4d@googlegroups.com> Guys, theres any1way to list all queued messages from a server "x" in a datagrid? (.net for example?) thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From romeomarkmateo at gmail.com Tue Dec 18 06:11:41 2012 From: romeomarkmateo at gmail.com (Romeo Mark Mateo) Date: Mon, 17 Dec 2012 22:11:41 -0800 (PST) Subject: [rabbitmq-discuss] AIX and HPUX Message-ID: <02667cdc-9787-4bb3-866a-0c550e79d21f@googlegroups.com> Is the rabbitmq supported on AIX and HPUX servers? -------------- next part -------------- An HTML attachment was scrubbed... URL: From prabodh.upreti at vce.com Tue Dec 18 09:55:10 2012 From: prabodh.upreti at vce.com (Prabodh Upreti) Date: Tue, 18 Dec 2012 01:55:10 -0800 (PST) Subject: [rabbitmq-discuss] custom plugin causing problems In-Reply-To: <1355817230309-24091.post@n5.nabble.com> References: <1355817230309-24091.post@n5.nabble.com> Message-ID: <1355824510623-24097.post@n5.nabble.com> Tim thank you. I found my problem. Yes, the server was not restarting properly hence was picking up the old rabbitmq.config file. -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/custom-plugin-causing-problems-tp24091p24097.html Sent from the RabbitMQ mailing list archive at Nabble.com. From emile at rabbitmq.com Tue Dec 18 09:58:40 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Tue, 18 Dec 2012 09:58:40 +0000 Subject: [rabbitmq-discuss] AIX and HPUX In-Reply-To: <02667cdc-9787-4bb3-866a-0c550e79d21f@googlegroups.com> References: <02667cdc-9787-4bb3-866a-0c550e79d21f@googlegroups.com> Message-ID: <50D03E50.9040404@rabbitmq.com> Hi, On 18/12/12 06:11, Romeo Mark Mateo wrote: > Is the rabbitmq supported on AIX and HPUX servers? The question is rather whether Erlang is supported on those platforms. RabbitMQ should run fine on any platform as long as Erlang is present. Is is possible to compile Erlang on AIX and HPUX, though some modifications to the Erlang sources are required in both cases. We only have access to AIX 5.3, and I'm happy to share some patches for it. We don't have access to HPUX, but there are reports on the Erlang mailing lists of others having success. -Emile From emile at rabbitmq.com Tue Dec 18 10:08:21 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Tue, 18 Dec 2012 10:08:21 +0000 Subject: [rabbitmq-discuss] list queued messages? In-Reply-To: <74784dd5-b502-4dd3-8a91-ceed69cbbf4d@googlegroups.com> References: <74784dd5-b502-4dd3-8a91-ceed69cbbf4d@googlegroups.com> Message-ID: <50D04095.20301@rabbitmq.com> Hi Patryk, On 17/12/12 17:05, Patryk Moura wrote: > Guys, theres any1way to list all queued messages from a server "x" in a > datagrid? (.net for example?) It is possible to dequeue and then requeue all messages in a queue using a standard AMQP client, but this could be an expensive operation and it will alter the messages by turning on the redelivered flag when those messages are delivered subsequently. You would also need to enumerate the queues, which cannot be done with AMQP - this will require "rabbitmqctl list_queues" or access to the management interface. -Emile From brett.r.cameron at gmail.com Tue Dec 18 10:13:05 2012 From: brett.r.cameron at gmail.com (Brett Cameron) Date: Tue, 18 Dec 2012 23:13:05 +1300 Subject: [rabbitmq-discuss] AIX and HPUX In-Reply-To: <50D03E50.9040404@rabbitmq.com> References: <02667cdc-9787-4bb3-866a-0c550e79d21f@googlegroups.com> <50D03E50.9040404@rabbitmq.com> Message-ID: Hi, Are you running HPUX on PA-RISC or Itanium? I've ported Erlang 14B to Itanium (quite a painless operation), but have not never attempted it on PA-RISC. Brett On Tue, Dec 18, 2012 at 10:58 PM, Emile Joubert wrote: > Hi, > > On 18/12/12 06:11, Romeo Mark Mateo wrote: > > Is the rabbitmq supported on AIX and HPUX servers? > > The question is rather whether Erlang is supported on those platforms. > RabbitMQ should run fine on any platform as long as Erlang is present. > > Is is possible to compile Erlang on AIX and HPUX, though some > modifications to the Erlang sources are required in both cases. We only > have access to AIX 5.3, and I'm happy to share some patches for it. We > don't have access to HPUX, but there are reports on the Erlang mailing > lists of others having success. > > > -Emile > > > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Tue Dec 18 10:51:22 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Tue, 18 Dec 2012 10:51:22 +0000 Subject: [rabbitmq-discuss] list queued messages? In-Reply-To: <50D04095.20301@rabbitmq.com> References: <74784dd5-b502-4dd3-8a91-ceed69cbbf4d@googlegroups.com> <50D04095.20301@rabbitmq.com> Message-ID: <50D04AAA.4090205@rabbitmq.com> On 18/12/12 10:08, Emile Joubert wrote: > Hi Patryk, > > On 17/12/12 17:05, Patryk Moura wrote: >> Guys, theres any1way to list all queued messages from a server "x" in a >> datagrid? (.net for example?) > > It is possible to dequeue and then requeue all messages in a queue using > a standard AMQP client, but this could be an expensive operation and it > will alter the messages by turning on the redelivered flag when those > messages are delivered subsequently. You would also need to enumerate > the queues, which cannot be done with AMQP - this will require > "rabbitmqctl list_queues" or access to the management interface. Also, check the management API /api/queues///get, documented here: http://hg.rabbitmq.com/rabbitmq-management/raw-file/rabbitmq_v3_0_1/priv/www/api/index.html This dequeues and requeues as Emile suggests. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From simon at rabbitmq.com Tue Dec 18 11:12:18 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Tue, 18 Dec 2012 11:12:18 +0000 Subject: [rabbitmq-discuss] Crash Report In-Reply-To: References: Message-ID: <50D04F92.5060602@rabbitmq.com> Hmm. So the logs make it fairly clear that Mnesia shut down due to an error. Mnesia is the distributed database RabbitMQ uses to store metadata, so when it is down all sorts of things will fail. Unfortunately it's not very clear why it shut down. This is, needless to say, an unusual occurrence - I found one similar report from 2009 and that's it. So I'm not sure what to recommend. It may be worth upgrading your Erlang installation (the debs from https://www.erlang-solutions.com/downloads/download-erlang-otp should help here). If this happens again then the output of rabbitmqctl eval 'ets:tab2list(mnesia_gvar).' might prove useful. Sorry I can't give you something more concrete. Cheers, Simon On 17/12/12 23:09, Matt Long wrote: > Using RabbitMQ v2.8.5 on Ubuntu 11.10. Yes, I'm aware that version 3.0+ > is now available...I'm just a bit behind in staying up to date :-) > > RabbitMQ suddenly became unreachable by my clients. In particular, the > amqp Python package raised ConnectionError: 541: (INTERNAL_ERROR, (0, > 0), None). First thing I did was attempting to list the queues: > > $ sudo rabbitmqctl list_queues > Listing queues ... > Error: {aborted,{no_exists,[rabbit_queue, > {amqqueue,{resource,<<"/">>,queue,'_'}, > '_','_','_','_','_','_','_'}]}} > > This was fairly cryptic to me since I'm not too familiar with the > innards of RabbitMQ. Next I checked the status: > > $ sudo service rabbitmq-server status > Status of node 'rabbit at ip-10-100-105-118' ... > [{pid,879}, > {running_applications,[{rabbit,"RabbitMQ","2.8.5"}, > {os_mon,"CPO CXC 138 46","2.2.5"}, > {sasl,"SASL CXC 138 11","2.1.9.3"}, > {stdlib,"ERTS CXC 138 10","1.17.3"}, > {kernel,"ERTS CXC 138 10","2.14.3"}]}, > {os,{unix,linux}}, > {erlang_version,"Erlang R14B02 (erts-5.8.3) [source] [64-bit] > [smp:8:8] [rq:8] [async-threads:30] [kernel-poll:true]\n"}, > {memory,[{total,128970944}, > {processes,49035088}, > {processes_used,36245608}, > {system,79935856}, > {atom,1182377}, > {atom_used,1157674}, > {binary,17554600}, > {code,11329658}, > {ets,47162232}]}, > {vm_memory_high_watermark,0.4}, > {vm_memory_limit,2920456192}, > {disk_free_limit,1000000000}, > {disk_free,6324633600}, > {file_descriptors,[{total_limit,924}, > {total_used,186}, > {sockets_limit,829}, > {sockets_used,128}]}, > {processes,[{limit,1048576},{used,1235}]}, > {run_queue,0}, > {uptime,4829636}] > ...done. > > The error logs contain quite a bit of information related to the crash. > Here are links to excerpts from the main RabbitMQ log and the sasl log: > > rabbit at myhostname.log: http://pastebin.com/1CBjmbGb > rabbit at myhostname-sasl.log: http://pastebin.com/8qZas7hA > > Stopping and then starting the rabbitmq-server daemon luckily fixed the > problem and seemed to maintain at least most of Rabbit's state. Can > someone help me interpret what happened and what I can do to prevent > this in the future? > > Many thanks in advance! > > Cheers, > Matt > > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > -- Simon MacMullen RabbitMQ, VMware From simon at rabbitmq.com Tue Dec 18 11:22:02 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Tue, 18 Dec 2012 11:22:02 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs In-Reply-To: <0258b37c-fa3b-4375-8ee9-fe943a76cc8c@googlegroups.com> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <09fd72fb-6849-4f42-a9b0-f7c0aff4d41e@googlegroups.com> <4561f600-e96b-4550-8c98-0537f5a87548@googlegroups.com> <3d6fb186-1011-4538-815b-52578930eff2@googlegroups.com> <0258b37c-fa3b-4375-8ee9-fe943a76cc8c@googlegroups.com> Message-ID: <50D051DA.3070405@rabbitmq.com> On 17/12/12 14:59, Rui wrote: > We use a .Net process which runs Rabbit using ?sbin\rabbitmq-server?. > This has been running in prod with previous versions of rabbitmq for a > while with no problems ? have you changed the way the Management Plug-in > runs? Not in any way that should matter. But the management plugin (well, the management agent) does invoke external commands periodically to help it monitor use of file handles. If I had to guess on what's happening I would say something is getting confused in the environment of this external process. If you were able to post a self-contained source of the process which launches RabbitMQ for you then we can investigate this - without that we're rather stuck. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From simon at rabbitmq.com Tue Dec 18 11:50:49 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Tue, 18 Dec 2012 11:50:49 +0000 Subject: [rabbitmq-discuss] rabbitmqctl status terminates all Web-STOMP client connections In-Reply-To: References: Message-ID: <50D05899.2010901@rabbitmq.com> On 18/12/12 05:34, Adam Ashley wrote: > And this is output at the console where the command was run: > root at mq01:~# rabbitmqctl status > Status of node rabbit at mq01 ... > Error: {{{case_clause,{odd_request,which_children}}, > [{rabbit_ws_client,terminate,2}, > {gen_server,terminate,6}, > {proc_lib,init_p_do_apply,3}]}, > {gen_server,call,[<4974.1627.0>,which_children,infinity]}} > > This only occurs when a Web-STOMP client is connected. Normal STOMP > clients do not have an issue. Hi. Thanks for the bug report. It looks like there's a bug in the web-stomp supervision hierarchy. We should be able to release a fix soon. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From ruifavas at hotmail.com Tue Dec 18 11:56:38 2012 From: ruifavas at hotmail.com (Rui) Date: Tue, 18 Dec 2012 03:56:38 -0800 (PST) Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs In-Reply-To: <0258b37c-fa3b-4375-8ee9-fe943a76cc8c@googlegroups.com> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <09fd72fb-6849-4f42-a9b0-f7c0aff4d41e@googlegroups.com> <4561f600-e96b-4550-8c98-0537f5a87548@googlegroups.com> <3d6fb186-1011-4538-815b-52578930eff2@googlegroups.com> <0258b37c-fa3b-4375-8ee9-fe943a76cc8c@googlegroups.com> Message-ID: <2d22efad-7e46-42e8-9343-f28637c3721c@googlegroups.com> Hi Tim, Simon, Thank you for your help on this I can now re-create the problem on demand. It only happens on versions 3/3.0.1 and if the management plugin is on. The problem is caused by starting the process without using the Operating System shell. In our case we set the UseShellExecute to false so we can catch the Standard In/Out. On Monday, 17 December 2012 14:59:04 UTC, Rui wrote: > > Hello Tim, > > We use a .Net process which runs Rabbit using ?sbin\rabbitmq-server?. This > has been running in prod with previous versions of rabbitmq for a while > with no problems ? have you changed the way the Management Plug-in runs? > > > > > On Monday, 17 December 2012 13:15:59 UTC, Rui wrote: >> >> Erlang starts fine ? Both work fine for a period of time (I can acess >> rabbit and management console fine for an hour or so) >> >> >> >> See full log below:- >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:44 === >> >> Starting RabbitMQ 3.0.1 on Erlang R15B03 >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:46 === >> >> Limiting to approx 65436 file handles (58890 sockets) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:46 === >> >> application: mnesia >> >> exited: stopped >> >> type: temporary >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> Memory limit set to 9826MB of 24565MB total. >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> Disk free limit set to 1000MB >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> Management plugin upgraded statistics to coarse. >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> msg_store_transient: using rabbit_msg_store_ets_index to provide index >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> msg_store_persistent: using rabbit_msg_store_ets_index to provide index >> >> >> >> =WARNING REPORT==== 17-Dec-2012::10:00:47 === >> >> msg_store_persistent: rebuilding indices from scratch >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> Adding vhost '/test' >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> Creating user 'testadmin' >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> Setting user tags for user 'testadmin' to [administrator] >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> Setting permissions for 'testadmin' in '/bcfs' to '.*', '.*', '.*' >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> started TCP Listener on [::]:5672 >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> started TCP Listener on 0.0.0.0:5672 >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> Management agent started. >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> Management plugin started. Port: 15672 >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> Statistics database started. >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> accepting AMQP connection <0.362.0> (10.74.59.91:51986 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> accepting AMQP connection <0.372.0> (10.74.59.91:51985 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> accepting AMQP connection <0.387.0> (10.74.59.91:51988 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:00:47 === >> >> accepting AMQP connection <0.391.0> (10.74.59.91:51987 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:04:01 === >> >> accepting AMQP connection <0.549.0> (30.254.43.157:62861 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:04:16 === >> >> closing AMQP connection <0.549.0> (30.254.43.157:62861 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:04:29 === >> >> accepting AMQP connection <0.562.0> (30.254.43.157:62865 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:04:33 === >> >> accepting AMQP connection <0.575.0> (30.254.43.157:62866 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:21:57 === >> >> closing AMQP connection <0.575.0> (30.254.43.157:62866 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:21:58 === >> >> closing AMQP connection <0.562.0> (30.254.43.157:62865 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:47:31 === >> >> accepting AMQP connection <0.1467.0> (30.254.43.157:51530 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:47:38 === >> >> accepting AMQP connection <0.1480.0> (30.254.43.157:51533 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:47:43 === >> >> accepting AMQP connection <0.1491.0> (30.254.43.157:51535 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:47:49 === >> >> accepting AMQP connection <0.1502.0> (30.254.43.157:51536 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:48:00 === >> >> accepting AMQP connection <0.1513.0> (30.254.43.157:51539 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:48:08 === >> >> accepting AMQP connection <0.1524.0> (30.254.43.157:51543 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:49:24 === >> >> accepting AMQP connection <0.1536.0> (30.254.43.157:51565 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:49:31 === >> >> accepting AMQP connection <0.1547.0> (30.254.43.157:51567 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:53:04 === >> >> closing AMQP connection <0.1536.0> (30.254.43.157:51565 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:53:06 === >> >> closing AMQP connection <0.1524.0> (30.254.43.157:51543 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:53:11 === >> >> closing AMQP connection <0.1502.0> (30.254.43.157:51536 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:53:19 === >> >> closing AMQP connection <0.1513.0> (30.254.43.157:51539 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:53:20 === >> >> closing AMQP connection <0.1547.0> (30.254.43.157:51567 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:53:22 === >> >> closing AMQP connection <0.1491.0> (30.254.43.157:51535 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:53:57 === >> >> closing AMQP connection <0.1480.0> (30.254.43.157:51533 -> >> 10.74.59.91:5672) >> >> >> >> =INFO REPORT==== 17-Dec-2012::10:54:00 === >> >> closing AMQP connection <0.1467.0> (30.254.43.157:51530 -> >> 10.74.59.91:5672) >> >> >> >> =ERROR REPORT==== 17-Dec-2012::11:00:00 === >> >> ** Generic server <0.28.0> terminating >> >> ** Last message in was {'EXIT',<0.29.0>,einval} >> >> ** When Server state == {state,user_sup,undefined,<0.29.0>, >> >> {<0.28.0>,user_sup}} >> >> ** Reason for termination == >> >> ** einval >> >> >> >> On Monday, 17 December 2012 11:35:04 UTC, Rui wrote: >>> >>> The upgrade was simple - We just uninstalled the previous version and >>> delete all the previous files (including the rabbit db) and installed the >>> new version. >>> >>> >>> >>> We are running: >>> >>> >>> >>> RabbitMQ : 3.0.1 >>> >>> Erlang : 5.9.3 >>> >>> OS : Windows Server 2008 64-bit >>> >>> >>> >>> >>> >>> Here?s what we get on the logs:- >>> >>> >>> >>> Rabbit Log >>> >>> >>> >>> =ERROR REPORT==== 17-Dec-2012::11:00:00 === >>> >>> ** Generic server <0.28.0> terminating >>> >>> ** Last message in was {'EXIT',<0.29.0>,einval} >>> >>> ** When Server state == {state,user_sup,undefined,<0.29.0>, >>> >>> {<0.28.0>,user_sup}} >>> >>> ** Reason for termination == >>> >>> ** einval >>> >>> >>> >>> >>> >>> Rabbit SASL Log >>> >>> >>> >>> >>> >>> =SUPERVISOR REPORT==== 17-Dec-2012::11:00:00 === >>> >>> Supervisor: {<0.28.0>,user_sup} >>> >>> Context: child_terminated >>> >>> Reason: einval >>> >>> Offender: [{pid,<0.29.0>},{mod,user_sup}] >>> >>> >>> >>> >>> >>> =CRASH REPORT==== 17-Dec-2012::11:00:00 === >>> >>> crasher: >>> >>> initial call: supervisor_bridge:user_sup/1 >>> >>> pid: <0.28.0> >>> >>> registered_name: [] >>> >>> exception exit: einval >>> >>> in function gen_server:terminate/6 (gen_server.erl, line 747) >>> >>> ancestors: [kernel_sup,<0.10.0>] >>> >>> messages: [] >>> >>> links: [<0.11.0>] >>> >>> dictionary: [] >>> >>> trap_exit: true >>> >>> status: running >>> >>> heap_size: 377 >>> >>> stack_size: 24 >>> >>> reductions: 337 >>> >>> neighbours: >>> >>> >>> >>> =SUPERVISOR REPORT==== 17-Dec-2012::11:00:00 === >>> >>> Supervisor: {local,kernel_sup} >>> >>> Context: child_terminated >>> >>> Reason: einval >>> >>> Offender: [{pid,<0.28.0>}, >>> >>> {name,user}, >>> >>> {mfargs,{user_sup,start,[]}}, >>> >>> {restart_type,temporary}, >>> >>> {shutdown,2000}, >>> >>> {child_type,supervisor}] >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From emile at rabbitmq.com Tue Dec 18 12:52:10 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Tue, 18 Dec 2012 12:52:10 +0000 Subject: [rabbitmq-discuss] BIGIP/F5 and Connection resets In-Reply-To: References: Message-ID: <50D066FA.3090300@rabbitmq.com> Hi Jason, On 17/12/12 22:53, Jason McIntosh wrote: > From what I've been told, most network devices drop TCP/IP > connections after an hour automatically (i.e. switches, routers, > etc.) and force a reconnect - not sure if Rabbit handles this? The broker handles a closed connection by logging the event. > There is a work around at the moment we're looking into. It looks like > most (if not all) Rabbit interfaces have a heartbeat setting that would > allow connections to be maintained Yes, AMQP heartbeats are a suitable solution if intermediate network devices are closing idle connections too eagerly. Heartbeats are enabled by default in v3.0.0 if the client supports them. Another options is to write client applications to re-establish closed connections after a suitable delay. If consumers receive messages asynchronously instead of polling the broker for messages, and there are no messages to deliver then the TCP connection will carry no traffic. > Other questions related to the above: Is the AMQP protocol designed to > have the clients just sit idle, no communication with the servers until > a message comes in Rabbit does not impose limits on connection duration and idle connections are permitted to remain so indefinitely. > If there is no check, and the client hasn't received a message in a > day at what point do you retry your connection to verify you're even > still connected? It sounds like in this case you could have a > consumer of a queue lose it's connection and never realize If connections are being severed silently without notification from the network stack then you must use AMQP heartbeats so that both sides of the connection become aware of it. Otherwise the network stack should provide notification that the connection has been interrupted. > Then you'd have a server just sitting backlogging messages waiting > for a client (or worse depending on configuration, just dropping all > the messages). The broker will not drop messages due to broken connections and the protocol is designed so that a guarantee of message delivery can be offered even in the face of an unreliable transport. > Looked at the AMQP 0-9-1 specifications and not seeing a whole lot > defined on how AMQP implementers are supposed to work with TCP/IP > traffic (other than some heartbeat definitions). The "connection" class relates to the transport, which must be stream-oriented. -Emile From tim at rabbitmq.com Tue Dec 18 13:28:37 2012 From: tim at rabbitmq.com (Tim Watson) Date: Tue, 18 Dec 2012 13:28:37 +0000 Subject: [rabbitmq-discuss] Query related to Rabbitmq Clustering. In-Reply-To: References: Message-ID: <58FD51A1-E186-499B-BDE0-1B3DED1474E9@rabbitmq.com> On 13 Dec 2012, at 11:10, Vikrant Sayeewal wrote: > If both the available rabbitmq nodes goes down then it means, I need to restart whole cluster in place of restarting those nodes?? > Restarting a single node *should* be enough, but caveats apply. If you published to node 1 and that message was non-persistent, then node 1 dies *before* the message can be relayed to node 2 (for example if the network between the two nodes becomes slow or unavailable during that time) then the message could be lost. As Simon points out, you need to use persistent messages to make sure they survive. Another scenario in which message loss can occur even when messages are persistent is that you publish to node 1 and it dies before transmitting the message to node 2 **and** before writing the message to disk. The solution to this is to use publisher confirms. When confirms are enabled (setting the channel to confirm mode) and messages are persistent, then the broker will not send a confirm.ok until the message has been written to disk *and* the i/o buffer has been flushed/synchronised. The broker will also ensure that the message has been transmitted to node 2 and confirmed as persisted there. In this case, no message loss will occur such that once you have seen a confirm for the message, even if both nodes go down, restarting one node will be enough to access the message. Cheers, Tim From tim at rabbitmq.com Tue Dec 18 13:33:41 2012 From: tim at rabbitmq.com (Tim Watson) Date: Tue, 18 Dec 2012 13:33:41 +0000 Subject: [rabbitmq-discuss] Sending HTTP Request in Rabbit-MQ In-Reply-To: References: Message-ID: <4E00367A-5CCC-41EC-9AED-8CF2097738AE@rabbitmq.com> Aravind, what you're asking doesn't make a great deal of sense to me. What is it you're trying to achieve? Do you want to relay HTTP traffic via RabbitMQ to a web server, or from one web server to another, or something else? Have you considered using an HTTP enabled plugin such as the STOMP adapter to achieve this? Anyway, if you're just trying to relay messages between HTTP/AMQP then writing an adapter shouldn't be too hard. For AMQP => HTTP => AMQP (i.e., an rpc request to AMQP that gets processed 'in the middle' by a servlet application running in Tomcat) is quite simple to implement. Write your AMQP client code to consume the message from Rabbit. Turn the message headers into HTTP headers and transform/convert the payload if necessary, then execute the HTTP request. Once the HTTPClient return a response, reverse the process and pack everything back into AMQP. As I said, if you don't want to write this by hand then you can use the web-stomp plugin or something similar to expose queues/exchanges via HTTP, but I get the impression that's not what you're trying to do. Cheers, Tim On 17 Dec 2012, at 10:52, wrote: > Hi, > > I'm trying to send the instances of HTTPServletRequest, HTTPServletResponse and HttpMethod in rabbitmq(in Java). At present, we are sending this request using executeMethod() of HTTPClient. > > It is very obvious that we cannot serialize the above mentioned classes. I want to know is there a way to send the HTTP Request via rabbitmq and to invoke that in tomcat. > > Aravind > > This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. > > Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. > > ______________________________________________________________________________________ > > www.accenture.com > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From stuff at moesel.net Tue Dec 18 13:55:03 2012 From: stuff at moesel.net (Chris) Date: Tue, 18 Dec 2012 08:55:03 -0500 Subject: [rabbitmq-discuss] Distributing Tasks to Worker Queues Across Federated Exchanges Message-ID: Hello, I'm new to Rabbit (and AMQP!) and am trying to determine if my requirements are possible to implement in RabbitMQ. I hope so, because I really like a lot about what I've seen so far! I have a federation of brokers (let's say two: A and B). They are federated because they are across WAN, so I know clustering will not work. I would like to setup worker queues so that if I submit a job to an exchange/queue, it will be processed by one and only one consumer across the federated brokers. Ideally, it should also prefer local consumers before going to federated consumers. For example: Broker A: Workers listening on queues with routing keys X & Y Broker B: Workers listening on queues with routing keys Y & Z 1) Submit job with routing key X from Broker A: Should go to Consumer of X on Broker A 2) Submit job with routing key Y from Broker A: Should go ONLY to Consumer of Y on Broker A 3) Submit job with routing key Z from Broker A: Should go to Consumer of Z on Broker A I tried this with federated direct exchanges (one link in each direction), but in case #2 above, the job will get distributed to consumers of Y on BOTH Broker A and Broker B. Even if i set up the consumers to use the same queue name, it seems they are logically different queues since they are different brokers. I'd really like to find a way this will work with RabbitMQ, else I will probably need to evaluate other options... and I don't want to do too much of that, because Rabbit looks awesome! Thanks, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Tue Dec 18 15:10:40 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Tue, 18 Dec 2012 15:10:40 +0000 Subject: [rabbitmq-discuss] Distributing Tasks to Worker Queues Across Federated Exchanges In-Reply-To: References: Message-ID: <50D08770.1090907@rabbitmq.com> On 18/12/12 13:55, Chris wrote: > I have a federation of brokers (let's say two: A and B). They are > federated because they are across WAN, so I know clustering will not > work. I would like to setup worker queues so that if I submit a job to > an exchange/queue, it will be processed by one and only one consumer > across the federated brokers. Ideally, it should also prefer local > consumers before going to federated consumers. > > For example: > > Broker A: Workers listening on queues with routing keys X & Y > Broker B: Workers listening on queues with routing keys Y & Z > > 1) Submit job with routing key X from Broker A: Should go to Consumer of > X on Broker A > 2) Submit job with routing key Y from Broker A: Should go ONLY to > Consumer of Y on Broker A > 3) Submit job with routing key Z from Broker A: Should go to Consumer of > Z on Broker A I think that the alternate-exchange mechanism (http://www.rabbitmq.com/ae.html) might help you here. Publish to a non-federated direct exchange X1. Declare X1 with an AE of a federated direct exchange: X2. Your workers will need to bind to both X1 and X2 unfortunately, but messages should get routed the way you want - if there's a local binding then the message never hits the federated exchange, but if there isn't it then goes out over federation. What this *won't* do is ensure the message only gets delivered to *one* other broker over federation. Aha! But you could do that by making each X1 be federated, but have its upstream set to a single remote X2, with the broker federation links arranged in a ring. Then messages go round the ring, at each node either being delivered locally or forwarded on by federation. You'd need to set max_hops to the ring size at each point, so that unroutable messages go round the ring once and then die. Does this make sense? Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From stuff at moesel.net Tue Dec 18 17:13:20 2012 From: stuff at moesel.net (Chris) Date: Tue, 18 Dec 2012 12:13:20 -0500 Subject: [rabbitmq-discuss] Distributing Tasks to Worker Queues Across Federated Exchanges In-Reply-To: <50D08770.1090907@rabbitmq.com> References: <50D08770.1090907@rabbitmq.com> Message-ID: Hi Simon, Thanks for the suggestions. This definitely gets me closer to what I'm looking for! I didn't know about the alternate-exchange, so that's very helpful to know (and could be helpful in other scenarios too). The ring-configuration sounds like it could work too, but then I guess I am giving up some high availability-- in that a single broken link breaks the chain and potentially prevents communication to other brokers that are still running fine. Definitely something to think about. Thanks, Simon! -Chris On Tue, Dec 18, 2012 at 10:10 AM, Simon MacMullen wrote: > On 18/12/12 13:55, Chris wrote: > >> I have a federation of brokers (let's say two: A and B). They are >> federated because they are across WAN, so I know clustering will not >> work. I would like to setup worker queues so that if I submit a job to >> an exchange/queue, it will be processed by one and only one consumer >> across the federated brokers. Ideally, it should also prefer local >> consumers before going to federated consumers. >> >> For example: >> >> Broker A: Workers listening on queues with routing keys X & Y >> Broker B: Workers listening on queues with routing keys Y & Z >> >> 1) Submit job with routing key X from Broker A: Should go to Consumer of >> X on Broker A >> 2) Submit job with routing key Y from Broker A: Should go ONLY to >> Consumer of Y on Broker A >> 3) Submit job with routing key Z from Broker A: Should go to Consumer of >> Z on Broker A >> > > I think that the alternate-exchange mechanism (http://www.rabbitmq.com/ae. > **html ) might help you here. Publish to > a non-federated direct exchange X1. Declare X1 with an AE of a federated > direct exchange: X2. > > Your workers will need to bind to both X1 and X2 unfortunately, but > messages should get routed the way you want - if there's a local binding > then the message never hits the federated exchange, but if there isn't it > then goes out over federation. > > What this *won't* do is ensure the message only gets delivered to *one* > other broker over federation. Aha! But you could do that by making each X1 > be federated, but have its upstream set to a single remote X2, with the > broker federation links arranged in a ring. Then messages go round the > ring, at each node either being delivered locally or forwarded on by > federation. You'd need to set max_hops to the ring size at each point, so > that unroutable messages go round the ring once and then die. > > Does this make sense? > > Cheers, Simon > > -- > Simon MacMullen > RabbitMQ, VMware > -------------- next part -------------- An HTML attachment was scrubbed... URL: From roanoketech at yahoo.com Tue Dec 18 19:24:01 2012 From: roanoketech at yahoo.com (John Smith) Date: Tue, 18 Dec 2012 11:24:01 -0800 (PST) Subject: [rabbitmq-discuss] Consuming ack transactional without txCommit() ? In-Reply-To: <0E287CD4-BD16-4F0D-A929-8127D2B32A3A@rabbitmq.com> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <09fd72fb-6849-4f42-a9b0-f7c0aff4d41e@googlegroups.com> <4561f600-e96b-4550-8c98-0537f5a87548@googlegroups.com> <3d6fb186-1011-4538-815b-52578930eff2@googlegroups.com> <0E287CD4-BD16-4F0D-A929-8127D2B32A3A@rabbitmq.com> Message-ID: <1355858641.62971.YahooMailNeo@web165004.mail.bf1.yahoo.com> What does it mean that the ack is transacted on consuming side, but not the read. ? I do get the fact that I can not write a rollback.? What I do not understand is what it means that the ack is trasactional.? ? Does tis mean the act will not complete until the server deletes the message, and therefore the rollback is no longer permitted ? ? In the examples, I do not see a txCommmit() on the consuming side.? ? Do I have to put a txCommit (and txselect) on the consuming side in order to have the ack be transactional ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From patryk.moura at gmail.com Tue Dec 18 22:12:40 2012 From: patryk.moura at gmail.com (Patryk Moura) Date: Tue, 18 Dec 2012 20:12:40 -0200 Subject: [rabbitmq-discuss] list queued messages? In-Reply-To: <50D04AAA.4090205@rabbitmq.com> References: <74784dd5-b502-4dd3-8a91-ceed69cbbf4d@googlegroups.com> <50D04095.20301@rabbitmq.com> <50D04AAA.4090205@rabbitmq.com> Message-ID: Awesome Simon! Tks a lot, i deffly will!!! 2012/12/18 Simon MacMullen > On 18/12/12 10:08, Emile Joubert wrote: > >> Hi Patryk, >> >> On 17/12/12 17:05, Patryk Moura wrote: >> >>> Guys, theres any1way to list all queued messages from a server "x" in a >>> datagrid? (.net for example?) >>> >> >> It is possible to dequeue and then requeue all messages in a queue using >> a standard AMQP client, but this could be an expensive operation and it >> will alter the messages by turning on the redelivered flag when those >> messages are delivered subsequently. You would also need to enumerate >> the queues, which cannot be done with AMQP - this will require >> "rabbitmqctl list_queues" or access to the management interface. >> > > Also, check the management API /api/queues///**get, > documented here: > > http://hg.rabbitmq.com/**rabbitmq-management/raw-file/** > rabbitmq_v3_0_1/priv/www/api/**index.html > > This dequeues and requeues as Emile suggests. > > Cheers, Simon > -- > Simon MacMullen > RabbitMQ, VMware > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Petr.Gotthard at Honeywell.com Wed Dec 19 00:45:58 2012 From: Petr.Gotthard at Honeywell.com (Gotthard, Petr) Date: Wed, 19 Dec 2012 00:45:58 +0000 Subject: [rabbitmq-discuss] Minor troubles with visualization plugin in 3.0.1 Message-ID: Hello, In the rabbitmq 3.0.1 (1) The visualizer still asks for HTTP authentication, while the whole web management uses a new log-in dialog. This means that I need to log-in twice: once using the log-in dialog (to enter the web management) and then for the second time when I enter the visualizer. (2) The visualizer now doesn't display the RabbitMQ logo. Problem is that the logo is (well, used to be) the only way how to leave the visualization screen and switch to another web management screen. Is it a bug or a feature? ;-) (I'm using Firefox 17.0.1) Regards, Petr -------------- next part -------------- An HTML attachment was scrubbed... URL: From roanoketech at yahoo.com Wed Dec 19 02:37:39 2012 From: roanoketech at yahoo.com (John Smith) Date: Tue, 18 Dec 2012 18:37:39 -0800 (PST) Subject: [rabbitmq-discuss] Can NOT start 2.8.6 (using R15B03), Can start 3.0 In-Reply-To: References: Message-ID: <1355884659.47072.YahooMailNeo@web165001.mail.bf1.yahoo.com> ON Windows 2008, I can install RabbitMQ 3.0 (latest version with Erlang otp_win32_R15B03-1.exe ? It installs and starts properly ? However, If i uninstall Rabbit and install RabbitMQ 2.8.6 (preparing for the VMWare version), it installs well, but I get the following error ? {"init terminating in do_boot",{function_clause,[{lists,usort,[['rabbit at IMPOSSIB LE2'|{['rabbit at IMPOSSIBLE2'],['rabbit at IMPOSSIBLE2']}]],[{file,"lists.erl"},{line ,992}]},{rabbit_upgrade,maybe_upgrade_mnesia,0,[]},{rabbit,prepare,0,[]},{init,e val_script,8,[{file,"init.erl"},{line,842}]},{init,do_boot,3,[{file,"init.erl"}, {line,748}]}]}} init terminating in do_boot () ? I am guessing the problem is the ERLANG level ? What is the correct level for erlang for RabiitMQ 2.8.6, or is this another problem -------------- next part -------------- An HTML attachment was scrubbed... URL: From jerryk at rbcon.com Wed Dec 19 04:44:36 2012 From: jerryk at rbcon.com (Jerry Kuch) Date: Tue, 18 Dec 2012 20:44:36 -0800 Subject: [rabbitmq-discuss] Can NOT start 2.8.6 (using R15B03), Can start 3.0 In-Reply-To: <1355884659.47072.YahooMailNeo@web165001.mail.bf1.yahoo.com> References: <1355884659.47072.YahooMailNeo@web165001.mail.bf1.yahoo.com> Message-ID: <4D27475D-B638-4AE8-BF8D-92411FFADC53@rbcon.com> Although Rabbit will upgrade its Mnesia schema to newer versions when an upgrade is first installed, that code doesn't IIRC do the reverse. Assuming there's nothing in your Mnesia that you want to keep you should try blowing them away and then starting 2.8.x. If there is stuff there you want to keep, reinstall 3.0, export the stuff for safekeeping, then trash Mnesia and go back to 2.8.6. Alternatively you could play with the environment settings to put Mnesia somewhere else for one of the versions... Sent from my iPhone (Brevity and typos are hopefully the result of 1-fingered typing rather than rudeness or illiteracy). On Dec 18, 2012, at 6:37 PM, John Smith wrote: > ON Windows 2008, I can install RabbitMQ 3.0 (latest version with Erlang otp_win32_R15B03-1.exe > > It installs and starts properly > > However, If i uninstall Rabbit and install RabbitMQ 2.8.6 (preparing for the VMWare version), it installs well, but I get the following error > > {"init terminating in do_boot",{function_clause,[{lists,usort,[['rabbit at IMPOSSIB > LE2'|{['rabbit at IMPOSSIBLE2'],['rabbit at IMPOSSIBLE2']}]],[{file,"lists.erl"},{line > ,992}]},{rabbit_upgrade,maybe_upgrade_mnesia,0,[]},{rabbit,prepare,0,[]},{init,e > val_script,8,[{file,"init.erl"},{line,842}]},{init,do_boot,3,[{file,"init.erl"}, > {line,748}]}]}} > init terminating in do_boot () > > I am guessing the problem is the ERLANG level > > What is the correct level for erlang for RabiitMQ 2.8.6, or is this another problem > > > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris.d at frugalit.co.uk Wed Dec 19 09:08:14 2012 From: chris.d at frugalit.co.uk (Chris Duncan) Date: Wed, 19 Dec 2012 01:08:14 -0800 (PST) Subject: [rabbitmq-discuss] Checking consumer message delivery Message-ID: I'm doing some testing around consumer behaviour and I'd like to confirm that what I'm seeing on the wire is expected RabbitMQ behaviour. My environments are running Ubuntu 12.04.1 LTS (32bit and 64bit), Erlang R14B04 and RabbitMQ 3.0.1. In my simple test I publish one message to a queue. Then I register a consumer on that queue. What I see coming back from the server (via Wireshark) is a frame that contains a consume-ok and a delivery message set as follows: Frame 24: 250 bytes on wire (2000 bits), 250 bytes captured (2000 bits) Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst: 00:00:00_00:00:00 (00:00:00:00:00:00) Internet Protocol Version 4, Src: 127.0.0.1 (127.0.0.1), Dst: 127.0.0.1 (127.0.0.1) Transmission Control Protocol, Src Port: amqp (5672), Dst Port: 51578 (51578), Seq: 444, Ack: 440, Len: 184 Advanced Message Queueing Protocol Type: Method (1) Channel: 2 Length: 36 Class: Basic (60) Method: Consume-Ok (21) Arguments Consumer-Tag: amq.ctag-74qvMgHQcikGwClWTdzjFg Advanced Message Queueing Protocol Type: Method (1) Channel: 2 Length: 57 Class: Basic (60) Method: Deliver (60) Arguments Consumer-Tag: amq.ctag-74qvMgHQcikGwClWTdzjFg Delivery-Tag: 1 .... ...1 = Redelivered: True Exchange: Routing-Key: task_queue Advanced Message Queueing Protocol Type: Content header (2) Channel: 2 Length: 41 Class ID: Basic (60) Weight: 0 Body size: 18 Property flags: 0x9800 Properties Content-Type: application/octet-stream Delivery-Mode: 2 Priority: 0 Advanced Message Queueing Protocol Type: Content body (3) Channel: 2 Length: 18 Payload: 4e6f7720776520697320706c6179696e2031 Is this what you would expect to see or should the consume-ok and delivery set be returned as separate frames? Any help would be much appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stiwari at apollogrp.edu Tue Dec 18 23:56:13 2012 From: stiwari at apollogrp.edu (pundit) Date: Tue, 18 Dec 2012 15:56:13 -0800 (PST) Subject: [rabbitmq-discuss] Rabbit MQ(2.8.7) Server loses connection Message-ID: <1355874973171-24114.post@n5.nabble.com> Hello, I am connecting to RabbitMQ server 2.8.7 via java client using Spring framework. And I see a weird issue. After few hours( this time varies) queue at RabbitMQ server starts pilling messages and it shows no consumer for the queue. However my client still shows that it has a connection and it is connected. But it stops processing messages. There is no error message in client application log file. Thanks -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/Rabbit-MQ-2-8-7-Server-loses-connection-tp24114.html Sent from the RabbitMQ mailing list archive at Nabble.com. From simon at rabbitmq.com Wed Dec 19 10:34:26 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Wed, 19 Dec 2012 10:34:26 +0000 Subject: [rabbitmq-discuss] Checking consumer message delivery In-Reply-To: References: Message-ID: <50D19832.5060506@rabbitmq.com> On 19/12/12 09:08, Chris Duncan wrote: > I'm doing some testing around consumer behaviour and I'd like to confirm > that what I'm seeing on the wire is expected RabbitMQ behaviour. My > environments are running Ubuntu 12.04.1 LTS (32bit and 64bit), Erlang > R14B04 and RabbitMQ 3.0.1. > > In my simple test I publish one message to a queue. Then I register a > consumer on that queue. What I see coming back from the server (via > Wireshark) is a frame that contains a consume-ok and a delivery message > set as follows: > Is this what you would expect to see or should the consume-ok and > delivery set be returned as separate frames? Any help would be much > appreciated. AFAICS that's one *ethernet* frame containing two AMQP methods composed of four *AMQP* frames. (The deliver method consists of three AMQP frames). We make no attempt to make AMQP frame boundaries match underlying IP packets / ethernet frames - it's transparent to clients, and it would be less efficient for small messages and impossible for large ones. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From simon at rabbitmq.com Wed Dec 19 10:36:27 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Wed, 19 Dec 2012 10:36:27 +0000 Subject: [rabbitmq-discuss] Rabbit MQ(2.8.7) Server loses connection In-Reply-To: <1355874973171-24114.post@n5.nabble.com> References: <1355874973171-24114.post@n5.nabble.com> Message-ID: <50D198AB.2010602@rabbitmq.com> On 18/12/12 23:56, pundit wrote: > I am connecting to RabbitMQ server 2.8.7 via java client using Spring > framework. And I see a weird issue. > > After few hours( this time varies) queue at RabbitMQ server starts pilling > messages and it shows no consumer for the queue. However my client still > shows that it has a connection and it is connected. But it stops processing > messages. > > There is no error message in client application log file. I would imagine that some firewall or router somewhere is dropping what it considers to be an idle connection. You probably want to turn on heartbeats in your clients (or upgrade to 3.x where heartbeats are enabled by default in the server). Also, you might check the server logs. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From chris.d at frugalit.co.uk Wed Dec 19 10:40:59 2012 From: chris.d at frugalit.co.uk (Chris Duncan) Date: Wed, 19 Dec 2012 10:40:59 +0000 Subject: [rabbitmq-discuss] Checking consumer message delivery In-Reply-To: <50D19832.5060506@rabbitmq.com> References: <50D19832.5060506@rabbitmq.com> Message-ID: <50D199BB.5070102@frugalit.co.uk> On 19/12/12 10:34, Simon MacMullen wrote: > On 19/12/12 09:08, Chris Duncan wrote: >> I'm doing some testing around consumer behaviour and I'd like to confirm >> that what I'm seeing on the wire is expected RabbitMQ behaviour. My >> environments are running Ubuntu 12.04.1 LTS (32bit and 64bit), Erlang >> R14B04 and RabbitMQ 3.0.1. >> >> In my simple test I publish one message to a queue. Then I register a >> consumer on that queue. What I see coming back from the server (via >> Wireshark) is a frame that contains a consume-ok and a delivery message >> set as follows: > > > >> Is this what you would expect to see or should the consume-ok and >> delivery set be returned as separate frames? Any help would be much >> appreciated. > > AFAICS that's one *ethernet* frame containing two AMQP methods > composed of four *AMQP* frames. (The deliver method consists of three > AMQP frames). > > We make no attempt to make AMQP frame boundaries match underlying IP > packets / ethernet frames - it's transparent to clients, and it would > be less efficient for small messages and impossible for large ones. > > Cheers, Simon > Thanks Simon, that clarifies my understanding of ethernet frames as opposed to AMQP frames. From tim at rabbitmq.com Wed Dec 19 11:38:18 2012 From: tim at rabbitmq.com (Tim Watson) Date: Wed, 19 Dec 2012 11:38:18 +0000 Subject: [rabbitmq-discuss] Transactions In-Reply-To: <1355771741.55347.YahooMailNeo@web165001.mail.bf1.yahoo.com> References: <1355172599.17308.YahooMailNeo@web165005.mail.bf1.yahoo.com> <1355180560.9407.YahooMailNeo@web165002.mail.bf1.yahoo.com> <1355758269.50486.YahooMailNeo@web165003.mail.bf1.yahoo.com> <1355771741.55347.YahooMailNeo@web165001.mail.bf1.yahoo.com> Message-ID: <50D1A72A.20708@rabbitmq.com> John, Please start a new thread when asking a new topic. It's very difficult to keep track of your posts otherwise, and it therefore takes us longer to help! Thanks. So on the subject of transactions... On 12/17/2012 07:15 PM, John Smith wrote: > Am I correctly interpreting the following link: > http://www.rabbitmq.com/semantics.html > I can have publish inside a transaction, but not receive inside a tx, You can of course receive messages inside a transaction, however that *receipt is not transactional* but rather the acknowledgement you send for it is. What this means in practise is that once delivered, a message arriving during a transaction will not be redelivered even if you roll back the transaction. On the broker, if you send back an ACK the message is normally then removed from the queue, and not before then, so that nack/reject work as expected. If you send an ACK during a transaction and subsequently roll back the transaction, the message will *not* be removed from the queue nor will it be delivered to you again! That is what the AMQP spec means when it distinguishes between atomic delivery (which isn't mandated or supported) and atomic acknowledgements (which are). As per the spec, if you're holding onto a message received during a transaction that was subsequently rolled back, it is valid to ACK that message at a later time in a subsequent transaction. > and the transaction is not atomic ? > Transactions in AMQP are atomic for a single queue, but RabbitMQ does not uphold the atomicity guarantee in the face of failure during the commit phase. > Could someone please post a link to where I can view an example of a > transaction in Rabbit ? > If you explain what you're specifically trying to achieve with transactions, then we can probably point you in the right direction. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Wed Dec 19 11:50:13 2012 From: tim at rabbitmq.com (Tim Watson) Date: Wed, 19 Dec 2012 11:50:13 +0000 Subject: [rabbitmq-discuss] Consuming ack transactional without txCommit() ? In-Reply-To: <1355858641.62971.YahooMailNeo@web165004.mail.bf1.yahoo.com> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <09fd72fb-6849-4f42-a9b0-f7c0aff4d41e@googlegroups.com> <4561f600-e96b-4550-8c98-0537f5a87548@googlegroups.com> <3d6fb186-1011-4538-815b-52578930eff2@googlegroups.com> <0E287CD4-BD16-4F0D-A929-8127D2B32A3A@rabbitmq.com> <1355858641.62971.YahooMailNeo@web165004.mail.bf1.yahoo.com> Message-ID: <50D1A9F5.4080400@rabbitmq.com> John, I tried to answer this in my reply to your other post: see http://rabbitmq.1065348.n5.nabble.com/Can-no-longer-start-RabbitMQ-service-td23954.html - note that the thread's title doesn't make much sense because of topic switching. Please shout if it still isn't making sense! Cheers, Tim On 12/18/2012 07:24 PM, John Smith wrote: > What does it mean that the ack is transacted on consuming side, but > not the read. > I do get the fact that I can not write a rollback. What I do not > understand is what it means that the ack is trasactional. > Does tis mean the act will not complete until the server deletes the > message, and therefore the rollback is no longer permitted ? > In the examples, I do not see a txCommmit() on the consuming side. > Do I have to put a txCommit (and txselect) on the consuming side in > order to have the ack be transactional ? > > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcintoshj at gmail.com Wed Dec 19 16:39:53 2012 From: mcintoshj at gmail.com (Jason McIntosh) Date: Wed, 19 Dec 2012 10:39:53 -0600 Subject: [rabbitmq-discuss] BIGIP/F5 and Connection resets In-Reply-To: <50D066FA.3090300@rabbitmq.com> References: <50D066FA.3090300@rabbitmq.com> Message-ID: I saw that heartbeats are turned on with 3.0.0 - the question is does 2.8.7 have heartbeat support by default on the server side or can it be turned on? How is this different the SO_KEEPALIVE: http://www.erlang.org/doc/man/inet.html There's no details on the documentation about configuring the heartbeat on 2.8.7 setting if there is a configuration option for it. I did find this: https://bugs.launchpad.net/nova/+bug/856764 AND http://rabbitmq.1065348.n5.nabble.com/Timeout-for-hung-connection-on-rabbitmq-server-td21354.html I'm not sure what the difference is between a rabbit heartbeat and erlangs keepalive? Or is heartbeat just turning on keepalive? I'm going to look at the erlang configuration as a possible fix. We're trying to do this on the server side so we don't have to modify all of our clients. Here's a few more details on the exact issue we've encountered RAB_SERVER <-> F5/Firewall/etc. <-> RAB_CLIENT the client and server don't have any traffic going through so they get disconnected in one of two ways. If we used just a router and not a load balancer it seems most network firewalls auto disconnect with NO notification both clients after an hour of no TCP/IP traffic (from what I understand, SSH for example uses a TCP/IP Keepalive to keep their connections going). The load balancer on the other hand does a graceful RESET to both client and server after our delay of 300 seconds. We've tried increasing the delay, but it looks like 2.8.7 by default doesn't set any kind of heartbeat or keepalive so even if we set it to an hour, we'd still get resets. Rabbit clients using spring & the shovel configuration itself handle resets of the connection pretty gracefully. The issue is I'd rather not have resets as I don't trust all clients to be nice about reconnecting. The spring code reconnects gracefully - the standard rabbit client doesn't seem to be as nice about reconnecting. Jason On Tue, Dec 18, 2012 at 6:52 AM, Emile Joubert wrote: > > Hi Jason, > > On 17/12/12 22:53, Jason McIntosh wrote: > > > From what I've been told, most network devices drop TCP/IP > > connections after an hour automatically (i.e. switches, routers, > > etc.) and force a reconnect - not sure if Rabbit handles this? > > The broker handles a closed connection by logging the event. > > > There is a work around at the moment we're looking into. It looks like > > most (if not all) Rabbit interfaces have a heartbeat setting that would > > allow connections to be maintained > > Yes, AMQP heartbeats are a suitable solution if intermediate network > devices are closing idle connections too eagerly. Heartbeats are enabled > by default in v3.0.0 if the client supports them. > > Another options is to write client applications to re-establish closed > connections after a suitable delay. > > If consumers receive messages asynchronously instead of polling the > broker for messages, and there are no messages to deliver then the TCP > connection will carry no traffic. > > > Other questions related to the above: Is the AMQP protocol designed to > > have the clients just sit idle, no communication with the servers until > > a message comes in > > Rabbit does not impose limits on connection duration and idle > connections are permitted to remain so indefinitely. > > > If there is no check, and the client hasn't received a message in a > > day at what point do you retry your connection to verify you're even > > still connected? It sounds like in this case you could have a > > consumer of a queue lose it's connection and never realize > > If connections are being severed silently without notification from the > network stack then you must use AMQP heartbeats so that both sides of > the connection become aware of it. Otherwise the network stack should > provide notification that the connection has been interrupted. > > > Then you'd have a server just sitting backlogging messages waiting > > for a client (or worse depending on configuration, just dropping all > > the messages). > > The broker will not drop messages due to broken connections and the > protocol is designed so that a guarantee of message delivery can be > offered even in the face of an unreliable transport. > > > Looked at the AMQP 0-9-1 specifications and not seeing a whole lot > > defined on how AMQP implementers are supposed to work with TCP/IP > > traffic (other than some heartbeat definitions). > > The "connection" class relates to the transport, which must be > stream-oriented. > > > -Emile > > > > > > > > > > > -- Jason McIntosh http://mcintosh.poetshome.com/blog/ 573-424-7612 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ask at rabbitmq.com Wed Dec 19 16:48:47 2012 From: ask at rabbitmq.com (Ask Solem) Date: Wed, 19 Dec 2012 16:48:47 +0000 Subject: [rabbitmq-discuss] AMQPChannelException: (404, u"NOT_FOUND - no exchange '4042acd4bbec471aafc557af39ee0efe' in vhost '/'", (60, 40), 'Channel.basic_publish') In-Reply-To: References: Message-ID: <0332A3E1-A471-49C2-AD7D-0E471E95CA59@rabbitmq.com> On 18 Dec 2012, at 08:54, Alex Lyakas wrote: > Greetings all, > > I am using rabbitmq server + kombu + pyamqplib on a stock Ubuntu-Precise. Below are the versions of the components: > rabbitmq-server 2.7.1-0ubuntu4 > python-amqplib 1.0.0+ds-1 > python-kombu 1.4.3-1 > > The issue I am seeing is the ?no exchange? exception, which I hit when opening a new channel on an existing connection. Here is a typical crash stack: > TRACE: File "/usr/lib/python2.7/dist-packages/kombu/connection.py", line 159, in channel > TRACE: chan = self.transport.create_channel(self.connection) > TRACE: File "/usr/lib/python2.7/dist-packages/kombu/transport/pyamqplib.py", line 235, in create_channel > TRACE: return connection.channel() > TRACE: File "/usr/lib/python2.7/dist-packages/kombu/transport/pyamqplib.py", line 144, in channel > TRACE: return Channel(self, channel_id) > TRACE: File "/usr/lib/python2.7/dist-packages/kombu/transport/pyamqplib.py", line 183, in init > TRACE: super(Channel, self).__init__(*args, **kwargs) > TRACE: File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/channel.py", line 82, in init > TRACE: self._x_open() > TRACE: File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/channel.py", line 471, in _x_open > TRACE: (20, 11), # Channel.open_ok > TRACE: File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/abstract_channel.py", line 97, in wait > TRACE: return self.dispatch_method(method_sig, args, content) > TRACE: File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/abstract_channel.py", line 115, in dispatch_method > TRACE: return amqp_method(self, args) > TRACE: File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/channel.py", line 273, in _close > TRACE: (class_id, method_id)) > TRACE: AMQPChannelException: (404, u"NOT_FOUND - no exchange '4042acd4bbec471aafc557af39ee0efe' in vhost '/'", (60, 40), 'Channel.basic_publish') > > I hit this only with direct exchanges, with ?auto-delete? = True. > > The flow that I have is like follows: > - node A declares a direct exchange and declares a queue > - node A sends message to node B using a topic exchange, and embeds direct exchange name in the message > - node B parses the message, prepares the reply, declares the (same) direct exchange and a producer > - node B sends reply message on the producer > - node A and node B close their channels > - several seconds after that, when node B tries to create a new channel on the same connection (using the same channel_id), it hits this exception. > > I am trying to debug this for some time, but do not have a clear way to repro this. It happens occasionally. > > I understand, that since I open the channel with the same channel_id, I may receive some stale message from the server (for the same channel_id) regarding failure to publish. However, several things confuse me: > > 1) The only code, which publishes to a direct exchange is as follows: > self.exchange = kombu.entity.Exchange(name=self.exchange_name, **self.kwargs) > self.producer = kombu.messaging.Producer(exchange=self.exchange, channel=channel, routing_key=self.routing_key) > self.producer.publish(msg) > How can exchange not being present here? The Kombu producer object will declare the exchange at construction. This is the default behavior, but it's no longer a best practice to use it. Sadly documentation is scarce as I have not had as much time as I'd like to update it. The best way to use a Producer object in Kombu is to instantiate it without a default exchange, and rather use the exchange argument to publish: prod = Producer(connection) prod.publish(message, exchange=exchange, routing_key=routing_key, declare=[exchange], ) The declare argument takes a list of entities (Queue's / Exchange's) that must declared before publishing the message, and these are cached if possible (state belonging to the current connection, so that they will be redeclared if the connection is lost) Using the Producer like this also enables you to use the retry argument properly so that the declare operation also happens before a retry: prod.publish(message, exchange=exchange, declare=[exchange], retry=True, retry_policy={ 'max_retries': None, 'interval_start': 2.0, 'interval_step': 2.0, 'interval_max': 30.0, }) The retry_policy argument can be a dict containing any of the arguments supported by Connection.ensure_connection: http://kombu.readthedocs.org/en/latest/reference/kombu.html#kombu.Connection.ensure_connection > > 2) Even though all exchanges have auto-delete=True, I see more than 3000 existing direct exchanges on the rabbitmqctl list_exchanges output. The queues that used these exchanges (also auto-delete=True) do not exist anymore. > When auto-delete=True exchanges are deleted? Is there some timeout on their deletion? The documentation says that there SHOULD be a reasonable timeout. What is this timeout? Can it be configured? Is exchange auto-deletion supposed to work in my version? I'm unsure of the exact details but it has probably been mentioned before if you search the mailing-list archives. You are not recommended to use the auto_delete flag anymore, and in fact it's no longer supported by some clients (i.e. librabbitmq) > > 3) The exchanges that I receive exceptions about do not exist indeed. How can I debug the rabbitmq server and understand why it decides to delete some exchanges, but not the other ones? From simon at rabbitmq.com Wed Dec 19 17:06:52 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Wed, 19 Dec 2012 17:06:52 +0000 Subject: [rabbitmq-discuss] Queue Rates at Zero in Management Interface In-Reply-To: References: Message-ID: <50D1F42C.1060408@rabbitmq.com> On 17/12/12 11:21, David Legg wrote: > On 14/12/2012 16:37, "Simon MacMullen" wrote: > > >> I'm not sure what I can suggest then. This all sounds like it should be >> working. If you could post the output of "rabbitmqctl report" that might >> give me some sort of a clue in case something odd leaps out. But apart >>from that I'm rather stuck. Would you be prepared to run some patched >> version of the management plugin so I can see what's going on? > > > The output of 'rabbitmqctl report' is pretty hefty. Is there anything in > there that we should be looking out for? I'm not sure, that's what I wanted to look at it. Could you upload it to a server somewhere? Also logs (especially the SASL log) might be useful. > I've turned on fine grained statistics and increased the interval to > 10000ms but this hasn't had any effect. This did seem to start occurring > after we changed the IP addresses of our two Rabbit servers. What effect > would this have? Well, it shouldn't have any, I'm still in the dark here. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From stiwari at apollogrp.edu Wed Dec 19 17:12:26 2012 From: stiwari at apollogrp.edu (pundit) Date: Wed, 19 Dec 2012 09:12:26 -0800 (PST) Subject: [rabbitmq-discuss] Rabbit MQ(2.8.7) Server loses connection In-Reply-To: <50D198AB.2010602@rabbitmq.com> References: <1355874973171-24114.post@n5.nabble.com> <50D198AB.2010602@rabbitmq.com> Message-ID: <1355937146490-24127.post@n5.nabble.com> ohh I was under impression that heartbeats are enabled by default. So I will have to enable heartbeats in RabbitMQ server and also pass heartbeat parameter in client connection factory. Or is it enough to provide parameter on either client or server side? Thanks -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/Rabbit-MQ-2-8-7-Server-loses-connection-tp24114p24127.html Sent from the RabbitMQ mailing list archive at Nabble.com. From emile at rabbitmq.com Wed Dec 19 17:23:56 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Wed, 19 Dec 2012 17:23:56 +0000 Subject: [rabbitmq-discuss] BIGIP/F5 and Connection resets In-Reply-To: References: <50D066FA.3090300@rabbitmq.com> Message-ID: <50D1F82C.5060100@rabbitmq.com> Hi, On 19/12/12 16:39, Jason McIntosh wrote: > I saw that heartbeats are turned on with 3.0.0 - the question is does > 2.8.7 have heartbeat support by default on the server side or can it be > turned on? Yes, heartbeat support has been available for several years. Any broker version released in last few years will honour heartbeat requests from clients. The broker can propose a configured heartbeat interval since v3.0.0 using the "heartbeat" directive: http://www.rabbitmq.com/configure.html The default in v3.x.x is 600 seconds. In earlier versions of the broker the default was not to use heartbeats. The client and broker negotiate a heartbeat interval during connection tuning phase of connection establishment as per the specification: http://www.rabbitmq.com/amqp-0-9-1-reference.html#connection.tune.heartbeat http://www.rabbitmq.com/amqp-0-9-1-reference.html#connection.tune-ok.heartbeat > How is this different the SO_KEEPALIVE: > http://www.erlang.org/doc/man/inet.html The difference is that TCP keep-alives are implemented in the network stack below the application level. They are part of the transport and transparent to the application. This can be turned on using the tcp_listen_options configuration directive. The default is not to use keep-alives. Bear in mind that the default keep-alive interval varies widely across different implementations of TCP/IP. > If we used just a router and not a load balancer it seems most > network firewalls auto disconnect with NO notification both clients > after an hour of no TCP/IP traffic AMQP heartbeats should solve this problem. -Emile From simon at rabbitmq.com Wed Dec 19 17:32:11 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Wed, 19 Dec 2012 17:32:11 +0000 Subject: [rabbitmq-discuss] Rabbit MQ(2.8.7) Server loses connection In-Reply-To: <1355937146490-24127.post@n5.nabble.com> References: <1355874973171-24114.post@n5.nabble.com> <50D198AB.2010602@rabbitmq.com> <1355937146490-24127.post@n5.nabble.com> Message-ID: <50D1FA1B.60000@rabbitmq.com> On 19/12/12 17:12, pundit wrote: > ohh I was under impression that heartbeats are enabled by default. > So I will have to enable heartbeats in RabbitMQ server and also pass > heartbeat parameter in client connection factory. Or is it enough to provide > parameter on either client or server side? They are enabled by default in 3.0. And 2.x doesn't let you enable them on the server side. But in general you only need to do one or the other. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From roanoketech at yahoo.com Wed Dec 19 20:20:04 2012 From: roanoketech at yahoo.com (John Smith) Date: Wed, 19 Dec 2012 12:20:04 -0800 (PST) Subject: [rabbitmq-discuss] How to start New Discussions Threads In-Reply-To: <50D1A9F5.4080400@rabbitmq.com> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <09fd72fb-6849-4f42-a9b0-f7c0aff4d41e@googlegroups.com> <4561f600-e96b-4550-8c98-0537f5a87548@googlegroups.com> <3d6fb186-1011-4538-815b-52578930eff2@googlegroups.com> <0E287CD4-BD16-4F0D-A929-8127D2B32A3A@rabbitmq.com> <1355858641.62971.YahooMailNeo@web165004.mail.bf1.yahoo.com> <50D1A9F5.4080400@rabbitmq.com> Message-ID: <1355948404.39210.YahooMailNeo@web165003.mail.bf1.yahoo.com> Tim: ? I apologize for not starting new trheads.? I am unfamiliar with this discussions group. ? I thorught I was starting new threads by sending a? note to the discussion group (usually by hiting a REPLY key, and entering a new SUBJECT line ? How do I start a new thread when sending a? message to the discussion group ? ? ? ________________________________ From: Tim Watson To: John Smith ; Discussions about RabbitMQ Cc: "rabbitmq-discuss at googlegroups.com" Sent: Wednesday, December 19, 2012 6:50 AM Subject: Re: [rabbitmq-discuss] Consuming ack transactional without txCommit() ? John, I tried to answer this in my reply to your other post: see http://rabbitmq.1065348.n5.nabble.com/Can-no-longer-start-RabbitMQ-service-td23954.html - note that the thread's title doesn't make much sense because of topic switching. Please shout if it still isn't making sense! Cheers, Tim On 12/18/2012 07:24 PM, John Smith wrote: What does it mean that the ack is transacted on consuming side, but not the read. >? >I do get the fact that I can not write a rollback.? What I do not understand is what it means that the ack is trasactional.? >? >Does tis mean the act will not complete until the server deletes the message, and therefore the rollback is no longer permitted ? >? >In the examples, I do not see a txCommmit() on the consuming side.? >? >Do I have to put a txCommit (and txselect) on the consuming side in order to have the ack be transactional ? > > >_______________________________________________ rabbitmq-discuss mailing list rabbitmq-discuss at lists.rabbitmq.com https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From scotta1white at gmail.com Wed Dec 19 19:38:18 2012 From: scotta1white at gmail.com (Scott White) Date: Wed, 19 Dec 2012 11:38:18 -0800 (PST) Subject: [rabbitmq-discuss] Change default user and password Message-ID: Hi, I'm trying to update the default_user and default_passwd by setting these in the rabbitmq.config file before the initial startup, but have not been successful in doing so. My rabbitmq.config file is: [ {rabbit, [ {cluster_nodes, {['rabbit at host1', 'rabbit at host2'], disc}}, {default_user,<<"rabbitmq">>}, {default_pass,<<"my-pass1.">>} ] } ]. Despite the above, the guest/guest account is still created when the rabbit server starts. I believe its readig the config file because the cluster nodes are set appropriately once started. Is the syntax wrong or is it something else? Regards, Scott -------------- next part -------------- An HTML attachment was scrubbed... URL: From watson.timothy at gmail.com Wed Dec 19 21:42:17 2012 From: watson.timothy at gmail.com (Tim Watson) Date: Wed, 19 Dec 2012 21:42:17 +0000 Subject: [rabbitmq-discuss] How to start New Discussions Threads In-Reply-To: <1355948404.39210.YahooMailNeo@web165003.mail.bf1.yahoo.com> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <09fd72fb-6849-4f42-a9b0-f7c0aff4d41e@googlegroups.com> <4561f600-e96b-4550-8c98-0537f5a87548@googlegroups.com> <3d6fb186-1011-4538-815b-52578930eff2@googlegroups.com> <0E287CD4-BD16-4F0D-A929-8127D2B32A3A@rabbitmq.com> <1355858641.62971.YahooMailNeo@web165004.mail.bf1.yahoo.com> <50D1A9F5.4080400@rabbitmq.com> <1355948404.39210.YahooMailNeo@web165003.mail.bf1.yahoo.com> Message-ID: Hi John, that's fine I learned this the same as you when someone pointed it out. Most mailing lists start new threads by sending a new email to the group address. Replies are appending to previous threads even when the subject line is changed. Cheers Tim On 19 Dec 2012, at 20:20, John Smith wrote: > Tim: > > I apologize for not starting new trheads. I am unfamiliar with this discussions group. > > I thorught I was starting new threads by sending a note to the discussion group (usually by hiting a REPLY key, and entering a new SUBJECT line > > How do I start a new thread when sending a message to the discussion group ? > > > > From: Tim Watson > To: John Smith ; Discussions about RabbitMQ > Cc: "rabbitmq-discuss at googlegroups.com" > Sent: Wednesday, December 19, 2012 6:50 AM > Subject: Re: [rabbitmq-discuss] Consuming ack transactional without txCommit() ? > > John, > > I tried to answer this in my reply to your other post: see http://rabbitmq.1065348.n5.nabble.com/Can-no-longer-start-RabbitMQ-service-td23954.html - note that the thread's title doesn't make much sense because of topic switching. > > Please shout if it still isn't making sense! > > Cheers, > Tim > > On 12/18/2012 07:24 PM, John Smith wrote: >> >> What does it mean that the ack is transacted on consuming side, but not the read. >> >> I do get the fact that I can not write a rollback. What I do not understand is what it means that the ack is trasactional. >> >> Does tis mean the act will not complete until the server deletes the message, and therefore the rollback is no longer permitted ? >> >> In the examples, I do not see a txCommmit() on the consuming side. >> >> Do I have to put a txCommit (and txselect) on the consuming side in order to have the ack be transactional ? >> >> >> _______________________________________________ >> rabbitmq-discuss mailing list >> rabbitmq-discuss at lists.rabbitmq.com >> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From terry.weymouth at gmail.com Thu Dec 20 01:48:52 2012 From: terry.weymouth at gmail.com (Terry Weymouth) Date: Wed, 19 Dec 2012 17:48:52 -0800 (PST) Subject: [rabbitmq-discuss] rabbitmq nodedown error In-Reply-To: <49780a75-214c-4d05-a1c3-93803ff46d18@googlegroups.com> References: <49780a75-214c-4d05-a1c3-93803ff46d18@googlegroups.com> Message-ID: <4962bc46-f17a-4bc4-af16-454650a1a0ce@googlegroups.com> pi, did you ever get an answer? I am having the same problem. Furthermore, I tried to forcibly kill the process (with and without -9), but it keeps coming back. Here is what i see: terry% sudo cat .erlang.cookie MBFIPNFMCWGYGTVEVPLE terry% sudo -u rabbitmq rabbitmqctl stop Stopping and halting node rabbit at terry ... Error: unable to connect to node rabbit at terry: nodedown DIAGNOSTICS =========== nodes in question: [rabbit at terry] hosts, their running nodes and ports: - terry: [{rabbit,54387},{rabbitmqctl55720,54434}] current node details: - node name: rabbitmqctl55720 at terry - home dir: /Users/terry - cookie hash: qLCaC9zyMZQKKUfgYXz/AA== terry% ps aux | grep rabbit rabbitmq 55331 0.1 1.0 2500740 40544 ?? S 8:19PM 0:06.25 /opt/local/lib/erlang/erts-5.9/bin/beam.smp -W w -K true -A30 -P 1048576 -- -root /opt/local/lib/erlang -progname erl -- -home /opt/local/var/lib/rabbitmq -- -noshell -noinput -sname rabbit at terry -boot /opt/local/var/lib/rabbitmq/mnesia/rabbit at terry-plugins-expand/rabbit -kernel inet_default_connect_options [{nodelay,true}] -sasl errlog_type error -sasl sasl_error_logger false -rabbit error_logger {file,"/opt/local/var/log/rabbitmq/rabbit at terry.log"} -rabbit sasl_error_logger {file,"/opt/local/var/log/rabbitmq/rabbit at terry-sasl.log"} -os_mon start_cpu_sup false -os_mon start_disksup false -os_mon start_memsup false -mnesia dir "/opt/local/var/lib/rabbitmq/mnesia/rabbit at terry" rabbitmq 55374 0.0 0.0 2434996 276 ?? S 8:20PM 0:00.00 inet_gethost 4 rabbitmq 55373 0.0 0.0 2434992 788 ?? Ss 8:20PM 0:00.01 inet_gethost 4 rabbitmq 55325 0.0 0.0 2435544 684 ?? S 8:19PM 0:00.00 /bin/sh /opt/local/sbin/rabbitmq-server rabbitmq 55322 0.0 0.0 2448144 1120 ?? Ss 8:19PM 0:00.01 /opt/local/bin/daemondo --label=rabbitmq-server --start-cmd /opt/local/etc/LaunchDaemons/org.macports.rabbitmq-server/rabbitmq-server.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.rabbitmq-server/rabbitmq-server.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.rabbitmq-server/rabbitmq-server.wrapper restart ; --pid=none rabbitmq 55192 0.0 0.0 2434996 256 ?? S 8:13PM 0:00.02 /opt/local/lib/erlang/erts-5.9/bin/epmd -daemon -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Thu Dec 20 10:20:53 2012 From: tim at rabbitmq.com (Tim Watson) Date: Thu, 20 Dec 2012 10:20:53 +0000 Subject: [rabbitmq-discuss] rabbitmq nodedown error In-Reply-To: <4962bc46-f17a-4bc4-af16-454650a1a0ce@googlegroups.com> References: <49780a75-214c-4d05-a1c3-93803ff46d18@googlegroups.com> <4962bc46-f17a-4bc4-af16-454650a1a0ce@googlegroups.com> Message-ID: Guys, The erlang.cookie needs to be getting picked up from the same place, so if the account that runs rabbitmqctl is picking up the cookie from a different file (or not at all) then the rabbitmqctl node won't be able to connect to the other node (on which the broker is running). The cookie is often located in /var/lib/rabbitmq/.erlang.cookie on unix based installs, though that may differ if you've installed via macports which I can see Terry has. Terry I'd suggest looking for the .erlang.cookie file beneath /opt/local - if you look at the broker logs I'm pretty sure you'll see that the home directory is not /Users/terry and erlang will look in $HOME/.erlang.cookie so if you figure out where macports has put this and copy it to your home directory, you should be ok. Same should go for you pi, though obviously minus the /opt/local prefix. Cheers, Tim On 20 Dec 2012, at 01:48, Terry Weymouth wrote: > pi, did you ever get an answer? > > I am having the same problem. Furthermore, I tried to forcibly kill the process (with and without -9), but it keeps coming back. > Here is what i see: > > terry% sudo cat .erlang.cookie > MBFIPNFMCWGYGTVEVPLE > > terry% sudo -u rabbitmq rabbitmqctl stop > Stopping and halting node rabbit at terry ... > Error: unable to connect to node rabbit at terry: nodedown > > DIAGNOSTICS > =========== > > nodes in question: [rabbit at terry] > > hosts, their running nodes and ports: > - terry: [{rabbit,54387},{rabbitmqctl55720,54434}] > > current node details: > - node name: rabbitmqctl55720 at terry > - home dir: /Users/terry > - cookie hash: qLCaC9zyMZQKKUfgYXz/AA== > > terry% ps aux | grep rabbit > rabbitmq 55331 0.1 1.0 2500740 40544 ?? S 8:19PM 0:06.25 /opt/local/lib/erlang/erts-5.9/bin/beam.smp -W w -K true -A30 -P 1048576 -- -root /opt/local/lib/erlang -progname erl -- -home /opt/local/var/lib/rabbitmq -- -noshell -noinput -sname rabbit at terry -boot /opt/local/var/lib/rabbitmq/mnesia/rabbit at terry-plugins-expand/rabbit -kernel inet_default_connect_options [{nodelay,true}] -sasl errlog_type error -sasl sasl_error_logger false -rabbit error_logger {file,"/opt/local/var/log/rabbitmq/rabbit at terry.log"} -rabbit sasl_error_logger {file,"/opt/local/var/log/rabbitmq/rabbit at terry-sasl.log"} -os_mon start_cpu_sup false -os_mon start_disksup false -os_mon start_memsup false -mnesia dir "/opt/local/var/lib/rabbitmq/mnesia/rabbit at terry" > rabbitmq 55374 0.0 0.0 2434996 276 ?? S 8:20PM 0:00.00 inet_gethost 4 > rabbitmq 55373 0.0 0.0 2434992 788 ?? Ss 8:20PM 0:00.01 inet_gethost 4 > rabbitmq 55325 0.0 0.0 2435544 684 ?? S 8:19PM 0:00.00 /bin/sh /opt/local/sbin/rabbitmq-server > rabbitmq 55322 0.0 0.0 2448144 1120 ?? Ss 8:19PM 0:00.01 /opt/local/bin/daemondo --label=rabbitmq-server --start-cmd /opt/local/etc/LaunchDaemons/org.macports.rabbitmq-server/rabbitmq-server.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.rabbitmq-server/rabbitmq-server.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.rabbitmq-server/rabbitmq-server.wrapper restart ; --pid=none > rabbitmq 55192 0.0 0.0 2434996 256 ?? S 8:13PM 0:00.02 /opt/local/lib/erlang/erts-5.9/bin/epmd -daemon > > > > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From emile at rabbitmq.com Thu Dec 20 10:28:35 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Thu, 20 Dec 2012 10:28:35 +0000 Subject: [rabbitmq-discuss] Change default user and password In-Reply-To: References: Message-ID: <50D2E853.5030509@rabbitmq.com> Hi Scott, On 19/12/12 19:38, Scott White wrote: > Is the syntax wrong or is it something else? That file works fine for me. Are you sure the config file is in the correct place and being read by all clustered brokers on startup? You should see a line like this in the startup banner: config file(s) : /etc/rabbitmq/rabbitmq.config -Emile From majek04 at gmail.com Thu Dec 20 10:35:22 2012 From: majek04 at gmail.com (Marek Majkowski) Date: Thu, 20 Dec 2012 10:35:22 +0000 Subject: [rabbitmq-discuss] RabbitMQ sending frames after delivering connection_close_ok Message-ID: Hi, One of the Puka users found that it is possible to crash Puka. It happens as RabbitMQ seems to keep on sending frames after connection_close_ok. Puka has trouble behaving in such a case. Is it a valid AMQP behaviour? Can anything be delivered after connection_close_ok had been sent? More comments: https://github.com/majek/puka/issues/34 To reproduce run two instances of this code on a SMP machine: https://gist.github.com/4344132 Tested with RabbitMQ 2.7.1 and probably 2.8.6. Cheers, Marek From tim at rabbitmq.com Thu Dec 20 10:41:46 2012 From: tim at rabbitmq.com (Tim Watson) Date: Thu, 20 Dec 2012 10:41:46 +0000 Subject: [rabbitmq-discuss] RabbitMQ sending frames after delivering connection_close_ok In-Reply-To: References: Message-ID: <5F089143-EDE2-4B46-A492-358B8065490D@rabbitmq.com> Hi Marek! :) Can you actually see the cancel.ok frame arrive on the network after the close.ok frame? I'm not seeing how that can happen on the broker's side, but I'll continue staring at the code a while to make sure. Cheers, Tim On 20 Dec 2012, at 10:35, Marek Majkowski wrote: > Hi, > > One of the Puka users found that it is possible to > crash Puka. It happens as RabbitMQ seems to > keep on sending frames after connection_close_ok. > > Puka has trouble behaving in such a case. > > Is it a valid AMQP behaviour? Can anything be delivered > after connection_close_ok had been sent? > > More comments: > https://github.com/majek/puka/issues/34 > > To reproduce run two instances of this code on a > SMP machine: > https://gist.github.com/4344132 > > Tested with RabbitMQ 2.7.1 and probably 2.8.6. > > Cheers, > Marek > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From psl88506 at gmail.com Thu Dec 20 10:42:18 2012 From: psl88506 at gmail.com (PSL 88506) Date: Thu, 20 Dec 2012 16:12:18 +0530 Subject: [rabbitmq-discuss] Node Resilency Message-ID: We are using RabbitMQ in our application. We encountered problem last week in production. We have 5 server - clustered and no load balancer is used. Suddenly over console when we opened RabbitServer-1, It is showing RabbitServer-2,3,4,5 in red, Not Running and RabbitServer-1 is Running. When RabbitServer-2 console is opened, it showed that RabbitServer-2 is Running and other is Red and Not Running. It is same for all 5 server. We understood that cluster was broken. Please let us know if there could be any other issues. Also our team has raised request to Network team to know if any network flucuations happened. Hence we decided to handle node failure to ensure node resiliency. Could you please help in throwing some light on how to ensure node resiliency. Please help. Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at rabbitmq.com Thu Dec 20 10:46:16 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Thu, 20 Dec 2012 10:46:16 +0000 Subject: [rabbitmq-discuss] Change default user and password In-Reply-To: <50D2E853.5030509@rabbitmq.com> References: <50D2E853.5030509@rabbitmq.com> Message-ID: <50D2EC78.30204@rabbitmq.com> On 20/12/12 10:28, Emile Joubert wrote: > Hi Scott, > > On 19/12/12 19:38, Scott White wrote: >> Is the syntax wrong or is it something else? > > That file works fine for me. Are you sure the config file is in the > correct place and being read by all clustered brokers on startup? You > should see a line like this in the startup banner: > > config file(s) : /etc/rabbitmq/rabbitmq.config Also: both the default_user / default_pass and cluster_nodes config items are only read when starting from a completely blank setup - i.e. after a fresh installation or rabbitmqctl reset. But the cluster nodes one will persist. So if the OP set cluster_nodes first, then set default_user / default_pass and restarted, it would not do anything. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From simon at rabbitmq.com Thu Dec 20 12:13:12 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Thu, 20 Dec 2012 12:13:12 +0000 Subject: [rabbitmq-discuss] RabbitMQ sending frames after delivering connection_close_ok In-Reply-To: References: Message-ID: <50D300D8.3000701@rabbitmq.com> On 20/12/12 10:35, Marek Majkowski wrote: > One of the Puka users found that it is possible to > crash Puka. It happens as RabbitMQ seems to > keep on sending frames after connection_close_ok. > > Puka has trouble behaving in such a case. Yes, I've managed to replicate this. However, I would point out that Puka's behaviour in this case is rather odd, so I think some fault lies with both sides. Certainly RabbitMQ should not let itself be provoked into doing this though, so I'll file a bug. Looking at the situation with Wireshark, we see the following sequence of events. Channel numbers in brackets. We have opened the connection and two channels, set confirm mode and published a message on (1) and declared a queue on (2). Then things get odd: Puka -> RabbitMQ (2) basic.qos Puka -> RabbitMQ (3) channel.open Puka -> RabbitMQ (0) connection.close Up until this point Puka is behaving oddly (not waiting for the qos-ok or open-ok before issuing connection.close) but I don't think it's violated the spec. But then: Puka <- RabbitMQ (2) basic.qos-ok Puka -> RabbitMQ (2) basic.consume Puka has now sent basic.consume after connection.close! Puka <- RabbitMQ (0) connection.close-ok Puka <- RabbitMQ (3) channel.open-ok And now RabbitMQ sends connection.close-ok followed by channel.open-ok. That channel.open-ok is... unhelpful at best. > Is it a valid AMQP behaviour? Good question. The spec is quite vague on this - it only says "This method [connection.close-ok] confirms a Connection.Close method and tells the recipient that it is safe to release resources for the connection and close the socket." It does not say that nothing else should be sent! So I am not sure we are outside the *letter* of the spec. But this behaviour is clearly confusing so we will change it. But you should think about whether Puka should be sending normal methods after connection.close too :-) Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From majek04 at gmail.com Thu Dec 20 14:07:29 2012 From: majek04 at gmail.com (Marek Majkowski) Date: Thu, 20 Dec 2012 14:07:29 +0000 Subject: [rabbitmq-discuss] RabbitMQ sending frames after delivering connection_close_ok In-Reply-To: <50D300D8.3000701@rabbitmq.com> References: <50D300D8.3000701@rabbitmq.com> Message-ID: On Thu, Dec 20, 2012 at 12:13 PM, Simon MacMullen wrote: > Puka -> RabbitMQ (2) basic.qos > Puka -> RabbitMQ (3) channel.open > Puka -> RabbitMQ (0) connection.close > > Up until this point Puka is behaving oddly (not waiting for the qos-ok or > open-ok before issuing connection.close) but I don't think it's violated the > spec. But then: > > Puka <- RabbitMQ (2) basic.qos-ok > Puka -> RabbitMQ (2) basic.consume > > Puka has now sent basic.consume after connection.close! > > Puka <- RabbitMQ (0) connection.close-ok > Puka <- RabbitMQ (3) channel.open-ok Simon, thanks for the great investigation! Internally for puka everything is async, everything continues unchanged until connection.close.ok is received. Only then puka cleans up. Obviously issuing basic.consume after sending connection.close makes little sense from protocol perspective, but it's completely valid from puka point of view - user just issued connection.close and did some further actions before waiting for the result. I think my quick workaround will be to just ignore everything rabbit sends after receiving connection.close.ok. Thanks for fixing that on the server side :) Cheers, Marek From simon at rabbitmq.com Thu Dec 20 14:12:26 2012 From: simon at rabbitmq.com (Simon MacMullen) Date: Thu, 20 Dec 2012 14:12:26 +0000 Subject: [rabbitmq-discuss] RabbitMQ sending frames after delivering connection_close_ok In-Reply-To: References: <50D300D8.3000701@rabbitmq.com> Message-ID: <50D31CCA.3080406@rabbitmq.com> On 20/12/12 14:07, Marek Majkowski wrote: > I think my quick workaround will be to just ignore everything rabbit > sends after receiving connection.close.ok. Matthias has pointed out that the spec also says "After sending this method, [connection.close] any received methods except Close and Close?OK MUST be discarded. The response to receiving a Close after sending Close must be to send Close?Ok." So really you should start ignore everything a bit earlier: after sending connection.close. So strictly we are within the spec (we could just start firing random frames at you after that point) - but it's not helpful so we'll still fix it. Cheers, Simon -- Simon MacMullen RabbitMQ, VMware From meyer at paperplanes.de Thu Dec 20 14:48:05 2012 From: meyer at paperplanes.de (Mathias Meyer) Date: Thu, 20 Dec 2012 15:48:05 +0100 Subject: [rabbitmq-discuss] Automating a RabbitMQ 3.0 cluster on EC2 Message-ID: <9882557829464795BC4C6547C54DDED1@paperplanes.de> Hey all, I spent some quality time automating a cluster setup of 3.0.1 on EC2 over the last couple of days, and came across some things that felt a bit odd to me. Maybe I did it all wrong, happy to be proven that I did. I apologize if this turns out a bit long, there are a couple of questions that boil down to a similar issue. Would be curious to hear how other folks have solved this issue, and mostly focussing on RabbitMQ 3.0, as, from what I've read, clustering behaviour has changed with that release. First a whee bit about the setup, nothing special really, but required to clarify some of the questions below: every node has a custom CNAME record rabbitmq1.domain.com, rabbitmq2.domain.com, each pointing to the EC2 host name. I do this because I prefer full hostnames over EC2 hostnames because it adds clarity to the whole setup, at least for me :) The first issue with this setup comes up when you want to change the hostname for the RabbitMQ node. Changing it post-installation is a bit of a hassle because the package already starts up the service. Changing the nodename to the FQDN and trying to restart the service after that leads to errors because the service can't be stopped anymore as the nodenames are now different. I solved this on EC2 by adding domain.com to the DHCP configuration and restarting the network before installing the RabbitMQ package. It's not a great solution, but acceptable. In the end it boils down to the package starting the service immediately on installation, more on that below. The next issue is related to clustering. When RabbitMQ starts up, and there's a cluster_nodes section in the config, it seems to try and reach the nodes only once. This behaviour I'm not sure of, hence the question. I noticed that when a node can't look up any of the nodes in the cluster_nodes config, it won't try again at a later point in time, e.g. on restart. Therefore that node will never automatically join the cluster unless rabbitmqctl join_cluster is called. The DHCP configuration helped solve this issue as well, but I'm still wondering if a) my observation is correct and b) if this is desired behaviour. Should a new node be partitioned from the others only temporarily, when it joins, it requires manual intervention to force it to join the cluster. This somewhat seems to conform to what the documentation says: http://www.rabbitmq.com/clustering.html#auto-config, but I'm not entirely clear on whether a node just gives up trying to form a cluster once it couldn't reach any of the nodes in the cluster_nodes list. So the question boils down to whether the automatic configuration is the way to go or if it makes more sense to automate commands (using Chef, btw) around the join_cluster and cluster_status commands. On top of that, to have a fresh node join the cluster, it needs to be stopped again (stop_app) and reset, which somewhat boils down to the service being started on package installation again. This behaviour seems to also have changed from 2.x where just updating the config and making sure all nodes have the same Erlang cookie is correct, right? So the biggest question is: how do folks work around the fact that the RabbitMQ node is started up on package installation. There's the option to use policy-rc.d systems, but I'm not quite sure how feasible this is to automate. Given that Chef runs every 30 minutes or so, the consequence would be to install a policy on every run or to check on every run whether or not the desired package is already installed. Currently I'm stopping the service after stop_app and reset, before installing the new Erlang cookie. I'm just not sure, it feels a bit weird to automate to me. I'd love for some input or suggestions on this. My current setup is working, and I can add nodes that automatically join the cluster, so it's okay. Just want to make sure it's the right approach, or if there are any other experiences on this. From what I understand there are differences to 2.x cluster setup, where updating the config and changing the Erlang cookie apparently were all that's needed, but that's from my reading of the documentation and existing Chef cookbooks (https://github.com/opscode-cookbooks/rabbitmq). Overall I feel like there's a bit of a lack of documentation on how setting up a cluster can or should be automated. Happy to help improving that situation, but I'd like to sure that the choices described above are sane or completely bullocks. Again, apologies for the long email. I hope the setup, issues and questions are somewhat clear. Please let me know if more input is require, happy to dive into more detail. Thank you for your time, for RabbitMQ clustering, and for any feedback you might have :) Cheers, Mathias -------------- next part -------------- An HTML attachment was scrubbed... URL: From cischmidt77 at gmail.com Thu Dec 20 16:18:36 2012 From: cischmidt77 at gmail.com (Chris Schmidt) Date: Thu, 20 Dec 2012 08:18:36 -0800 Subject: [rabbitmq-discuss] RMQ performance between high MHz/low core vs lower MHz/high core servers Message-ID: I've been given a chance to try a high core server (4x10) as a possible RMQ server and have hit a few throughput issues that I hope someone can help shed some light on. We currently have a decently powered single RMQ server that is running as a standalone node and has RHEL 6.2. It has 12 cores running at 3.4GHz. There are 22 queues, some configured with no-ack, but mostly with acks being used. The message sizes are varied but can get large and we hit about 51k messages/sec throughput through all queues. During the day this system caps out at 63% CPU utilization (13% system) and stays that way until the evening. We are definitely hitting a bottleneck with it. I've tried HiPE in the past, but the system % jumped considerably and we actually got poorer performance and instability. A vendor let us borrow the 40-core machine to see if it would work better. When I switched over to it using the same configuration as the production machine, it capped out at around 12,000 messages/sec. We changed the network card and tweaked MTU to see if that was causing a problem, but it still seems capped. What's odd is I can't determine what is causing the bottleneck on the machine. Each core is only 11-15% utilized. There is no iowait at all. The machine does have a lot more RAM at 256 GB vs 72 GB on the existing hardware. We disabled NUMA in the bios to see if that would change things but we got the same performance. On the producer side that injects the initial data, the logs show it can't push data into the new machine fast enough. There are in-memory queues that store data in case of slow downs and they immediately begin to fill up when pushing to the new machine, whereas it rarely happens with the old one. Are there any other tools that I can use to see why the erlang processes don't seem to be fully utilizing the server's capacity? I know the cores are slower in overall speed, but I would have bet money that in aggregate this machine would outperform our other one. Thanks in advance for any suggestions, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuaner at gmail.com Thu Dec 20 11:14:45 2012 From: wuaner at gmail.com (Spring Amqp User) Date: Thu, 20 Dec 2012 03:14:45 -0800 (PST) Subject: [rabbitmq-discuss] How amqp-client modify & reject(requeue true) a message back to the original queue in rabbit broker? Message-ID: <147b8d62-71c1-4abd-b5f9-99b67f0158d9@googlegroups.com> I am use spring amqp, i have a question: is there a way for the client to modify & reject a received message to rabbit broker? the arguments requeue of basicReject() must set to true, right? my english is not very good, so my question perhaps not very clear, i a pologize. All response will be appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From emile at rabbitmq.com Thu Dec 20 16:37:38 2012 From: emile at rabbitmq.com (Emile Joubert) Date: Thu, 20 Dec 2012 16:37:38 +0000 Subject: [rabbitmq-discuss] How amqp-client modify & reject(requeue true) a message back to the original queue in rabbit broker? In-Reply-To: <147b8d62-71c1-4abd-b5f9-99b67f0158d9@googlegroups.com> References: <147b8d62-71c1-4abd-b5f9-99b67f0158d9@googlegroups.com> Message-ID: <50D33ED2.9070305@rabbitmq.com> Hi, On 20/12/12 11:14, Spring Amqp User wrote: > I am use spring amqp, i have a question: is there a way for the > client to modify & reject a received message to rabbit broker? the > arguments requeue of basicReject() must set to true, right? No it is not possible to modify the message while rejecting with requeue. The closest approximation would be to acknowledge and republish with the modifications. -Emile From eric.berg at pardot.com Thu Dec 20 17:02:44 2012 From: eric.berg at pardot.com (Eric Berg) Date: Thu, 20 Dec 2012 12:02:44 -0500 Subject: [rabbitmq-discuss] Exchange to Exchange Binding Apache/PHP AMQP- PECL 1.0.9/1.0.7 Message-ID: Hi, I am setting up a Rabbit connection in my php application code and binding one exchange to another for a rich topology. However the $exchange->bind() call blocks and my server hangs. The exchanges are created correctly and the binding is successful, but the call never returns. Has anyone run into this before? Thanks for the help Side notes: If I pass in the AMQP_NOWAIT flag to the bind method doesnt block, but the binding does not succeed. This works correctly through the CLI, but not in apache Are there any known modules/issues with apache that might cause this? Versions: Rabbit 3.0.0 AMQP- PECL 1.0.9 and 1.0.7 (tried both) PHP 5.3.13 Apache 2.2.3 ** My code" $connection = new AMQPConnection(); $connection->connect(); if (!$connection->isConnected()) { die('Not connected :(' . PHP_EOL); } // Open Channel $channel = new AMQPChannel($connection); // Declare exchange $exchange1 = new AMQPExchange($channel); $exchange1->setName('master'); $exchange1->setType('topic'); $exchange1->declare(); $exchange = new AMQPExchange($channel); $exchange->setName('exchange1'); $exchange->setType('topic'); $exchange->declare(); $exchange->bind('master', 'routing_key'); // Never gets here -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Thu Dec 20 17:07:29 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Thu, 20 Dec 2012 17:07:29 +0000 Subject: [rabbitmq-discuss] RMQ performance between high MHz/low core vs lower MHz/high core servers In-Reply-To: References: Message-ID: <50D345D1.3060102@rabbitmq.com> Chris, On 20/12/12 16:18, Chris Schmidt wrote: > There are 22 queues > [...] > A vendor let us borrow the 40-core machine to see if it would work > better. [...] Each core is only 11-15% utilized. You may not be able to saturate 40 cores with 22 queues. Depends on how many producers and consumers there are. The other constraint could be scheduling and general Erlang multi-core performance. This has improved *considerably* over the last few years. So please make sure you are running the latest Erlang/OTP release - R15B03. You may also want to tweak the various smp/scheduling related settings in Erlang. In particular I have seen massive performance differences when adjusting the +swt setting. > I've tried HiPE in the past, but the system % jumped considerably > and we actually got poorer performance and instability. That's odd. Again, please make sure you are runninng the latest Erlang; HiPE is another area that has improved considerably recently. > I know the cores are slower in overall speed, but I would have bet > money that in aggregate this machine would outperform our other one. Depends on the workload. e.g. if queues are the bottleneck then having many more (slow) cores than queues won't help. Regards, Matthias. From cischmidt77 at gmail.com Thu Dec 20 17:27:39 2012 From: cischmidt77 at gmail.com (Chris Schmidt) Date: Thu, 20 Dec 2012 09:27:39 -0800 Subject: [rabbitmq-discuss] RMQ performance between high MHz/low core vs lower MHz/high core servers In-Reply-To: <50D345D1.3060102@rabbitmq.com> References: <50D345D1.3060102@rabbitmq.com> Message-ID: <91DCE58C-EB72-4556-AE70-4AD8B0F7AFBE@gmail.com> Hello, On Dec 20, 2012, at 9:07 AM, Matthias Radestock wrote: > Chris, > > On 20/12/12 16:18, Chris Schmidt wrote: >> There are 22 queues > > [...] >> A vendor let us borrow the 40-core machine to see if it would work >> better. [...] Each core is only 11-15% utilized. > > You may not be able to saturate 40 cores with 22 queues. Depends on how many producers and consumers there are. > > The other constraint could be scheduling and general Erlang multi-core performance. This has improved *considerably* over the last few years. So please make sure you are running the latest Erlang/OTP release - R15B03. > > You may also want to tweak the various smp/scheduling related settings in Erlang. In particular I have seen massive performance differences when adjusting the +swt setting. > RHEL 6.2 doesn't seem to have the latest version of Erlang available in the repositories. Does anyone have experience with manually building Erlang on that platform with success? We're on R14B04 right now. There are a huge number of erlang related rpms that get installed I'm not certain if a single Erlang version for CentOS would work properly or not. I had +K true -smp enable +native +sbtps plus the other RMQ defaults set on the 40 core machine while testing. I also removed everything to use plain vanilla RMQ settings to see how that impacted performance. I also had 15 consumers running against the initial queue that was having problems. I also tried sending the data into 2 - 40 exchanges (and updated the queue to read from those exchanges) in order to see if I could spread the load that way. Does a single process manage each queue? If so I can see that being a potential bottleneck due to the core's speed difference. Is there an erlang or rabbitmqctl command that I can run against the RMQ server to determine if the queues themselves are the bottleneck? >> I've tried HiPE in the past, but the system % jumped considerably >> and we actually got poorer performance and instability. > > That's odd. Again, please make sure you are runninng the latest Erlang; HiPE is another area that has improved considerably recently. I'd definitely like to try HiPE again since we're CPU bound on the existing production server. > >> I know the cores are slower in overall speed, but I would have bet >> money that in aggregate this machine would outperform our other one. > > Depends on the workload. e.g. if queues are the bottleneck then having many more (slow) cores than queues won't help. > > Regards, > > Matthias. I appreciate the pointers, thanks Matthias! From eric.berg at pardot.com Thu Dec 20 17:49:07 2012 From: eric.berg at pardot.com (Eric Berg) Date: Thu, 20 Dec 2012 12:49:07 -0500 Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 and PECL AMQP package problems In-Reply-To: <50BDBCCB.2050905@rabbitmq.com> References: <50BDBCCB.2050905@rabbitmq.com> Message-ID: Hi Matthias, My logs say only this: =INFO REPORT==== 20-Dec-2012::12:46:10 === accepting AMQP connection <0.5197.0> (ip_address:port -> ip_address:port) No other logs were written to at this time. On Tue, Dec 4, 2012 at 4:05 AM, Matthias Radestock wrote: > Eric, > > > On 03/12/12 18:55, Eric Berg wrote: > >> I was sailing smoothly on RabbitMQ 2.8.7 using the newest PECL AMQP >> package 1.0.9. However a recent upgrade to RabbitMQ 3.0.0 has caused >> some problems with PECL AMQP 1.0.9. I am able to connect and bind one >> exchange to another successfully, however the bind method throws an >> exception, even though it has been successful. >> > > There haven't been any changes to the protocol or how RabbitMQ handles it > between 2.8.7 and 3.0.0, so the difference in behaviour you are seeing is a > little odd. > > > I get an AMQPExchangeException with message "Library error: Resource >> temporarily unavailable" >> > > What do the server logs say? > > Regards, > > Matthias. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From toby.corkindale at strategicdata.com.au Fri Dec 21 00:41:44 2012 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Fri, 21 Dec 2012 11:41:44 +1100 Subject: [rabbitmq-discuss] 3.0.1 STOMP bug - reply-to header Message-ID: <50D3B048.6020803@strategicdata.com.au> Hi, When testing against RabbitMQ 3.0.1, we're seeing what looks like a bug and regression compared to the last 2.9 version. The stomp adapter is turning a reply-to header for a topic queue into a temp queue. Eg, the reply queue name is getting munged from /topic/foo.export.pid to /reply-queue//topic/foo.export.pid I haven't investigated further and am about to go on leave for a couple of weeks, but wanted to mention it. cheers, Toby From wuaner at gmail.com Fri Dec 21 02:02:46 2012 From: wuaner at gmail.com (javaLee) Date: Fri, 21 Dec 2012 10:02:46 +0800 Subject: [rabbitmq-discuss] How amqp-client modify & reject(requeue true) a message back to the original queue in rabbit broker? In-Reply-To: <50D33ED2.9070305@rabbitmq.com> References: <147b8d62-71c1-4abd-b5f9-99b67f0158d9@googlegroups.com> <50D33ED2.9070305@rabbitmq.com> Message-ID: Thanks for reply, Emile. I really need the requeue function, because on client side i want do some retry operation with spring-retry. if max-retry-count is exhausted & the message is still not be processing appropriately, i will not requeue it (to the original queue) any more & put it to the dead-letter-exchange. But before put it to the DLX, i really want add some error-description to this message, So another consumer that listening to the DLX can retrieve & analysis & process it according to the error-description, that's why i want modify message before reject it. *M**y understanding*: Queue in rabbitmq broker will never drop the unacknowledged message before client ack-or-reject it, ack-or-reject-operationing on the client side do not need resend the message to rabbitmq broker, that's why client side cannot modify the message, is that true? On Fri, Dec 21, 2012 at 12:37 AM, Emile Joubert wrote: > Hi, > > On 20/12/12 11:14, Spring Amqp User wrote: > > I am use spring amqp, i have a question: is there a way for the > > client to modify & reject a received message to rabbit broker? the > > arguments requeue of basicReject() must set to true, right? > > > No it is not possible to modify the message while rejecting with > requeue. The closest approximation would be to acknowledge and republish > with the modifications. > > > -Emile > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From psl88506 at gmail.com Fri Dec 21 04:43:00 2012 From: psl88506 at gmail.com (PSL 88506) Date: Fri, 21 Dec 2012 10:13:00 +0530 Subject: [rabbitmq-discuss] Node Resilency In-Reply-To: References: Message-ID: can some please help me in responding to the below issue. On Thu, Dec 20, 2012 at 4:12 PM, PSL 88506 wrote: > We are using RabbitMQ in our application. > We encountered problem last week in production. > > We have 5 server - clustered and no load balancer is used. > Suddenly over console when we opened RabbitServer-1, It is showing > RabbitServer-2,3,4,5 in red, Not Running and RabbitServer-1 is Running. > When RabbitServer-2 console is opened, it showed that RabbitServer-2 is > Running and other is Red and Not Running. > It is same for all 5 server. > > We understood that cluster was broken. Please let us know if there could > be any other issues. Also our team has raised request to Network team to > know if any network flucuations happened. > > Hence we decided to handle node failure to ensure node resiliency. > > Could you please help in throwing some light on how to ensure node > resiliency. > > Please help. > > Thanks in advance. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simlu at su.se Fri Dec 21 09:40:05 2012 From: simlu at su.se (Simon =?iso-8859-1?Q?Lundstr=F6m?=) Date: Fri, 21 Dec 2012 10:40:05 +0100 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <8D205910-A3E3-472D-A7AA-8D5737812DC4@rabbitmq.com> References: <20121205134204.GK335@kaka.it.su.se> <24509631-CA1C-4A55-8E66-87E11E4E5D83@rabbitmq.com> <20121205155530.GL335@kaka.it.su.se> <20121211162045.GE754@kaka.it.su.se> <20121211193803.GG754@kaka.it.su.se> <4D859580-D762-4BFA-A759-43F94B500FC7@rabbitmq.com> <20121212093115.GH754@kaka.it.su.se> <8D205910-A3E3-472D-A7AA-8D5737812DC4@rabbitmq.com> Message-ID: <20121221093949.GA14329@kaka.it.su.se> No worries, I'm on holiday and paternity leave until end of january. Happy holidays! - Simon On Fri, 2012-12-14 at 19:28:24 +0000, Tim Watson wrote: > Sorry I haven't managed to look at this yet. I will take a look at some point soon and see if I can debug the problem though. From matthias.reik at gmail.com Fri Dec 21 10:03:54 2012 From: matthias.reik at gmail.com (Matthias Reik) Date: Fri, 21 Dec 2012 11:03:54 +0100 Subject: [rabbitmq-discuss] RMQ performance between high MHz/low core vs lower MHz/high core servers In-Reply-To: <91DCE58C-EB72-4556-AE70-4AD8B0F7AFBE@gmail.com> References: <50D345D1.3060102@rabbitmq.com> <91DCE58C-EB72-4556-AE70-4AD8B0F7AFBE@gmail.com> Message-ID: One thing we found out is that disk-IO is the bottleneck in our setup (most queues are ACK-ed, HA- queues). Our solutions: 1) batching of messages improved performance (message size bigger, but less messages) 2) Faster disks (10k spinners RAIDed) improved performance So make sure you also look at that part of the system. Cheers Maze On Thu, Dec 20, 2012 at 6:27 PM, Chris Schmidt wrote: > Hello, > > On Dec 20, 2012, at 9:07 AM, Matthias Radestock > wrote: > > > Chris, > > > > On 20/12/12 16:18, Chris Schmidt wrote: > >> There are 22 queues > > > [...] > >> A vendor let us borrow the 40-core machine to see if it would work > >> better. [...] Each core is only 11-15% utilized. > > > > You may not be able to saturate 40 cores with 22 queues. Depends on how > many producers and consumers there are. > > > > The other constraint could be scheduling and general Erlang multi-core > performance. This has improved *considerably* over the last few years. So > please make sure you are running the latest Erlang/OTP release - R15B03. > > > > You may also want to tweak the various smp/scheduling related settings > in Erlang. In particular I have seen massive performance differences when > adjusting the +swt setting. > > > > RHEL 6.2 doesn't seem to have the latest version of Erlang available in > the repositories. Does anyone have experience with manually building Erlang > on that platform with success? We're on R14B04 right now. There are a huge > number of erlang related rpms that get installed I'm not certain if a > single Erlang version for CentOS would work properly or not. > > I had +K true -smp enable +native +sbtps plus the other RMQ defaults set > on the 40 core machine while testing. I also removed everything to use > plain vanilla RMQ settings to see how that impacted performance. > > I also had 15 consumers running against the initial queue that was having > problems. I also tried sending the data into 2 - 40 exchanges (and updated > the queue to read from those exchanges) in order to see if I could spread > the load that way. Does a single process manage each queue? If so I can see > that being a potential bottleneck due to the core's speed difference. > > Is there an erlang or rabbitmqctl command that I can run against the RMQ > server to determine if the queues themselves are the bottleneck? > > >> I've tried HiPE in the past, but the system % jumped considerably > >> and we actually got poorer performance and instability. > > > > That's odd. Again, please make sure you are runninng the latest Erlang; > HiPE is another area that has improved considerably recently. > > I'd definitely like to try HiPE again since we're CPU bound on the > existing production server. > > > >> I know the cores are slower in overall speed, but I would have bet > >> money that in aggregate this machine would outperform our other one. > > > > Depends on the workload. e.g. if queues are the bottleneck then having > many more (slow) cores than queues won't help. > > > > Regards, > > > > Matthias. > > I appreciate the pointers, thanks Matthias! > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wayne at prjatk.com Thu Dec 20 16:39:18 2012 From: wayne at prjatk.com (Wayne Douglas) Date: Thu, 20 Dec 2012 16:39:18 +0000 Subject: [rabbitmq-discuss] unsubscribe Message-ID: -- *--------------------* * * *w://* * * *t: 07525424882* * * *--------------------* -------------- next part -------------- An HTML attachment was scrubbed... URL: From tommy.odom at gmail.com Thu Dec 20 16:49:37 2012 From: tommy.odom at gmail.com (Tommy Odom) Date: Thu, 20 Dec 2012 08:49:37 -0800 (PST) Subject: [rabbitmq-discuss] rabbitmq-plugins not working as root user Message-ID: Hi all, Just installed rabbitmq-server on Ubuntu 12.04 using the latest 3.0.1 package and I am running into a problem running the rabbitmq-plugins list/enable commands. I have 3.0.0 installed on a separate server as well and it seems to be working correctly for me. When I run "sudo rabbitmq-plugins list" I get an error "Failed to create cookie file". I looked at the /usr/sbin/rabbitmq-plugins script and I see that it has some logic for determining when to su over to the rabbitmq user so I tried explicitly running "sudo su rabbitmq -s /bin/sh -c "/usr/lib/rabbitmq/bin/rabbitmq-plugins list" and that worked correctly. The rabbitmq-server is running and the /var/lib/rabbitmq directory is owned by rabbitmq user and does have a .erlang.cookie file present. However, when I try to run rabbitmq-plugins as the rabbitmq user to enable a plugin I get an error that it can't write the /etc/rabbitmq/enabled_plugins file because the /etc/rabbitmq directory is owned by root. I verified that on my 3.0.0 server I am able to run "sudo /usr/lib/rabbitmq/bin/rabbitmq-plugins list" directly w/o the su to the rabbitmq user. Any ideas? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmqjava1a at yahoo.com Thu Dec 20 18:55:53 2012 From: rmqjava1a at yahoo.com (CJ) Date: Thu, 20 Dec 2012 10:55:53 -0800 (PST) Subject: [rabbitmq-discuss] Cathing broker shut down in a consumer Message-ID: <180f3c43-23a6-4f5c-8466-a10c950c363d@googlegroups.com> I need to write an exception in the case of a broker shutdown to end my programs gracefully In the Sender, I used the following code successfully: while ( numMsgs < maxMsgs ) { try { channel.basicPublish( exchange, queueName, (persistEnabled) ? MessageProperties.PERSISTENT_TEXT_PLAIN : null, message.getBytes()); } catch (Exception ex) { System.out.println("--- Connection Broken ---"); } This catches the IOException and termiates gracefully on the Sender. I can NOT do this on the consumer, where I get the following error once the broker is shut down I do not seem to be able to catch the problem of the broker coming down in the consumer. I use the following code on the nextDelivery catch (ShutdownSignalException ex) { System.out.println("--- Broker Shut Down ---"); } catch (Exception ex) { System.out.println("--- Broker Shut Down ---"); } But I get the following error: Exception in thread "main" com.rabbitmq.client.ShutdownSignalException: connecti on error; reason: {#method(reply-code=320, reply-text=CONNECTI ON_FORCED - broker forced connection closure with reason 'shutdown', class-id=0, method-id=0), null, ""} at com.rabbitmq.client.QueueingConsumer.handle(QueueingConsumer.java:198 ) at com.rabbitmq.client.QueueingConsumer.nextDelivery(QueueingConsumer.ja va:227) at Recv.main(Recv.java:50) Does Rabbit support catching broken connections in the consumer ? How can I do this ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From psl88506 at gmail.com Fri Dec 21 10:19:02 2012 From: psl88506 at gmail.com (PSL 88506) Date: Fri, 21 Dec 2012 15:49:02 +0530 Subject: [rabbitmq-discuss] Dangling Connection Message-ID: Hi, We have 2 instances running on the same Server (running on same IP address). Hence each instance will be connect to RabbitMQ and will establish multiple connections Say Suppose, For Server-1 with IP address: xx.xx.xx.xx. Instance-1 establishes 10 RabbitMQ connections(IC10, IC11, IC12....IC19) and Instance-2 established 10 RabbitMQ connections(IC20, IC21, IC22....IC29). Is there any way to identify dangling connections(connection is idle) and for which instance that dangling connection belongs to ? Someone please respond. -------------- next part -------------- An HTML attachment was scrubbed... URL: From psl88506 at gmail.com Fri Dec 21 10:19:15 2012 From: psl88506 at gmail.com (PSL 88506) Date: Fri, 21 Dec 2012 15:49:15 +0530 Subject: [rabbitmq-discuss] Enable Heartbeat Message-ID: Hi, If we enable heartbeat, can we ensure that there would not be any dangling connections. If connection is idle for some time (say no consumer exists), Will enabling heartbeat takes care of closing the connections after some period of time? Someone please respond. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Fri Dec 21 10:20:58 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 21 Dec 2012 10:20:58 +0000 Subject: [rabbitmq-discuss] Node Resilency In-Reply-To: References: Message-ID: <46AF2430-195E-4AE2-A985-8F74947A6F86@rabbitmq.com> Hi On 20 Dec 2012, at 10:42, PSL 88506 wrote: > We are using RabbitMQ in our application. > We encountered problem last week in production. > > We have 5 server - clustered and no load balancer is used. > Suddenly over console when we opened RabbitServer-1, It is showing RabbitServer-2,3,4,5 in red, Not Running and RabbitServer-1 is Running. > When RabbitServer-2 console is opened, it showed that RabbitServer-2 is Running and other is Red and Not Running. > It is same for all 5 server. > > We understood that cluster was broken. Please let us know if there could be any other issues. Also our team has raised request to Network team to know if any network flucuations happened. > If the other nodes are showing up in red, then they're definitely inaccessible. This could be down to network interruptions. I'm afraid I can't suggest what might be wrong just on the basis of red lights in the 'console' - I assume you're talking about the management web interface here? > Hence we decided to handle node failure to ensure node resiliency. > > Could you please help in throwing some light on how to ensure node resiliency. > There are a great number of factors to take into account when planning this sort of thing. The *most* important factor when using rabbit in a cluster, is to ensure you don't encounter any net-split, as rabbit doesn't handle these well. I have no idea why your nodes became unable to see one another, but if you post the logs (or a subset of them) somewhere then we can take a look. If you can identify why the nodes got disconnected, it would help figure out how to guard against this in future. Tim From tim at rabbitmq.com Fri Dec 21 10:21:28 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 21 Dec 2012 10:21:28 +0000 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <20121221093949.GA14329@kaka.it.su.se> References: <20121205134204.GK335@kaka.it.su.se> <24509631-CA1C-4A55-8E66-87E11E4E5D83@rabbitmq.com> <20121205155530.GL335@kaka.it.su.se> <20121211162045.GE754@kaka.it.su.se> <20121211193803.GG754@kaka.it.su.se> <4D859580-D762-4BFA-A759-43F94B500FC7@rabbitmq.com> <20121212093115.GH754@kaka.it.su.se> <8D205910-A3E3-472D-A7AA-8D5737812DC4@rabbitmq.com> <20121221093949.GA14329@kaka.it.su.se> Message-ID: <53443B9F-8877-4993-9732-35F417AE04F0@rabbitmq.com> On 21 Dec 2012, at 09:40, Simon Lundstr?m wrote: > No worries, I'm on holiday and paternity leave until end of january. > Great, because I'm not likely to spend much time on it for next couple of week either! :) > Happy holidays! You too! > - Simon > > On Fri, 2012-12-14 at 19:28:24 +0000, Tim Watson wrote: >> Sorry I haven't managed to look at this yet. I will take a look at some point soon and see if I can debug the problem though. > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From tim at rabbitmq.com Fri Dec 21 10:24:56 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 21 Dec 2012 10:24:56 +0000 Subject: [rabbitmq-discuss] Dangling Connection In-Reply-To: References: Message-ID: Hi On 21 Dec 2012, at 10:19, PSL 88506 wrote: > Hi, > > We have 2 instances running on the same Server (running on same IP address). > Hence each instance will be connect to RabbitMQ and will establish multiple connections > > Say Suppose, > For Server-1 with IP address: xx.xx.xx.xx. > Instance-1 establishes 10 RabbitMQ connections(IC10, IC11, IC12....IC19) and Instance-2 established 10 RabbitMQ connections(IC20, IC21, IC22....IC29). > I'm afraid I really don't understand your question. Instances of what!? Are you saying two client instances connecting to one broker? Or something else? > Is there any way to identify dangling connections(connection is idle) and for which instance that dangling connection belongs to ? > The management web interface provides a view of active connections. I don't think that the information there will tell you about when the connection last did much useful however. What do you mean by 'dangling' connections? From tim at rabbitmq.com Fri Dec 21 10:31:03 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 21 Dec 2012 10:31:03 +0000 Subject: [rabbitmq-discuss] Enable Heartbeat In-Reply-To: References: Message-ID: <81F6C642-B1C0-483D-A3BC-639CCFB25BAA@rabbitmq.com> On 21 Dec 2012, at 10:19, PSL 88506 wrote: > Hi, > > If we enable heartbeat, can we ensure that there would not be any dangling connections. > > If connection is idle for some time (say no consumer exists), Will enabling heartbeat takes care of closing the connections after some period of time? > If the connection is idle, but still connected, then heartbeats will not close the connection. Heartbeats will ensure that if a connection 'goes away' it will be noticed within some time frame, much like TCP keep-alive though with the added benefit that both ends knows about the other away and the broker can therefore tear down resources as soon as possible. If you want your consumer to drop connections when it's not doing anything then make it disconnect when it's finished consuming!? From tim at rabbitmq.com Fri Dec 21 10:37:23 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 21 Dec 2012 10:37:23 +0000 Subject: [rabbitmq-discuss] rabbitmq-plugins not working as root user In-Reply-To: References: Message-ID: <65462837-8AA9-4E7A-B6B4-CA349F82A874@rabbitmq.com> I haven't been able to reproduce into this problem yet. Did you have a previous version installed on this machine? On 20 Dec 2012, at 16:49, Tommy Odom wrote: > Hi all, > > Just installed rabbitmq-server on Ubuntu 12.04 using the latest 3.0.1 package and I am running into a problem running the rabbitmq-plugins list/enable commands. I have 3.0.0 installed on a separate server as well and it seems to be working correctly for me. > > When I run "sudo rabbitmq-plugins list" I get an error "Failed to create cookie file". I looked at the /usr/sbin/rabbitmq-plugins script and I see that it has some logic for determining when to su over to the rabbitmq user so I tried explicitly running "sudo su rabbitmq -s /bin/sh -c "/usr/lib/rabbitmq/bin/rabbitmq-plugins list" and that worked correctly. The rabbitmq-server is running and the /var/lib/rabbitmq directory is owned by rabbitmq user and does have a .erlang.cookie file present. > > However, when I try to run rabbitmq-plugins as the rabbitmq user to enable a plugin I get an error that it can't write the /etc/rabbitmq/enabled_plugins file because the /etc/rabbitmq directory is owned by root. > Yeah you should be running just with sudo and nothing else should be necessary. Did you customise any environment setup post-install? > I verified that on my 3.0.0 server I am able to run "sudo /usr/lib/rabbitmq/bin/rabbitmq-plugins list" directly w/o the su to the rabbitmq user. > > Any ideas? > I'll try a clean install on 12.04 and see if I can reproduce the problem. From psl88506 at gmail.com Fri Dec 21 10:43:24 2012 From: psl88506 at gmail.com (PSL 88506) Date: Fri, 21 Dec 2012 16:13:24 +0530 Subject: [rabbitmq-discuss] Dangling Connection In-Reply-To: References: Message-ID: I'm afraid I really don't understand your question. Instances of what!? Are you saying two client instances connecting to one broker? Or something else? - 2 client instances running on same server connection to different RabbitMQ brokers. Dangling Connection means idle connection not used for very long time. Say suppose, client is stopped abruptly and server is not informed, such connection should not exist. Is there any way to handle such connection i.e remove them. since we have 2 instances we are also unable to identify which connection belongs to which instance and how long it is not accessible. Please respond, please let me know if any information is required. On Fri, Dec 21, 2012 at 3:54 PM, Tim Watson wrote: > Hi > > On 21 Dec 2012, at 10:19, PSL 88506 wrote: > > > Hi, > > > > We have 2 instances running on the same Server (running on same IP > address). > > Hence each instance will be connect to RabbitMQ and will establish > multiple connections > > > > Say Suppose, > > For Server-1 with IP address: xx.xx.xx.xx. > > Instance-1 establishes 10 RabbitMQ connections(IC10, IC11, IC12....IC19) > and Instance-2 established 10 RabbitMQ connections(IC20, IC21, > IC22....IC29). > > > > I'm afraid I really don't understand your question. Instances of what!? > Are you saying two client instances connecting to one broker? Or something > else? > > > Is there any way to identify dangling connections(connection is idle) > and for which instance that dangling connection belongs to ? > > > > The management web interface provides a view of active connections. I > don't think that the information there will tell you about when the > connection last did much useful however. What do you mean by 'dangling' > connections? > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Petr.Gotthard at Honeywell.com Fri Dec 21 10:43:46 2012 From: Petr.Gotthard at Honeywell.com (Gotthard, Petr) Date: Fri, 21 Dec 2012 10:43:46 +0000 Subject: [rabbitmq-discuss] Minor troubles with rabbitmq-management-visualiser plugin in 3.0.1 Message-ID: [Let me resend this question. Some people replied to my original e-mail just to ask another question, so I think my question might have disappeared from your tracking system.] Hello, In the rabbitmq 3.0.1 (1) The visualizer still asks for HTTP authentication, while the whole web management uses a new log-in dialog. This means that I need to log-in twice: once using the log-in dialog (to enter the web management) and then for the second time when I enter the visualizer. (2) The visualizer now doesn't display the RabbitMQ logo. Problem is that the logo is (well, used to be) the only way how to leave the visualization screen and switch to another web management screen. Is it a bug or a feature? ;-) Based on what I have seen in Github, the rabbitmq-management-visualiser have not been updated in 3.0. Could this be the problem? (I'm using Firefox 17.0.1) Regards, Petr -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Fri Dec 21 10:46:02 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 21 Dec 2012 10:46:02 +0000 Subject: [rabbitmq-discuss] rabbitmq-plugins not working as root user In-Reply-To: <65462837-8AA9-4E7A-B6B4-CA349F82A874@rabbitmq.com> References: <65462837-8AA9-4E7A-B6B4-CA349F82A874@rabbitmq.com> Message-ID: <5BB80E37-6D43-4F41-8CA4-87CB1D51BAC7@rabbitmq.com> On 21 Dec 2012, at 10:37, Tim Watson wrote: > > I'll try a clean install on 12.04 and see if I can reproduce the problem. Well I actually removed an old version and installed 3.0.1 as well as trying a fresh install and that was fine too. Please confirm whether or not your environment has been customised at all. From tim at rabbitmq.com Fri Dec 21 10:53:42 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 21 Dec 2012 10:53:42 +0000 Subject: [rabbitmq-discuss] Dangling Connection In-Reply-To: References: Message-ID: <48782174-5F4B-4C9C-81EC-24459014B8B3@rabbitmq.com> On 21 Dec 2012, at 10:43, PSL 88506 wrote: > 2 client instances running on same server connection to different RabbitMQ brokers. > That's not possible. You've either not explained clearly, or you've fundamentally misunderstood. "2 client instances running on [the] same server, *connected* to differed RabbitMQ brokers" would be fine, but 2 clients cannot share one connection to two different brokers. So should I assume you mean the former? > Dangling Connection means idle connection not used for very long time. > Say suppose, client is stopped abruptly and server is not informed, such connection should not exist. Is there any way to handle such connection i.e remove them. If a client stops abruptly, then the connection will drop. It's certainly true that TCP/IP can take quite a long time to notice this and inform the broker! That is *exactly* what heartbeats are there for, so that after some shorter time interval, the broker will notice that there have been no heartbeats and therefore tear down the socket and release any server allocated resources. So yes, use heartbeats to ensure that connection state gets cleaned up in a timely fashion. From tim at rabbitmq.com Fri Dec 21 10:57:18 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 21 Dec 2012 10:57:18 +0000 Subject: [rabbitmq-discuss] Minor troubles with rabbitmq-management-visualiser plugin in 3.0.1 In-Reply-To: References: Message-ID: <036624CA-6121-4BF4-93C2-F24794CE8064@rabbitmq.com> Hi Petr On 21 Dec 2012, at 10:43, Gotthard, Petr wrote: > [Let me resend this question. Some people replied to my original e-mail just to ask another question, so I think my question might have disappeared from your tracking system.] > > Hello, > In the rabbitmq 3.0.1 > > (1) The visualizer still asks for HTTP authentication, while the whole web management uses a new log-in dialog. This means that I need to log-in twice: once using the log-in dialog (to enter the web management) and then for the second time when I enter the visualizer. That looks like an oversight on our part. Certainly I don't see any commits in the history indicating that the visualiser was worked on between 2.8.7 and 3.0.1. I'll file a bug to look into this. > > (2) The visualizer now doesn?t display the RabbitMQ logo. Problem is that the logo is (well, used to be) the only way how to leave the visualization screen and switch to another web management screen. Is it a bug or a feature? ;-) He he - I guess it's probably not a feature eh!? I'll file a bug to look into that too. > > Based on what I have seen in Github, the rabbitmq-management-visualiser have not been updated in 3.0. Could this be the problem? > (I?m using Firefox 17.0.1) Sounds like it. Thanks for reporting this! Cheers, Tim From psl88506 at gmail.com Fri Dec 21 11:37:25 2012 From: psl88506 at gmail.com (PSL 88506) Date: Fri, 21 Dec 2012 17:07:25 +0530 Subject: [rabbitmq-discuss] Dangling Connection In-Reply-To: <48782174-5F4B-4C9C-81EC-24459014B8B3@rabbitmq.com> References: <48782174-5F4B-4C9C-81EC-24459014B8B3@rabbitmq.com> Message-ID: I'm very sorry, It is typo - It is not connection , Its connected. I apologize , please consider your former comment - "2 client instances running on [the] same server, *connected* to differed RabbitMQ brokers" I'm very sorry for confusing. Thank you very much for your reply. This is helping us a lot. One more clarification: We have connection pool at client side, and If a graceful shutdown is done for server (RabbitMQ) or server(RabbitMQ) is stopped abruptly - In both scenarios can we ensure that heartbeat with close all connections. On Fri, Dec 21, 2012 at 4:23 PM, Tim Watson wrote: > On 21 Dec 2012, at 10:43, PSL 88506 wrote: > > > 2 client instances running on same server connection to different > RabbitMQ brokers. > > > > That's not possible. You've either not explained clearly, or you've > fundamentally misunderstood. "2 client instances running on [the] same > server, *connected* to differed RabbitMQ brokers" would be fine, but 2 > clients cannot share one connection to two different brokers. So should I > assume you mean the former? > > > Dangling Connection means idle connection not used for very long time. > > Say suppose, client is stopped abruptly and server is not informed, such > connection should not exist. Is there any way to handle such connection i.e > remove them. > > If a client stops abruptly, then the connection will drop. It's certainly > true that TCP/IP can take quite a long time to notice this and inform the > broker! That is *exactly* what heartbeats are there for, so that after some > shorter time interval, the broker will notice that there have been no > heartbeats and therefore tear down the socket and release any server > allocated resources. So yes, use heartbeats to ensure that connection state > gets cleaned up in a timely fashion. > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From psl88506 at gmail.com Fri Dec 21 11:43:27 2012 From: psl88506 at gmail.com (PSL 88506) Date: Fri, 21 Dec 2012 17:13:27 +0530 Subject: [rabbitmq-discuss] Node Resilency In-Reply-To: <46AF2430-195E-4AE2-A985-8F74947A6F86@rabbitmq.com> References: <46AF2430-195E-4AE2-A985-8F74947A6F86@rabbitmq.com> Message-ID: Thank you very much for your response. In the below mail - console means the management web interface. Is there any way to restore the cluster without disturbing the operational nodes i.e nodes which would be running. We do not want to restart the nodes and cluster them, please suggest if there is any way to cluster them back. On Fri, Dec 21, 2012 at 3:50 PM, Tim Watson wrote: > is to ensure you don't encounter any net-split -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Fri Dec 21 12:06:21 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 21 Dec 2012 12:06:21 +0000 Subject: [rabbitmq-discuss] Cathing broker shut down in a consumer In-Reply-To: <180f3c43-23a6-4f5c-8466-a10c950c363d@googlegroups.com> References: <180f3c43-23a6-4f5c-8466-a10c950c363d@googlegroups.com> Message-ID: On 20 Dec 2012, at 18:55, CJ wrote: > I do not seem to be able to catch the problem of the broker coming down in > the consumer. I use the following code on the nextDelivery > > catch (ShutdownSignalException ex) { > System.out.println("--- Broker Shut Down ---"); > } > catch (Exception ex) { > System.out.println("--- Broker Shut Down ---"); > } > > But I get the following error: > > Exception in thread "main" com.rabbitmq.client.ShutdownSignalException: connecti > on error; reason: {#method(reply-code=320, reply-text=CONNECTI > ON_FORCED - broker forced connection closure with reason 'shutdown', class-id=0, > method-id=0), null, ""} > at com.rabbitmq.client.QueueingConsumer.handle(QueueingConsumer.java:198 > ) > at com.rabbitmq.client.QueueingConsumer.nextDelivery(QueueingConsumer.ja > va:227) > at Recv.main(Recv.java:50) > > Does Rabbit support catching broken connections in the consumer ? > Are you sure you're looking at the exception that you think!? More to the point, are you sure it's being thrown in the thread you think you're catching it in? From tim at rabbitmq.com Fri Dec 21 12:07:43 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 21 Dec 2012 12:07:43 +0000 Subject: [rabbitmq-discuss] Node Resilency In-Reply-To: References: <46AF2430-195E-4AE2-A985-8F74947A6F86@rabbitmq.com> Message-ID: What version of rabbit are they running? If they're able to communicate and have been previously clustered then you don't need to cluster them again, though you may need to perform recovery by shutting them down and restarting them so they can re-establish themselves. On 21 Dec 2012, at 11:43, PSL 88506 wrote: > Thank you very much for your response. > > In the below mail - console means the management web interface. > > Is there any way to restore the cluster without disturbing the operational nodes i.e nodes which would be running. > > We do not want to restart the nodes and cluster them, please suggest if there is any way to cluster them back. > > On Fri, Dec 21, 2012 at 3:50 PM, Tim Watson wrote: > is to ensure you don't encounter any net-split > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From tim at rabbitmq.com Fri Dec 21 12:18:17 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 21 Dec 2012 12:18:17 +0000 Subject: [rabbitmq-discuss] Dangling Connection In-Reply-To: References: <48782174-5F4B-4C9C-81EC-24459014B8B3@rabbitmq.com> Message-ID: <423A5AE4-574C-45C2-A52D-972ED76A9A50@rabbitmq.com> Hi On 21 Dec 2012, at 11:37, PSL 88506 wrote: > I'm very sorry, It is typo - It is not connection , Its connected. > I apologize , please consider your former comment - "2 client instances running on [the] same server, *connected* to differed RabbitMQ brokers" > > I'm very sorry for confusing. No problem, I just wanted to clarify. > Thank you very much for your reply. This is helping us a lot. > Good - that's why we have the list! :) > One more clarification: > > We have connection pool at client side, and If a graceful shutdown is done for server (RabbitMQ) or server(RabbitMQ) is stopped abruptly - > In both scenarios can we ensure that heartbeat with close all connections. > Yes that will be fine. If you have a client that is connected and you do a graceful shutdown, the broker will notify the client that it's going away. Sometimes, network interruption can mean that the notification to close the connection takes a long time to get to the client (or gets lost altogether if the link disappears). The other scenario is, as you pointed out, an abrupt shutdown where the broker doesn't even send the connection a close notice. The heartbeat implementation on the client side will notice that the broker is not responding to the heartbeat request and will close the socket (and throw an exception). The pool can then decide what to do about those closed connections (attempting to re-establish them or whatever). Hope that helps! Cheers, Tim From tim at rabbitmq.com Fri Dec 21 12:48:14 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 21 Dec 2012 12:48:14 +0000 Subject: [rabbitmq-discuss] 3.0.1 STOMP bug - reply-to header In-Reply-To: <50D3B048.6020803@strategicdata.com.au> References: <50D3B048.6020803@strategicdata.com.au> Message-ID: <0F6BE205-868F-4EA9-B971-22CD71B6C0D5@rabbitmq.com> On 21 Dec 2012, at 00:41, Toby Corkindale wrote: > > I haven't investigated further and am about to go on leave for a couple of weeks, but wanted to mention it. > Thanks for raising it - we'll take a look. From matthias at rabbitmq.com Fri Dec 21 15:04:22 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 21 Dec 2012 15:04:22 +0000 Subject: [rabbitmq-discuss] Minor troubles with rabbitmq-management-visualiser plugin in 3.0.1 In-Reply-To: <036624CA-6121-4BF4-93C2-F24794CE8064@rabbitmq.com> References: <036624CA-6121-4BF4-93C2-F24794CE8064@rabbitmq.com> Message-ID: <50D47A76.3090903@rabbitmq.com> On 21/12/12 10:57, Tim Watson wrote: > On 21 Dec 2012, at 10:43, Gotthard, Petr wrote: >> (1) The visualizer still asks for HTTP authentication > That looks like an oversight on our part. [...] I'll file a bug to > look into this. This is a known problem and there's a bug filed for it already. >> (2) The visualizer now doesn?t display the RabbitMQ logo. Problem >> is that the logo is (well, used to be) the only way how to leave >> the visualization screen and switch to another web management >> screen. Is it a bug or a feature? ;-) > > He he - I guess it's probably not a feature eh!? I'll file a bug to > look into that too. I've tagged this onto the existing bug. Regards, Matthias. From stuff at moesel.net Fri Dec 21 15:20:28 2012 From: stuff at moesel.net (Chris) Date: Fri, 21 Dec 2012 10:20:28 -0500 Subject: [rabbitmq-discuss] Distributing Tasks to Worker Queues Across Federated Exchanges In-Reply-To: References: <50D08770.1090907@rabbitmq.com> Message-ID: Hmmm... I just realized that the proposed configuration of setting things up in a ring will have one other adverse affect (besides weakening HA). If I have the ring setup like this: A --> B --> C --> A... then if B and C both have worker queues for the same type of task, B will tend to get too much preference because it will handle all requests from A and B (since the requests will never go to the AE to route to C)-- whereas the ideal setup would equally distribute requests from A to B and to C. Hmmm... Is there any ongoing work to make RabbitMQ support a feature more like ActiveMQ's network of brokers? In ActiveMQ's network of brokers, I think it truly operates as one logical bus (still giving preference to local consumers)-- which seems more like what I want. (That said, I have heard a few horror stories about ActiveMQ's network of brokers too.) Thanks, Chris On Tue, Dec 18, 2012 at 12:13 PM, Chris wrote: > Hi Simon, > > Thanks for the suggestions. This definitely gets me closer to what I'm > looking for! I didn't know about the alternate-exchange, so that's very > helpful to know (and could be helpful in other scenarios too). The > ring-configuration sounds like it could work too, but then I guess I am > giving up some high availability-- in that a single broken link breaks the > chain and potentially prevents communication to other brokers that are > still running fine. > > Definitely something to think about. Thanks, Simon! > > -Chris > > > On Tue, Dec 18, 2012 at 10:10 AM, Simon MacMullen wrote: > >> On 18/12/12 13:55, Chris wrote: >> >>> I have a federation of brokers (let's say two: A and B). They are >>> federated because they are across WAN, so I know clustering will not >>> work. I would like to setup worker queues so that if I submit a job to >>> an exchange/queue, it will be processed by one and only one consumer >>> across the federated brokers. Ideally, it should also prefer local >>> consumers before going to federated consumers. >>> >>> For example: >>> >>> Broker A: Workers listening on queues with routing keys X & Y >>> Broker B: Workers listening on queues with routing keys Y & Z >>> >>> 1) Submit job with routing key X from Broker A: Should go to Consumer of >>> X on Broker A >>> 2) Submit job with routing key Y from Broker A: Should go ONLY to >>> Consumer of Y on Broker A >>> 3) Submit job with routing key Z from Broker A: Should go to Consumer of >>> Z on Broker A >>> >> >> I think that the alternate-exchange mechanism ( >> http://www.rabbitmq.com/ae.**html ) >> might help you here. Publish to a non-federated direct exchange X1. Declare >> X1 with an AE of a federated direct exchange: X2. >> >> Your workers will need to bind to both X1 and X2 unfortunately, but >> messages should get routed the way you want - if there's a local binding >> then the message never hits the federated exchange, but if there isn't it >> then goes out over federation. >> >> What this *won't* do is ensure the message only gets delivered to *one* >> other broker over federation. Aha! But you could do that by making each X1 >> be federated, but have its upstream set to a single remote X2, with the >> broker federation links arranged in a ring. Then messages go round the >> ring, at each node either being delivered locally or forwarded on by >> federation. You'd need to set max_hops to the ring size at each point, so >> that unroutable messages go round the ring once and then die. >> >> Does this make sense? >> >> Cheers, Simon >> >> -- >> Simon MacMullen >> RabbitMQ, VMware >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Fri Dec 21 15:36:47 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 21 Dec 2012 15:36:47 +0000 Subject: [rabbitmq-discuss] 3.0.1 STOMP bug - reply-to header In-Reply-To: <50D3B048.6020803@strategicdata.com.au> References: <50D3B048.6020803@strategicdata.com.au> Message-ID: <50D4820F.4020700@rabbitmq.com> Toby, On 21/12/12 00:41, Toby Corkindale wrote: > When testing against RabbitMQ 3.0.1, we're seeing what looks like a bug > and regression compared to the last 2.9 version. > > The stomp adapter is turning a reply-to header for a topic queue into a > temp queue. > Eg, the reply queue name is getting munged from > /topic/foo.export.pid to /reply-queue//topic/foo.export.pid This looks like an accidental side effect of the change we made to allow AMQP clients to handle reply-to headers created by stomp clients. Thanks for reporting this. I have filed a bug. Regards, Matthias. From tim at rabbitmq.com Fri Dec 21 16:12:19 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 21 Dec 2012 16:12:19 +0000 Subject: [rabbitmq-discuss] Distributing Tasks to Worker Queues Across Federated Exchanges In-Reply-To: References: <50D08770.1090907@rabbitmq.com> Message-ID: On 21 Dec 2012, at 15:20, Chris wrote: > Hmmm... I just realized that the proposed configuration of setting things up in a ring will have one other adverse affect (besides weakening HA). > > If I have the ring setup like this: A --> B --> C --> A... then if B and C both have worker queues for the same type of task, B will tend to get too much preference because it will handle all requests from A and B (since the requests will never go to the AE to route to C)-- whereas the ideal setup would equally distribute requests from A to B and to C. Hmmm... > It's probably possible to write a custom exchange type that co-operates with exchanges on other nodes to load balance, but there are likely to be all kinds of issues there. Why not just but a load balancer in front of four nodes? From matthias at rabbitmq.com Fri Dec 21 16:30:23 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 21 Dec 2012 16:30:23 +0000 Subject: [rabbitmq-discuss] Exchange to Exchange Binding Apache/PHP AMQP- PECL 1.0.9/1.0.7 In-Reply-To: References: Message-ID: <50D48E9F.8080503@rabbitmq.com> Eric, On 20/12/12 17:02, Eric Berg wrote: > I am setting up a Rabbit connection in my php application code and > binding one exchange to another for a rich topology. However the > $exchange->bind() call blocks and my server hangs. The exchanges are > created correctly and the binding is successful, but the call never > returns. Has anyone run into this before? Thanks for the help > > Side notes: > If I pass in the AMQP_NOWAIT flag to the bind method doesnt block, but > the binding does not succeed. That is odd - the NOWAIT flag has no effect on what the broker does; it simply causes the response to be omitted. > This works correctly through the CLI, but not in apache ...and from your previous emails I gather it worked fine in apache with rabbitmq 2.8.7. I suggest you run the working and non-working versions through the RabbitMQ AMQP protocol tracer (http://www.rabbitmq.com/api-guide.html#tracer) and capture & compare the output. Regards, Matthias. From stuff at moesel.net Fri Dec 21 16:59:57 2012 From: stuff at moesel.net (Chris) Date: Fri, 21 Dec 2012 11:59:57 -0500 Subject: [rabbitmq-discuss] Distributing Tasks to Worker Queues Across Federated Exchanges In-Reply-To: References: <50D08770.1090907@rabbitmq.com> Message-ID: Thanks for the reply, Tim. The nodes may be thousands of miles apart and each geographic location will have its own cluster as well. We're trying to find a solution that doesn't require any additional hardware and can be configured somewhat easily via a GUI. A load balancer also would not understand how to properly route based on queues/exchanges-- the key is only to distribute/load-balance over the nodes that actually have consumers for the given exchange/queue. Thanks, Chris On Fri, Dec 21, 2012 at 11:12 AM, Tim Watson wrote: > > On 21 Dec 2012, at 15:20, Chris wrote: > > > Hmmm... I just realized that the proposed configuration of setting > things up in a ring will have one other adverse affect (besides weakening > HA). > > > > If I have the ring setup like this: A --> B --> C --> A... then if B > and C both have worker queues for the same type of task, B will tend to get > too much preference because it will handle all requests from A and B (since > the requests will never go to the AE to route to C)-- whereas the ideal > setup would equally distribute requests from A to B and to C. Hmmm... > > > > It's probably possible to write a custom exchange type that co-operates > with exchanges on other nodes to load balance, but there are likely to be > all kinds of issues there. Why not just but a load balancer in front of > four nodes? > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Fri Dec 21 18:46:12 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 21 Dec 2012 18:46:12 +0000 Subject: [rabbitmq-discuss] RMQ performance between high MHz/low core vs lower MHz/high core servers In-Reply-To: <91DCE58C-EB72-4556-AE70-4AD8B0F7AFBE@gmail.com> References: <50D345D1.3060102@rabbitmq.com> <91DCE58C-EB72-4556-AE70-4AD8B0F7AFBE@gmail.com> Message-ID: <50D4AE74.3080505@rabbitmq.com> Chris, On 20/12/12 17:27, Chris Schmidt wrote: > RHEL 6.2 doesn't seem to have the latest version of Erlang available > in the repositories. Does anyone have experience with manually > building Erlang on that platform with success? We're on R14B04 right > now. There are a huge number of erlang related rpms that get > installed I'm not certain if a single Erlang version for CentOS > would work properly or not. You may want to give https://my.vmware.com/web/vmware/details?downloadGroup=VFEL_15B02&productId=267 a try - it's R15B02 (so not quite the latest but close enough) with "batteries included", i.e. no dependencies. > I had +K true -smp enable +native +sbtps plus the other RMQ defaults "+K true" is already part of the standard config. So is "-smp auto", which enables smp when there is more than one core. "+native" is a compile-time option and I would not recommend using it. As for +sbtps, I suggest you leave that out and stick with the default. As I said in my earlier email, playing with the +swt option may yield some benefits. > I also had 15 consumers running against the initial queue that was > having problems. Increasing the number of consumers only helps when the consumers, rather than the queue, are the bottleneck. > I also tried sending the data into 2 - 40 exchanges (and updated the > queue to read from those exchanges) in order to see if I could spread > the load that way. Exchanges are not represented by processes, so you don't gain anything by spreading the load over them. Increasing the number of producers can increase the message ingestion rate, but only if the messages get routed to different queues. > Does a single process manage each queue? yes. > If so I can see that being a potential bottleneck due to the core's > speed difference. Exactly. > Is there an erlang or rabbitmqctl command that I can run against the > RMQ server to determine if the queues themselves are the bottleneck? If the queues are growing then the bottleneck is on the outbound side (rabbit's AMQP encoding, network, consumers). If the queues stay short/empty then the bottleneck is on the inbound side (producer, network, rabbit's AMQP decoding, routing, the queue). If connections get blocked due to flow control then the bottleneck is in the latter three. Narrowing it down any further is tricky. Regards, Matthias. From rmqjava1a at yahoo.com Fri Dec 21 18:55:10 2012 From: rmqjava1a at yahoo.com (CJ) Date: Fri, 21 Dec 2012 10:55:10 -0800 (PST) Subject: [rabbitmq-discuss] Cathing broker shut down in a consumer In-Reply-To: <180f3c43-23a6-4f5c-8466-a10c950c363d@googlegroups.com> References: <180f3c43-23a6-4f5c-8466-a10c950c363d@googlegroups.com> Message-ID: I think I have the registration issue worked out now. Does anyone know how I can catch Exception on sending to queues ? On Thursday, December 20, 2012 1:55:53 PM UTC-5, CJ wrote: > I need to write an exception in the case of a broker shutdown to end my > programs gracefully > > In the Sender, I used the following code successfully: > > while ( numMsgs < maxMsgs ) { > try { channel.basicPublish( exchange, queueName, > (persistEnabled) ? MessageProperties.PERSISTENT_TEXT_PLAIN : > null, > message.getBytes()); } > catch (Exception ex) { > System.out.println("--- Connection Broken ---"); > } > > This catches the IOException and termiates gracefully on the Sender. > I can NOT do this on the consumer, where I get the following error once > the broker is shut down > I do not seem to be able to catch the problem of the broker coming down in > the consumer. I use the following code on the nextDelivery > > catch (ShutdownSignalException ex) { > System.out.println("--- Broker Shut Down ---"); > } > catch (Exception ex) { > System.out.println("--- Broker Shut Down ---"); > } > > But I get the following error: > > Exception in thread "main" com.rabbitmq.client.ShutdownSignalException: > connecti > on error; reason: {#method(reply-code=320, > reply-text=CONNECTI > ON_FORCED - broker forced connection closure with reason 'shutdown', > class-id=0, > method-id=0), null, ""} > at > com.rabbitmq.client.QueueingConsumer.handle(QueueingConsumer.java:198 > ) > at > com.rabbitmq.client.QueueingConsumer.nextDelivery(QueueingConsumer.ja > va:227) > at Recv.main(Recv.java:50) > > Does Rabbit support catching broken connections in the consumer ? > > How can I do this ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bin.Chen at kla-tencor.com Fri Dec 21 19:29:10 2012 From: Bin.Chen at kla-tencor.com (Chen, Bin) Date: Fri, 21 Dec 2012 11:29:10 -0800 Subject: [rabbitmq-discuss] .NET client: intermittent AlreadyClosedException - connected host has failed to respond In-Reply-To: <50BC7A9A.3020609@rabbitmq.com> References: <6762d23c-8815-4624-8f92-e86b75ecedab@googlegroups.com><50B5E4E2.8040500@rabbitmq.com> <50BC7A9A.3020609@rabbitmq.com> Message-ID: Hi Emile, Is there any plan to solve this AlreadyClosedException issue in the future release? I am using RabbitMQ 2.8.6 with .NET client on Windows Server 2008 R2. Our system also suffers from this AlreadyClosedException problem. It causes our system to retry the related task, and this degraded the performance. Thanks, Bin Chen -----Original Message----- From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Emile Joubert Sent: Monday, December 03, 2012 2:11 AM To: Andrei Volkov Cc: Discussions about RabbitMQ Subject: Re: [rabbitmq-discuss] .NET client: intermittent AlreadyClosedException - connected host has failed to respond Hi Andrei, On 29/11/12 18:15, Andrei Volkov wrote: > It looks like a TCP port exhaustion on the client side. > What happens is, unlike our main app, our healthcheck page opens (and > closes) a new connection every time it is hit. The healthcheck page is > hit every 5 seconds. By default on Windows the ephemeral TCP port > can't be reused until after 240 seconds after it's closed. Hence the > port exhaustion. That explanation would work if there were only 48 ports available in the ephemeral range. By default there are many more, so I would be surprised if this was the cause. -Emile _______________________________________________ rabbitmq-discuss mailing list rabbitmq-discuss at lists.rabbitmq.com https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From matthias at rabbitmq.com Fri Dec 21 19:34:02 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 21 Dec 2012 19:34:02 +0000 Subject: [rabbitmq-discuss] Distributing Tasks to Worker Queues Across Federated Exchanges In-Reply-To: References: <50D08770.1090907@rabbitmq.com> Message-ID: <50D4B9AA.4020105@rabbitmq.com> Chris, On 21/12/12 16:59, Chris wrote: > Thanks for the reply, Tim. The nodes may be thousands of miles apart > and each geographic location will have its own cluster as well. We're > trying to find a solution that doesn't require any additional hardware > and can be configured somewhat easily via a GUI. A load balancer also > would not understand how to properly route based on queues/exchanges-- > the key is only to distribute/load-balance over the nodes that actually > have consumers for the given exchange/queue. It is not quite clear what problem you are trying to solve. In your original email you said: Broker A: Workers listening on queues with routing keys X & Y Broker B: Workers listening on queues with routing keys Y & Z 1) Submit job with routing key X from Broker A: Should go to Consumer of X on Broker A 2) Submit job with routing key Y from Broker A: Should go ONLY to Consumer of Y on Broker A 3) Submit job with routing key Z from Broker A: Should go to Consumer of Z on Broker A Re (3) - there is no consumer of Z on A. I'm guessing you meant B. Overall, I am guessing what you are trying to say here is that you have three types of task - X,Y,Z - and workers that know how to process a sub-set of these tasks, and that these workers might be in different locations. And each task should be processed by only one worker. So why not simply have a single broker, in one location, with three queues - X, Y, Z? Workers, wherever they are, connect to the broker and start consuming from the queues whose tasks they can handle. One step up from this simple set up would be a federation where the X, Y, Z queues reside on different brokers in the federation. The main complication that creates is that workers need to know which of the federated brokers they need to connect to. Beware of premature optimisations. I'd stick with the simple setup unless you have determined experimentally that it does not perform adequately for your use case. Regards, Matthias From Bin.Chen at kla-tencor.com Fri Dec 21 19:38:37 2012 From: Bin.Chen at kla-tencor.com (Chen, Bin) Date: Fri, 21 Dec 2012 11:38:37 -0800 Subject: [rabbitmq-discuss] .NET client: intermittentAlreadyClosedException - connected host has failed to respond In-Reply-To: References: <6762d23c-8815-4624-8f92-e86b75ecedab@googlegroups.com><50B5E4E2.8040500@rabbitmq.com><50BC7A9A.3020609@rabbitmq.com> Message-ID: Emile, I forgot to mention that our client code does set up the heartbeat for 10s. Somehow, the intermittent AlreadyClosedException still happens. Here the code: var factory = new ConnectionFactory { HostName = rmqHost, UserName = "guest", Password = "guest", Protocol = Protocols.FromEnvironment(), VirtualHost = '/", RequestedHeartbeat = 10 }; Thanks, Bin Chen -----Original Message----- From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Chen, Bin Sent: Friday, December 21, 2012 11:29 AM To: Discussions about RabbitMQ Subject: Re: [rabbitmq-discuss] .NET client: intermittentAlreadyClosedException - connected host has failed to respond Hi Emile, Is there any plan to solve this AlreadyClosedException issue in the future release? I am using RabbitMQ 2.8.6 with .NET client on Windows Server 2008 R2. Our system also suffers from this AlreadyClosedException problem. It causes our system to retry the related task, and this degraded the performance. Thanks, Bin Chen -----Original Message----- From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Emile Joubert Sent: Monday, December 03, 2012 2:11 AM To: Andrei Volkov Cc: Discussions about RabbitMQ Subject: Re: [rabbitmq-discuss] .NET client: intermittent AlreadyClosedException - connected host has failed to respond Hi Andrei, On 29/11/12 18:15, Andrei Volkov wrote: > It looks like a TCP port exhaustion on the client side. > What happens is, unlike our main app, our healthcheck page opens (and > closes) a new connection every time it is hit. The healthcheck page is > hit every 5 seconds. By default on Windows the ephemeral TCP port > can't be reused until after 240 seconds after it's closed. Hence the > port exhaustion. That explanation would work if there were only 48 ports available in the ephemeral range. By default there are many more, so I would be surprised if this was the cause. -Emile _______________________________________________ rabbitmq-discuss mailing list rabbitmq-discuss at lists.rabbitmq.com 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 From matthias at rabbitmq.com Fri Dec 21 19:42:24 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 21 Dec 2012 19:42:24 +0000 Subject: [rabbitmq-discuss] .NET client: intermittent AlreadyClosedException - connected host has failed to respond In-Reply-To: References: <6762d23c-8815-4624-8f92-e86b75ecedab@googlegroups.com><50B5E4E2.8040500@rabbitmq.com> <50BC7A9A.3020609@rabbitmq.com> Message-ID: <50D4BBA0.3030208@rabbitmq.com> On 21/12/12 19:29, Chen, Bin wrote: > I am using RabbitMQ 2.8.6 with .NET client on Windows Server 2008 R2. > Our system also suffers from this AlreadyClosedException problem. > It causes our system to retry the related task, and this degraded the > performance. Did you try enabling heartbeats, as Emile suggested in reply to the OP here: http://rabbitmq.1065348.n5.nabble.com/NET-client-intermittent-AlreadyClosedException-connected-host-has-failed-to-respond-tp23688p23698.html? Note that in RabbitMQ 3.0.x heartbeats are enabled by default, so if you don't want to change your application code (to add the one line to enable heartbeats) then I suggest an upgrade. Regards, Matthias From matthias at rabbitmq.com Fri Dec 21 19:45:44 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 21 Dec 2012 19:45:44 +0000 Subject: [rabbitmq-discuss] .NET client: intermittentAlreadyClosedException - connected host has failed to respond In-Reply-To: References: <6762d23c-8815-4624-8f92-e86b75ecedab@googlegroups.com><50B5E4E2.8040500@rabbitmq.com><50BC7A9A.3020609@rabbitmq.com> Message-ID: <50D4BC68.4000701@rabbitmq.com> On 21/12/12 19:38, Chen, Bin wrote: > I forgot to mention that our client code does set up the heartbeat for > 10s. > Somehow, the intermittent AlreadyClosedException still happens. Hmm. that's odd. Is there anything of interest in the server logs? Regardless, I do suggest you upgrade to 3.0.1. Regards, Matthias From matthias at rabbitmq.com Fri Dec 21 19:54:48 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 21 Dec 2012 19:54:48 +0000 Subject: [rabbitmq-discuss] How amqp-client modify & reject(requeue true) a message back to the original queue in rabbit broker? In-Reply-To: References: <147b8d62-71c1-4abd-b5f9-99b67f0158d9@googlegroups.com> <50D33ED2.9070305@rabbitmq.com> Message-ID: <50D4BE88.6020009@rabbitmq.com> On 21/12/12 02:02, javaLee wrote: > /*M*//y understanding/: Queue in rabbitmq broker will never drop the > unacknowledged message before client ack-or-reject it, > ack-or-reject-operationing on the client side do not need resend the > message to rabbitmq broker, that's why client side cannot modify the > message, is that true? Correct. > I really need the requeue function, because on client side i want do > some retry operation with spring-retry. if max-retry-count is exhausted > & the message is still not be processing appropriately, i will not > requeue it (to the original queue) any more & put it to the > dead-letter-exchange. > But before put it to the DLX, i really want add some error-description > to this message, So another consumer that listening to the DLX can > retrieve & analysis & process it according to the error-description, > that's why i want modify message before reject it. So don't use reject. Instead publish the modified message to the original queue or DLX - depending on the retry-count - and ack the original message. Regards, Matthias From matthias at rabbitmq.com Fri Dec 21 20:04:09 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 21 Dec 2012 20:04:09 +0000 Subject: [rabbitmq-discuss] RabbitMQ 3.0.0 hangs In-Reply-To: <2d22efad-7e46-42e8-9343-f28637c3721c@googlegroups.com> References: <42e4167c-b7ae-4e2d-98a8-95160bbd31f9@googlegroups.com> <09fd72fb-6849-4f42-a9b0-f7c0aff4d41e@googlegroups.com> <4561f600-e96b-4550-8c98-0537f5a87548@googlegroups.com> <3d6fb186-1011-4538-815b-52578930eff2@googlegroups.com> <0258b37c-fa3b-4375-8ee9-fe943a76cc8c@googlegroups.com> <2d22efad-7e46-42e8-9343-f28637c3721c@googlegroups.com> Message-ID: <50D4C0B9.7020405@rabbitmq.com> On 18/12/12 11:56, Rui wrote: > The problem is caused by starting the process without using the > Operating System shell. In our case we set theUseShellExecute to false > so we can catch the Standard In/Out. As Simon said If you were able to post a self-contained source of the process which launches RabbitMQ for you then we can investigate this - without that we're rather stuck. Matthias. From matthias at rabbitmq.com Fri Dec 21 20:06:48 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 21 Dec 2012 20:06:48 +0000 Subject: [rabbitmq-discuss] RabbitMQ 2.8.2 crashing with VMWare In-Reply-To: References: Message-ID: <50D4C158.4080003@rabbitmq.com> Dan, On 14/12/12 13:21, Dan Wise wrote: > We are running as a process, not a service, which is being run by a > service-based wrapper. We do this so we have better control over the > environment variables we use to configure the broker. > > Do you think running as a service may not be susceptible to this issue? There's a pretty good chance that would avoid the problem, so please give that a try. Regards, Matthias. From stuff at moesel.net Fri Dec 21 20:08:10 2012 From: stuff at moesel.net (Chris) Date: Fri, 21 Dec 2012 15:08:10 -0500 Subject: [rabbitmq-discuss] Distributing Tasks to Worker Queues Across Federated Exchanges In-Reply-To: <50D4B9AA.4020105@rabbitmq.com> References: <50D08770.1090907@rabbitmq.com> <50D4B9AA.4020105@rabbitmq.com> Message-ID: Hi Matthias, Thanks for your reply. I too originally preferred to go with the simpler setup of having a single broker (or cluster of brokers). Since the services and clients will literally be distributed across the world, however, our product owner did not want all traffic to have to go over the WAN (in some cases volume may be high). In addition, each geographic location needs to be able to continue to operate in a basic fashion if it becomes disconnected from the WAN (with the understanding that the set of available services may be smaller during the disconnected period). You're right about #3 though-- a typo on my part! Thanks again for the help-- I think I have a basic understanding of my options now... -Chris On Fri, Dec 21, 2012 at 2:34 PM, Matthias Radestock wrote: > Chris, > > > On 21/12/12 16:59, Chris wrote: > >> Thanks for the reply, Tim. The nodes may be thousands of miles apart >> and each geographic location will have its own cluster as well. We're >> trying to find a solution that doesn't require any additional hardware >> and can be configured somewhat easily via a GUI. A load balancer also >> would not understand how to properly route based on queues/exchanges-- >> the key is only to distribute/load-balance over the nodes that actually >> have consumers for the given exchange/queue. >> > > It is not quite clear what problem you are trying to solve. In your > original email you said: > > > > Broker A: Workers listening on queues with routing keys X & Y > Broker B: Workers listening on queues with routing keys Y & Z > > 1) Submit job with routing key X from Broker A: Should go to Consumer of X > on Broker A > 2) Submit job with routing key Y from Broker A: Should go ONLY to Consumer > of Y on Broker A > 3) Submit job with routing key Z from Broker A: Should go to Consumer of Z > on Broker A > > > Re (3) - there is no consumer of Z on A. I'm guessing you meant B. > > Overall, I am guessing what you are trying to say here is that you have > three types of task - X,Y,Z - and workers that know how to process a > sub-set of these tasks, and that these workers might be in different > locations. And each task should be processed by only one worker. > > So why not simply have a single broker, in one location, with three queues > - X, Y, Z? Workers, wherever they are, connect to the broker and start > consuming from the queues whose tasks they can handle. > > One step up from this simple set up would be a federation where the X, Y, > Z queues reside on different brokers in the federation. The main > complication that creates is that workers need to know which of the > federated brokers they need to connect to. > > Beware of premature optimisations. I'd stick with the simple setup unless > you have determined experimentally that it does not perform adequately for > your use case. > > Regards, > > Matthias > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dburgan at peopleanswers.com Sun Dec 23 04:01:34 2012 From: dburgan at peopleanswers.com (dburgan at peopleanswers.com) Date: Sat, 22 Dec 2012 20:01:34 -0800 (PST) Subject: [rabbitmq-discuss] Measuring end-to-end message delivery time Message-ID: <38fb3b6b-ba65-4dfe-b1af-d73b0b470703@googlegroups.com> Firstly, kudos to the RabbitMQ team for an astonishingly good product. We are using it as the messaging bus backbone for our flagship application and have had literally zero problems with it. Can't say enough good things. I'm hoping someone can help me figure out a solution for this. When we send a message, it generally goes through a pipeline something like this: 1. (Sending JVM) A Java thread will push the message into a ThreadPoolExecutor queue. 2. (Sending JVM) The ThreadPoolExecutor sends the message to RabbitMQ. 3. RabbitMQ delivers the message to the consumer. 4. (Receiving JVM) The consumer receives the message and pushes it into a ThreadPoolExecutor queue 5. (Receiving JVM) The ThreadPoolExecutor handles the message My goal is to measure the total time spent, per message, with millisecond accuracy, from one end of this pipeline to the other. I want to be able to calculate this for every message sent through our message bus, so then I can do analysis on those times, in real-time, and draw useful conclusions. The trouble is that the part pre-RabbitMQ (1-2) could be in a different JVM on a different physical server than the part post-RabbitMQ (4-5). So I can measure the time for steps 1, 2, 4, and 5. But how do I measure the time it took for the message to actually travel through RabbitMQ (step 3)? I can't just time-stamp the message because the local time on the two physical servers cannot be guaranteed to be synchronized to the millisecond. We use NTP but it does not keep the two servers that closely synchronized. So my question is: does RabbitMQ offer anything I can use that will allow me to figure out how long step 4 took for each message I send through RabbitMQ, or at least approximate it closely? Or is there some other clever technoloogy I could use to accomplish the same thing? Thanks in advance, Darrell Burgan -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Mon Dec 24 05:00:10 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Mon, 24 Dec 2012 05:00:10 +0000 Subject: [rabbitmq-discuss] Measuring end-to-end message delivery time In-Reply-To: <38fb3b6b-ba65-4dfe-b1af-d73b0b470703@googlegroups.com> References: <38fb3b6b-ba65-4dfe-b1af-d73b0b470703@googlegroups.com> Message-ID: <50D7E15A.2090409@rabbitmq.com> Darrell, On 23/12/12 04:01, dburgan at peopleanswers.com wrote: > My goal is to measure the total time spent, per message, with > millisecond accuracy, from one end of this pipeline to the other. > [...] > I can't just time-stamp the message because the local time on the two > physical servers cannot be guaranteed to be synchronized to the > millisecond. We use NTP but it does not keep the two servers that > closely synchronized. NTP is supposedly accurate to within a few milliseconds, and sub-ms if the machines are on a local network. Is that really not sufficient for your measurements? > So my question is: does RabbitMQ offer anything I can use that will > allow me to figure out how long step 4 took for each message I send > through RabbitMQ, or at least approximate it closely? I can't really see how rabbit can help you here. It could measure the time a message spends transiting it (*), but in the end that message still has to go across the network to the consumer machine, and if, as you say, the clock there is too far off the producer's then that hop will introduce significant inaccuracy. Perhaps you could hook up GPS receivers to the producer and consumer machines. That should provide a very accurate time signal by which to keep the clocks in sync. Regards, Matthias. (*) RabbitMQ doesn't in fact measure this, but provided messages contain some unique id, you could quite easily set up network taps to capture the time a message was received by rabbit and sent out again, respectively. From jaaaelpumuki at gmail.com Mon Dec 24 09:46:47 2012 From: jaaaelpumuki at gmail.com (=?UTF-8?Q?F=C3=A9lix?=) Date: Mon, 24 Dec 2012 01:46:47 -0800 (PST) Subject: [rabbitmq-discuss] Best practices with channels Message-ID: Hi, I'm developing an app that for each received message it publishes N using the same channel. I'm wondering whether it would be better having two channel, a Publish channel and a Receive channel. What's the best practice on this? Thanks, F?lix -------------- next part -------------- An HTML attachment was scrubbed... URL: From burrmilo at gmail.com Mon Dec 24 05:36:32 2012 From: burrmilo at gmail.com (Milo Burr) Date: Sun, 23 Dec 2012 21:36:32 -0800 (PST) Subject: [rabbitmq-discuss] Amqp Gem and Unicorn Message-ID: <0179450f-fbe4-46e3-9443-5a3160d6bc71@googlegroups.com> Hey all, I've scoured the internet and this mailing list for Unicorn + Amqp examples and can't seem to find anything that works for my use case, which is presumably a very common one. Basically, based on user web requests I want to publish messages to a queue, have them processed on another server, and then show the results to the user. I would be extremely grateful is someone could provide any insight here. So my current design (based mostly on the Amqp gem examples and this gist: https://gist.github.com/2692861) waits for a unicorn worker to fork, runs the EM in another thread, and then does a next_tick that creates the connection to the server. Two issues: 1. From my controllers, what is the best way to publish messages? That gist has the controllers calling "EventLoopHelper.run" and then publishing, but shouldn't the EM already be running in another thread? It seems like I should be calling next_tick with a block that publishes a message, that way on the next reactor tick the message will get published. But when I use next_tick, the messages get publishes sometimes and other times nothing happens. That is, someones the message isn't published and other times a bunch of messages are published. Is this a thread safety issue or am I just completely missing something? I haven't event attempted to add subscribe functionality into the reactor yet, so nothing should be blocking the reactor. 2. I also want my unicorn rails app to subscribe to a queue that has the result of the long-running jobs that occur on another server. If I call subscribe in the reactor event loop, will that block the reactor from publishing messages submitted by the controllers? Any help would be much appreciated! -Milo -------------- next part -------------- An HTML attachment was scrubbed... URL: From f at mazzo.li Mon Dec 24 11:31:23 2012 From: f at mazzo.li (Francesco Mazzoli) Date: Mon, 24 Dec 2012 12:31:23 +0100 Subject: [rabbitmq-discuss] Automating a RabbitMQ 3.0 cluster on EC2 In-Reply-To: <9882557829464795BC4C6547C54DDED1@paperplanes.de> References: <9882557829464795BC4C6547C54DDED1@paperplanes.de> Message-ID: <87623rk7p0.wl%f@mazzo.li> Hi Mathias, At Thu, 20 Dec 2012 15:48:05 +0100, Mathias Meyer wrote: > I spent some quality time automating a cluster setup of 3.0.1 on EC2 over the > last couple of days, and came across some things that felt a bit odd to > me. Maybe I did it all wrong, happy to be proven that I did. I apologize if > this turns out a bit long, there are a couple of questions that boil down to a > similar issue. Would be curious to hear how other folks have solved this > issue, and mostly focussing on RabbitMQ 3.0, as, from what I've read, > clustering behaviour has changed with that release. > > First a whee bit about the setup, nothing special really, but required to > clarify some of the questions below: every node has a custom CNAME record > rabbitmq1.domain.com, rabbitmq2.domain.com, each pointing to the EC2 host > name. I do this because I prefer full hostnames over EC2 hostnames because it > adds clarity to the whole setup, at least for me :) > > The first issue with this setup comes up when you want to change the hostname > for the RabbitMQ node. Changing it post-installation is a bit of a hassle > because the package already starts up the service. Changing the nodename to > the FQDN and trying to restart the service after that leads to errors because > the service can't be stopped anymore as the nodenames are now different. > > I solved this on EC2 by adding domain.com to the DHCP configuration and > restarting the network before installing the RabbitMQ package. It's not a > great solution, but acceptable. In the end it boils down to the package > starting the service immediately on installation, more on that below. Uhm, two things: * RabbitMQ does not like FQDNs - I think you can probably make it work by tweaking the startup scripts, but I am not sure. What we recommend is not to use FQDNs. * If you change the hostname and restart RabbitMQ, things should go smoothly. That said, I?m not sure what DHCP has to do with this. I suppose that what you have done is to make possible to resolve the short names of the other nodes, since things are working. > The next issue is related to clustering. When RabbitMQ starts up, and there's > a cluster_nodes section in the config, it seems to try and reach the nodes > only once. This behaviour I'm not sure of, hence the question. I noticed that > when a node can't look up any of the nodes in the cluster_nodes config, it > won't try again at a later point in time, e.g. on restart. Therefore that node > will never automatically join the cluster unless rabbitmqctl join_cluster is > called. > > The DHCP configuration helped solve this issue as well, but I'm still > wondering if a) my observation is correct and b) if this is desired > behaviour. Should a new node be partitioned from the others only temporarily, > when it joins, it requires manual intervention to force it to join the > cluster. This somewhat seems to conform to what the documentation says: > http://www.rabbitmq.com/clustering.html#auto-config, but I'm not entirely > clear on whether a node just gives up trying to form a cluster once it > couldn't reach any of the nodes in the cluster_nodes list. The behaviour you describe is correct. The `cluster_nodes' list is only effective on ?virgin? nodes, that is nodes that are started for the first time. If the node can?t connect to any other node it won?t do anything. The rationale behind that comes from boring technicalities related to how mnesia (the database that backs RabbitMQ clustering) works, and most importantly the fact that clustered nodes shouldn?t experience netsplits. So if you say ?Should a new node be partitioned from the others only temporarily...?, maybe clustering is not the right solution. Again, I?m don?t see how DHCP has anything to do with this. > So the question boils down to whether the automatic configuration is the way > to go or if it makes more sense to automate commands (using Chef, btw) around > the join_cluster and cluster_status commands. > > On top of that, to have a fresh node join the cluster, it needs to be stopped > again (stop_app) and reset, which somewhat boils down to the service being > started on package installation again. This behaviour seems to also have > changed from 2.x where just updating the config and making sure all nodes have > the same Erlang cookie is correct, right? > > So the biggest question is: how do folks work around the fact that the > RabbitMQ node is started up on package installation. There's the option to use > policy-rc.d systems, but I'm not quite sure how feasible this is to > automate. Given that Chef runs every 30 minutes or so, the consequence would > be to install a policy on every run or to check on every run whether or not > the desired package is already installed. Currently I'm stopping the service > after stop_app and reset, before installing the new Erlang cookie. I'm just > not sure, it feels a bit weird to automate to me. I'd love for some input or > suggestions on this. > > My current setup is working, and I can add nodes that automatically join the > cluster, so it's okay. Just want to make sure it's the right approach, or if > there are any other experiences on this. From what I understand there are > differences to 2.x cluster setup, where updating the config and changing the > Erlang cookie apparently were all that's needed, but that's from my reading of > the documentation and existing Chef cookbooks > (https://github.com/opscode-cookbooks/rabbitmq). Overall I feel like there's a > bit of a lack of documentation on how setting up a cluster can or should be > automated. Happy to help improving that situation, but I'd like to sure that > the choices described above are sane or completely bullocks. > > Again, apologies for the long email. I hope the setup, issues and questions > are somewhat clear. Please let me know if more input is require, happy to dive > into more detail. > > Thank you for your time, for RabbitMQ clustering, and for any feedback you > might have :) I don?t know anything about EC2 or Chef, and I don?t understand what you are doing with DHCP, but I?m quite sure you?re mixing up two separated issues: one is related to FQDNs and how nodes resolve other node names, and the other is related to how the automatic clustering configuration works. For what concerns the former, RabbitMQ nodes will use unqualified names (unless you are tweaking how RabbitMQ nodes are started up), so you?ll have to play by that. Obviously you?ll have to make the unqualified names resolve correctly on each node, e.g. by adding entries in the hosts file. For what concerns the latter, if you are confident that netsplits won?t occur, then the semantics of the `cluster_nodes' configuration should be fine. If that is not the case you might need to hack up some other mechanism but I would advise against that because 1. It?s easy to get wrong, clustering is quite delicate and there are many subtleties. 2. If you are on a network that is affected by netsplits, you should avoid clustering anyway - see . And yes, things changed from 2.x on this front as part of efforts to make clustering more solid. I hope this helps. Francesco From watson.timothy at gmail.com Mon Dec 24 12:00:35 2012 From: watson.timothy at gmail.com (Tim Watson) Date: Mon, 24 Dec 2012 12:00:35 +0000 Subject: [rabbitmq-discuss] Best practices with channels In-Reply-To: References: Message-ID: <34AB7AD5-535A-4238-92EC-608FF6ED94CA@rabbitmq.com> If you're producing and consuming in separate threads then two channels would make sense. It does depend to some extent which client you're using. On 24 Dec 2012, at 09:46, F?lix wrote: > Hi, > > I'm developing an app that for each received message it publishes N using the same channel. I'm wondering whether it would be better having two channel, a Publish channel and a Receive channel. > > What's the best practice on this? > > Thanks, F?lix > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From vladislav.pernin at gmail.com Mon Dec 24 14:34:22 2012 From: vladislav.pernin at gmail.com (Vladislav Pernin) Date: Mon, 24 Dec 2012 15:34:22 +0100 Subject: [rabbitmq-discuss] Possible error in HA page documentation Message-ID: Hi, I think there is a mistake in the page describing the HA policy for distributed queue. The documentation says : PUT /api/parameters/policy/%2f/ha-all {"pattern":"^ha\.", "definition":{"ha-mode":"all"}} The right syntax may be : PUT /api/policies/%2f/ha-all {"pattern":"^ha\.", "definition":{"ha-mode":"all"}} Regards, Vladislav Pernin -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.s.klishin at gmail.com Mon Dec 24 16:38:23 2012 From: michael.s.klishin at gmail.com (Michael Klishin) Date: Mon, 24 Dec 2012 20:38:23 +0400 Subject: [rabbitmq-discuss] Amqp Gem and Unicorn In-Reply-To: <0179450f-fbe4-46e3-9443-5a3160d6bc71@googlegroups.com> References: <0179450f-fbe4-46e3-9443-5a3160d6bc71@googlegroups.com> Message-ID: 2012/12/24 Milo Burr > 1. From my controllers, what is the best way to publish messages? That > gist has the controllers calling "EventLoopHelper.run" and then publishing, > but shouldn't the EM already be running in another thread? > There is no need to connect in every action, just assign an exchange instance somewhere (a class variable or even a global) and use it. > > 2. I also want my unicorn rails app to subscribe to a queue that has the > result of the long-running jobs that occur on another server. If I call > subscribe in the reactor event loop, will that block the reactor from > publishing messages submitted by the controllers? > No. But running consumers inside a Rails application does not make much sense: Rails' low-level HTTP stack assumes synchronous responses to HTTP clients. So you won't be able to easily propagate responses. Relevant resources: http://rubyamqp.info/articles/connecting_to_broker/#using_ruby_amqp_gem_with_unicorn https://github.com/michaelklishin/rubyonrails23_unicorn_amqp_gem_example -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jbdupont at gmail.com Wed Dec 26 18:28:02 2012 From: jbdupont at gmail.com (Jean-Baptiste Dupont) Date: Wed, 26 Dec 2012 10:28:02 -0800 (PST) Subject: [rabbitmq-discuss] Need fix page plugin management : http://www.rabbitmq.com/management.html Message-ID: <883dda98-270d-4ad5-b7b4-85506bc25037@googlegroups.com> Command recommanded on the page to enable the plugin rabbitmq-plugins enable rabbitmq_management Seems not to work - OS says command does not exist... I found something like rabbitmq-activate-plugins in /usr/sbin and it seems to do something if I put it like this: rabbitmq-activate-plugins enable rabbitmq_management The web page should be fixed to reflect the change as long as I'm not making a mistake, of course. Thanks, jb -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmqjava1a at yahoo.com Thu Dec 27 00:45:40 2012 From: rmqjava1a at yahoo.com (CJ) Date: Wed, 26 Dec 2012 16:45:40 -0800 (PST) Subject: [rabbitmq-discuss] Persistence and Transactions Message-ID: <1356569140927-24204.post@n5.nabble.com> From watson.timothy at gmail.com Thu Dec 27 10:21:17 2012 From: watson.timothy at gmail.com (Tim Watson) Date: Thu, 27 Dec 2012 10:21:17 +0000 Subject: [rabbitmq-discuss] Persistence and Transactions In-Reply-To: <1356569140927-24204.post@n5.nabble.com> References: <1356569140927-24204.post@n5.nabble.com> Message-ID: On 27 Dec 2012, at 00:45, CJ wrote: > From the examples I have seen, on the Publish side > > 1> You place a PERSISTENT_TEXT_PLAIN in the basicPublish call to perform > persistence > Correct - this is a message property that sets deliveryMode = 2 which is what actually marks the message as persistent. > 2> You use a channel.txSelect and a channel.txCommit to perform > transactions > > However, from the examples I have seen, there is no such requirement on the > consumer side > > 1> Do I have to perform any special coding for a consumption of a > persistent message. > No none at all. > 2> Do I have to use a txCommit to perform a transaction of the ACKNOLEDGE on > a consumer (I understand that the consumption is not under a tx basis). > Not sure I understand the question here. If there is no transaction running then ACKs will just work and you don't need to do anything apart form sending them. If your consumer starts a transaction o a channel then the opposite is true. Consumer and producer transactions are completely separate. You cannot have a transaction that spans both clients. If a client is running in a transaction then ACKs it sends will be held uncommitted until the transaction commits. Or if the transaction rolls back, the client can still send the ACK afterwards, outside the transaction context wherein it will be treated like any other non-transactional ack. This is orthogonal to message persistence. HTH > > > > > -- > View this message in context: http://rabbitmq.1065348.n5.nabble.com/Persistence-and-Transactions-tp24204.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 From tim at rabbitmq.com Thu Dec 27 10:31:42 2012 From: tim at rabbitmq.com (Tim Watson) Date: Thu, 27 Dec 2012 10:31:42 +0000 Subject: [rabbitmq-discuss] Need fix page plugin management : http://www.rabbitmq.com/management.html In-Reply-To: <883dda98-270d-4ad5-b7b4-85506bc25037@googlegroups.com> References: <883dda98-270d-4ad5-b7b4-85506bc25037@googlegroups.com> Message-ID: This was true for the old 1.x series but not anymore. You clearly have a very old version of rabbit installed. :) On 26 Dec 2012, at 18:28, Jean-Baptiste Dupont wrote: > Command recommanded on the page to enable the plugin > rabbitmq-plugins enable rabbitmq_management > > Seems not to work - OS says command does not exist... > > I found something like > rabbitmq-activate-plugins in /usr/sbin and it seems to do something if I put it like this: > > rabbitmq-activate-plugins enable rabbitmq_management > > The web page should be fixed to reflect the change as long as I'm not making a mistake, of course. > Thanks, > jb > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From michael.s.klishin at gmail.com Thu Dec 27 11:36:34 2012 From: michael.s.klishin at gmail.com (Michael Klishin) Date: Thu, 27 Dec 2012 15:36:34 +0400 Subject: [rabbitmq-discuss] ANN Bunny 0.9.0.pre4 is released Message-ID: Bunny 0.9.0.pre4 is released [1]. This pre release adds several convenience features, improves usability and fixes a number of bugs. Change log is available on GitHub: https://github.com/ruby-amqp/bunny/blob/master/ChangeLog.md#changes-between-bunny-090pre3-and-090pre4 For virtually every application out there, it is a drop-in replacement for 0.9.0.pre3. Bunny 0.9 is getting closer and closer to being feature complete. Main focus in the next release will be on network failure detection/recovery and documentation [2]. Big thanks to Chris Duncan who suggested a number of usability improvements and discovered several issues, including a tricky race condition. Happy holidays! 1. https://rubygems.org/gems/bunny/versions/0.9.0.pre4 2. http://rubybunny.info -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -------------- next part -------------- An HTML attachment was scrubbed... URL: From newsjimi at gmail.com Thu Dec 27 15:22:55 2012 From: newsjimi at gmail.com (Jimi Riblei) Date: Thu, 27 Dec 2012 16:22:55 +0100 Subject: [rabbitmq-discuss] Get A list of nodes in the RabbitMQ cluster Message-ID: Hello, Which are the way for get the list of nodes in the RabbitMQ cluster ? Currentely I'm using : curl -i -u guest:guest http://192.168.40.6:15672/api/nodes I need to get the nodes for bind dynamically other machine without have a "master". I'd like to don't install a plug-in! Thank you! J. -------------- next part -------------- An HTML attachment was scrubbed... URL: From watson.timothy at gmail.com Thu Dec 27 15:43:01 2012 From: watson.timothy at gmail.com (Tim Watson) Date: Thu, 27 Dec 2012 15:43:01 +0000 Subject: [rabbitmq-discuss] Get A list of nodes in the RabbitMQ cluster In-Reply-To: References: Message-ID: <45E7B334-76C7-4ED1-B3BE-60A1A45AE25A@rabbitmq.com> 'rabbitmqctl cluster_status' should do it On 27 Dec 2012, at 15:22, Jimi Riblei wrote: > Hello, > Which are the way for get the list of nodes in the RabbitMQ cluster ? > > Currentely I'm using : > curl -i -u guest:guest http://192.168.40.6:15672/api/nodes > > > I need to get the nodes for bind dynamically other machine without have a "master". > > I'd like to don't install a plug-in! > > > Thank you! > J. > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Thu Dec 27 15:54:09 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Thu, 27 Dec 2012 15:54:09 +0000 Subject: [rabbitmq-discuss] Cathing broker shut down in a consumer In-Reply-To: References: <180f3c43-23a6-4f5c-8466-a10c950c363d@googlegroups.com> Message-ID: <50DC6F21.40002@rabbitmq.com> On 21/12/12 18:55, CJ wrote: > Does anyone know how I can catch Exception on sending to queues ? It's not clear what you are asking here, e.g. why doesn't the code you posted previously... > In the Sender, I used the following code successfully: > > while ( numMsgs < maxMsgs ) { > try { channel.basicPublish( exchange, queueName, > (persistEnabled) ? > MessageProperties.PERSISTENT_TEXT_PLAIN : null, > message.getBytes()); } > catch (Exception ex) { > System.out.println("--- Connection Broken ---"); > } ... work? Perhaps you are asking how to catch errors arising during publishing, e.g. attempts to publish to a non-existing exchange. Since publishing is asynchronous, those errors will not show up as exceptions of the corresponding basicPublish method invocation. You can get hold of the errors by registering a ShutdownListener on the connection and channel objects with http://www.rabbitmq.com/javadoc/com/rabbitmq/client/ShutdownNotifier.html#addShutdownListener%28com.rabbitmq.client.ShutdownListener%29. Regards, Matthias. From vladislav.pernin at gmail.com Thu Dec 27 17:02:03 2012 From: vladislav.pernin at gmail.com (Vladislav Pernin) Date: Thu, 27 Dec 2012 18:02:03 +0100 Subject: [rabbitmq-discuss] Federation and upstream cluster Message-ID: Hi, I'm running RabbitMQ 3.0.1 on two cluster of Linux servers. Let's name the two clusters : - downstream cluster running a federation to get messages from upstream cluster - upstream cluster The documentation explains well if a node fails, links to upstream exchanges will be recreated on a surviving node. There is no problem for the "client" side of the federation. I cannot use a load balancer if fail over mode to have high avaibility of the upstream cluster. What would be the recommended solution in this case ? I have tried to set up two upstream and group them in a upstream set, but I have the following problem : - when I shut down one the node, the federation status shows the matching upstream down as expected but after having restarted the first one, if I shut down the other one, both the federation status shows both upstream down - so, I tried to add a ha-mode policy to all on the federated queue, it is now possible to shutdown either one or the other node, but it seems that I'm losing some messages. -- Vladislav -------------- next part -------------- An HTML attachment was scrubbed... URL: From mpietrek at skytap.com Fri Dec 28 00:55:41 2012 From: mpietrek at skytap.com (Matt Pietrek) Date: Thu, 27 Dec 2012 16:55:41 -0800 Subject: [rabbitmq-discuss] Additional fields returned via /api/overview? Message-ID: I've just noticed that when comparing the results of calling the HTTP API with /api/overview, there are at least a couple of fields that look new in 3.0X, relative to 2.8.7. In particular: rabbitmq_version erlang_version object_totals Is this expected? And if so, is there some sort of comprehensive list of changes to the HTTP provided data in 3.0.x, relative to 2.8.X? Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Fri Dec 28 01:31:35 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 28 Dec 2012 01:31:35 +0000 Subject: [rabbitmq-discuss] Additional fields returned via /api/overview? In-Reply-To: References: Message-ID: <50DCF677.20809@rabbitmq.com> On 28/12/2012 00:55, Matt Pietrek wrote: > I've just noticed that when comparing the results of calling the HTTP > API with /api/overview, there are at least a couple of fields that look > new in 3.0X, relative to 2.8.7. In particular: > > rabbitmq_version > erlang_version > object_totals > Yes, those look familiar. > Is this expected? And if so, is there some sort of comprehensive list of > changes to the HTTP provided data in 3.0.x, relative to 2.8.X? > Does http://hg.rabbitmq.com/rabbitmq-management/raw-file/rabbitmq_v3_0_1/priv/www/api/index.html not meet your needs Matt? How would you like to see that information presented? Is it just that you'd like example json documents for all the API calls listed in that help page, or are you after some kind of schema - and if so, in what format? Cheers, Tim > Thanks, > > Matt > > > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > From tim at rabbitmq.com Fri Dec 28 02:04:34 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 28 Dec 2012 02:04:34 +0000 Subject: [rabbitmq-discuss] Federation and upstream cluster In-Reply-To: References: Message-ID: <50DCFE32.1080900@rabbitmq.com> Hi On 27/12/2012 17:02, Vladislav Pernin wrote: > Hi, > > I'm running RabbitMQ 3.0.1 on two cluster of Linux servers. > > Let's name the two clusters : > - downstream cluster running a federation to get messages from upstream > cluster > - upstream cluster > > The documentation explains well if a node fails, links to upstream > exchanges will be recreated on a surviving node. > There is no problem for the "client" side of the federation. > > I cannot use a load balancer if fail over mode to have high avaibility > of the upstream cluster. > > What would be the recommended solution in this case ? > I'm struggling to understand what the question is here Vladislav. The 'failover' that is being described in the federation plugin documentation is applied when using federation in a cluster, so if the node on which the downstream link is running dies, then another downstream node will take over (i.e., re-establish the links). There is a choice between clustering (i.e., ha/mirror queues) and federation - you do not get 'ha of the upstream cluster' in the same sense that mirror queues in a cluster are 'ha'. You have federated exchanges which copy data using AMQP (with ACKs enabled and some other guarantees) and the ability to try and re-establish links and so. Federation however, provides only the Availability and Partition tolerance parts of the CAP theorem, not the same Consistency guarantees as clustering/ha. > I have tried to set up two upstream and group them in a upstream set, Can you post the configuration you're using to do that? > but I have the following problem : > - when I shut down one the node, the federation status shows the > matching upstream down as expected but after having restarted the first > one, if I shut down the other one, both the federation status shows both > upstream down Just to confirm: you're saying that 1. you shut down one of the two upstream nodes 2. that node shows up dead in the web interface 3. you re-start that node 4. that node shows up alive in the web interface 5. you shut down the other upstream node 6. both nodes show up as dead in the web interface *but* 7. one of the upstream nodes *is* alive despite what the web admin says Have I understood that correctly? > - so, I tried to add a ha-mode policy to all on the federated queue, it > is now possible to shutdown either one or the other node, I'm not sure I understand this at all. Are you saying it was not possible to shut down one or both of the upstream nodes before? That seems different from your earlier comment. > but it seems that I'm losing some messages. > When you say 'the federated queue' do you mean the queue created in the upstream exchange's broker? Why would you want to add ha-mode policy that? The upstream queue is internal to the federation mechanism so you should be binding to the downstream exchange only. Or are you saying that you've bound a queue to the downstream exchange and made that ha-enabled? Because in the latter case, that will make no difference to reliability: if both upstream nodes go down before messages are delivered and ack'ed by the downstream for example. I'd be interested to hear how you've set this ha-mode policy and why and also how you've determined that there was message loss? I suspect that you have assumed expectations about the reliability of federation (in the face of node failures) that do not hold. If your messages sat in an exchange on an upstream node (or pair of exchanges/nodes, etc) and both nodes die before successfully transmitting the messages, then they will not arrive at the downstream exchange. The guarantees about message delivery for ha/mirror queues apply to nodes in *that* cluster only. The federation guarantees are different and orthogonal to ha/clustering. Hope that makes sense. Cheers, Tim > -- > Vladislav > > > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > From vladislav.pernin at gmail.com Fri Dec 28 09:32:43 2012 From: vladislav.pernin at gmail.com (Vladislav Pernin) Date: Fri, 28 Dec 2012 10:32:43 +0100 Subject: [rabbitmq-discuss] Federation and upstream cluster In-Reply-To: <50DCFE32.1080900@rabbitmq.com> References: <50DCFE32.1080900@rabbitmq.com> Message-ID: Hi, >> I'm running RabbitMQ 3.0.1 on two cluster of Linux servers. >> >> Let's name the two clusters : >> - downstream cluster running a federation to get messages from upstream >> cluster >> - upstream cluster >> >> The documentation explains well if a node fails, links to upstream >> exchanges will be recreated on a surviving node. >> There is no problem for the "client" side of the federation. >> >> I cannot use a load balancer if fail over mode to have high avaibility >> of the upstream cluster. >> >> What would be the recommended solution in this case ? >> >> > I'm struggling to understand what the question is here Vladislav. The > 'failover' that is being described in the federation plugin documentation > is applied when using federation in a cluster, so if the node on which the > downstream link is running dies, then another downstream node will take > over (i.e., re-establish the links). There is a choice between clustering > (i.e., ha/mirror queues) and federation - you do not get 'ha of the > upstream cluster' in the same sense that mirror queues in a cluster are > 'ha'. You have federated exchanges which copy data using AMQP (with ACKs > enabled and some other guarantees) and the ability to try and re-establish > links and so. Federation however, provides only the Availability and > Partition tolerance parts of the CAP theorem, not the same Consistency > guarantees as clustering/ha. I did get that, no problem for the downstream side who hold the federation, it works well. Question is really : I have two nodes in the "remote" or upstream cluster, I want to get messages of one exchange in a reliable way and the network stream has to be establish by the downstream cluster ; how can I be tolerant to failure of one remote node ? That is what I have called high avaibility on the upstream cluster, but only regarding the transmission of the exchange messages to the downstream cluster. > > > I have tried to set up two upstream and group them in a upstream set, >> > > Can you post the configuration you're using to do that? The configuration has been done using the HTTP API. curl -i -w %{http_code} -k -u "XXX:XXXX" -XPUT -H "content-type:application/json" -d '{ "pattern":"downstream-exchange","definition":{"federation-upstream-set":"upstreamset-test"} }' https://localhost:15671/api/policies/%2f/federate-me curl -i -w %{http_code} -k -u "XXX:XXXX" -XPUT -H "content-type:application/json" -d '{ "name":"local-nodename","value":"federation-local" }' https://localhost:15671/api/parameters/federation/%2f/local-nodename curl -i -w %{http_code} -u "XXX:XXXX" -k -s -XPUT -H "content-type:application/json" -d "{ "value":{ "uri":\"amqps://XXX:XXX at remote-server1 ?certfile=XXXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false" } }" https://localhost:15671/api/parameters/federation-upstream/%2f/upstream1 curl -i -w %{http_code} -u "XXX:XXXX" -k -s -XPUT -H "content-type:application/json" -d "{ "value":{ "uri":\"amqps://XXX:XXX at remote-server2 ?certfile=XXXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false" } }" https://localhost:15671/api/parameters/federation-upstream/%2f/upstream2 curl -i -w %{http_code} -k -u "XXX:XXXX" -XPUT -H "content-type:application/json" -d '{ "value":[{"upstream":"upstream1","exchange":"upstream-exchange"},{"upstream":"upstream2","exchange":"upstream-exchange"}] }' https://localhost:15671/api/parameters/federation-upstream-set/%2f/upstreamset-test > > > but I have the following problem : >> - when I shut down one the node, the federation status shows the >> matching upstream down as expected but after having restarted the first >> one, if I shut down the other one, both the federation status shows both >> upstream down >> > > Just to confirm: you're saying that > > 1. you shut down one of the two upstream nodes > 2. that node shows up dead in the web interface > 3. you re-start that node > 4. that node shows up alive in the web interface > 5. you shut down the other upstream node > 6. both nodes show up as dead in the web interface *but* > 7. one of the upstream nodes *is* alive despite what the web admin says > > Have I understood that correctly? Absolutely, you can find an extract of the downstream node log (rabbit at XXXX.log) at the end of the mail. That is not that easy to read but I think there might be an explanation in the logs. Case 2 : web admin says : - upstream1 : running - upstream 2 : error (econnrefused) Everything is OK Case 6 : web admin says : - upstream1 : error (econnrefused) - upstream 2 : shutdown (server_initiated_code,404,<<"NOT_FOUND ... the upstream1 (remote-server1) has been shutdown, but not the upstream2 (remote-server2). > > > - so, I tried to add a ha-mode policy to all on the federated queue, it >> is now possible to shutdown either one or the other node, >> > > I'm not sure I understand this at all. Are you saying it was not possible > to shut down one or both of the upstream nodes before? That seems different > from your earlier comment. My bad ! It is not explained properly. When I was saying "not possible to shutdown", I meant shutting down the remote node and having the proper status in the federation. > > > but it seems that I'm losing some messages. >> >> > When you say 'the federated queue' do you mean the queue created in the > upstream exchange's broker? Why would you want to add ha-mode policy that? > The upstream queue is internal to the federation mechanism so you should be > binding to the downstream exchange only. Or are you saying that you've > bound a queue to the downstream exchange and made that ha-enabled? Because > in the latter case, that will make no difference to reliability: if both > upstream nodes go down before messages are delivered and ack'ed by the > downstream for example. > Yes, "federated queue" is the queue created in the upstream exchange's broker. So, yes, it does not really make sense to add a ha policy, that was just an attempt in order to investigate a little bit further. And yes I did bound a ha queue to the downstream exchange, but I agree, it has nothing to do with the subject. > > I'd be interested to hear how you've set this ha-mode policy and why and > also how you've determined that there was message loss? I suspect that you > have assumed expectations about the reliability of federation (in the face > of node failures) that do not hold. If your messages sat in an exchange on > an upstream node (or pair of exchanges/nodes, etc) and both nodes die > before successfully transmitting the messages, then they will not arrive at > the downstream exchange. The guarantees about message delivery for > ha/mirror queues apply to nodes in *that* cluster only. The federation > guarantees are different and orthogonal to ha/clustering. > I understand, I just want to make sure that the messages will arrive at the downstream exchange, not duplicated and without loss : - if one upstream node dies - if there is network failure between downstream and upstream nodes - if upstream nodes fail and come back again Thanks. Vlad *Extract of logs for case 2* : =WARNING REPORT==== 28-Dec-2012::10:27:08 === Connection (<0.14803.351>) closing: received hard error {'connection.close', 320, <<"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'">>, 0,0} from server =ERROR REPORT==== 28-Dec-2012::10:27:08 === ** Generic server <0.14803.351> terminating ** Last message in was {#Ref<0.0.127.4786>,{error,closed}} ** When Server state == {state,amqp_network_connection, {state, {ssl_socket,#Port<0.46383>, {sslsocket,new_ssl,<0.14806.351>}}, 600,<0.14808.351>,131072, {server_initiated_close,320, <<"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'">>}, false}, <0.14802.351>,<0.14805.351>, {amqp_params_network,<<"XXXX">>, <<"XXXX">>,<<"/">>,"remote-server2",5671,0, 0,0,infinity, [{fail_if_no_peer_cert,false}, {verify,verify_none}, {keyfile, "XXXX"}, {certfile, "XXXX"}], [#Fun, #Fun], [],[]}, 0, [{<<"capabilities">>,table, [{<<"publisher_confirms">>,bool,true}, {<<"exchange_exchange_bindings">>,bool,true}, {<<"basic.nack">>,bool,true}, {<<"consumer_cancel_notify">>,bool,true}]}, {<<"copyright">>,longstr, <<"Copyright (C) 2007-2012 VMware, Inc.">>}, {<<"information">>,longstr, <<"Licensed under the MPL. See http://www.rabbitmq.com/">>}, {<<"platform">>,longstr,<<"Erlang/OTP">>}, {<<"product">>,longstr,<<"RabbitMQ">>}, {<<"version">>,longstr,<<"3.0.1">>}], #Fun, #Fun, {closing,server_initiated_close, {'connection.close',320, <<"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'">>, 0,0}, none}} ** Reason for termination == ** socket_closed_unexpectedly =INFO REPORT==== 28-Dec-2012::10:27:08 === Federation exchange 'downstream-exchange' in vhost '/' disconnected from exchange 'upstream-exchange' in vhost '/' on amqps://XXXX:XXXX at remote-server2 ?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false {upstream_channel_down, {connection_closing, {server_initiated_close,320, <<"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'">>}}} =WARNING REPORT==== 28-Dec-2012::10:27:08 === Federation exchange 'downstream-exchange' in vhost '/' did not connect to exchange 'upstream-exchange' in vhost '/' on amqps://XXXX:XXXX at remote-server2 ?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false {error,econnrefused} ==> rabbit at XXXX-sasl.log <== =CRASH REPORT==== 28-Dec-2012::10:27:08 === crasher: initial call: amqp_gen_connection:init/1 pid: <0.14803.351> registered_name: [] exception exit: socket_closed_unexpectedly in function gen_server:terminate/6 (gen_server.erl, line 747) ancestors: [<0.14802.351>,amqp_sup,<0.49.0>] messages: [] links: [<0.14802.351>] dictionary: [] trap_exit: true status: running heap_size: 2584 stack_size: 24 reductions: 1786 neighbours: =SUPERVISOR REPORT==== 28-Dec-2012::10:27:08 === Supervisor: {<0.14802.351>,amqp_connection_sup} Context: child_terminated Reason: socket_closed_unexpectedly Offender: [{pid,<0.14803.351>}, {name,connection}, {mfa, {amqp_gen_connection,start_link, [amqp_network_connection, {amqp_params_network,<<"XXXX">>, <<"XXXX">>,<<"/">>,"remote-server2",5671,0,0, 0,infinity, [{fail_if_no_peer_cert,false}, {verify,verify_none}, {keyfile, "XXXX"}, {certfile, "XXXX"}], [#Fun, #Fun], [],[]}, #Fun, #Fun,[]]}}, {restart_type,intrinsic}, {shutdown,brutal_kill}, {child_type,worker}] =SUPERVISOR REPORT==== 28-Dec-2012::10:27:08 === Supervisor: {<0.14802.351>,amqp_connection_sup} Context: shutdown Reason: reached_max_restart_intensity Offender: [{pid,<0.14803.351>}, {name,connection}, {mfa, {amqp_gen_connection,start_link, [amqp_network_connection, {amqp_params_network,<<"XXXX">>, <<"XXXX">>,<<"/">>,"remote-server2",5671,0,0, 0,infinity, [{fail_if_no_peer_cert,false}, {verify,verify_none}, {keyfile, "XXXX"}, {certfile, "XXXX"}], [#Fun, #Fun], [],[]}, #Fun, #Fun,[]]}}, {restart_type,intrinsic}, {shutdown,brutal_kill}, {child_type,worker}] ==> rabbit at XXXX.log <== =WARNING REPORT==== 28-Dec-2012::10:27:10 === Federation exchange 'downstream-exchange' in vhost '/' did not connect to exchange 'upstream-exchange' in vhost '/' on amqps://XXXX:XXXX at remote-server2 ?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false {error,econnrefused} *Extract of logs for case 6* : =WARNING REPORT==== 28-Dec-2012::10:16:42 === Connection (<0.32151.341>) closing: received hard error {'connection.close', 320, <<"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'">>, 0,0} from server =ERROR REPORT==== 28-Dec-2012::10:16:42 === ** Generic server <0.32151.341> terminating ** Last message in was {#Ref<0.0.123.217100>,{error,closed}} ** When Server state == {state,amqp_network_connection, {state, {ssl_socket,#Port<0.45661>, {sslsocket,new_ssl,<0.32161.341>}}, 600,<0.32170.341>,131072, {server_initiated_close,320, <<"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'">>}, false}, <0.32149.341>,<0.32154.341>, {amqp_params_network,<<"XXXX">>, <<"XXXX">>,<<"/">>,"remote-server1",5671,0, 0,0,infinity, [{fail_if_no_peer_cert,false}, {verify,verify_none}, {keyfile, "XXXX"}, {certfile, "XXXX"}], [#Fun, #Fun], [],[]}, 0, [{<<"capabilities">>,table, [{<<"publisher_confirms">>,bool,true}, {<<"exchange_exchange_bindings">>,bool,true}, {<<"basic.nack">>,bool,true}, {<<"consumer_cancel_notify">>,bool,true}]}, {<<"copyright">>,longstr, <<"Copyright (C) 2007-2012 VMware, Inc.">>}, {<<"information">>,longstr, <<"Licensed under the MPL. See http://www.rabbitmq.com/">>}, {<<"platform">>,longstr,<<"Erlang/OTP">>}, {<<"product">>,longstr,<<"RabbitMQ">>}, {<<"version">>,longstr,<<"3.0.1">>}], #Fun, #Fun, {closing,server_initiated_close, {'connection.close',320, <<"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'">>, 0,0}, none}} ** Reason for termination == ** socket_closed_unexpectedly =ERROR REPORT==== 28-Dec-2012::10:16:42 === ** Generic server <0.32126.341> terminating ** Last message in was {'DOWN',#Ref<0.0.123.217187>,process,<0.32193.341>, shutdown} ** When Server state == {state, {upstream, {amqp_params_network,<<"XXXX">>, <<"XXXX">>,<<"/">>,"remote-server1",undefined,0, 0,0,infinity, [{fail_if_no_peer_cert,false}, {verify,verify_none}, {keyfile, "XXXX"}, {certfile, "XXXX"}], [#Fun, #Fun], [],[]}, <<"amqps://XXXX:XXXX at remote-server1 ?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false">>, {exchange, {resource,<<"/">>,exchange,<<"upstream-exchange">>}, direct,true,false,false,[],undefined, [{vhost,<<"/">>}, {name,<<"federate-me">>}, {pattern,<<"downstream-exchange">>}, {definition, [{<<"federation-upstream-set">>, <<"upstreamset-test">>}]}, {priority,0}]}, 1000,1,1,none,none,false,none,<<"upstream1">>}, <0.32151.341>,<0.32193.341>, <<"amq.ctag-iCWCgBnLBU7S3cWTi06V1A">>, <<"federation: upstream-exchange -> federation-local:downstream-exchange">>, <<"federation: upstream-exchange -> federation-local:downstream-exchange B">>, {0,nil}, 1, {dict,1,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}, {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], [[{<<"test">>,[]}| {set,1,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], []}, {{[],[],[],[], [{resource,<<"/">>,queue, <<"downstream-queue">>}], [],[],[],[],[],[],[],[],[],[],[]}}}]]}}}, <0.32129.341>,<0.32141.341>, {resource,<<"/">>,exchange,<<"downstream-exchange">>}, {0,nil}} ** Reason for termination == ** {upstream_channel_down,shutdown} =INFO REPORT==== 28-Dec-2012::10:16:42 === Federation exchange 'downstream-exchange' in vhost '/' received 'basic.cancel' =WARNING REPORT==== 28-Dec-2012::10:16:42 === Federation exchange 'downstream-exchange' in vhost '/' did not connect to exchange 'upstream-exchange' in vhost '/' on amqps://XXXX:XXXX at remote-server1 ?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false {error,econnrefused} ==> rabbit at XXXX-sasl.log <== =CRASH REPORT==== 28-Dec-2012::10:16:42 === crasher: initial call: amqp_gen_connection:init/1 pid: <0.32151.341> registered_name: [] exception exit: socket_closed_unexpectedly in function gen_server:terminate/6 (gen_server.erl, line 747) ancestors: [<0.32149.341>,amqp_sup,<0.49.0>] messages: [socket_closed] links: [<0.32149.341>] dictionary: [] trap_exit: true status: running heap_size: 2584 stack_size: 24 reductions: 1794 neighbours: =SUPERVISOR REPORT==== 28-Dec-2012::10:16:42 === Supervisor: {<0.32149.341>,amqp_connection_sup} Context: child_terminated Reason: socket_closed_unexpectedly Offender: [{pid,<0.32151.341>}, {name,connection}, {mfa, {amqp_gen_connection,start_link, [amqp_network_connection, {amqp_params_network,<<"XXXX">>, <<"XXXX">>,<<"/">>,"remote-server1",5671,0,0, 0,infinity, [{fail_if_no_peer_cert,false}, {verify,verify_none}, {keyfile, "XXXX"}, {certfile, "XXXX"}], [#Fun, #Fun], [],[]}, #Fun, #Fun,[]]}}, {restart_type,intrinsic}, {shutdown,brutal_kill}, {child_type,worker}] =SUPERVISOR REPORT==== 28-Dec-2012::10:16:42 === Supervisor: {<0.32149.341>,amqp_connection_sup} Context: shutdown Reason: reached_max_restart_intensity Offender: [{pid,<0.32151.341>}, {name,connection}, {mfa, {amqp_gen_connection,start_link, [amqp_network_connection, {amqp_params_network,<<"XXXX">>, <<"XXXX">>,<<"/">>,"remote-server1",5671,0,0, 0,infinity, [{fail_if_no_peer_cert,false}, {verify,verify_none}, {keyfile, "XXXX"}, {certfile, "XXXX"}], [#Fun, #Fun], [],[]}, #Fun, #Fun,[]]}}, {restart_type,intrinsic}, {shutdown,brutal_kill}, {child_type,worker}] =CRASH REPORT==== 28-Dec-2012::10:16:42 === crasher: initial call: gen:init_it/6 pid: <0.32126.341> registered_name: [] exception exit: {upstream_channel_down,shutdown} in function gen_server2:terminate/3 ancestors: [<0.32125.341>,<0.218.0>,rabbit_federation_link_sup_sup, rabbit_federation_sup,rabbit_sup,<0.165.0>] messages: [{'DOWN',#Ref<0.0.123.217038>,process,<0.32141.341>,normal}] links: [<0.32125.341>] dictionary: [] trap_exit: true status: running heap_size: 1597 stack_size: 24 reductions: 2291192 neighbours: ==> rabbit at XXXX.log <== =WARNING REPORT==== 28-Dec-2012::10:16:44 === Federation exchange 'downstream-exchange' in vhost '/' did not connect to exchange 'upstream-exchange' in vhost '/' on amqps://XXXX:XXXX at remote-server1 ?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false {error,econnrefused} =WARNING REPORT==== 28-Dec-2012::10:16:46 === Federation exchange 'downstream-exchange' in vhost '/' did not connect to exchange 'upstream-exchange' in vhost '/' on amqps://XXXX:XXXX at remote-server2 ?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false {{shutdown,{server_initiated_close,404, <<"NOT_FOUND - home node 'rabbit at remote-server1' of durable queue 'federation: upstream-exchange -> federation-local:downstream-exchange' in vhost '/' is down or inaccessible">>}}, {gen_server,call, [<0.7847.351>, {call,{'queue.declare',0, <<"federation: upstream-exchange -> federation-local:downstream-exchange">>, false,true,false,false,false,[]}, none,<0.7815.351>}, infinity]}} =WARNING REPORT==== 28-Dec-2012::10:16:48 === Federation exchange 'downstream-exchange' in vhost '/' did not connect to exchange 'upstream-exchange' in vhost '/' on amqps://XXXX:XXXX at remote-server1 ?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false {error,econnrefused} -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Fri Dec 28 11:04:59 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 28 Dec 2012 11:04:59 +0000 Subject: [rabbitmq-discuss] Federation and upstream cluster In-Reply-To: References: <50DCFE32.1080900@rabbitmq.com> Message-ID: <672A41EB-0A96-4AB3-A61F-CD84CF76A2DF@rabbitmq.com> Vladislav, Is the upstream exchange you're federating durable? If not, it's going to be deleted when you shut the broker down, which would explain the NOT_FOUND error. Cheers, Tim On 28 Dec 2012, at 09:32, Vladislav Pernin wrote: > Hi, > > > I'm running RabbitMQ 3.0.1 on two cluster of Linux servers. > > Let's name the two clusters : > - downstream cluster running a federation to get messages from upstream > cluster > - upstream cluster > > The documentation explains well if a node fails, links to upstream > exchanges will be recreated on a surviving node. > There is no problem for the "client" side of the federation. > > I cannot use a load balancer if fail over mode to have high avaibility > of the upstream cluster. > > What would be the recommended solution in this case ? > > > I'm struggling to understand what the question is here Vladislav. The 'failover' that is being described in the federation plugin documentation is applied when using federation in a cluster, so if the node on which the downstream link is running dies, then another downstream node will take over (i.e., re-establish the links). There is a choice between clustering (i.e., ha/mirror queues) and federation - you do not get 'ha of the upstream cluster' in the same sense that mirror queues in a cluster are 'ha'. You have federated exchanges which copy data using AMQP (with ACKs enabled and some other guarantees) and the ability to try and re-establish links and so. Federation however, provides only the Availability and Partition tolerance parts of the CAP theorem, not the same Consistency guarantees as clustering/ha. > > I did get that, no problem for the downstream side who hold the federation, it works well. > Question is really : I have two nodes in the "remote" or upstream cluster, I want to get messages of one exchange in a reliable way and the network stream has to be establish by the downstream cluster ; how can I be tolerant to failure of one remote node ? That is what I have called high avaibility on the upstream cluster, but only regarding the transmission of the exchange messages to the downstream cluster. > > > > I have tried to set up two upstream and group them in a upstream set, > > Can you post the configuration you're using to do that? > > The configuration has been done using the HTTP API. > > curl -i -w %{http_code} -k -u "XXX:XXXX" -XPUT -H "content-type:application/json" -d '{ > "pattern":"downstream-exchange","definition":{"federation-upstream-set":"upstreamset-test"} > }' https://localhost:15671/api/policies/%2f/federate-me > > curl -i -w %{http_code} -k -u "XXX:XXXX" -XPUT -H "content-type:application/json" -d '{ > "name":"local-nodename","value":"federation-local" > }' https://localhost:15671/api/parameters/federation/%2f/local-nodename > > curl -i -w %{http_code} -u "XXX:XXXX" -k -s -XPUT -H "content-type:application/json" -d "{ > "value":{ > "uri":\"amqps://XXX:XXX at remote-server1?certfile=XXXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false" > } > }" https://localhost:15671/api/parameters/federation-upstream/%2f/upstream1 > > curl -i -w %{http_code} -u "XXX:XXXX" -k -s -XPUT -H "content-type:application/json" -d "{ > "value":{ > "uri":\"amqps://XXX:XXX at remote-server2?certfile=XXXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false" > } > }" https://localhost:15671/api/parameters/federation-upstream/%2f/upstream2 > > curl -i -w %{http_code} -k -u "XXX:XXXX" -XPUT -H "content-type:application/json" -d '{ > "value":[{"upstream":"upstream1","exchange":"upstream-exchange"},{"upstream":"upstream2","exchange":"upstream-exchange"}] > }' https://localhost:15671/api/parameters/federation-upstream-set/%2f/upstreamset-test > > > > but I have the following problem : > - when I shut down one the node, the federation status shows the > matching upstream down as expected but after having restarted the first > one, if I shut down the other one, both the federation status shows both > upstream down > > Just to confirm: you're saying that > > 1. you shut down one of the two upstream nodes > 2. that node shows up dead in the web interface > 3. you re-start that node > 4. that node shows up alive in the web interface > 5. you shut down the other upstream node > 6. both nodes show up as dead in the web interface *but* > 7. one of the upstream nodes *is* alive despite what the web admin says > > Have I understood that correctly? > > Absolutely, you can find an extract of the downstream node log (rabbit at XXXX.log) at the end of the mail. > That is not that easy to read but I think there might be an explanation in the logs. > > Case 2 : > web admin says : > - upstream1 : running > - upstream 2 : error (econnrefused) > Everything is OK > > Case 6 : > web admin says : > - upstream1 : error (econnrefused) > - upstream 2 : shutdown (server_initiated_code,404,<<"NOT_FOUND ... > the upstream1 (remote-server1) has been shutdown, but not the upstream2 (remote-server2). > > > > - so, I tried to add a ha-mode policy to all on the federated queue, it > is now possible to shutdown either one or the other node, > > I'm not sure I understand this at all. Are you saying it was not possible to shut down one or both of the upstream nodes before? That seems different from your earlier comment. > > My bad ! It is not explained properly. When I was saying "not possible to shutdown", I meant shutting down the remote node and having the proper status in the federation. > > > > but it seems that I'm losing some messages. > > > When you say 'the federated queue' do you mean the queue created in the upstream exchange's broker? Why would you want to add ha-mode policy that? The upstream queue is internal to the federation mechanism so you should be binding to the downstream exchange only. Or are you saying that you've bound a queue to the downstream exchange and made that ha-enabled? Because in the latter case, that will make no difference to reliability: if both upstream nodes go down before messages are delivered and ack'ed by the downstream for example. > > Yes, "federated queue" is the queue created in the upstream exchange's broker. So, yes, it does not really make sense to add a ha policy, that was just an attempt in order to investigate a little bit further. > And yes I did bound a ha queue to the downstream exchange, but I agree, it has nothing to do with the subject. > > > I'd be interested to hear how you've set this ha-mode policy and why and also how you've determined that there was message loss? I suspect that you have assumed expectations about the reliability of federation (in the face of node failures) that do not hold. If your messages sat in an exchange on an upstream node (or pair of exchanges/nodes, etc) and both nodes die before successfully transmitting the messages, then they will not arrive at the downstream exchange. The guarantees about message delivery for ha/mirror queues apply to nodes in *that* cluster only. The federation guarantees are different and orthogonal to ha/clustering. > > I understand, I just want to make sure that the messages will arrive at the downstream exchange, not duplicated and without loss : > - if one upstream node dies > - if there is network failure between downstream and upstream nodes > - if upstream nodes fail and come back again > > Thanks. > Vlad > > Extract of logs for case 2 : > > =WARNING REPORT==== 28-Dec-2012::10:27:08 === > Connection (<0.14803.351>) closing: received hard error {'connection.close', > 320, > <<"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'">>, > 0,0} from server > > =ERROR REPORT==== 28-Dec-2012::10:27:08 === > ** Generic server <0.14803.351> terminating > ** Last message in was {#Ref<0.0.127.4786>,{error,closed}} > ** When Server state == {state,amqp_network_connection, > {state, > {ssl_socket,#Port<0.46383>, > {sslsocket,new_ssl,<0.14806.351>}}, > 600,<0.14808.351>,131072, > {server_initiated_close,320, > <<"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'">>}, > false}, > <0.14802.351>,<0.14805.351>, > {amqp_params_network,<<"XXXX">>, > <<"XXXX">>,<<"/">>,"remote-server2",5671,0, > 0,0,infinity, > [{fail_if_no_peer_cert,false}, > {verify,verify_none}, > {keyfile, > "XXXX"}, > {certfile, > "XXXX"}], > [#Fun, > #Fun], > [],[]}, > 0, > [{<<"capabilities">>,table, > [{<<"publisher_confirms">>,bool,true}, > {<<"exchange_exchange_bindings">>,bool,true}, > {<<"basic.nack">>,bool,true}, > {<<"consumer_cancel_notify">>,bool,true}]}, > {<<"copyright">>,longstr, > <<"Copyright (C) 2007-2012 VMware, Inc.">>}, > {<<"information">>,longstr, > <<"Licensed under the MPL. See http://www.rabbitmq.com/">>}, > {<<"platform">>,longstr,<<"Erlang/OTP">>}, > {<<"product">>,longstr,<<"RabbitMQ">>}, > {<<"version">>,longstr,<<"3.0.1">>}], > #Fun, > #Fun, > {closing,server_initiated_close, > {'connection.close',320, > <<"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'">>, > 0,0}, > none}} > ** Reason for termination == > ** socket_closed_unexpectedly > > =INFO REPORT==== 28-Dec-2012::10:27:08 === > Federation exchange 'downstream-exchange' in vhost '/' disconnected from exchange 'upstream-exchange' in vhost '/' on amqps://XXXX:XXXX at remote-server2?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false > {upstream_channel_down, > {connection_closing, > {server_initiated_close,320, > <<"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'">>}}} > > =WARNING REPORT==== 28-Dec-2012::10:27:08 === > Federation exchange 'downstream-exchange' in vhost '/' did not connect to exchange 'upstream-exchange' in vhost '/' on amqps://XXXX:XXXX at remote-server2?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false > {error,econnrefused} > > ==> rabbit at XXXX-sasl.log <== > > =CRASH REPORT==== 28-Dec-2012::10:27:08 === > crasher: > initial call: amqp_gen_connection:init/1 > pid: <0.14803.351> > registered_name: [] > exception exit: socket_closed_unexpectedly > in function gen_server:terminate/6 (gen_server.erl, line 747) > ancestors: [<0.14802.351>,amqp_sup,<0.49.0>] > messages: [] > links: [<0.14802.351>] > dictionary: [] > trap_exit: true > status: running > heap_size: 2584 > stack_size: 24 > reductions: 1786 > neighbours: > > =SUPERVISOR REPORT==== 28-Dec-2012::10:27:08 === > Supervisor: {<0.14802.351>,amqp_connection_sup} > Context: child_terminated > Reason: socket_closed_unexpectedly > Offender: [{pid,<0.14803.351>}, > {name,connection}, > {mfa, > {amqp_gen_connection,start_link, > [amqp_network_connection, > {amqp_params_network,<<"XXXX">>, > <<"XXXX">>,<<"/">>,"remote-server2",5671,0,0, > 0,infinity, > [{fail_if_no_peer_cert,false}, > {verify,verify_none}, > {keyfile, > "XXXX"}, > {certfile, > "XXXX"}], > [#Fun, > #Fun], > [],[]}, > #Fun, > #Fun,[]]}}, > {restart_type,intrinsic}, > {shutdown,brutal_kill}, > {child_type,worker}] > > > =SUPERVISOR REPORT==== 28-Dec-2012::10:27:08 === > Supervisor: {<0.14802.351>,amqp_connection_sup} > Context: shutdown > Reason: reached_max_restart_intensity > Offender: [{pid,<0.14803.351>}, > {name,connection}, > {mfa, > {amqp_gen_connection,start_link, > [amqp_network_connection, > {amqp_params_network,<<"XXXX">>, > <<"XXXX">>,<<"/">>,"remote-server2",5671,0,0, > 0,infinity, > [{fail_if_no_peer_cert,false}, > {verify,verify_none}, > {keyfile, > "XXXX"}, > {certfile, > "XXXX"}], > [#Fun, > #Fun], > [],[]}, > #Fun, > #Fun,[]]}}, > {restart_type,intrinsic}, > {shutdown,brutal_kill}, > {child_type,worker}] > > > ==> rabbit at XXXX.log <== > > =WARNING REPORT==== 28-Dec-2012::10:27:10 === > Federation exchange 'downstream-exchange' in vhost '/' did not connect to exchange 'upstream-exchange' in vhost '/' on amqps://XXXX:XXXX at remote-server2?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false > {error,econnrefused} > > > Extract of logs for case 6 : > > =WARNING REPORT==== 28-Dec-2012::10:16:42 === > Connection (<0.32151.341>) closing: received hard error {'connection.close', > 320, > <<"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'">>, > 0,0} from server > > =ERROR REPORT==== 28-Dec-2012::10:16:42 === > ** Generic server <0.32151.341> terminating > ** Last message in was {#Ref<0.0.123.217100>,{error,closed}} > ** When Server state == {state,amqp_network_connection, > {state, > {ssl_socket,#Port<0.45661>, > {sslsocket,new_ssl,<0.32161.341>}}, > 600,<0.32170.341>,131072, > {server_initiated_close,320, > <<"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'">>}, > false}, > <0.32149.341>,<0.32154.341>, > {amqp_params_network,<<"XXXX">>, > <<"XXXX">>,<<"/">>,"remote-server1",5671,0, > 0,0,infinity, > [{fail_if_no_peer_cert,false}, > {verify,verify_none}, > {keyfile, > "XXXX"}, > {certfile, > "XXXX"}], > [#Fun, > #Fun], > [],[]}, > 0, > [{<<"capabilities">>,table, > [{<<"publisher_confirms">>,bool,true}, > {<<"exchange_exchange_bindings">>,bool,true}, > {<<"basic.nack">>,bool,true}, > {<<"consumer_cancel_notify">>,bool,true}]}, > {<<"copyright">>,longstr, > <<"Copyright (C) 2007-2012 VMware, Inc.">>}, > {<<"information">>,longstr, > <<"Licensed under the MPL. See http://www.rabbitmq.com/">>}, > {<<"platform">>,longstr,<<"Erlang/OTP">>}, > {<<"product">>,longstr,<<"RabbitMQ">>}, > {<<"version">>,longstr,<<"3.0.1">>}], > #Fun, > #Fun, > {closing,server_initiated_close, > {'connection.close',320, > <<"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'">>, > 0,0}, > none}} > ** Reason for termination == > ** socket_closed_unexpectedly > > =ERROR REPORT==== 28-Dec-2012::10:16:42 === > ** Generic server <0.32126.341> terminating > ** Last message in was {'DOWN',#Ref<0.0.123.217187>,process,<0.32193.341>, > shutdown} > ** When Server state == {state, > {upstream, > {amqp_params_network,<<"XXXX">>, > <<"XXXX">>,<<"/">>,"remote-server1",undefined,0, > 0,0,infinity, > [{fail_if_no_peer_cert,false}, > {verify,verify_none}, > {keyfile, > "XXXX"}, > {certfile, > "XXXX"}], > [#Fun, > #Fun], > [],[]}, > <<"amqps://XXXX:XXXX at remote-server1?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false">>, > {exchange, > {resource,<<"/">>,exchange,<<"upstream-exchange">>}, > direct,true,false,false,[],undefined, > [{vhost,<<"/">>}, > {name,<<"federate-me">>}, > {pattern,<<"downstream-exchange">>}, > {definition, > [{<<"federation-upstream-set">>, > <<"upstreamset-test">>}]}, > {priority,0}]}, > 1000,1,1,none,none,false,none,<<"upstream1">>}, > <0.32151.341>,<0.32193.341>, > <<"amq.ctag-iCWCgBnLBU7S3cWTi06V1A">>, > <<"federation: upstream-exchange -> federation-local:downstream-exchange">>, > <<"federation: upstream-exchange -> federation-local:downstream-exchange B">>, > {0,nil}, > 1, > {dict,1,16,16,8,80,48, > {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}, > {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], > [[{<<"test">>,[]}| > {set,1,16,16,8,80,48, > {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], > []}, > {{[],[],[],[], > [{resource,<<"/">>,queue, > <<"downstream-queue">>}], > [],[],[],[],[],[],[],[],[],[],[]}}}]]}}}, > <0.32129.341>,<0.32141.341>, > {resource,<<"/">>,exchange,<<"downstream-exchange">>}, > {0,nil}} > ** Reason for termination == > ** {upstream_channel_down,shutdown} > > =INFO REPORT==== 28-Dec-2012::10:16:42 === > Federation exchange 'downstream-exchange' in vhost '/' received 'basic.cancel' > > =WARNING REPORT==== 28-Dec-2012::10:16:42 === > Federation exchange 'downstream-exchange' in vhost '/' did not connect to exchange 'upstream-exchange' in vhost '/' on amqps://XXXX:XXXX at remote-server1?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false > {error,econnrefused} > > ==> rabbit at XXXX-sasl.log <== > > =CRASH REPORT==== 28-Dec-2012::10:16:42 === > crasher: > initial call: amqp_gen_connection:init/1 > pid: <0.32151.341> > registered_name: [] > exception exit: socket_closed_unexpectedly > in function gen_server:terminate/6 (gen_server.erl, line 747) > ancestors: [<0.32149.341>,amqp_sup,<0.49.0>] > messages: [socket_closed] > links: [<0.32149.341>] > dictionary: [] > trap_exit: true > status: running > heap_size: 2584 > stack_size: 24 > reductions: 1794 > neighbours: > > =SUPERVISOR REPORT==== 28-Dec-2012::10:16:42 === > Supervisor: {<0.32149.341>,amqp_connection_sup} > Context: child_terminated > Reason: socket_closed_unexpectedly > Offender: [{pid,<0.32151.341>}, > {name,connection}, > {mfa, > {amqp_gen_connection,start_link, > [amqp_network_connection, > {amqp_params_network,<<"XXXX">>, > <<"XXXX">>,<<"/">>,"remote-server1",5671,0,0, > 0,infinity, > [{fail_if_no_peer_cert,false}, > {verify,verify_none}, > {keyfile, > "XXXX"}, > {certfile, > "XXXX"}], > [#Fun, > #Fun], > [],[]}, > #Fun, > #Fun,[]]}}, > {restart_type,intrinsic}, > {shutdown,brutal_kill}, > {child_type,worker}] > > > =SUPERVISOR REPORT==== 28-Dec-2012::10:16:42 === > Supervisor: {<0.32149.341>,amqp_connection_sup} > Context: shutdown > Reason: reached_max_restart_intensity > Offender: [{pid,<0.32151.341>}, > {name,connection}, > {mfa, > {amqp_gen_connection,start_link, > [amqp_network_connection, > {amqp_params_network,<<"XXXX">>, > <<"XXXX">>,<<"/">>,"remote-server1",5671,0,0, > 0,infinity, > [{fail_if_no_peer_cert,false}, > {verify,verify_none}, > {keyfile, > "XXXX"}, > {certfile, > "XXXX"}], > [#Fun, > #Fun], > [],[]}, > #Fun, > #Fun,[]]}}, > {restart_type,intrinsic}, > {shutdown,brutal_kill}, > {child_type,worker}] > > > =CRASH REPORT==== 28-Dec-2012::10:16:42 === > crasher: > initial call: gen:init_it/6 > pid: <0.32126.341> > registered_name: [] > exception exit: {upstream_channel_down,shutdown} > in function gen_server2:terminate/3 > ancestors: [<0.32125.341>,<0.218.0>,rabbit_federation_link_sup_sup, > rabbit_federation_sup,rabbit_sup,<0.165.0>] > messages: [{'DOWN',#Ref<0.0.123.217038>,process,<0.32141.341>,normal}] > links: [<0.32125.341>] > dictionary: [] > trap_exit: true > status: running > heap_size: 1597 > stack_size: 24 > reductions: 2291192 > neighbours: > > ==> rabbit at XXXX.log <== > > =WARNING REPORT==== 28-Dec-2012::10:16:44 === > Federation exchange 'downstream-exchange' in vhost '/' did not connect to exchange 'upstream-exchange' in vhost '/' on amqps://XXXX:XXXX at remote-server1?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false > {error,econnrefused} > > =WARNING REPORT==== 28-Dec-2012::10:16:46 === > Federation exchange 'downstream-exchange' in vhost '/' did not connect to exchange 'upstream-exchange' in vhost '/' on amqps://XXXX:XXXX at remote-server2?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false > {{shutdown,{server_initiated_close,404, > <<"NOT_FOUND - home node 'rabbit at remote-server1' of durable queue 'federation: upstream-exchange -> federation-local:downstream-exchange' in vhost '/' is down or inaccessible">>}}, > {gen_server,call, > [<0.7847.351>, > {call,{'queue.declare',0, > <<"federation: upstream-exchange -> federation-local:downstream-exchange">>, > false,true,false,false,false,[]}, > none,<0.7815.351>}, > infinity]}} > > =WARNING REPORT==== 28-Dec-2012::10:16:48 === > Federation exchange 'downstream-exchange' in vhost '/' did not connect to exchange 'upstream-exchange' in vhost '/' on amqps://XXXX:XXXX at remote-server1?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false > {error,econnrefused} > From vladislav.pernin at gmail.com Fri Dec 28 11:09:03 2012 From: vladislav.pernin at gmail.com (Vladislav Pernin) Date: Fri, 28 Dec 2012 12:09:03 +0100 Subject: [rabbitmq-discuss] Federation and upstream cluster In-Reply-To: <672A41EB-0A96-4AB3-A61F-CD84CF76A2DF@rabbitmq.com> References: <50DCFE32.1080900@rabbitmq.com> <672A41EB-0A96-4AB3-A61F-CD84CF76A2DF@rabbitmq.com> Message-ID: Tim, Yes it is a durable exchange. Vlad 2012/12/28 Tim Watson > Vladislav, > > Is the upstream exchange you're federating durable? If not, it's going to > be deleted when you shut the broker down, which would explain the NOT_FOUND > error. > > Cheers, > Tim > > On 28 Dec 2012, at 09:32, Vladislav Pernin wrote: > > > Hi, > > > > > > I'm running RabbitMQ 3.0.1 on two cluster of Linux servers. > > > > Let's name the two clusters : > > - downstream cluster running a federation to get messages from upstream > > cluster > > - upstream cluster > > > > The documentation explains well if a node fails, links to upstream > > exchanges will be recreated on a surviving node. > > There is no problem for the "client" side of the federation. > > > > I cannot use a load balancer if fail over mode to have high avaibility > > of the upstream cluster. > > > > What would be the recommended solution in this case ? > > > > > > I'm struggling to understand what the question is here Vladislav. The > 'failover' that is being described in the federation plugin documentation > is applied when using federation in a cluster, so if the node on which the > downstream link is running dies, then another downstream node will take > over (i.e., re-establish the links). There is a choice between clustering > (i.e., ha/mirror queues) and federation - you do not get 'ha of the > upstream cluster' in the same sense that mirror queues in a cluster are > 'ha'. You have federated exchanges which copy data using AMQP (with ACKs > enabled and some other guarantees) and the ability to try and re-establish > links and so. Federation however, provides only the Availability and > Partition tolerance parts of the CAP theorem, not the same Consistency > guarantees as clustering/ha. > > > > I did get that, no problem for the downstream side who hold the > federation, it works well. > > Question is really : I have two nodes in the "remote" or upstream > cluster, I want to get messages of one exchange in a reliable way and the > network stream has to be establish by the downstream cluster ; how can I be > tolerant to failure of one remote node ? That is what I have called high > avaibility on the upstream cluster, but only regarding the transmission of > the exchange messages to the downstream cluster. > > > > > > > > I have tried to set up two upstream and group them in a upstream set, > > > > Can you post the configuration you're using to do that? > > > > The configuration has been done using the HTTP API. > > > > curl -i -w %{http_code} -k -u "XXX:XXXX" -XPUT -H > "content-type:application/json" -d '{ > > > "pattern":"downstream-exchange","definition":{"federation-upstream-set":"upstreamset-test"} > > }' https://localhost:15671/api/policies/%2f/federate-me > > > > curl -i -w %{http_code} -k -u "XXX:XXXX" -XPUT -H > "content-type:application/json" -d '{ > > "name":"local-nodename","value":"federation-local" > > }' https://localhost:15671/api/parameters/federation/%2f/local-nodename > > > > curl -i -w %{http_code} -u "XXX:XXXX" -k -s -XPUT -H > "content-type:application/json" -d "{ > > "value":{ > > "uri":\"amqps://XXX:XXX at remote-server1 > ?certfile=XXXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false" > > } > > }" > https://localhost:15671/api/parameters/federation-upstream/%2f/upstream1 > > > > curl -i -w %{http_code} -u "XXX:XXXX" -k -s -XPUT -H > "content-type:application/json" -d "{ > > "value":{ > > "uri":\"amqps://XXX:XXX at remote-server2 > ?certfile=XXXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false" > > } > > }" > https://localhost:15671/api/parameters/federation-upstream/%2f/upstream2 > > > > curl -i -w %{http_code} -k -u "XXX:XXXX" -XPUT -H > "content-type:application/json" -d '{ > > > "value":[{"upstream":"upstream1","exchange":"upstream-exchange"},{"upstream":"upstream2","exchange":"upstream-exchange"}] > > }' > https://localhost:15671/api/parameters/federation-upstream-set/%2f/upstreamset-test > > > > > > > > but I have the following problem : > > - when I shut down one the node, the federation status shows the > > matching upstream down as expected but after having restarted the first > > one, if I shut down the other one, both the federation status shows both > > upstream down > > > > Just to confirm: you're saying that > > > > 1. you shut down one of the two upstream nodes > > 2. that node shows up dead in the web interface > > 3. you re-start that node > > 4. that node shows up alive in the web interface > > 5. you shut down the other upstream node > > 6. both nodes show up as dead in the web interface *but* > > 7. one of the upstream nodes *is* alive despite what the web admin says > > > > Have I understood that correctly? > > > > Absolutely, you can find an extract of the downstream node log > (rabbit at XXXX.log) at the end of the mail. > > That is not that easy to read but I think there might be an explanation > in the logs. > > > > Case 2 : > > web admin says : > > - upstream1 : running > > - upstream 2 : error (econnrefused) > > Everything is OK > > > > Case 6 : > > web admin says : > > - upstream1 : error (econnrefused) > > - upstream 2 : shutdown (server_initiated_code,404,<<"NOT_FOUND ... > > the upstream1 (remote-server1) has been shutdown, but not the upstream2 > (remote-server2). > > > > > > > > - so, I tried to add a ha-mode policy to all on the federated queue, it > > is now possible to shutdown either one or the other node, > > > > I'm not sure I understand this at all. Are you saying it was not > possible to shut down one or both of the upstream nodes before? That seems > different from your earlier comment. > > > > My bad ! It is not explained properly. When I was saying "not possible > to shutdown", I meant shutting down the remote node and having the proper > status in the federation. > > > > > > > > but it seems that I'm losing some messages. > > > > > > When you say 'the federated queue' do you mean the queue created in the > upstream exchange's broker? Why would you want to add ha-mode policy that? > The upstream queue is internal to the federation mechanism so you should be > binding to the downstream exchange only. Or are you saying that you've > bound a queue to the downstream exchange and made that ha-enabled? Because > in the latter case, that will make no difference to reliability: if both > upstream nodes go down before messages are delivered and ack'ed by the > downstream for example. > > > > Yes, "federated queue" is the queue created in the upstream exchange's > broker. So, yes, it does not really make sense to add a ha policy, that was > just an attempt in order to investigate a little bit further. > > And yes I did bound a ha queue to the downstream exchange, but I agree, > it has nothing to do with the subject. > > > > > > I'd be interested to hear how you've set this ha-mode policy and why and > also how you've determined that there was message loss? I suspect that you > have assumed expectations about the reliability of federation (in the face > of node failures) that do not hold. If your messages sat in an exchange on > an upstream node (or pair of exchanges/nodes, etc) and both nodes die > before successfully transmitting the messages, then they will not arrive at > the downstream exchange. The guarantees about message delivery for > ha/mirror queues apply to nodes in *that* cluster only. The federation > guarantees are different and orthogonal to ha/clustering. > > > > I understand, I just want to make sure that the messages will arrive at > the downstream exchange, not duplicated and without loss : > > - if one upstream node dies > > - if there is network failure between downstream and upstream nodes > > - if upstream nodes fail and come back again > > > > Thanks. > > Vlad > > > > Extract of logs for case 2 : > > > > =WARNING REPORT==== 28-Dec-2012::10:27:08 === > > Connection (<0.14803.351>) closing: received hard error > {'connection.close', > > 320, > > > <<"CONNECTION_FORCED - broker forced connection closure with reason > 'shutdown'">>, > > 0,0} from server > > > > =ERROR REPORT==== 28-Dec-2012::10:27:08 === > > ** Generic server <0.14803.351> terminating > > ** Last message in was {#Ref<0.0.127.4786>,{error,closed}} > > ** When Server state == {state,amqp_network_connection, > > {state, > > {ssl_socket,#Port<0.46383>, > > {sslsocket,new_ssl,<0.14806.351>}}, > > 600,<0.14808.351>,131072, > > {server_initiated_close,320, > > <<"CONNECTION_FORCED - broker forced > connection closure with reason 'shutdown'">>}, > > false}, > > <0.14802.351>,<0.14805.351>, > > {amqp_params_network,<<"XXXX">>, > > > <<"XXXX">>,<<"/">>,"remote-server2",5671,0, > > 0,0,infinity, > > [{fail_if_no_peer_cert,false}, > > {verify,verify_none}, > > {keyfile, > > "XXXX"}, > > {certfile, > > "XXXX"}], > > [#Fun, > > #Fun], > > [],[]}, > > 0, > > [{<<"capabilities">>,table, > > [{<<"publisher_confirms">>,bool,true}, > > > {<<"exchange_exchange_bindings">>,bool,true}, > > {<<"basic.nack">>,bool,true}, > > > {<<"consumer_cancel_notify">>,bool,true}]}, > > {<<"copyright">>,longstr, > > <<"Copyright (C) 2007-2012 VMware, > Inc.">>}, > > {<<"information">>,longstr, > > <<"Licensed under the MPL. See > http://www.rabbitmq.com/">>}, > > {<<"platform">>,longstr,<<"Erlang/OTP">>}, > > {<<"product">>,longstr,<<"RabbitMQ">>}, > > {<<"version">>,longstr,<<"3.0.1">>}], > > #Fun, > > #Fun, > > {closing,server_initiated_close, > > {'connection.close',320, > > <<"CONNECTION_FORCED - broker forced > connection closure with reason 'shutdown'">>, > > 0,0}, > > none}} > > ** Reason for termination == > > ** socket_closed_unexpectedly > > > > =INFO REPORT==== 28-Dec-2012::10:27:08 === > > Federation exchange 'downstream-exchange' in vhost '/' disconnected from > exchange 'upstream-exchange' in vhost '/' on > amqps://XXXX:XXXX at remote-server2 > ?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false > > {upstream_channel_down, > > {connection_closing, > > {server_initiated_close,320, > > <<"CONNECTION_FORCED - broker forced connection closure with > reason 'shutdown'">>}}} > > > > =WARNING REPORT==== 28-Dec-2012::10:27:08 === > > Federation exchange 'downstream-exchange' in vhost '/' did not connect > to exchange 'upstream-exchange' in vhost '/' on > amqps://XXXX:XXXX at remote-server2 > ?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false > > {error,econnrefused} > > > > ==> rabbit at XXXX-sasl.log <== > > > > =CRASH REPORT==== 28-Dec-2012::10:27:08 === > > crasher: > > initial call: amqp_gen_connection:init/1 > > pid: <0.14803.351> > > registered_name: [] > > exception exit: socket_closed_unexpectedly > > in function gen_server:terminate/6 (gen_server.erl, line 747) > > ancestors: [<0.14802.351>,amqp_sup,<0.49.0>] > > messages: [] > > links: [<0.14802.351>] > > dictionary: [] > > trap_exit: true > > status: running > > heap_size: 2584 > > stack_size: 24 > > reductions: 1786 > > neighbours: > > > > =SUPERVISOR REPORT==== 28-Dec-2012::10:27:08 === > > Supervisor: {<0.14802.351>,amqp_connection_sup} > > Context: child_terminated > > Reason: socket_closed_unexpectedly > > Offender: [{pid,<0.14803.351>}, > > {name,connection}, > > {mfa, > > {amqp_gen_connection,start_link, > > [amqp_network_connection, > > {amqp_params_network,<<"XXXX">>, > > > <<"XXXX">>,<<"/">>,"remote-server2",5671,0,0, > > 0,infinity, > > [{fail_if_no_peer_cert,false}, > > {verify,verify_none}, > > {keyfile, > > "XXXX"}, > > {certfile, > > "XXXX"}], > > [#Fun, > > #Fun], > > [],[]}, > > #Fun, > > #Fun,[]]}}, > > {restart_type,intrinsic}, > > {shutdown,brutal_kill}, > > {child_type,worker}] > > > > > > =SUPERVISOR REPORT==== 28-Dec-2012::10:27:08 === > > Supervisor: {<0.14802.351>,amqp_connection_sup} > > Context: shutdown > > Reason: reached_max_restart_intensity > > Offender: [{pid,<0.14803.351>}, > > {name,connection}, > > {mfa, > > {amqp_gen_connection,start_link, > > [amqp_network_connection, > > {amqp_params_network,<<"XXXX">>, > > > <<"XXXX">>,<<"/">>,"remote-server2",5671,0,0, > > 0,infinity, > > [{fail_if_no_peer_cert,false}, > > {verify,verify_none}, > > {keyfile, > > "XXXX"}, > > {certfile, > > "XXXX"}], > > [#Fun, > > #Fun], > > [],[]}, > > #Fun, > > #Fun,[]]}}, > > {restart_type,intrinsic}, > > {shutdown,brutal_kill}, > > {child_type,worker}] > > > > > > ==> rabbit at XXXX.log <== > > > > =WARNING REPORT==== 28-Dec-2012::10:27:10 === > > Federation exchange 'downstream-exchange' in vhost '/' did not connect > to exchange 'upstream-exchange' in vhost '/' on > amqps://XXXX:XXXX at remote-server2 > ?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false > > {error,econnrefused} > > > > > > Extract of logs for case 6 : > > > > =WARNING REPORT==== 28-Dec-2012::10:16:42 === > > Connection (<0.32151.341>) closing: received hard error > {'connection.close', > > 320, > > > <<"CONNECTION_FORCED - broker forced connection closure with reason > 'shutdown'">>, > > 0,0} from server > > > > =ERROR REPORT==== 28-Dec-2012::10:16:42 === > > ** Generic server <0.32151.341> terminating > > ** Last message in was {#Ref<0.0.123.217100>,{error,closed}} > > ** When Server state == {state,amqp_network_connection, > > {state, > > {ssl_socket,#Port<0.45661>, > > {sslsocket,new_ssl,<0.32161.341>}}, > > 600,<0.32170.341>,131072, > > {server_initiated_close,320, > > <<"CONNECTION_FORCED - broker forced > connection closure with reason 'shutdown'">>}, > > false}, > > <0.32149.341>,<0.32154.341>, > > {amqp_params_network,<<"XXXX">>, > > > <<"XXXX">>,<<"/">>,"remote-server1",5671,0, > > 0,0,infinity, > > [{fail_if_no_peer_cert,false}, > > {verify,verify_none}, > > {keyfile, > > "XXXX"}, > > {certfile, > > "XXXX"}], > > [#Fun, > > #Fun], > > [],[]}, > > 0, > > [{<<"capabilities">>,table, > > [{<<"publisher_confirms">>,bool,true}, > > > {<<"exchange_exchange_bindings">>,bool,true}, > > {<<"basic.nack">>,bool,true}, > > > {<<"consumer_cancel_notify">>,bool,true}]}, > > {<<"copyright">>,longstr, > > <<"Copyright (C) 2007-2012 VMware, > Inc.">>}, > > {<<"information">>,longstr, > > <<"Licensed under the MPL. See > http://www.rabbitmq.com/">>}, > > {<<"platform">>,longstr,<<"Erlang/OTP">>}, > > {<<"product">>,longstr,<<"RabbitMQ">>}, > > {<<"version">>,longstr,<<"3.0.1">>}], > > #Fun, > > #Fun, > > {closing,server_initiated_close, > > {'connection.close',320, > > <<"CONNECTION_FORCED - broker forced > connection closure with reason 'shutdown'">>, > > 0,0}, > > none}} > > ** Reason for termination == > > ** socket_closed_unexpectedly > > > > =ERROR REPORT==== 28-Dec-2012::10:16:42 === > > ** Generic server <0.32126.341> terminating > > ** Last message in was > {'DOWN',#Ref<0.0.123.217187>,process,<0.32193.341>, > > shutdown} > > ** When Server state == {state, > > {upstream, > > {amqp_params_network,<<"XXXX">>, > > > <<"XXXX">>,<<"/">>,"remote-server1",undefined,0, > > 0,0,infinity, > > [{fail_if_no_peer_cert,false}, > > {verify,verify_none}, > > {keyfile, > > "XXXX"}, > > {certfile, > > "XXXX"}], > > [#Fun, > > #Fun], > > [],[]}, > > <<"amqps://XXXX:XXXX at remote-server1 > ?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false">>, > > {exchange, > > > {resource,<<"/">>,exchange,<<"upstream-exchange">>}, > > direct,true,false,false,[],undefined, > > [{vhost,<<"/">>}, > > {name,<<"federate-me">>}, > > {pattern,<<"downstream-exchange">>}, > > {definition, > > [{<<"federation-upstream-set">>, > > <<"upstreamset-test">>}]}, > > {priority,0}]}, > > 1000,1,1,none,none,false,none,<<"upstream1">>}, > > <0.32151.341>,<0.32193.341>, > > <<"amq.ctag-iCWCgBnLBU7S3cWTi06V1A">>, > > <<"federation: upstream-exchange -> > federation-local:downstream-exchange">>, > > <<"federation: upstream-exchange -> > federation-local:downstream-exchange B">>, > > {0,nil}, > > 1, > > {dict,1,16,16,8,80,48, > > > {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}, > > {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], > > [[{<<"test">>,[]}| > > {set,1,16,16,8,80,48, > > > {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], > > []}, > > {{[],[],[],[], > > [{resource,<<"/">>,queue, > > <<"downstream-queue">>}], > > > [],[],[],[],[],[],[],[],[],[],[]}}}]]}}}, > > <0.32129.341>,<0.32141.341>, > > > {resource,<<"/">>,exchange,<<"downstream-exchange">>}, > > {0,nil}} > > ** Reason for termination == > > ** {upstream_channel_down,shutdown} > > > > =INFO REPORT==== 28-Dec-2012::10:16:42 === > > Federation exchange 'downstream-exchange' in vhost '/' received > 'basic.cancel' > > > > =WARNING REPORT==== 28-Dec-2012::10:16:42 === > > Federation exchange 'downstream-exchange' in vhost '/' did not connect > to exchange 'upstream-exchange' in vhost '/' on > amqps://XXXX:XXXX at remote-server1 > ?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false > > {error,econnrefused} > > > > ==> rabbit at XXXX-sasl.log <== > > > > =CRASH REPORT==== 28-Dec-2012::10:16:42 === > > crasher: > > initial call: amqp_gen_connection:init/1 > > pid: <0.32151.341> > > registered_name: [] > > exception exit: socket_closed_unexpectedly > > in function gen_server:terminate/6 (gen_server.erl, line 747) > > ancestors: [<0.32149.341>,amqp_sup,<0.49.0>] > > messages: [socket_closed] > > links: [<0.32149.341>] > > dictionary: [] > > trap_exit: true > > status: running > > heap_size: 2584 > > stack_size: 24 > > reductions: 1794 > > neighbours: > > > > =SUPERVISOR REPORT==== 28-Dec-2012::10:16:42 === > > Supervisor: {<0.32149.341>,amqp_connection_sup} > > Context: child_terminated > > Reason: socket_closed_unexpectedly > > Offender: [{pid,<0.32151.341>}, > > {name,connection}, > > {mfa, > > {amqp_gen_connection,start_link, > > [amqp_network_connection, > > {amqp_params_network,<<"XXXX">>, > > > <<"XXXX">>,<<"/">>,"remote-server1",5671,0,0, > > 0,infinity, > > [{fail_if_no_peer_cert,false}, > > {verify,verify_none}, > > {keyfile, > > "XXXX"}, > > {certfile, > > "XXXX"}], > > [#Fun, > > #Fun], > > [],[]}, > > #Fun, > > #Fun,[]]}}, > > {restart_type,intrinsic}, > > {shutdown,brutal_kill}, > > {child_type,worker}] > > > > > > =SUPERVISOR REPORT==== 28-Dec-2012::10:16:42 === > > Supervisor: {<0.32149.341>,amqp_connection_sup} > > Context: shutdown > > Reason: reached_max_restart_intensity > > Offender: [{pid,<0.32151.341>}, > > {name,connection}, > > {mfa, > > {amqp_gen_connection,start_link, > > [amqp_network_connection, > > {amqp_params_network,<<"XXXX">>, > > > <<"XXXX">>,<<"/">>,"remote-server1",5671,0,0, > > 0,infinity, > > [{fail_if_no_peer_cert,false}, > > {verify,verify_none}, > > {keyfile, > > "XXXX"}, > > {certfile, > > "XXXX"}], > > [#Fun, > > #Fun], > > [],[]}, > > #Fun, > > #Fun,[]]}}, > > {restart_type,intrinsic}, > > {shutdown,brutal_kill}, > > {child_type,worker}] > > > > > > =CRASH REPORT==== 28-Dec-2012::10:16:42 === > > crasher: > > initial call: gen:init_it/6 > > pid: <0.32126.341> > > registered_name: [] > > exception exit: {upstream_channel_down,shutdown} > > in function gen_server2:terminate/3 > > ancestors: [<0.32125.341>,<0.218.0>,rabbit_federation_link_sup_sup, > > rabbit_federation_sup,rabbit_sup,<0.165.0>] > > messages: > [{'DOWN',#Ref<0.0.123.217038>,process,<0.32141.341>,normal}] > > links: [<0.32125.341>] > > dictionary: [] > > trap_exit: true > > status: running > > heap_size: 1597 > > stack_size: 24 > > reductions: 2291192 > > neighbours: > > > > ==> rabbit at XXXX.log <== > > > > =WARNING REPORT==== 28-Dec-2012::10:16:44 === > > Federation exchange 'downstream-exchange' in vhost '/' did not connect > to exchange 'upstream-exchange' in vhost '/' on > amqps://XXXX:XXXX at remote-server1 > ?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false > > {error,econnrefused} > > > > =WARNING REPORT==== 28-Dec-2012::10:16:46 === > > Federation exchange 'downstream-exchange' in vhost '/' did not connect > to exchange 'upstream-exchange' in vhost '/' on > amqps://XXXX:XXXX at remote-server2 > ?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false > > {{shutdown,{server_initiated_close,404, > > <<"NOT_FOUND - home node > 'rabbit at remote-server1' of durable queue 'federation: upstream-exchange > -> federation-local:downstream-exchange' in vhost '/' is down or > inaccessible">>}}, > > {gen_server,call, > > [<0.7847.351>, > > {call,{'queue.declare',0, > > <<"federation: upstream-exchange -> > federation-local:downstream-exchange">>, > > false,true,false,false,false,[]}, > > none,<0.7815.351>}, > > infinity]}} > > > > =WARNING REPORT==== 28-Dec-2012::10:16:48 === > > Federation exchange 'downstream-exchange' in vhost '/' did not connect > to exchange 'upstream-exchange' in vhost '/' on > amqps://XXXX:XXXX at remote-server1 > ?certfile=XXXX&keyfile=XXXX&verify=verify_none&fail_if_no_peer_cert=false > > {error,econnrefused} > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From meyer at paperplanes.de Fri Dec 28 11:26:52 2012 From: meyer at paperplanes.de (Mathias Meyer) Date: Fri, 28 Dec 2012 12:26:52 +0100 Subject: [rabbitmq-discuss] Automating a RabbitMQ 3.0 cluster on EC2 In-Reply-To: <87623rk7p0.wl%f@mazzo.li> References: <9882557829464795BC4C6547C54DDED1@paperplanes.de> <87623rk7p0.wl%f@mazzo.li> Message-ID: Francesco, Thanks for the answers, I've added some clarification below. On Monday, 24. December 2012 at 12:31, Francesco Mazzoli wrote: > > Uhm, two things: > > * RabbitMQ does not like FQDNs - I think you can probably make it work by > tweaking the startup scripts, but I am not sure. What we recommend is not > to use FQDNs. > * If you change the hostname and restart RabbitMQ, things should go smoothly. > > That said, I?m not sure what DHCP has to do with this. I suppose that what you > have done is to make possible to resolve the short names of the other nodes, > since things are working. > Sorry that I wasn't more clear on this. The reference to DHCP is my way of updating either the /etc/hosts file or /etc/resolv.conf. EC2 instances use DHCP to get their network settings, and the DHCP client is responsible for writing things like /etc/resolv.conf, so I used that mechanism to mix in our own domain to search in. Good to know about the FQDN, I'll leave things as they are then. Regarding changing the host name, I tried that, and from my experiments, that didn't seem to work properly. But that might have been related again to the hostname temporarily not being resolvable. > > The behaviour you describe is correct. The `cluster_nodes' list is only > effective on ?virgin? nodes, that is nodes that are started for the first time. > If the node can?t connect to any other node it won?t do anything. The rationale > behind that comes from boring technicalities related to how mnesia (the database > that backs RabbitMQ clustering) works, and most importantly the fact that > clustered nodes shouldn?t experience netsplits. So if you say ?Should a new > node be partitioned from the others only temporarily...?, maybe clustering is > not the right solution. > The partitioning was mostly conjecture. It might happen, and it's still fixable if it does. The whole mechanism just strikes me as less than ideal when it comes to automating a cluster setup. > > Again, I?m don?t see how DHCP has anything to do with this. > Same as above :) > I don?t know anything about EC2 or Chef, and I don?t understand what you are > doing with DHCP, but I?m quite sure you?re mixing up two separated issues: one > is related to FQDNs and how nodes resolve other node names, and the other is > related to how the automatic clustering configuration works. > They might seem different on the surface, but given how the RabbitMQ package installer works, they bot converge into the issue of automating and customizing a cluster setup. > > For what concerns the former, RabbitMQ nodes will use unqualified names (unless > you are tweaking how RabbitMQ nodes are started up), so you?ll have to play by > that. Obviously you?ll have to make the unqualified names resolve correctly on > each node, e.g. by adding entries in the hosts file. > > For what concerns the latter, if you are confident that netsplits won?t occur, > then the semantics of the `cluster_nodes' configuration should be fine. If that > is not the case you might need to hack up some other mechanism but I would > advise against that because > > 1. It?s easy to get wrong, clustering is quite delicate and there are many > subtleties. Are all of them documented? Looking at the documentation, it seems to be mostly straight-forward, except for the netsplits. If there are that many subtleties, I sure wish they'd be mentioned properly in the documentation. > 2. If you are on a network that is affected by netsplits, you should avoid > clustering anyway - see . > The cluster is going to run with all nodes in a single available zone. Netsplits are unavoidable in any network but are less likely to happen in a setup like that. My biggest question still remains unanswered unfortunately: how do folks go about automating a cluster setup, with or without the issues described in my original email? Any input on that particular topic would be much appreciated. Thanks! Cheers, Mathias On Monday, 24. December 2012 at 12:31, Francesco Mazzoli wrote: > > > Hi Mathias, > > At Thu, 20 Dec 2012 15:48:05 +0100, > Mathias Meyer wrote: > > I spent some quality time automating a cluster setup of 3.0.1 on EC2 over the > > last couple of days, and came across some things that felt a bit odd to > > me. Maybe I did it all wrong, happy to be proven that I did. I apologize if > > this turns out a bit long, there are a couple of questions that boil down to a > > similar issue. Would be curious to hear how other folks have solved this > > issue, and mostly focussing on RabbitMQ 3.0, as, from what I've read, > > clustering behaviour has changed with that release. > > > > First a whee bit about the setup, nothing special really, but required to > > clarify some of the questions below: every node has a custom CNAME record > > rabbitmq1.domain.com (http://rabbitmq1.domain.com), rabbitmq2.domain.com (http://rabbitmq2.domain.com), each pointing to the EC2 host > > name. I do this because I prefer full hostnames over EC2 hostnames because it > > adds clarity to the whole setup, at least for me :) > > > > The first issue with this setup comes up when you want to change the hostname > > for the RabbitMQ node. Changing it post-installation is a bit of a hassle > > because the package already starts up the service. Changing the nodename to > > the FQDN and trying to restart the service after that leads to errors because > > the service can't be stopped anymore as the nodenames are now different. > > > > I solved this on EC2 by adding domain.com (http://domain.com) to the DHCP configuration and > > restarting the network before installing the RabbitMQ package. It's not a > > great solution, but acceptable. In the end it boils down to the package > > starting the service immediately on installation, more on that below. > > > > > Uhm, two things: > > * RabbitMQ does not like FQDNs - I think you can probably make it work by > tweaking the startup scripts, but I am not sure. What we recommend is not > to use FQDNs. > * If you change the hostname and restart RabbitMQ, things should go smoothly. > > That said, I?m not sure what DHCP has to do with this. I suppose that what you > have done is to make possible to resolve the short names of the other nodes, > since things are working. > > > The next issue is related to clustering. When RabbitMQ starts up, and there's > > a cluster_nodes section in the config, it seems to try and reach the nodes > > only once. This behaviour I'm not sure of, hence the question. I noticed that > > when a node can't look up any of the nodes in the cluster_nodes config, it > > won't try again at a later point in time, e.g. on restart. Therefore that node > > will never automatically join the cluster unless rabbitmqctl join_cluster is > > called. > > > > The DHCP configuration helped solve this issue as well, but I'm still > > wondering if a) my observation is correct and b) if this is desired > > behaviour. Should a new node be partitioned from the others only temporarily, > > when it joins, it requires manual intervention to force it to join the > > cluster. This somewhat seems to conform to what the documentation says: > > http://www.rabbitmq.com/clustering.html#auto-config, but I'm not entirely > > clear on whether a node just gives up trying to form a cluster once it > > couldn't reach any of the nodes in the cluster_nodes list. > > > > > The behaviour you describe is correct. The `cluster_nodes' list is only > effective on ?virgin? nodes, that is nodes that are started for the first time. > If the node can?t connect to any other node it won?t do anything. The rationale > behind that comes from boring technicalities related to how mnesia (the database > that backs RabbitMQ clustering) works, and most importantly the fact that > clustered nodes shouldn?t experience netsplits. So if you say ?Should a new > node be partitioned from the others only temporarily...?, maybe clustering is > not the right solution. > > Again, I?m don?t see how DHCP has anything to do with this. > > > So the question boils down to whether the automatic configuration is the way > > to go or if it makes more sense to automate commands (using Chef, btw) around > > the join_cluster and cluster_status commands. > > > > On top of that, to have a fresh node join the cluster, it needs to be stopped > > again (stop_app) and reset, which somewhat boils down to the service being > > started on package installation again. This behaviour seems to also have > > changed from 2.x where just updating the config and making sure all nodes have > > the same Erlang cookie is correct, right? > > > > So the biggest question is: how do folks work around the fact that the > > RabbitMQ node is started up on package installation. There's the option to use > > policy-rc.d systems, but I'm not quite sure how feasible this is to > > automate. Given that Chef runs every 30 minutes or so, the consequence would > > be to install a policy on every run or to check on every run whether or not > > the desired package is already installed. Currently I'm stopping the service > > after stop_app and reset, before installing the new Erlang cookie. I'm just > > not sure, it feels a bit weird to automate to me. I'd love for some input or > > suggestions on this. > > > > My current setup is working, and I can add nodes that automatically join the > > cluster, so it's okay. Just want to make sure it's the right approach, or if > > there are any other experiences on this. From what I understand there are > > differences to 2.x cluster setup, where updating the config and changing the > > Erlang cookie apparently were all that's needed, but that's from my reading of > > the documentation and existing Chef cookbooks > > (https://github.com/opscode-cookbooks/rabbitmq). Overall I feel like there's a > > bit of a lack of documentation on how setting up a cluster can or should be > > automated. Happy to help improving that situation, but I'd like to sure that > > the choices described above are sane or completely bullocks. > > > > Again, apologies for the long email. I hope the setup, issues and questions > > are somewhat clear. Please let me know if more input is require, happy to dive > > into more detail. > > > > Thank you for your time, for RabbitMQ clustering, and for any feedback you > > might have :) > > > > > I don?t know anything about EC2 or Chef, and I don?t understand what you are > doing with DHCP, but I?m quite sure you?re mixing up two separated issues: one > is related to FQDNs and how nodes resolve other node names, and the other is > related to how the automatic clustering configuration works. > > For what concerns the former, RabbitMQ nodes will use unqualified names (unless > you are tweaking how RabbitMQ nodes are started up), so you?ll have to play by > that. Obviously you?ll have to make the unqualified names resolve correctly on > each node, e.g. by adding entries in the hosts file. > > For what concerns the latter, if you are confident that netsplits won?t occur, > then the semantics of the `cluster_nodes' configuration should be fine. If that > is not the case you might need to hack up some other mechanism but I would > advise against that because > > 1. It?s easy to get wrong, clustering is quite delicate and there are many > subtleties. > 2. If you are on a network that is affected by netsplits, you should avoid > clustering anyway - see . > > And yes, things changed from 2.x on this front as part of efforts to make > clustering more solid. > > I hope this helps. > > Francesco -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Fri Dec 28 11:54:20 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 28 Dec 2012 11:54:20 +0000 Subject: [rabbitmq-discuss] Federation and upstream cluster In-Reply-To: References: <50DCFE32.1080900@rabbitmq.com> Message-ID: <50DD886C.4050904@rabbitmq.com> Vladislav, On 28/12/12 09:32, Vladislav Pernin wrote: > {{shutdown,{server_initiated_close,404, > <<"NOT_FOUND - home node > 'rabbit at remote-server1' of durable queue 'federation: upstream-exchange > -> federation-local:downstream-exchange' in vhost '/' is down or > inaccessible">>}}, That happens because the queue used by federation is durable but not mirrored, so when the node on which it was created goes down it is no longer accessible. You said you tried making that queue mirrored, but that resulted in message loss. How did you detect the message loss? Does the upstream publisher have confirms enabled? If it received a confirmation for a message then I certainly would expect the message to eventually make it to the downstream. In the absence of such confirmation all bets are off. Regards, Matthias. From vladislav.pernin at gmail.com Fri Dec 28 12:40:38 2012 From: vladislav.pernin at gmail.com (Vladislav Pernin) Date: Fri, 28 Dec 2012 13:40:38 +0100 Subject: [rabbitmq-discuss] Federation and upstream cluster In-Reply-To: <50DD886C.4050904@rabbitmq.com> References: <50DCFE32.1080900@rabbitmq.com> <50DD886C.4050904@rabbitmq.com> Message-ID: Hi, So you finally recommend to set a policy ha-mode all on the queue created in the upstream exchange's broker, like I did ? The test is very simple. I send 200 000 messages on the upstream exchange with a connection factory with both nodes and a retry timer (like in the Spring Rabbit AmqpAppender). I receive all messages on the downstream queue and verify that each sent message has been received. During the test, I shutdown and restart upstream node. But you are right, I do not use publisher confirm. I probably hit the "unsynchronized queue" problem. Otherwise, do you think that my setup is correct to make sure that the messages will arrive at the downstream exchange, not duplicated and without loss (publisher confirm excepted) ? Regards, Vladislav 2012/12/28 Matthias Radestock > Vladislav, > > > On 28/12/12 09:32, Vladislav Pernin wrote: > >> {{shutdown,{server_initiated_**close,404, >> <<"NOT_FOUND - home node >> 'rabbit at remote-server1' of durable queue 'federation: upstream-exchange >> -> federation-local:downstream-**exchange' in vhost '/' is down or >> inaccessible">>}}, >> > > That happens because the queue used by federation is durable but not > mirrored, so when the node on which it was created goes down it is no > longer accessible. > > You said you tried making that queue mirrored, but that resulted in > message loss. How did you detect the message loss? Does the upstream > publisher have confirms enabled? If it received a confirmation for a > message then I certainly would expect the message to eventually make it to > the downstream. In the absence of such confirmation all bets are off. > > Regards, > > Matthias. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Fri Dec 28 13:13:22 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 28 Dec 2012 13:13:22 +0000 Subject: [rabbitmq-discuss] Federation and upstream cluster In-Reply-To: References: <50DCFE32.1080900@rabbitmq.com> <50DD886C.4050904@rabbitmq.com> Message-ID: <50DD9AF2.90407@rabbitmq.com> Vladislav, On 28/12/12 12:40, Vladislav Pernin wrote: > So you finally recommend to set a policy ha-mode all on the queue > created in the upstream exchange's broker, like I did ? Yes. > Otherwise, do you think that my setup is correct to make sure that the > messages will arrive at the downstream exchange, not duplicated and > without loss (publisher confirm excepted) ? Yes, with one caveat...Rather than having an upstream set containing connection definitions for both upstream nodes, it would be better to have just one connection definition, to an upstream load balancer. Otherwise the order of messages cannot be preserved. There may be other undesirable behaviours when having multiple connections to the same logical upstream, though I'm not 100% sure. Regards, Matthias. From tim at rabbitmq.com Fri Dec 28 14:10:25 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 28 Dec 2012 14:10:25 +0000 Subject: [rabbitmq-discuss] Creating an auth plugin (Kerberos) In-Reply-To: <53443B9F-8877-4993-9732-35F417AE04F0@rabbitmq.com> References: <20121205134204.GK335@kaka.it.su.se> <24509631-CA1C-4A55-8E66-87E11E4E5D83@rabbitmq.com> <20121205155530.GL335@kaka.it.su.se> <20121211162045.GE754@kaka.it.su.se> <20121211193803.GG754@kaka.it.su.se> <4D859580-D762-4BFA-A759-43F94B500FC7@rabbitmq.com> <20121212093115.GH754@kaka.it.su.se> <8D205910-A3E3-472D-A7AA-8D5737812DC4@rabbitmq.com> <20121221093949.GA14329@kaka.it.su.se> <53443B9F-8877-4993-9732-35F417AE04F0@rabbitmq.com> Message-ID: <05223E0E-9BBE-4842-AC20-DBEB330791BD@rabbitmq.com> Simon - this works for me! Ha ha. Here's what I did. Firstly, I tweaked the package.mk so that the plugin got included in the release bundle, plus I had to add some noise to the compiler flags in order to build the native library on 64bit Mac OS (Lion). Then I made sure that the hard coded path which the on_load function uses to locate the image was exactly where $RABBITMQ_PLUGINS_EXPAND_DIR points to, plus the app+vsn/priv/.... etc. After this, the plugin loads correctly, the NIF is instantiated properly and I can interact with the kinit module as expected: t4 at iske:rabbitmq-server $ RABBITMQ_ALLOW_INPUT=1 ~/.bash/utilities/start-rabbit-noconf rabbit 5672 15672 Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4] [async-threads:30] [hipe] [kernel-poll:true] [lock-counting] Eshell V5.9.1 (abort with ^G) (rabbit at iske)1> +---+ +---+ | | | | | | | | | | | | | +---+ +-------+ | | | RabbitMQ +---+ | | | | | | v%%VSN%% +---+ | | | +-------------------+ AMQP 0-9-1 / 0-9 / 0-8 Copyright (C) 2007-2012 VMware, Inc. Licensed under the MPL. See http://www.rabbitmq.com/ node : rabbit at iske app descriptor : /Users/t4/work/vmware/rabbitmq-umbrella/rabbitmq-server/scripts/../ebin/rabbit.app home dir : /Users/t4 config file(s) : /tmp/etc/rabbit.config cookie hash : s5K3NR4kyNZMeKMtaQLkvQ== log : /tmp/rabbit.log sasl log : /tmp/rabbit-sasl.log database dir : /tmp/rabbitmq-rabbit-mnesia erlang version : 5.9.1 [SNIP] broker running -- plugins running amqp_client 0.0.0 rabbitmq_auth_backend_kerberos 0.0.0 rabbitmq_shovel 0.0.0 (rabbit at iske)1> (rabbit at iske)1> (rabbit at iske)1> kinit:module_info(). [{exports,[{init,0}, {kinit,2}, {module_info,0}, {module_info,1}]}, {imports,[]}, {attributes,[{vsn,[179147207627583207794822872273379546429]}]}, {compile,[{options,[{outdir,"/Users/t4/work/vmware/rabbitmq-umbrella/rabbitmq-public-umbrella/rabbitmq-auth-backend-kerberos/ebin"}, {i,"/Users/t4/work/vmware/rabbitmq-umbrella/rabbitmq-public-umbrella/rabbitmq-auth-backend-kerberos/include"}, debug_info]}, {version,"4.8.1"}, {time,{2012,12,28,14,4,2}}, {source,"/Users/t4/work/vmware/rabbitmq-umbrella/rabbitmq-public-umbrella/rabbitmq-auth-backend-kerberos/src/kinit.erl"}]}] (rabbit at iske)2> kinit:kinit(<<"foo">>, <<"bar">>). true (rabbit at iske)3> BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded (v)ersion (k)ill (D)b-tables (d)istribution a I suspect your problem is that you're not calculating the location of the directory into which the plugins are exploded properly. Take a look at rabbit_plugins:setup/0 to see how all these things are calculated, then try and mimic this behaviour to locate your target directory dynamically (and correctly!) at runtime. Cheers, Tim On 21 Dec 2012, at 10:21, Tim Watson wrote: > On 21 Dec 2012, at 09:40, Simon Lundstr?m wrote: > >> No worries, I'm on holiday and paternity leave until end of january. >> > > Great, because I'm not likely to spend much time on it for next couple of week either! :) > >> Happy holidays! > > You too! > >> - Simon >> >> On Fri, 2012-12-14 at 19:28:24 +0000, Tim Watson wrote: >>> Sorry I haven't managed to look at this yet. I will take a look at some point soon and see if I can debug the problem though. >> _______________________________________________ >> rabbitmq-discuss mailing list >> rabbitmq-discuss at lists.rabbitmq.com >> 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 From abuckner at homeaway.com Fri Dec 28 14:29:58 2012 From: abuckner at homeaway.com (Austin Buckner) Date: Fri, 28 Dec 2012 14:29:58 +0000 Subject: [rabbitmq-discuss] HA Queue declaration In-Reply-To: Message-ID: I'm currently running 2.8.7 in a cluster of 2 disk nodes and 1 ram node with a load balancer. We have a dev and a test env pointing at the same rabbit cluster using '/dev' and '/' for vhosts. In test we have long lived queues (per app) to start simulating our prod env and in dev we spin up auto delete queues(differing queue names based on the appVimId) to avoid the clutter of multiple people testing. I'm trying to push HA queues out and am running into a start up error. For /dev it works great, the app spins up the HA queues, finishes the tests and then they auto delete themselves. When I try pushing it out to our test env I get this error from the rabbit logs: connection <0.15043.4>, channel 1 - error: {amqp_error,precondition_failed, "inequivalent arg 'x-ha-policy'for queue 'queue.name' in vhost '/': received the value 'all' of type 'longstr' but current is none", 'queue.declare'} I've tried pushing it out with the non HA queues still up, and also with deleting them before trying to spin up the new ones and no dice still can't create these queues. I don't know if its worth noting that the queue names are still the same all I'm trying to do is simply declare them with the x-ha-policy = all Map params = new HashMap(); params.put("x-ha-policy", "all"); params.put("x-expires", TimeUnit.HOURS.toMillis(24)); Queue queue = new Queue(queueName, true, false, isAutoDelete, params); Has anyone else run into this problem? I realize I can upgrade to 3.0.1 and implement HA queues at the broker level but at this point I want to try and get this to work without having to go through and upgrade all of our envs. Let me know if you need any more log info or code snippets or elaboration. Thanks -Quinn -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Fri Dec 28 14:35:50 2012 From: tim at rabbitmq.com (Tim Watson) Date: Fri, 28 Dec 2012 14:35:50 +0000 Subject: [rabbitmq-discuss] HA Queue declaration In-Reply-To: References: Message-ID: <0A43D5F6-2457-485C-9291-135F02ED097E@rabbitmq.com> Hi On 28 Dec 2012, at 14:29, Austin Buckner wrote: > When I try pushing it out to our test env I get this error from the rabbit logs: > > connection <0.15043.4>, channel 1 - error: > {amqp_error,precondition_failed, > "inequivalent arg 'x-ha-policy'for queue 'queue.name' in vhost '/': received the value 'all' of type 'longstr' but current is none", > 'queue.declare'} > This error is quite explicit - there is already a queue with the same name in that vhost, for which the x-ha-policy is set to 'none' - declaring it with a different policy is an error. > > I've tried pushing it out with the non HA queues still up, and also with deleting them before trying to spin up the new ones and no dice still can't create these queues. If you've completely deleted the queues first, and redeclared them for the first time with x-ha-policy=all then it should work. If that's not the case, please post a transcript so we can reproduce the problem. > I don't know if its worth noting that the queue names are still the same all I'm trying to do is simply declare them with the x-ha-policy = all > If they already exist with a different x-ha-policy then that won't work. Otherwise, you should be fine! > Map params = new HashMap(); > params.put("x-ha-policy", "all"); > params.put("x-expires", TimeUnit.HOURS.toMillis(24)); > > Has anyone else run into this problem? I realize I can upgrade to 3.0.1 and implement HA queues at the broker level but at this point I want to try and get this to work without having to go through and upgrade all of our envs. > Whilst we always suggest upgrading where possible, this *should* work on 2.x series brokers as long as the declaration doesn't clash with an existing object (having different parameters). Cheers Tim From abuckner at homeaway.com Fri Dec 28 16:13:29 2012 From: abuckner at homeaway.com (Austin Buckner) Date: Fri, 28 Dec 2012 16:13:29 +0000 Subject: [rabbitmq-discuss] HA Queue declaration In-Reply-To: <0A43D5F6-2457-485C-9291-135F02ED097E@rabbitmq.com> Message-ID: It seems I should read the errors more closely. In each env we have 2 queues per app. I deleted the 01s for all except one in which case I deleted the 02 and thus the name collision on startup. Thanks for making me read what I type all is well now, I had the right notion but not a comprehensive execution. -Quinn On 12/28/12 8:35 AM, "Tim Watson" wrote: >Hi > >On 28 Dec 2012, at 14:29, Austin Buckner wrote: > >> When I try pushing it out to our test env I get this error from the >>rabbit logs: >> >> connection <0.15043.4>, channel 1 - error: >> {amqp_error,precondition_failed, >> "inequivalent arg 'x-ha-policy'for queue 'queue.name' in >>vhost '/': received the value 'all' of type 'longstr' but current is >>none", >> 'queue.declare'} >> > >This error is quite explicit - there is already a queue with the same >name in that vhost, for which the x-ha-policy is set to 'none' - >declaring it with a different policy is an error. > >> >> I've tried pushing it out with the non HA queues still up, and also >>with deleting them before trying to spin up the new ones and no dice >>still can't create these queues. > >If you've completely deleted the queues first, and redeclared them for >the first time with x-ha-policy=all then it should work. If that's not >the case, please post a transcript so we can reproduce the problem. > >> I don't know if its worth noting that the queue names are still the >>same all I'm trying to do is simply declare them with the x-ha-policy = >>all >> > >If they already exist with a different x-ha-policy then that won't work. >Otherwise, you should be fine! > >> Map params = new HashMap(); >> params.put("x-ha-policy", "all"); >> params.put("x-expires", TimeUnit.HOURS.toMillis(24)); >> >> Has anyone else run into this problem? I realize I can upgrade to 3.0.1 >>and implement HA queues at the broker level but at this point I want to >>try and get this to work without having to go through and upgrade all of >>our envs. >> > >Whilst we always suggest upgrading where possible, this *should* work on >2.x series brokers as long as the declaration doesn't clash with an >existing object (having different parameters). > >Cheers >Tim > >_______________________________________________ >rabbitmq-discuss mailing list >rabbitmq-discuss at lists.rabbitmq.com >https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss > From videlalvaro at gmail.com Fri Dec 28 16:28:39 2012 From: videlalvaro at gmail.com (Alvaro Videla) Date: Fri, 28 Dec 2012 17:28:39 +0100 Subject: [rabbitmq-discuss] question regarding topic routes Message-ID: Hi, I have a question regarding the topic exchange. How is the '#' meant to be used in binding keys? Actually, what happens when I have the following binding: #.some.topic.words ? Then I sent messages with the following routing keys: - here.are.some.topic.words <--- matches - here.some.topic.words <--- matches - here.topic.words <-- doesn't match? Does this mean that the three last words of my binding have to be 'some', 'topic' and 'words' but it doesn't matter how many words are there in front? Is it expected to be used this way or I should use '*' to represent how many words I want to skip from the beginning of the routing key? Regards, Alvaro -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Fri Dec 28 16:35:03 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 28 Dec 2012 16:35:03 +0000 Subject: [rabbitmq-discuss] question regarding topic routes In-Reply-To: References: Message-ID: <50DDCA37.8030001@rabbitmq.com> Alvaro, On 28/12/12 16:28, Alvaro Videla wrote: > How is the '#' meant to be used in binding keys? > > Actually, what happens when I have the following binding: > > #.some.topic.words ? > > Then I sent messages with the following routing keys: > > - here.are.some.topic.words <--- matches > - here.some.topic.words <--- matches > - here.topic.words <-- doesn't match? > > Does this mean that the three last words of my binding have to be > 'some', 'topic' and 'words' but it doesn't matter how many words are > there in front? Correct. From s3.1.3.3 of the AMQP 0-9-1 spec: The routing key used for a topic exchange MUST consist of zero or more words delimited by dots. Each word may contain the letters A-Z and a-z and digits 0-9. [NB: rabbit doesn't enforce this]. The routing pattern follows the same rules as the routing key with the addition that * matches a single word, and # matches zero or more words. Thus the routing pattern *.stock.# matches the routing keys usd.stock and eur.stock.db but not stock.nasdaq. So there is no restriction on where the * and # can go - beginning, middle, end are all fine. > Is it expected to be used this way Can't see why not. > or I should use '*' to represent how many words I want to skip from > the beginning of the routing key? If that is possible (it may not be, i.e. an app may want to match on the tail w/o knowing how many words there can be in the head) then it is likely to be more efficient than using #. Regards, Matthias. From matthias at rabbitmq.com Fri Dec 28 16:47:17 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Fri, 28 Dec 2012 16:47:17 +0000 Subject: [rabbitmq-discuss] Possible error in HA page documentation In-Reply-To: References: Message-ID: <50DDCD15.2080408@rabbitmq.com> Vladislav, On 24/12/12 14:34, Vladislav Pernin wrote: > I think there is a mistake in the page describing the HA policy for > distributed queue. > > The documentation says : > > PUT /api/parameters/policy/%2f/ha-all > {"pattern":"^ha\.", "definition":{"ha-mode":"all"}} > > The right syntax may be : > > PUT /api/policies/%2f/ha-all > {"pattern":"^ha\.", "definition":{"ha-mode":"all"}} Well spotted. Thanks for reporting this. Fixed. Regards, Matthias. From rmqjava1a at yahoo.com Fri Dec 28 18:00:30 2012 From: rmqjava1a at yahoo.com (CJ) Date: Fri, 28 Dec 2012 10:00:30 -0800 (PST) Subject: [rabbitmq-discuss] Persistence and Transactions In-Reply-To: <1356569140927-24204.post@n5.nabble.com> References: <1356569140927-24204.post@n5.nabble.com> Message-ID: <1356717630006-24229.post@n5.nabble.com> I got the coding examples for producing and consuming transactions from this site https://gist.github.com/613157 In this example a txcommit is used by the producer, but not the consumer My questrion involves the Consumer. I understand that a rollback is not possible on a nextDelivery (only on the sending side), and that only ACKS on consumers are transacted I noticed that the consumer does NOT have a txcommit or a txSelect. So do you actually need a txcommit on a consumer since only the ACK is transacted. Does the ACK tramsaction happen automatically without a txcommit. To have the fullest possible persistence on a consumer, is the consumer example in the link above sufficient for my purpose, and therefore I do not need a txselect or txcommit to get the ACK of the consumer transaction to be trasacted ? -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/Persistence-and-Transactions-tp24204p24229.html Sent from the RabbitMQ mailing list archive at Nabble.com. From mpietrek at skytap.com Fri Dec 28 18:58:43 2012 From: mpietrek at skytap.com (Matt Pietrek) Date: Fri, 28 Dec 2012 10:58:43 -0800 Subject: [rabbitmq-discuss] Additional fields returned via /api/overview? In-Reply-To: <50DCF677.20809@rabbitmq.com> References: <50DCF677.20809@rabbitmq.com> Message-ID: > How would you like to see that information presented? The page is fine for understanding what requests I can make but it doesn't at all cover what responses are expected. Thus, in order to see if a particular request is going to provide what I need, I have to construct a call and examine the output fields. It would be nice if there was a schema definition for what the response look like. JSON is fine for my needs - I don't know about others. An interesting twist on the above is also that in some circumstances, not all data is returned for a given request. I'm specifically thinking about the case where the 'stats' database isn't available, so only a subset of the fields were returned when querying queue stats (I think I'm recalling the exact scenario correctly.) A tiny bit more background - I'm starting to write tooling that will work against both 2.8 and 3.0 versions, so I need to query which version of the server I'm talking to. I initially queried a 3.0.1 instance for /api/overview and found the "rabbitmq_version" element. Great! So I coded that up in my tooling, and was then surprised when I didn't find that element when querying a 2.8.7 instance. Is this normal? Correct? Who knows? I have no schema reference to consult. :-) Matt On Thu, Dec 27, 2012 at 5:31 PM, Tim Watson wrote: > On 28/12/2012 00:55, Matt Pietrek wrote: > >> I've just noticed that when comparing the results of calling the HTTP >> API with /api/overview, there are at least a couple of fields that look >> new in 3.0X, relative to 2.8.7. In particular: >> >> rabbitmq_version >> erlang_version >> object_totals >> >> > Yes, those look familiar. > > > Is this expected? And if so, is there some sort of comprehensive list of >> changes to the HTTP provided data in 3.0.x, relative to 2.8.X? >> >> > Does http://hg.rabbitmq.com/**rabbitmq-management/raw-file/** > rabbitmq_v3_0_1/priv/www/api/**index.htmlnot meet your needs Matt? How would you like to see that information > presented? Is it just that you'd like example json documents for all the > API calls listed in that help page, or are you after some kind of schema - > and if so, in what format? > > Cheers, > Tim > > Thanks, >> >> Matt >> >> >> >> ______________________________**_________________ >> rabbitmq-discuss mailing list >> rabbitmq-discuss at lists.**rabbitmq.com >> https://lists.rabbitmq.com/**cgi-bin/mailman/listinfo/**rabbitmq-discuss >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rabbitmq.com Sat Dec 29 01:41:03 2012 From: tim at rabbitmq.com (Tim Watson) Date: Sat, 29 Dec 2012 01:41:03 +0000 Subject: [rabbitmq-discuss] Persistence and Transactions In-Reply-To: <1356717630006-24229.post@n5.nabble.com> References: <1356569140927-24204.post@n5.nabble.com> <1356717630006-24229.post@n5.nabble.com> Message-ID: Hi CJ On 28 Dec 2012, at 18:00, CJ wrote: > I got the coding examples for producing and consuming transactions from this > site > > https://gist.github.com/613157 > > In this example a txcommit is used by the producer, but not the consumer > That's your choice, you can use a transaction in the consumer as well if you wish. Just remember that doing so will create a completely separate transaction which has nothing to do with the producer's transaction. The hint (about the scope of transactions) is in the fact that the producer and consumer threads in that application are using separate connections. Even if the consumer was transactional, that would be completely independent of the producer's transaction, which would continue to govern only the publication of messages. This would only cease to be the case if both producing and consuming were taking place over the same channel. > My questrion involves the Consumer. I understand that a rollback is not > possible on a nextDelivery (only on the sending side), and that only ACKS on > consumers are transacted > > I noticed that the consumer does NOT have a txcommit or a txSelect. > That's a design decision really. The point about that gist is that even if the consumer had a transaction running, that transaction would *not* interact with the producer's transaction in any way. If the producer committed then the messages would become visible to the consumer. Whether or not the consumer is using a transaction is of no relevance to the producer as transactions are scoped to a single channel. > So do you actually need a txcommit on a consumer since only the ACK is > transacted. Does the ACK tramsaction happen automatically without a > txcommit. > No, the ACK is just handled normally because there is no transaction running for the consumer. Whether or not you want auto-ack or manual control over ACKs is up to you, but they're not transactional unless the channel is set to be so. Using transactions in a consumer provides a means to ACK received messages in a transaction context. Whether or not you want to be able to roll back consumed messages depends entirely on your application. The *common* case for this (and for transactions in AMQP in general) is, AFAICS, where the application is both publishing *and* consuming on the same channel, and wishes to be able to commit or roll back all the work of sending messages and sending ACKs for messages it has consumed as well, all in one 'bundle' as it were. For most users where the producer and consumer are decoupled, producer confirms are a better choice than transactions, although they offer different semantics. > To have the fullest possible persistence on a consumer, is the consumer > example in the link above sufficient for my purpose, and therefore I do not > need a txselect or txcommit to get the ACK of the consumer transaction to be > trasacted ? > I'm not really sure what you're asking here. It *sounds* like you're asking how to link the publishing and consuming parties into a single transaction, which would only work if they were running in the same application and using the same channel (and presumably the same thread). There is no way to get a publisher in App123 and a consumer in App456 to share a transaction context in that way. Also, the question of 'persistence' with regards consuming messages is a bit confusing. If you want to be able to consume and message, send an ACK for it and then change your mind, then using a transaction on the consumer's channel is a good idea. If the tx is rolled back then the broker will subsequently consider the message as 'still requiring an ACK' although it will not redeliver it. If you *do* want to use transactions in the consumer then as I said, you'll need to make the consumer's channel transactional. Hope that makes sense. Cheers, Tim From tim at rabbitmq.com Sat Dec 29 01:44:00 2012 From: tim at rabbitmq.com (Tim Watson) Date: Sat, 29 Dec 2012 01:44:00 +0000 Subject: [rabbitmq-discuss] Additional fields returned via /api/overview? In-Reply-To: References: <50DCF677.20809@rabbitmq.com> Message-ID: Hi Matt On 28 Dec 2012, at 18:58, Matt Pietrek wrote: > > How would you like to see that information presented? > > The page is fine for understanding what requests I can make but it doesn't at all cover what responses are expected. > > Thus, in order to see if a particular request is going to provide what I need, I have to construct a call and examine the output fields. It would be nice if there was a schema definition for what the response look like. JSON is fine for my needs - I don't know about others. > Well JSON schema is probably a non-starter as it's not formally settled into a 1.0 spec yet AFAIK. I suppose we *could* serve up a list of fields and mark them as mandatory or optional as well as providing their data types. > An interesting twist on the above is also that in some circumstances, not all data is returned for a given request. I'm specifically thinking about the case where the 'stats' database isn't available, so only a subset of the fields were returned when querying queue stats (I think I'm recalling the exact scenario correctly.) > I can see why that'd be annoying. > A tiny bit more background - I'm starting to write tooling that will work against both 2.8 and 3.0 versions, so I need to query which version of the server I'm talking to. I initially queried a 3.0.1 instance for /api/overview and found the "rabbitmq_version" element. Great! So I coded that up in my tooling, and was then surprised when I didn't find that element when querying a 2.8.7 instance. > > Is this normal? Correct? Who knows? I have no schema reference to consult. :-) > Fair point, though I suspect we'll end up improving the documentation rather than coming up with a way of providing a reference schema. I could be wrong though. :) From evasilchenko at groupcommerce.com Fri Dec 28 18:17:36 2012 From: evasilchenko at groupcommerce.com (Eugene Vasilchenko) Date: Fri, 28 Dec 2012 10:17:36 -0800 (PST) Subject: [rabbitmq-discuss] Can someone please confirm the clustered durable queue behavior? Message-ID: We are planning on using RabbitMQ extensively and I am writing some documentation right now so I just wanted to confirm something. Let's say I have a cluster of 3 machines running rabbit. All of my queues are durable and the node with the master durable queue dies. A new master is chosen and life goes on. Well, what happens when this old master rejoins the cluster? From murraytodd at gmail.com Fri Dec 28 21:24:54 2012 From: murraytodd at gmail.com (Murray Williams) Date: Fri, 28 Dec 2012 13:24:54 -0800 (PST) Subject: [rabbitmq-discuss] =?utf-8?q?Any_movement_on_RabbitMQ-=C3=98MQ=3F?= Message-ID: <4c327716-f2f5-4c30-a8e8-160b14460296@googlegroups.com> I'm trying to build some glue between a system that uses a low-level ?MQ implementation and some Enterprise (J2EE for the moment) frameworks, and I got excited when I read the blog about the RabbitMQ-?MQ plugin. Unfortunately, that plugin seems to depend on the older Erlang-?MQ (erlzmq) bindings instead of the newer erlzmq2 bindings, and the older bindings don't compile against my recent version of Erlang ("Driver compiled with incorrect version of erl_driver.h") so I'm stuck, unless I want to downgrade my system's Erlang version, but even if I did that, this would give me a very brittle solution. Does anyone know if the RabbitMQ-?MQ stuff has been used much in the past two years since the first posting? Am I looking at a dead end here? -------------- next part -------------- An HTML attachment was scrubbed... URL: From konklone at gmail.com Sat Dec 29 00:25:56 2012 From: konklone at gmail.com (Eric Mill) Date: Fri, 28 Dec 2012 16:25:56 -0800 (PST) Subject: [rabbitmq-discuss] Measuring end-to-end message delivery time In-Reply-To: <38fb3b6b-ba65-4dfe-b1af-d73b0b470703@googlegroups.com> References: <38fb3b6b-ba65-4dfe-b1af-d73b0b470703@googlegroups.com> Message-ID: <4f030e84-ff70-453d-912d-4c502eabf2b8@googlegroups.com> What I'd do is snapshot the time, down to the millisecond, on both servers, both before and after the message goes through the pipeline (to verify that they didn't drift apart or closer during the message sending event). Then timestamp the message and use the time delta between the two servers to adjust the message sent and receive timestamps to figure out the true time it took to send the message. -- Eric On Saturday, December 22, 2012 11:01:34 PM UTC-5, dbu... at peopleanswers.com wrote: > > Firstly, kudos to the RabbitMQ team for an astonishingly good product. We > are using it as the messaging bus backbone for our flagship application and > have had literally zero problems with it. Can't say enough good things. > > I'm hoping someone can help me figure out a solution for this. When we > send a message, it generally goes through a pipeline something like this: > > 1. (Sending JVM) A Java thread will push the message into a > ThreadPoolExecutor queue. > 2. (Sending JVM) The ThreadPoolExecutor sends the message to RabbitMQ. > 3. RabbitMQ delivers the message to the consumer. > 4. (Receiving JVM) The consumer receives the message and pushes it into a > ThreadPoolExecutor queue > 5. (Receiving JVM) The ThreadPoolExecutor handles the message > > My goal is to measure the total time spent, per message, with millisecond > accuracy, from one end of this pipeline to the other. I want to be able to > calculate this for every message sent through our message bus, so then I > can do analysis on those times, in real-time, and draw useful conclusions. > > The trouble is that the part pre-RabbitMQ (1-2) could be in a different > JVM on a different physical server than the part post-RabbitMQ (4-5). So I > can measure the time for steps 1, 2, 4, and 5. But how do I measure the > time it took for the message to actually travel through RabbitMQ (step 3)? > > I can't just time-stamp the message because the local time on the two > physical servers cannot be guaranteed to be synchronized to the > millisecond. We use NTP but it does not keep the two servers that closely > synchronized. > > So my question is: does RabbitMQ offer anything I can use that will allow > me to figure out how long step 4 took for each message I send through > RabbitMQ, or at least approximate it closely? Or is there some other clever > technoloogy I could use to accomplish the same thing? > > Thanks in advance, > Darrell Burgan > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Sat Dec 29 02:17:03 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Sat, 29 Dec 2012 02:17:03 +0000 Subject: [rabbitmq-discuss] Can someone please confirm the clustered durable queue behavior? In-Reply-To: References: Message-ID: <50DE529F.30701@rabbitmq.com> Eugene, On 28/12/12 18:17, Eugene Vasilchenko wrote: > Let's say I have a cluster of 3 machines running rabbit. All of my > queues are durable ...and mirrored, presumably... > and the node with the master durable queue dies. A new master is > chosen and life goes on. Well, what happens when this old master > rejoins the cluster? From what I understand is that it just gets a > new empty slave copy and just drains the old master queue of messages > until it's empty? Am I way off base here? The mirror that became master when the old master died will continue to function as the master. The old, rejoined master becomes a slave, initially empty and unsynchronised. Once all the messages that were in the master at that point have been dequeued by consumers, have expired, or were in any other way removed from the queue permanently, the slave becomes synchronised, i.e. it now holds the same messages as the master (namely all messages published after it joined and not yet removed). ...all of which is basically re-stating http://www.rabbitmq.com/ha.html#unsynchronised-slaves ;) Regards, Matthias. From matthias at rabbitmq.com Sat Dec 29 02:22:05 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Sat, 29 Dec 2012 02:22:05 +0000 Subject: [rabbitmq-discuss] Can someone please confirm the clustered durable queue behavior? In-Reply-To: <50DE529F.30701@rabbitmq.com> References: <50DE529F.30701@rabbitmq.com> Message-ID: <50DE53CD.20900@rabbitmq.com> On 29/12/12 02:17, Matthias Radestock wrote: > On 28/12/12 18:17, Eugene Vasilchenko wrote: >> Let's say I have a cluster of 3 machines running rabbit. All of my >> queues are durable > > ...and mirrored, presumably... Btw, note that durability is a red herring here; queue synchronisation behaviour when nodes (re)join the cluster is the same regardless of whether the queue is durable. Durability only comes into play when the last mirror of a queue is stopped and subsequently restarted. Matthias. From evasilchenko at groupcommerce.com Sat Dec 29 03:21:12 2012 From: evasilchenko at groupcommerce.com (Eugene Vasilchenko) Date: Fri, 28 Dec 2012 22:21:12 -0500 Subject: [rabbitmq-discuss] Can someone please confirm the clustered durable queue behavior? In-Reply-To: <50DE53CD.20900@rabbitmq.com> References: <50DE529F.30701@rabbitmq.com> <50DE53CD.20900@rabbitmq.com> Message-ID: Matthias, Thank you so much for the explanation. So if I understand it correctly, once the original master is back online as a slave, its old messages will get consumed, meaning it's possible that we will get some old, previously consumed messages again. (Since we already consumed them earlier from the new master?) If this is the case, is there any way to be able to tell if this message is stale? My only guess would be through the delivery tag? On Fri, Dec 28, 2012 at 9:22 PM, Matthias Radestock wrote: > On 29/12/12 02:17, Matthias Radestock wrote: > >> On 28/12/12 18:17, Eugene Vasilchenko wrote: >> >>> Let's say I have a cluster of 3 machines running rabbit. All of my >>> queues are durable >>> >> >> ...and mirrored, presumably... >> > > Btw, note that durability is a red herring here; queue synchronisation > behaviour when nodes (re)join the cluster is the same regardless of whether > the queue is durable. Durability only comes into play when the last mirror > of a queue is stopped and subsequently restarted. > > Matthias. > -- Front End Engineer | Group Commerce Inc. 646-549-8891 | evasilchenko at groupcommerce.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Sat Dec 29 03:32:36 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Sat, 29 Dec 2012 03:32:36 +0000 Subject: [rabbitmq-discuss] Can someone please confirm the clustered durable queue behavior? In-Reply-To: References: <50DE529F.30701@rabbitmq.com> <50DE53CD.20900@rabbitmq.com> Message-ID: <50DE6454.4000401@rabbitmq.com> Eugene, On 29/12/12 03:21, Eugene Vasilchenko wrote: > So if I understand it correctly, once the original master is back > online as a slave, its old messages will get consumed, meaning it's > possible that we will get some old, previously consumed messages > again. (Since we already consumed them earlier from the new master?) No, as I said The old, rejoined master becomes a slave, initially *empty* and unsynchronised. Matthias. From evasilchenko at groupcommerce.com Sat Dec 29 03:39:38 2012 From: evasilchenko at groupcommerce.com (Eugene Vasilchenko) Date: Fri, 28 Dec 2012 22:39:38 -0500 Subject: [rabbitmq-discuss] Can someone please confirm the clustered durable queue behavior? In-Reply-To: <50DE6454.4000401@rabbitmq.com> References: <50DE529F.30701@rabbitmq.com> <50DE53CD.20900@rabbitmq.com> <50DE6454.4000401@rabbitmq.com> Message-ID: Matthias, Thanks again, so this means that even though the queue is durable, since it's mirrored, the durability won't matter in this case until the last node goes down. So if the last node goes down and it restarts, since it's coming up as the first node and it's queue is durable, then it will just come back up with that queue still in tact. Right? On Fri, Dec 28, 2012 at 10:32 PM, Matthias Radestock wrote: > Eugene, > > > On 29/12/12 03:21, Eugene Vasilchenko wrote: > >> So if I understand it correctly, once the original master is back >> online as a slave, its old messages will get consumed, meaning it's >> possible that we will get some old, previously consumed messages >> again. (Since we already consumed them earlier from the new master?) >> > > No, as I said > > The old, rejoined master becomes a slave, initially *empty* and > unsynchronised. > > > Matthias. > -- Front End Engineer | Group Commerce Inc. 646-549-8891 | evasilchenko at groupcommerce.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Sat Dec 29 03:41:55 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Sat, 29 Dec 2012 03:41:55 +0000 Subject: [rabbitmq-discuss] Can someone please confirm the clustered durable queue behavior? In-Reply-To: References: <50DE529F.30701@rabbitmq.com> <50DE53CD.20900@rabbitmq.com> <50DE6454.4000401@rabbitmq.com> Message-ID: <50DE6683.4000101@rabbitmq.com> On 29/12/12 03:39, Eugene Vasilchenko wrote: > Thanks again, so this means that even though the queue is durable, since > it's mirrored, the durability won't matter in this case until the last > node goes down. So if the last node goes down and it restarts, since > it's coming up as the first node and it's queue is durable, then it will > just come back up with that queue still in tact. Right? Correct. Matthias. From tim at rabbitmq.com Sat Dec 29 10:42:51 2012 From: tim at rabbitmq.com (Tim Watson) Date: Sat, 29 Dec 2012 10:42:51 +0000 Subject: [rabbitmq-discuss] =?iso-8859-1?q?Any_movement_on_RabbitMQ-=D8MQ?= =?iso-8859-1?q?=3F?= In-Reply-To: <4c327716-f2f5-4c30-a8e8-160b14460296@googlegroups.com> References: <4c327716-f2f5-4c30-a8e8-160b14460296@googlegroups.com> Message-ID: Hi On 28 Dec 2012, at 21:24, Murray Williams wrote: > I'm trying to build some glue between a system that uses a low-level ?MQ implementation and some Enterprise (J2EE for the moment) frameworks, and I got excited when I read the blog about the RabbitMQ-?MQ plugin. Unfortunately, that plugin seems to depend on the older Erlang-?MQ (erlzmq) bindings instead of the newer erlzmq2 bindings, and the older bindings don't compile against my recent version of Erlang ("Driver compiled with incorrect version of erl_driver.h") so I'm stuck, unless I want to downgrade my system's Erlang version, but even if I did that, this would give me a very brittle solution. > > Does anyone know if the RabbitMQ-?MQ stuff has been used much in the past two years since the first posting? Am I looking at a dead end here? I can't speak to its usage, but it sounds like the project is in need of revitalising. If you want to be the community member to own that process (!?), I'd be glad to provide assistance with getting a plugin together that uses the new(er) bindings. This is not an officially supported plugin at the moment though, so it would be on a best effort/spare time basis. Let me know if you'd like to give it a go. At least if you're the plugin author you've got completely control over making sure it works in your environment! :) > _______________________________________________ > rabbitmq-discuss mailing list > rabbitmq-discuss at lists.rabbitmq.com > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss From michal.liwoj at gmail.com Sat Dec 29 11:19:51 2012 From: michal.liwoj at gmail.com (=?UTF-8?Q?Michal_Lev=C3=BD?=) Date: Sat, 29 Dec 2012 03:19:51 -0800 (PST) Subject: [rabbitmq-discuss] C# client publisher confirm bug under load (2.8.7) In-Reply-To: <9092b42e-94de-4f8f-87a9-daa2024cef5b@googlegroups.com> References: <9092b42e-94de-4f8f-87a9-daa2024cef5b@googlegroups.com> Message-ID: Hey Eric Problem is probably in fact, that model instance should not be used from multiple threads. If you are publishing from multiple threads, each thread should use its own IModel instance... Michal On Monday, December 10, 2012 3:22:51 PM UTC+1, Eric Swann wrote: > > When using publisher confirms with the C# code, there is a bug in the > client when experiencing any significant load. The offending code is in > the client "RabbitMQ.Client.Impl.ModelBase" class in the "BasicPublish" > method. > > if (m_nextPubSeqNo > 0) { > m_unconfirmedSet.*Add*(m_nextPubSeqNo, null); > m_nextPubSeqNo++; > } > > It looks like there are multiple threads hitting the bolded "*Add*" > method before the sequence number is incremented in the next line leading > to duplicate key exceptions being thrown by the "m_unconfirmedSet" sorted > list. This code either needs to have a lock around it or have > m_nextPubSeqNo change to a long so that "Interlocked.Increment" can be used > in the assignment. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michal.liwoj at gmail.com Sat Dec 29 11:41:05 2012 From: michal.liwoj at gmail.com (=?UTF-8?Q?Michal_Lev=C3=BD?=) Date: Sat, 29 Dec 2012 03:41:05 -0800 (PST) Subject: [rabbitmq-discuss] Routing Topologies - Multiple Queues vs One Queue In-Reply-To: <1d3602ac-c00c-4e38-913c-a2a699b5183f@googlegroups.com> References: <1d3602ac-c00c-4e38-913c-a2a699b5183f@googlegroups.com> Message-ID: Hi Adam Sorry but its obvious from your question that you dont understand AMQP basics. Scenarios you describe are very different. For example, in scenario #2 you are using one queue. If there are more consumers on single queue, only single consumer will get each message (rabbit will alternate between consumers in round-robin fashion). Its also not possible to subscribe to queue and get only messages with specified routing key. You always get all messages from that queue (if you are only subscriber). Last but not least, there is no way to publish messages with different routing keys into single queue using direct exchange because when using direct exchange, routing key is used as queue name... It would be better for you to check tutorialand AMQP concepts on rabbit website first HTH Michal On Friday, December 7, 2012 2:20:49 AM UTC+1, Adam Venturella wrote: > > My goal is to segregate tasks to different consumers. My messages are very > simple, I just may have a lot of them. > Assuming a direct exchange (no topics), is it better to have N queues with > 1 routing key per queue: > > Queue: foo > Routing Key: tasks > > Queue: bar > Routing Key: tasks > > Queue: baz > Routing Key: tasks > > > OR > > Is it better to have 1 queue with N routing keys. > > Queue: Tasks > Routing Key: foo > Routing Key: bar > Routing Key: baz > > My assumption is multiple routing keys are better. > Any advice? > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Sat Dec 29 11:46:43 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Sat, 29 Dec 2012 11:46:43 +0000 Subject: [rabbitmq-discuss] Routing Topologies - Multiple Queues vs One Queue In-Reply-To: References: <1d3602ac-c00c-4e38-913c-a2a699b5183f@googlegroups.com> Message-ID: <50DED823.8060003@rabbitmq.com> On 29/12/12 11:41, Michal Lev? wrote: > Last but not least, there is no way to publish messages with different > routing keys into single queue using direct exchange because when using > direct exchange, routing key is used as queue name... That's the behaviour of the *default* ('nameless') exchange, which is a special kind of direct exchange. More generally it is perfectly ok to bind queues to direct exchanges with any number of routing keys. Matthias. From f at mazzo.li Sat Dec 29 13:51:14 2012 From: f at mazzo.li (Francesco Mazzoli) Date: Sat, 29 Dec 2012 13:51:14 +0000 (UTC) Subject: [rabbitmq-discuss] Automating a RabbitMQ 3.0 cluster on EC2 References: <9882557829464795BC4C6547C54DDED1@paperplanes.de> <87623rk7p0.wl%f@mazzo.li> Message-ID: At Fri, 28 Dec 2012 12:26:52 +0100, Mathias Meyer wrote: > Regarding changing the host name, I tried that, and from my experiments, that > didn't seem to work properly. But that might have been related again to the > hostname temporarily not being resolvable. What did you do, and what didn?t work? It?s impossible for us to diagnose a problem without the symptoms. > The partitioning was mostly conjecture. It might happen, and it's still > fixable if it does. The whole mechanism just strikes me as less than ideal > when it comes to automating a cluster setup. This is set of assumptions that comes from a well established theorem: . RabbitMQ clustering sits on the CA side of things, with some limited support for partitioning. We provide other solutions that offer different guarantees, see . > They might seem different on the surface, but given how the RabbitMQ package > installer works, they bot converge into the issue of automating and > customizing a cluster setup. I?m not sure what you mean here. What does ?RabbitMQ package? refers to? Can you be more clear on why ?they converge into the same issue?? > Are all of them documented? Looking at the documentation, it seems to be > mostly straight-forward, except for the netsplits. If there are that many > subtleties, I sure wish they'd be mentioned properly in the documentation. Well, here to change clustering behavior you would probably have to force things a bit, either with ?dangerous? commands or by `eval'ing Erlang expressions - so you?d be delving into clustering internals that, as implementation details, are not documented. Note that you can also deploy some gentler measures like ?check that the node has clustered, try again in 5 minutes if it didn?t?, but those would be ad-hoc measures that we can?t generalize as default behaviour. > The cluster is going to run with all nodes in a single available > zone. Netsplits are unavoidable in any network but are less likely to happen > in a setup like that. Netsplits are tolerated to a certain extent, but currently we don?t precisely specify the semantics of the recovery mechanisms. What?s surely the case is that to use `join_cluster' both nodes have to be online - this is not that much about netsplits but about `join_cluster' being an operation that requires agreement from 2 parties. > My biggest question still remains unanswered unfortunately: how do folks go > about automating a cluster setup, with or without the issues described in my > original email? I?m still not sure what your problem is exactly. If the above makes sense, `join_cluster' should serve your needs. For what concerns the hostname problems, I?m waiting for more details. Francesco From meyer at paperplanes.de Sat Dec 29 14:12:06 2012 From: meyer at paperplanes.de (Mathias Meyer) Date: Sat, 29 Dec 2012 15:12:06 +0100 Subject: [rabbitmq-discuss] Automating a RabbitMQ 3.0 cluster on EC2 In-Reply-To: References: <9882557829464795BC4C6547C54DDED1@paperplanes.de> <87623rk7p0.wl%f@mazzo.li> Message-ID: <2E46CFA181E247DDAC9AB06CFBBC9720@paperplanes.de> On Saturday, 29. December 2012 at 14:51, Francesco Mazzoli wrote: > I?m not sure what you mean here. What does ?RabbitMQ package? refers to? Can > you be more clear on why ?they converge into the same issue?? > The package I mention refers to the package available on the RabbitMQ website. In this case I'm installing a Ubuntu package, which generates all its configuration files when installed and starts the service too. The problems outlined converge into the same issue because of this last bit. It might seem like a useful feature of the package, but given that a node that should enter the cluster needs to be fresh and untouched, this is practically impossible to achieve with the cluster_nodes section in the configuration, at least when trying to avoid hacks that generate the configuration beforehand, where users and directories don't yet exist. After the package installation, the node that was just freshly installed needs to be reset for these things to fully work. > > Well, here to change clustering behavior you would probably have to force > things a bit, either with ?dangerous? commands or by `eval'ing Erlang > expressions - so you?d be delving into clustering internals that, as > implementation details, are not documented. > > Note that you can also deploy some gentler measures like ?check that the node > has clustered, try again in 5 minutes if it didn?t?, but those would be ad-hoc > measures that we can?t generalize as default behaviour. > Sure, but I'm still interested in these, as odd as they may seem. My intent is to have an automated cluster setup, and for that to fully work, I need to know the oddities and ways to work around them. A lot of the documentation is aimed at setting up a cluster manually, which to me is a practice to be avoided in production. > > Netsplits are tolerated to a certain extent, but currently we don?t precisely > specify the semantics of the recovery mechanisms. What?s surely the case is > that to use `join_cluster' both nodes have to be online - this is not that much > about netsplits but about `join_cluster' being an operation that requires > agreement from 2 parties. > That's understandable behaviour, though I'd suggest considering some sort of retry in either scenario. Which might reduce the issues with the overall setup I've described here so far significantly. > > I?m still not sure what your problem is exactly. If the above makes sense, > `join_cluster' should serve your needs. For what concerns the hostname > problems, I?m waiting for more details. > join_cluster does fit my needs, but in an automated environment, e.g. with Chef, that command would be triggered every 30 minutes. Would you consider that a good practice to do? Hence me asking about experiences of automating a cluster setup in production. How people work to make it work, how people make sure a node joins the cluster, how to make sure resources aren't overused where not necessary, e.g. by triggering commands that don't need to be triggered, et.c Cheers, Mathias -------------- next part -------------- An HTML attachment was scrubbed... URL: From f at mazzo.li Sat Dec 29 14:37:38 2012 From: f at mazzo.li (Francesco Mazzoli) Date: Sat, 29 Dec 2012 14:37:38 +0000 (UTC) Subject: [rabbitmq-discuss] Automating a RabbitMQ 3.0 cluster on EC2 References: <9882557829464795BC4C6547C54DDED1@paperplanes.de> <87623rk7p0.wl%f@mazzo.li> <2E46CFA181E247DDAC9AB06CFBBC9720@paperplanes.de> Message-ID: > ... OK, I think I understand your issues better now: you?d like better tools to exist to setup clustering in an automated environment like Chef. Right now we don?t provide much in that space. What we had in mind is something along the lines of ?take a declarative description of a cluster, e.g. ?I want a rabbit cluster consisting of four nodes, A,B,C,D. A & B shall be disk nodes, C & D ram nodes?, and try to convert that into a set of commands to execute on the four machines, with the commands being idempotent and execution order between machines being irrelevant.?. This sounds reasonable and not too hard to do. I can?t promise anything though :). For what concerns now, things like > join_cluster does fit my needs, but in an automated environment, e.g. with > Chef, that command would be triggered every 30 minutes. Would you consider > that a good practice to do? Are perfectly fine, you can easily check periodically if a node is clustered as you want and fix it if something is not of your liking. However be aware that `join_cluster' will leave the current cluster the node is in and thus reset the node, so act carefully. Francesco From michael.dyer at digitaleragroup.com Sat Dec 29 14:42:43 2012 From: michael.dyer at digitaleragroup.com (austinnichols) Date: Sat, 29 Dec 2012 06:42:43 -0800 (PST) Subject: [rabbitmq-discuss] Management HTTP API - Specify Queue TTL Message-ID: Is it possible to specify TTL when creating a queue via the Management HTTP API (3.01)? I've tried using the following syntax, but the x-message-ttl parameter is ignored. {"auto_delete":false,"durable":true,"x-message-ttl":900000,"arguments":[]} I checked the Management HTTP API documentation and RMQ groups but was unable to find an answer.... Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmqjava1a at yahoo.com Sat Dec 29 23:26:04 2012 From: rmqjava1a at yahoo.com (CJ) Date: Sat, 29 Dec 2012 15:26:04 -0800 (PST) Subject: [rabbitmq-discuss] Persistence and Transactions In-Reply-To: <1356569140927-24204.post@n5.nabble.com> References: <1356569140927-24204.post@n5.nabble.com> Message-ID: <1356823564632-24250.post@n5.nabble.com> Thank you this is very helpful. I am writing 2 separate applications. One sending transactional messages, and another receiving transactional messages. I understand your point about the 2 transactions are separate and do not directly affect one another. My purpose for writing the producer and consumer this way is to make the applications as robust as possible to retain all messages. In your last post you wrote: > For most users where the producer and consumer are decoupled, producer > confirms are a better > choice than transactions, although they offer different semantics. Why are producer confirms better. Is this better and will this retain messages in the most secure manner possible. Also, what exactly does a producer confirm entail. Is this simply an auto-ACK ? -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/Persistence-and-Transactions-tp24204p24250.html Sent from the RabbitMQ mailing list archive at Nabble.com. From watson.timothy at gmail.com Sun Dec 30 09:33:13 2012 From: watson.timothy at gmail.com (Tim Watson) Date: Sun, 30 Dec 2012 09:33:13 +0000 Subject: [rabbitmq-discuss] Persistence and Transactions In-Reply-To: <1356823564632-24250.post@n5.nabble.com> References: <1356569140927-24204.post@n5.nabble.com> <1356823564632-24250.post@n5.nabble.com> Message-ID: Hi CJ On 29 Dec 2012, at 23:26, CJ wrote: > Thank you this is very helpful. > > I am writing 2 separate applications. One sending transactional messages, > and another receiving transactional messages. I understand your point about > the 2 transactions are separate and do not directly affect one another. My > purpose for writing the producer and consumer this way is to make the > applications as robust as possible to retain all messages. > That makes perfect sense. > In your last post you wrote: > > >> For most users where the producer and consumer are decoupled, producer >> confirms are a better >> choice than transactions, although they offer different semantics. > > Why are producer confirms better. Is this better and will this retain > messages in the most secure manner possible. > They're as reliable as transactions but offer far superior performance. > Also, what exactly does a producer confirm entail. Is this simply an > auto-ACK ? > > No not an auto-ack. Confirms are a RabbitMQ extension to AMQP. When confirms are enabled on a channel, the broker will reply with confirm-ok when it has 'taken full responsibility' for a message. If the queue is durable and the messages are marked as persistent, the broker will only reply once the messages are safely on disk an the file system has been fsynced. You can't really get safer than that. > > -- > View this message in context: http://rabbitmq.1065348.n5.nabble.com/Persistence-and-Transactions-tp24204p24250.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 From matthias at rabbitmq.com Sun Dec 30 12:24:59 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Sun, 30 Dec 2012 12:24:59 +0000 Subject: [rabbitmq-discuss] Management HTTP API - Specify Queue TTL In-Reply-To: References: Message-ID: <50E0329B.8040107@rabbitmq.com> On 29/12/12 14:42, austinnichols wrote: > Is it possible to specify TTL when creating a queue via the Management > HTTP API (3.01)? Yes. > I've tried using the following syntax, but the x-message-ttl parameter > is ignored. > > {"auto_delete":false,"durable":true,"x-message-ttl":900000,"arguments":[]} The x-message-ttl needs to go into the "arguments". Matthias. From michael.dyer at digitaleragroup.com Sun Dec 30 17:40:03 2012 From: michael.dyer at digitaleragroup.com (Michael Dyer) Date: Sun, 30 Dec 2012 12:40:03 -0500 Subject: [rabbitmq-discuss] Management HTTP API - Specify Queue TTL In-Reply-To: <50E0329B.8040107@rabbitmq.com> References: <50E0329B.8040107@rabbitmq.com> Message-ID: Thank you sir! BTW, I did run into a bit of trouble when trying to specify arguments. There are no examples of using arguments in the Management HTTP API docs so I had to experiment. Specifically I was trying to use: "arguments":[{"x-message-ttl":900000}] And found that I should be using: "arguments":{"x-message-ttl":900000} I don't manually create json all that often so I was making a basic mistake... On Sun, Dec 30, 2012 at 7:24 AM, Matthias Radestock wrote: > "**arguments":[] > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.santomaggio at gmail.com Mon Dec 31 14:37:41 2012 From: g.santomaggio at gmail.com (Gabriele Santomaggio) Date: Mon, 31 Dec 2012 15:37:41 +0100 Subject: [rabbitmq-discuss] Shovel on default virtual-host! Message-ID: Hello, I use this file: https://github.com/rabbitinaction/sourcecode/blob/master/configs/rabbitmq/rabbitmq.config.shovel So,it doesn't wok on my installation (two debian-6 with rabbitmq 3.0.1). I had to add "%2f? on [{broker, "amqp://guest:guest at localhost:5672/%2f"} and now it works. Without "%2f" I get this error: {amqp_error,access_refused,"access to vhost '' refused for user 'shovel'",'connection.open'}} I have read the amqp-uri spec here: http://pubs.vmware.com/vfabric52/index.jsp?topic=/com.vmware.vfabric.rabbitmq.2.8/rabbit-web-docs/uri-spec.html Could be an error? Or some configuration changed with the release RabbitMQ 3.0 ? Thank you! ------------------------ my file ----------------------------- {rabbitmq_shovel, [{shovels, [{avocado_order_shovel, [{sources, [{broker, "amqp://guest:guest at localhost :5672/%2f"}, {declarations, [{'queue.declare', [{queue, <<"backup_orders">>},durable]}, {'exchange.declare', [{exchange, <<"incoming_orders">>}, {type, <<"direct">>},durable]}, {'queue.bind', [{exchange, <<"incoming_orders">>}, {queue, <<"backup_orders">>}, {routing_key, <<"warehouse">>}]} ]}]}, {destinations, [{broker, "amqp://guest:guest at debianSlave:5672"}, ------------------------------------------------------------ -- Gabriele Santomaggio -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias at rabbitmq.com Mon Dec 31 15:11:18 2012 From: matthias at rabbitmq.com (Matthias Radestock) Date: Mon, 31 Dec 2012 15:11:18 +0000 Subject: [rabbitmq-discuss] Shovel on default virtual-host! In-Reply-To: References: Message-ID: <50E1AB16.4020703@rabbitmq.com> Gabriele, On 31/12/12 14:37, Gabriele Santomaggio wrote: > I use this file: > https://github.com/rabbitinaction/sourcecode/blob/master/configs/rabbitmq/rabbitmq.config.shovel > So,it doesn't wok on my installation (two debian-6 with rabbitmq 3.0.1). > I had to add "%2f? on [{broker, "amqp://guest:guest at localhost:5672/%2f"} > and now it works. > > Without "%2f" I get this error: > {amqp_error,access_refused,"access to vhost '' refused for user > 'shovel'",'connection.open'}} > > I have read the amqp-uri spec here: > http://pubs.vmware.com/vfabric52/index.jsp?topic=/com.vmware.vfabric.rabbitmq.2.8/rabbit-web-docs/uri-spec.html > > Could be an error? Or some configuration changed with the release > RabbitMQ 3.0 ? The docs you reference (as well as the docs for 3.0 at http://www.rabbitmq.com/uri-spec.html) state that: The vhost component may be absent; this is indicated by the lack of a "/" character following the amqp_authority. An absent vhost component is not equivalent to an empty (i.e. zero-length) vhost name. The above is correct as of RabbitMQ 2.7.0, so I'm guessing the example you found pre-dates that. Note that instead of adding %2f you could also drop the /, i.e. write "amqp://guest:guest at localhost:5672", since when the vhost is absent it is replaced by the default, which is "/". Also, you really should specify a uri of "amqp://" when connecting to the broker in which the shovel is running; that is establishing a direct connection rather than the network connection you'd get with a full URI, and is therefore considerably more efficient. Regards, Matthias. From murraytodd at gmail.com Mon Dec 31 15:44:06 2012 From: murraytodd at gmail.com (Murray Todd Williams) Date: Mon, 31 Dec 2012 07:44:06 -0800 (PST) Subject: [rabbitmq-discuss] =?utf-8?q?Any_movement_on_RabbitMQ-=C3=98MQ=3F?= In-Reply-To: References: <4c327716-f2f5-4c30-a8e8-160b14460296@googlegroups.com> Message-ID: <1356968646713-24256.post@n5.nabble.com> *Chuckle* Well, I'm not sure if I'm an appropriate person to own this. I don't know Erlang, or much of any functional programming for that matter. (I've had Lisp & Clojure on my wishful thinking to-do list for a while now.) I've got a medium-level of experience with build systems (autoconf, etc.) but this rebar thing even looks like a whole new world... I could put some organization time and effort, and I could definitely test on Windows, Linux and Mac OS X. I could even probably put together a SRPM and write some documentation. On the technical revitalization front, the only effort that would make sense would be to move RabbitMQ-?MQ to the erlzmq2 (NIF-based) bindings. It sounds like their native implementation had a significant performance boost and... well the whole point about ?MQ (in my opinion) is that it's all about when you really need that 10x performance and have to eschew the more "enterprise-friendly" protocols like AMQP. (When I read the blog by Martin S?strik about the work he and Michael Bridgen had done, it made a whole lot of sense and really got me pretty excited.) My hope is that, for the most part, the erlzmq->erlzmq2 API change would be pretty straightforward with at most a few subtle changes in the API call, but I've got nothing to base that on, other than the fact that there are only 25 lines in the module's source code that call the "zmq:" API, and they mostly look like "{ok, Data} = zmq:recv(Sock)". I would have attempted it myself, but given the fact that I have zero Erlang experience, I wouldn't even know where to begin in terms of debugging. But if anyone is willing to put in a little time on the technical side, I'm willing to test the build environments, assemble an SRPM (heck, maybe even figure out how to put together a Mac Port), write some documentation and essentially inject a little community spirit into things. Anyway, thanks, Tim for your response. (And Happy New Year) Murray Todd Williams Tim Watson-6 wrote > Hi > > I can't speak to its usage, but it sounds like the project is in need of > revitalising. If you want to be the community member to own that process > (!?), I'd be glad to provide assistance with getting a plugin together > that uses the new(er) bindings. This is not an officially supported plugin > at the moment though, so it would be on a best effort/spare time basis. > > Let me know if you'd like to give it a go. At least if you're the plugin > author you've got completely control over making sure it works in your > environment! :) > > On 28 Dec 2012, at 21:24, Murray Williams wrote: > >> I'm trying to build some glue between a system that uses a low-level ?MQ >> implementation and some Enterprise (J2EE for the moment) frameworks, and >> I got excited when I read the blog about the RabbitMQ-?MQ plugin. >> Unfortunately, that plugin seems to depend on the older Erlang-?MQ >> (erlzmq) bindings instead of the newer erlzmq2 bindings, and the older >> bindings don't compile against my recent version of Erlang ("Driver >> compiled with incorrect version of erl_driver.h") so I'm stuck, unless I >> want to downgrade my system's Erlang version, but even if I did that, >> this would give me a very brittle solution. >> >> Does anyone know if the RabbitMQ-?MQ stuff has been used much in the past >> two years since the first posting? Am I looking at a dead end here? -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/Any-movement-on-RabbitMQ-MQ-tp24234p24256.html Sent from the RabbitMQ mailing list archive at Nabble.com. From rmqjava1a at yahoo.com Mon Dec 31 23:02:22 2012 From: rmqjava1a at yahoo.com (CJ) Date: Mon, 31 Dec 2012 15:02:22 -0800 (PST) Subject: [rabbitmq-discuss] Persistence and Transactions In-Reply-To: <1356569140927-24204.post@n5.nabble.com> References: <1356569140927-24204.post@n5.nabble.com> Message-ID: <1356994942426-24257.post@n5.nabble.com> Thanks, I found the persistent confirm and got it to work rather easily. I have 2 questions about this In the examples, Why is the channel.waitForConfirmsOrDie() only performed after a batch of publishes, and not after each time a basicPublish is performed Also, I do not understand the difference between the following 2 persistence tyopes: MessageProperties.PERSISTENT_TEXT_PLAIN MessageProperties.PERSISTENT_BASIC I apologize in advance if I had missed this distintion in the documentations -- View this message in context: http://rabbitmq.1065348.n5.nabble.com/Persistence-and-Transactions-tp24204p24257.html Sent from the RabbitMQ mailing list archive at Nabble.com.