Emit more specific error than `[amqp] Detected TCP connection failure` #222

Closed
nhooey opened this Issue Apr 2, 2016 · 5 comments

Projects

None yet

2 participants

@nhooey
Contributor
nhooey commented Apr 2, 2016

This line in lib/amqp/session.rb emits [amqp] Detected TCP connection failure during the following conditions, which the comment lists:

  • We close TCP connection down
  • Our peer closes TCP connection down
  • There is a network connection issue
  • Initial TCP connection fails

Which is a lot of conditions to summarize in the word "failure".

The error should be specific so someone has a hope of troubleshooting the connection error.

@nhooey nhooey added a commit to nhooey/amqp that referenced this issue Apr 2, 2016
@nhooey nhooey Add some context to the `Detected TCP connection failure` message.
Closes #222.
6524dd9
@nhooey
Contributor
nhooey commented Apr 2, 2016

Awesome, thanks @michaelklishin! When can you cut a new release?

I'd like to get this in to Sensu as soon as possible.

@michaelklishin
Member

In the next few days.

@michaelklishin
Member

@nhooey I've released 1.5.3 (depends on amq-protocol 1.9.x, supports Ruby 1.9) and 1.6.0 (depends on amq-protocol 2.0.x, supports Ruby 2.0+).

In general, I'd highly recommend Sensu to switch to Bunny. amqp gem is not being actively maintained.

@nhooey
Contributor
nhooey commented Apr 4, 2016

@portertech What do you think about cutting a new release of Sensu using this version, and then switching to Bunny?

@nhooey
Contributor
nhooey commented Apr 4, 2016

Thanks for releasing his on short notice, @michaelklishin.

@jsonn jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Oct 17, 2016
taca Update ruby-amqp to 1.6.0.
## Changes Between 1.5.x and 1.6.0 (Apr 4th, 2016)

### amq-protocol Update

Minimum `amq-protocol` version is now `2.0.1`.

### Provide More Details in TCP Connection Failure Exception

Contributed by Neil Hooey.

GH issue: [#222](ruby-amqp/amqp#222).


### Ensures frameset is cleared after an unhandled exception

Ensures frameset is cleared after an unhandled exception.
This avoids confusing exceptions such as

```
undefined method `method_class' for #<AMQ::Protocol::BodyFrame:0x0000001e8a60b0>
```

Contributed by Michael Lutsiuk.

GH issue: [#218](ruby-amqp/amqp#218)
43728a4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment