Probably something not exposed right from docker. Try to use telnet or a simple socket test to figure out the issue. Where is the code running from? What is ‘AEROSPIKE_CONFIG’ ?
Which ip address are you using from the micro-service container to connect to the aerospike container? I don’t think you can use the loopback ip within the microservice container to talk over port 3000 to the other container.
Seems to work with the example you mentioned and using the “aerospike” hostname.
# Configure the client
config = {
'hosts': [ ('aerospike', 3000) ]
}
# Create a client and connect it to the cluster
try:
client = aerospike.client(config).connect()
except:
import sys
print("failed to connect to the cluster with", config['hosts'])
sys.exit(1)