# RabbitMq Plugin issue

**URL:** <https://discuss.elastic.co/t/rabbitmq-plugin-issue/144088>\
**Category:** Logstash\
**Created:** [August 13, 2018, 7:13am UTC](https://discuss.elastic.co/t/rabbitmq-plugin-issue/144088 "2018-08-13T07:13:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tigryss](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@Tigryss](https://discuss.elastic.co/u/Tigryss)\
**Post date:** [August 13, 2018, 7:13am UTC](https://discuss.elastic.co/t/rabbitmq-plugin-issue/144088/1 "2018-08-13T07:13:52Z")

</div>

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:in`new\_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:in`initialize'", "/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: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: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:in`connect!'", "/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:in`run'", "/opt/logstash/logstash-core/lib/logstash/pipeline.rb:512:in `inputworker'", "/opt/logstash/logstash-core/lib/logstash/pipeline.rb:505:in`block 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

---

<div class="post-metadata">

**Author:** ![Tigryss](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@Tigryss](https://discuss.elastic.co/u/Tigryss)\
**Post date:** [August 16, 2018, 5:52am UTC](https://discuss.elastic.co/t/rabbitmq-plugin-issue/144088/2 "2018-08-16T05:52:19Z")

</div>

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:in`read\_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:in`connect'  
/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:in`connect'  
/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:in`run'  
/opt/logstash/logstash-core/lib/logstash/pipeline.rb:512:in `inputworker' /opt/logstash/logstash-core/lib/logstash/pipeline.rb:505:in`block in start\_input'  
[2018-08-16T06:49:10,656][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}

---

<div class="post-metadata">

**Author:** ![yaauie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yaauie/32/23363_2.png) [@yaauie](https://discuss.elastic.co/u/yaauie)\
**Post date:** [August 16, 2018, 7:28am UTC](https://discuss.elastic.co/t/rabbitmq-plugin-issue/144088/3 "2018-08-16T07:28:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Tigryss](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@Tigryss](https://discuss.elastic.co/u/Tigryss)\
**Post date:** [August 16, 2018, 7:38am UTC](https://discuss.elastic.co/t/rabbitmq-plugin-issue/144088/4 "2018-08-16T07:38:44Z")

</div>

Hi yaauie,

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

---

<div class="post-metadata">

**Author:** ![Tigryss](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@Tigryss](https://discuss.elastic.co/u/Tigryss)\
**Post date:** [August 16, 2018, 7:50am UTC](https://discuss.elastic.co/t/rabbitmq-plugin-issue/144088/5 "2018-08-16T07:50:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 13, 2018, 7:50am UTC](https://discuss.elastic.co/t/rabbitmq-plugin-issue/144088/6 "2018-09-13T07:50:54Z")

</div>

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