Asadm -h localhost doesn't work in version 0.1.17

I found out what is the issue, and it has nothing to do with the configuration. The problem is that on hosts which have IPv6 enabled asadm -h localhost doesn’t work, while on hosts which have IPv6 disabled it works.

Our aerospike.conf only has this configured:

network {
    service {
        address any
        port 3000
    }
    ...
}

and when I look at on what address is Aerospike listening it’s only listening on IPv4:

# ss -ntlp | grep asd
LISTEN     0      128          *:3000                     *:*                   users:(("asd",pid=29860,fd=23))
LISTEN     0      128          *:3001                     *:*                   users:(("asd",pid=29860,fd=19))
LISTEN     0      128          *:3002                     *:*                   users:(("asd",pid=29860,fd=21))
LISTEN     0      128          *:3003                     *:*                   users:(("asd",pid=29860,fd=27))

My guess is that localhost is by default resolved to an IPv6 local address to which asadm cannot connect.

Regarding the astools.conf the file is part of aerospike-tools-3.15.3.2-1.el7.x86_64.rpm which is the latest version of the package. If I remember correctly if I install aerospike-tools from the Github repo, it doesn’t install that config file, but the package does.

I would recommend that you update astools.conf to use 127.0.0.1 instead of localhost in the config file, or make it so that it resolves localhost into an IPv4 address.