Rabbitmq logstash connection error


(krishna singh) #1

This is my logstash.conf file. I want my output in rabbitmq server... but it showing me RABBITMQ connection Error.please help me out.

input {
file {
path => "/var/log/"
type => "syslog"
}
rabbitmq {
host => "localhost"
exchange => "logexchange"
port => 5672
user => "guest"
password => "guest"
}
file {
path => "/var/log/apache2/*.log"
type => "apache"
start_position => "beginning"
}
}

filter {
if [path] =~ "access" {
mutate { replace => { "type" => "apache_access" } }
grok {
match => { "message" => "%{COMBINEDAPACHELOG}" }
}
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
}
}

output {
rabbitmq {
exchange => "logexchange"
exchange_type => "direct"
host => "localhost"
user => "guest"
port => 5672
password => "guest"
}
stdout { codec => rubydebug }
}

Error:
RabbitMQ connection error: . Will reconnect in 10 seconds... {:level=>:error}

Please help me out.


(Mark Walkom) #2

Is there more to the error at all? What is show in your RBMQ logs?


(krishna singh) #3

Using milestone 2 input plugin 'file'. This plugin should be stable, but if you see strange behavior, please let us know! For more information on plugin milestones, see http://logstash.net/docs/1.4.3/plugin-milestones {:level=>:warn}
Using milestone 1 input plugin 'rabbitmq'. This plugin should work, but would benefit from use by folks like you. Please let us know if you find bugs or have suggestions on how to improve this plugin. For more information on plugin milestones, see http://logstash.net/docs/1.4.3/plugin-milestones {:level=>:warn}
Using milestone 1 output plugin 'rabbitmq'. This plugin should work, but would benefit from use by folks like you. Please let us know if you find bugs or have suggestions on how to improve this plugin. For more information on plugin milestones, see http://logstash.net/docs/1.4.3/plugin-milestones {:level=>:warn}

It stuck at this moment.


(krishna singh) #4

RabbitMQ connection error: . Will reconnect in 10 seconds... {:level=>:error}
Exception in thread "<rabbitmq" org.jruby.exceptions.RaiseException: (ShutdownSignal) LogStash::ShutdownSignal
at org.jruby.RubyThread.raise(org/jruby/RubyThread.java:920)
MarchHare::ChannelAlreadyClosed: Attempt to use closed channel
convert_and_reraise at /home/krishna/Downloads/logstash-1.4.3/vendor/bundle/jruby/1.9/gems/march_hare-2.1.2-java/lib/march_hare/exceptions.rb:120
converting_rjc_exceptions_to_ruby at /home/krishna/Downloads/logstash-1.4.3/vendor/bundle/jruby/1.9/gems/march_hare-2.1.2-java/lib/march_hare/channel.rb:962
queue_delete at /home/krishna/Downloads/logstash-1.4.3/vendor/bundle/jruby/1.9/gems/march_hare-2.1.2-java/lib/march_hare/channel.rb:506
delete at /home/krishna/Downloads/logstash-1.4.3/vendor/bundle/jruby/1.9/gems/march_hare-2.1.2-java/lib/march_hare/queue.rb:134
teardown at /home/krishna/Downloads/logstash-1.4.3/lib/logstash/inputs/rabbitmq/march_hare.rb:69
shutdown at /home/krishna/Downloads/logstash-1.4.3/lib/logstash/pipeline.rb:247
each at org/jruby/RubyArray.java:1613
shutdown at /home/krishna/Downloads/logstash-1.4.3/lib/logstash/pipeline.rb:246
each at org/jruby/RubyArray.java:1613
shutdown at /home/krishna/Downloads/logstash-1.4.3/lib/logstash/pipeline.rb:234
execute at /home/krishna/Downloads/logstash-1.4.3/lib/logstash/agent.rb:120
call at org/jruby/RubyProc.java:271
each at org/jruby/RubyArray.java:1613
simulate_signal at /home/krishna/Downloads/logstash-1.4.3/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/trap.rb:46
trap at /home/krishna/Downloads/logstash-1.4.3/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/trap.rb:26
call at org/jruby/RubyProc.java:271


(Magnus B├Ąck) #5

I think this (lack of) error message has popped up before, and back then the problem was that Logstash wasn't configured to connect to the right vhost.

Apart from checking all entities again (exchange name etc) I'd see if Wireshark is capable of deciphering AMQP frames (I think it is) and dump some of the traffic to find out what's wrong. Then, file a GitHub issue about it.


(system) #6