Asadm -h localhost doesn't work in version 0.1.17

As the subject says asadm -h localhost doesn’t work on version 0.1.17 it fails with the following error:

[root@c7 ~]# asadm -h localhost
Seed:        [('localhost', 3000, None)]
Config_file: /root/.aerospike/astools.conf, /etc/aerospike/astools.conf
Aerospike Interactive Shell, version 0.1.17

ERROR: Not able to connect any cluster with [('localhost', 3000, None)].

This is on CentOS 7, I haven’t tried other distributions. An even bigger problem is that when you install the RPM of this latest version it adds the following line in /etc/aerospike/astools.conf:

host = "localhost:3000,[::1]:cluster_a:3000"

which means that it will use localhost by default when you type asadm so it fails as well.

Using asadm -h works without issues, and older versions work both with localhost and

only configuration setting part is different in asadm-0.1.17. Remaining working and connecting to cluster is same. As per your output, configuration are set correctly. Now it should connect cluster if older versions of asadm are able to connect on same machine. Also noticed that astools.conf file is not the one which installed by tools package. This is file from asadm git repo. Did you try git code before?

We tried but not able to reproduce this issue at our end. Can you please try clean installation again (uninstall tools, delete astools.conf and install tools). After that try asadm with localhost. If its still not working then try with --no-config-file option, in this way it will work same as older version (without reading anything from conf file). Also please try any other tool (for ex. aql) with localhost just to check working with localhost.

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- 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 instead of localhost in the config file, or make it so that it resolves localhost into an IPv4 address.

So its localhost issue. Your first comment, you mentioned that old asadm is working with localhost. I thought you tried it on the same box.

Actually all tools default host value is localhost. Just to keep consistent with that we keep default values in conf file.

Sorry, I wrote it bad the first time, localhost doesn’t work in 0.1.16 with IPv6 enabled. At that time I didn’t even try with IPv6 disabled.

It’s strange that localhost is the default value, because when I just type asadm it works in both cases (without a config file of course).

Have you managed to reproduce this issue? This can be a problem on all hosts with IPv6 enabled.

@Hemant_Patre, unless I am missing something, it appears that the default is ‘’. is the default, but the problem is that the latest aerospike-tools RPM ships with /etc/aerospike/astools.conf which has the following configured:

host = "localhost:cluster_a:3000"

So by default it uses localhost, instead of

We have already fixed this issue internally. We have commented all entries in conf file. So no new parameter will get assigned through conf without users knowledge. And default values will continue to work as old behaviour. host default is These changes will be published in next release once done with all testing.

© 2015 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.