-
Notifications
You must be signed in to change notification settings - Fork 20
heartbeat frames seem to cause connection failure #6
Comments
I believe we should handle AMQP 1.0 heartbeats. I could also believe that the code to do so might never have been tested. We should be logging any crash or failure; if there is nothing at all in the main or sasl log then that is itself a bug. I don't know anything about node.js, so in order to help look at this from the RabbitMQ end it would be really helpful to me if you could post a short set of instructions on how to run your client from scratch to expose this. |
@simonmacmullen thanks for the reply, so the raw hex being sent over the wire to cause this bug is "0000000802000000" if that helps with some sort of internal rabbit test. As for setting up a simple test, you can follow these steps:
At this point (if things are configured properly and the rabbitmq server is reachable) a whole bunch of debug data will be spewed out at you, and "connected" will show up at the bottom. After a short period of time you'll see a message indicating that it sent the heartbeat, and the corresponding ECONNRESET socket error |
@simonmacmullen I was looking for some unit tests I could perhaps add the raw data to, but it doesn't seem to exist per se. Do you have any unit tests I could look at to possibly submit a broken test case for? |
Sigh, this has been broken since 2010. References #6.
Unfortunately unit tests for the AMQP 1.0 plugin are quite weak. Anyway, this was easy enough to fix. I could replicate it with your test, but I did see errors in the SASL log when it crashed on receiving a heartbeat - didn't you? Heartbeats now look like they work, woo! |
@simonmacmullen I must have missed the sasl log, hrm. Well I'm glad you solved it! As I mentioned on the mailing list, I intend to create a suite of integration tests for node-amqp10 (as it shall soon be called) running against rabbitmq on travis, so hopefully that can establish a level of consistency for the plugin |
@simonmacmullen hm looks like I'm still getting a crash with the nightly build, albeit a new one this time:
|
@mbroadst: that's the same issue. It looks like nightlies have not actually succeeded for the last week or so (and they're on machines on a network which is quite flaky and which I can't currently access...) |
@simonmacmullen hrm thats strange, I don't recall seeing any errors on heartbeat previously (though we identified that I might have missed on in the sasl log). This was from the main rabbit log. Anyway, if it's as you say I'll keep an eye out for a new nightly build, thanks! |
@simonmacmullen any idea when the nightlies will be back up? Do you guys have a script for building the release debs (iirc the rabbitmq-public-umbrella's |
Hi! |
@simonmacmullen finally got around to building from source, and it looks like this indeed fixed. thanks. |
I'm working on a node amqp client and trying to run integration tests against rabbitmq, but it seems every time the internal heartbeat timer sends an empty (heartbeat) message rabbitmq immediately closes the connection, resulting in a local ECONNRESET.
Section 2.4.5 of the spec indicates that "Implementations MUST be prepared to handle empty frames arriving on any valid channel.." so this seems like a bug to me if that is indeed what is happening. To that end, I have no idea if that's actually what's happening because there isn't any trace information in the local rabbitmq log. Perhaps you could direct me as to how I might get more information?
The text was updated successfully, but these errors were encountered: