I am trying to use aerospike docker container , with python application also running same docker network. Below is the docker compose file.
aerospike:
image: aerospike/aerospike-server
volumes:
- "./aerospikeconfig:/opt/aerospike/etc"
environment:
config-file: /opt/aerospike/etc/aerospike.conf
rtbconsumer:
image: abhinav054/rtb_consumer:trending
depends_on:
- aerospike
- kafka
environment:
CONSUMER_ID: "rtb_aerospike_2"
HOST: "kafka:9092"
TOPIC: "rtb-logs"
AEROSPIKE_HOST: "aerospike:3000"
So in my script I am connecting aerospike using the below given config
config = {
'hosts':[('aerospike', 3000)],
'policies': {
'timeout': 1000 # milliseconds
}
}
The error I am getting is exception.ConnectionError: (-10, ‘Failed to connect’, ‘src/main/aerospike/as_cluster.c’, 254, False)
Can someone please help me figure out the problem.