How to solve AerospikeClient Error code 1
I am not too familiar with Aerospike but from what I see you are running two separate containers - one is the "server" and the other is the client connecting to it. Things you need to consider when doing this without using docker-compose.yml
- Both containers need to be on the same network to be able to communicate with each other (I suggest using docker-compose if you have multi-service setup because it creates a special network for the project where all containers are attached by default)
- You shouldn't just hard-code the IP address and instead define a special hostname since the IP address can change depending on what IP's are already assigned to other networks/containers
If I were you I would just use a docker-compose.yml file similar to this:
version: "3"services: server: image: aerospike/aerospike-server client: depends_on: - server image: aerospike/aerospike-tools command: ["aql", "-h", "172.17.0.2", "-p", "3000"]
But from what I see on the docker hub, you should use a custom configuration file and define access-address (see https://hub.docker.com/_/aerospike under access-address Configuration)