Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError after reconnect #359

Closed
eflukx opened this issue Nov 16, 2015 · 5 comments
Closed

NoMethodError after reconnect #359

eflukx opened this issue Nov 16, 2015 · 5 comments
Assignees

Comments

@eflukx
Copy link

eflukx commented Nov 16, 2015

Bunny is not reconnecting as expected after network issues. Bunny connection was setup using :automatically_recover=>true. After reconnecting the following happens. Parsing error of bogus data? I'm using RabbitMQ v 3.4.4 on Ubuntu as AMQP server. The bunny client is running on Windows 7 x64, MRI v2.2.

E, [2015-11-16T20:48:09.238787 #180960] ERROR -- #<Bunny::Session:0x45f4788 user@host.name:5672, vhost=/, addresses=[host.name:5672]>: Got an exception when receiving data: An existing connection was forcibly closed by the remote host. (Errno::ECONNRESET)
W, [2015-11-16T20:48:09.313791 #180960]  WARN -- #<Bunny::Session:0x45f4788 user@host.name:5672, vhost=/, addresses=[host.name:5672]>: Recovering from a network failure...
W, [2015-11-16T20:48:19.346365 #180960]  WARN -- #<Bunny::Session:0x45f4788 user@host.name:5672, vhost=/, addresses=[host.name:5672]>: Retrying connection on next host in line: host.name:5672
W, [2015-11-16T20:48:34.160212 #180960]  WARN -- #<Bunny::Session:0x45f4788 user@host.name:5672, vhost=/, addresses=[host.name:5672]>: TCP connection failed, reconnecting in 5.0 seconds
W, [2015-11-16T20:48:44.200787 #180960]  WARN -- #<Bunny::Session:0x45f4788 user@host.name:5672, vhost=/, addresses=[host.name:5672]>: Retrying connection on next host in line: host.name:5672
C:/Ruby22/lib/ruby/gems/2.2.0/gems/amq-protocol-2.0.0/lib/amq/protocol/frame.rb:62:in `decode_header': undefined method `unpack' for #<Hash:0x45f4260> (NoMethodError)
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bunny-2.2.1/lib/bunny/transport.rb:245:in `read_next_frame'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bunny-2.2.1/lib/bunny/reader_loop.rb:68:in `run_once'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bunny-2.2.1/lib/bunny/reader_loop.rb:35:in `block in run_loop'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bunny-2.2.1/lib/bunny/reader_loop.rb:32:in `loop'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bunny-2.2.1/lib/bunny/reader_loop.rb:32:in `run_loop'
@michaelklishin
Copy link
Member

We need a traffic capture to suggest something. A hash coming from the parser sounds pretty odd.

If you have a way to reproduce, please capture traffic with Wireshark and post your dump somewhere.

@eflukx
Copy link
Author

eflukx commented Nov 16, 2015

Dam'n you're fast 🚀

Just updated my Windows WiFi driver, if that seems to cure the issue I'll downgrade to unfix the issue and see if i can reproduce the problem.

@eflukx
Copy link
Author

eflukx commented Nov 16, 2015

Done: see this gist

Triggered the issue by switching off my access point.

@michaelklishin
Copy link
Member

I cannot reproduce this and we haven't seen this reported elsewhere => considering this environment-specific :(

@djmb
Copy link
Contributor

djmb commented Mar 15, 2016

I've also seen this issue and I've managed to fix it in my case with this PR: #387

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants