Logstash unable to bind to external IP

I have filebeat and logstash running of different droplets in digitalocean. When I use internal IP of logstash droplet in output.logstash section of filebeat.yml, everything works fine. When I change it to an external IP like IPv4, I get this error.

2019-05-07T04:31:08.874Z	ERROR	pipeline/output.go:100	Failed to connect to backoff(async(tcp://68.183.156.250:5043)): dial tcp 68.183.156.250:5043: connect: connection refused
2019-05-07T04:31:08.874Z	INFO	pipeline/output.go:93	Attempting to reconnect to backoff(async(tcp://68.183.156.250:5043)) with 1 reconnect attempt(s)
2019-05-07T04:31:10.918Z	ERROR	pipeline/output.go:100	Failed to connect to backoff(async(tcp://68.183.156.250:5043)): dial tcp 68.183.156.250:5043: connect: connection refused
2019-05-07T04:31:10.918Z	INFO	pipeline/output.go:93	Attempting to reconnect to backoff(async(tcp://68.183.156.250:5043)) with 2 reconnect attempt(s)
2019-05-07T04:31:16.830Z	ERROR	pipeline/output.go:100	Failed to connect to backoff(async(tcp://68.183.156.250:5043)): dial tcp 68.183.156.250:5043: connect: connection refused
2019-05-07T04:31:16.830Z	INFO	pipeline/output.go:93	Attempting to reconnect to backoff(async(tcp://68.183.156.250:5043)) with 3 reconnect attempt(s)
2019-05-07T04:31:26.495Z	ERROR	pipeline/output.go:100	Failed to connect to backoff(async(tcp://68.183.156.250:5043)): dial tcp 68.183.156.250:5043: connect: connection refused
2019-05-07T04:31:26.495Z	INFO	pipeline/output.go:93	Attempting to reconnect to backoff(async(tcp://68.183.156.250:5043)) with 4 reconnect attempt(s)

Please advise. Thanks

Is the external IP listed if you run ifconfig on the host?

Yes, it is listed.

Can you show the full output? What does your config look like?

Logstash config looks like this.
The filebeat config can be found here.

The output of the ifconfig is:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 68.183.156.250  netmask 255.255.240.0  broadcast 68.183.159.255
    inet6 fe80::eca5:aeff:fec1:66e0  prefixlen 64  scopeid 0x20<link>
    ether ee:a5:ae:c1:66:e0  txqueuelen 1000  (Ethernet)
    RX packets 879033  bytes 123763787 (118.0 MiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 814689  bytes 252430001 (240.7 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 10.132.175.130  netmask 255.255.0.0  broadcast 10.132.255.255
    inet6 fe80::ac35:ddff:fe51:e3f2  prefixlen 64  scopeid 0x20<link>
    ether ae:35:dd:51:e3:f2  txqueuelen 1000  (Ethernet)
    RX packets 4386200  bytes 2576371287 (2.3 GiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 5815612  bytes 85556736998 (79.6 GiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
    inet 127.0.0.1  netmask 255.0.0.0
    inet6 ::1  prefixlen 128  scopeid 0x10<host>
    loop  txqueuelen 1000  (Local Loopback)
    RX packets 6  bytes 416 (416.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 6  bytes 416 (416.0 B)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

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