title: Logstash Rabbitmq connection refused
body: <p>Have installed Elasticsearch-6.6.0 and kibana-6.6.0 in Windows core 2016 Server it is up and running, I had to index the data from Rabbitmq, so downloaded and unzipped logstash-6.0.0 and made a config file for rabbitmq as follows</p>
  
  <pre><code>input {
      rabbitmq {
          arguments =&gt; { "x-ha-policy" =&gt; "all" }
          host =&gt; "172.xx.xx.xx"
          queue =&gt; "xx.flow.queue"
          #durable =&gt; true
          key =&gt; "flowtrack"
          exchange =&gt; "xx.test.exchange"
          threads =&gt; 120
          exclusive =&gt; false
          prefetch_count =&gt; 512
          vhost =&gt; "/"
          port =&gt; 5672
          user =&gt; "usr"
          password =&gt; "Pass@123"
      }
  }
  output {
    elasticsearch {
      hosts =&gt; ["172.xx.xx.xx:9200"]
    }
  }
  </code></pre>
  
  <p>Ran logstash through commandline as follows</p>
  
  <pre><code>    c:\logstash-6.0.0&gt;bin\logstash -f config\rabbitmq.conf
  </code></pre>
  
  <p>but it throws error as follows</p>
  
  <pre><code> [2019-02-20T23:01:28,696][ERROR][logstash.inputs.rabbitmq ] RabbitMQ connection error, will retry. {:error_message=&gt;"Connection to localhost:5672 refused", :exception=&gt;"MarchHare::ConnectionRefused"}
      [2019-02-20T23:01:28,696][ERROR][logstash.inputs.rabbitmq ] RabbitMQ connection error, will retry. {:error_message=&gt;"Connection to localhost:5672 refused", :exception=&gt;"MarchHare::ConnectionRefused"}
  </code></pre>
  
  <p>Port 5672 is open in host
  Let me know if i have missed anything in configuration which is leading to this error.</p>
  
  <p>Thanks in advance </p>