aerospikeaerospike-ce

Aerospike - command execution timed out on client


Using the following code to load data in Aerospike. data is a list of maps of type BinMap

for _, binMap := range data {
   id, ok := binMap["id"].(string)
   key, _ := as.NewKey("test", "myset", id)
   err := shared.Client.Put(nil, key, binMap) 
   if err !=nil {
        fmt.Println(err)
 }

After loading few records, the following error message is received.

command execution timed out on client: Exceeded number of retries. 
See `Policy.MaxRetries`. (last error: Node not found for partition 
test:711 in partition table.)

For each iteration, the partition test number changes. The error continues even after waiting for 5 seconds after each Put command. I am not sure what timeout is reported in the error message.What client configuration is required for go client?

Using MacOs 10.15.3; go client; Aerospike running on docker 2.2.0.3


Solution

  • There's a good chance your cluster hasn't formed correctly, or that its networking isn't properly set up to give clients access to all the nodes. Since you're using Docker, take a look at Lucien's Medium post How do I get a 2 nodes Aerospike cluster running quickly in Docker without editing a single file?.