<p>I have deployed ELK stack in kubernetes cluster which is working fine. Now i have deployed rabbitMQ in the cluster and integrated with logstash so that i can view the message in kibana. My logstash configMap looks like this :</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: logstash-configmap
  namespace: kube-system
data:
  logstash.yml: |
     http.host: &quot;0.0.0.0&quot;
     path.config: /usr/share/logstash/pipeline
  logstash.conf: |
   
    input {
      rabbitmq{
        host =&gt; &quot;rabbitmq-cip-svc&quot;
        port =&gt; 15672
        durable =&gt; true
      }
    }

     output {
        elasticsearch {
            hosts =&gt; [ &quot;elasticsearch-logging:9200&quot; ]
        }
    }
</code></pre>
<p>I also checked the config file inside the container using the command below and it has the same configuration as mentioned in the configmap.</p>
<pre><code>kubectl exec logstash-deployment-d85dbdcdc-k662d --stdin --tty  -- binbash
</code></pre>
<p>Now the issue is the connection between rabbitmq and logstash is not working and when i checked the log i can see the following error message.</p>
<pre><code>[INFO ] 2020-07-17 12:27:52.933 [Ruby-0-Thread-1: /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22] agent - Pipelines running {:count=&gt;1, :running_pipelines=&gt;[:main], :non_running_pipelines=&gt;[]}
[INFO ] 2020-07-17 12:27:53.049 [Api Webserver] agent - Successfully started Logstash API endpoint {:port=&gt;9600}
[ERROR] 2020-07-17 12:30:03.834 [[main]&lt;rabbitmq] rabbitmq - RabbitMQ connection error, will retry. {:error_message=&gt;&quot;Connection to localhost:5672 refused&quot;, :exception=&gt;&quot;MarchHare::ConnectionRefused&quot;}
</code></pre>
<p>Not sure from where it is picking up this configuration. Can someone  help regarding this?</p>

Rabin Bhattacharya
<p>The issue was resolved after changing the rabbit MQ port to 5672.</p>
<p>Thanks,
Rabin</p>
