We're updating the issue view to help you get more done. 

RabbitMQ input plugin failures leave open sockets

Description

Configure a logstash server with the following RabbitMQ input:

1 2 3 4 5 6 7 8 9 10 11 input { rabbitmq { host => "bunny.contoso.com" type => "json_event" exchange => "LogStashTransport" queue => 'LogstashQ' auto_delete => false durable => true exclusive => false } }

The RabbitMQ server should be running, but with nothing putting data into the server. Then wait 15 minutes and see lots of sockets open and messages in the log file of the following form:

1 {:timestamp=>"2013-12-12T14:33:15.096000+0000", :message=>"RabbitMQ connection error: NOT_FOUND - no exchange 'LogStashTransport' in vhost '/'. Will reconnect in 10 seconds...", :level=>:error}

The problem is that the code did connect to the server, but did not close the socket.

The error seems to be present even in the latest version, around https://github.com/logstash/logstash/blob/master/lib/logstash/inputs/rabbitmq/march_hare.rb#L52

I think teardown needs to be called in the rescue clause.
But since this looks like a Hot Bunnies issue, I'll cross file there as well, when I find it.

Environment

None

Status

Assignee

Suyog Rao

Reporter

Luis F. Ortiz

Labels

Affects versions

1.2.2
1.4.0

Priority