Error getsockopt: connection refused

I am getting below errors in one of the sidebar collector node. This host is not sending any logs to graylog2.
It was working 2 days back. now it stopped working.
Please help me to fix this issue

 tail -f /var/log/graylog/collector-sidecar/filebeat
2017-11-29T08:58:30-06:00 INFO No non-zero metrics in the last 30s
2017-11-29T08:58:43-06:00 ERR Connecting error publishing events (retrying): dial tcp 10.0.40.232:5044: getsockopt: connection refused
2017-11-29T08:59:00-06:00 INFO No non-zero metrics in the last 30s
server_url: http://10.0.99.61:9000/api/
update_interval: 10
tls_skip_verify: true
send_status: true
list_log_files:
 - /var/log/
node_id: node1
collector_id: file:/etc/graylog/collector-sidecar/collector-id
cache_path: /var/cache/graylog/collector-sidecar
log_path: /var/log/graylog/collector-sidecar
log_rotation_time: 86400
log_max_age: 604800
tags:
    - messages
    - audit

backends:
    - name: nxlog
      enabled: false
      binary_path: /usr/bin/nxlog
      configuration_path: /etc/graylog/collector-sidecar/generated/nxlog.conf
    - name: filebeat
      enabled: true
      binary_path: /usr/bin/filebeat
      configuration_path: /etc/graylog/collector-sidecar/generated/filebeat.yml

beats input

    bind_address:
     0.0.0.0
    override_source:
     <empty>
    port:
     5044
    recv_buffer_size:
     1048576
    tcp_keepalive:
     false
    tls_cert_file:
     <empty>
    tls_client_auth:
     disabled
    tls_client_auth_cert_file:
     <empty>
    tls_enable:
     false
    tls_key_file:
     <empty>
    tls_key_password:
     ********

Are you sure that 10.0.40.232 is the correct IP address of the Graylog node running the Beats input?
What’s the output of netstat -tplen on the machine with the IP address 10.0.40.232?

Are you sure that 10.0.40.232 is the correct IP address of the Graylog node running the Beats input?
yes

Well, I’m not sure why you removed the output of netstat again but there’s nothing running on port 5044…

Thanks for your help… Issue with port no and added into iptables rules. It fixed.

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