Unable to bind to IPv4. Host => 0.0.0.0 is bound to [::]

Description

When specifying syslog server like so:

tcp {
port => 5000
type => syslog
}

> netstat -napt | grep -i 5000
tcp6 0 0 :::5000 :::* LISTEN 9982/java

According to documentation at http://logstash.net/docs/1.1.8/inputs/tcp#setting_host default host is 0.0.0.0 which should translate to IPv4, unlike :: which is the IPv6 equivalent

In short, using config:

tcp {
port => 5000
type => syslog
host => "0.0.0.0"
}

and

tcp {
port => 5000
type => syslog
host => "::"
}

Yields the very same IPv6 bind result.

What's even more strange is when attempting to specify 10.0.0.100:

tcp6 0 0 10.0.0.100:5000 :::* LISTEN 10472/java

tcp6??

Tested on Ubuntu 12.04 running java version "1.6.0_24"

What I'm after is a way to bind to all addresses (IPv4 and IPv6), both on loopback, and network interface.

Please correct me if I'm reading netstat wrong though

Gliffy Diagrams

Activity

Show:

Jordan Sissel January 11, 2013 at 5:54 PM

Forgetting netstat for the moment, if you telnet to localhost over ipv4 on that port, does it work?

Details

Assignee

Reporter

Affects versions

Created January 11, 2013 at 12:30 PM
Updated March 25, 2015 at 5:30 AM