RabbitMq Plugin issue

Hi

i have an ActiveMQ server which sending me a log4j messages,

so I try connect with logstash-input-rabbitmq

input {
rabbitmq {
host => "testurl"
port => 18062
queue => "ELK.PLAY.QUEUE"
}
}

[2018-08-13T06:56:07,403][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5}
[2018-08-13T06:56:07,505][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0x2a4792cc run>"}
[2018-08-13T06:56:07,583][DEBUG][logstash.inputs.rabbitmq ] Connecting to RabbitMQ. Settings: {:vhost=>"/", :hosts=>["testurl"], :port=>18062, :user=>"guest", :automatic_recovery=>true, :pass=>"guest", :timeout=>0, :heartbeat=>0}
[2018-08-13T06:56:07,617][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2018-08-13T06:56:07,645][DEBUG][logstash.agent ] Starting puma
[2018-08-13T06:56:07,673][DEBUG][logstash.agent ] Trying to start WebServer {:port=>9600}
[2018-08-13T06:56:07,733][DEBUG][logstash.api.service ] [api-service] start
[2018-08-13T06:56:07,737][ERROR][logstash.inputs.rabbitmq ] RabbitMQ connection error, will retry. {:error_message=>"Connection to localhost:5672 refused", :exception=>"MarchHare::ConnectionRefused", :backtrace=>["/opt/logstash/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare/session.rb:505:in converting_rjc_exceptions_to_ruby'", "/opt/logstash/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare/session.rb:541:innew_connection_impl'", "/opt/logstash/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare/session.rb:534:in build_new_connection'", "/opt/logstash/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare/session.rb:157:ininitialize'", "/opt/logstash/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare/session.rb:127:in connect'", "/opt/logstash/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare.rb:24:inconnect'", "/opt/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-mixin-rabbitmq_connection-5.0.2-java/lib/logstash/plugin_mixins/rabbitmq_connection.rb:201:in connect'", "/opt/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-mixin-rabbitmq_connection-5.0.2-java/lib/logstash/plugin_mixins/rabbitmq_connection.rb:138:inconnect!'", "/opt/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-rabbitmq-6.0.3/lib/logstash/inputs/rabbitmq.rb:183:in setup!'", "/opt/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-rabbitmq-6.0.3/lib/logstash/inputs/rabbitmq.rb:177:inrun'", "/opt/logstash/logstash-core/lib/logstash/pipeline.rb:512:in inputworker'", "/opt/logstash/logstash-core/lib/logstash/pipeline.rb:505:inblock in start_input'"]}
[2018-08-13T06:56:07,873][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}

Is there any reason why LS try to connect to "defaulthost:defaultport" and not to the configured url?

error_message=>"Connection to localhost:5672 refused"

Br
Tig

I tried also with stomp, but also error:

config:
stomp {
host => "testurl"
port => 18062
destination => "ELK.PLAY.QUEUE"
debug=>true
}

error

[2018-08-16T06:49:10,609][ERROR][logstash.pipeline ] A plugin had an unrecoverable error. Will restart this plugin.
Pipeline_id:main
Plugin: <LogStash::Inputs::Stomp host=>"testurl", port=>18062, destination=>"ELK.PLAY.QUEUE", debug=>true, id=>"5aab6a38781ad18304b22e56f42a706c68f2947a6566962fcbe1663e89a6eda8", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_27a8ea90-3b85-452e-91d6-b96467b668a5", enable_metric=>true, charset=>"UTF-8">, password=>, reconnect=>true, reconnect_interval=>30>
Error: End of file reached
Exception: EOFError
Stack: org/jruby/RubyIO.java:2803:in read_nonblock' /opt/logstash/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/connections/base.rb:354:inread_nonblock'
/opt/logstash/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/connections/base.rb:239:in io_process_read' /opt/logstash/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/connections/base.rb:109:inconnect'
/opt/logstash/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/connections.rb:49:in connect' /opt/logstash/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/client.rb:85:inconnect'
/opt/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-stomp-3.0.8/lib/logstash/inputs/stomp.rb:46:in connect' /opt/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-stomp-3.0.8/lib/logstash/inputs/stomp.rb:104:inrun'
/opt/logstash/logstash-core/lib/logstash/pipeline.rb:512:in inputworker' /opt/logstash/logstash-core/lib/logstash/pipeline.rb:505:inblock in start_input'
[2018-08-16T06:49:10,656][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}

What leads you to believe that the Stomp Input Plugin or the RabbitMQ Input Plugin would be able to connect to your ActiveMQ? RabbitMQ and ActiveMQ are distinct technologies with their own protocols. Stomp is a layer on top of several queuing services, but it requires installation on the queue servers themselves before other services can use the Stomp protocol to talk to the queue.

Hi yaauie,

i folloewd this blog:
http://blog.florian-hopf.de/2015/07/activemq-as-message-broker-for-logstash.html

So here if you try first time Amq: https://activemq.apache.org/stomp.html

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.