1

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

Tusshu
  • 1,664
  • 3
  • 16
  • 32
  • 1
    Your client is not successfully connecting to all the "nodes" of the Aerospike cluster - each node sends its partition ownership to the client. There are 4K partitions. Each record belongs to a unique partition id. So client keeps trying to write to the node that is the owner of partition 711 above and gives up after retrying. – pgupta Feb 13 '20 at 20:18
  • I am running single node cluster. Just followed the directions here: https://www.aerospike.com/docs/operations/install/vagrant/mac/index.html. Is multi-node installation required? – Tusshu Feb 13 '20 at 20:48
  • no, don't need multi-node cluster. single node cluster is fine. so you are losing connectivity to the node from the client. this is again probably docker related. – pgupta Feb 13 '20 at 20:59
  • It appears that the go client is messed up. I cannot perform any read/write operation. If I restart the application (go client), I can perform read/write. It is the performing the write operation in a loop that messes up the go client. – Tusshu Feb 14 '20 at 03:14
  • 'Messed up' is kind of a generalization. Quite a few heavily used applications interfacing with Aerospike are written in Go, including services for Snapchat. So the Go client definitely works. Open a bug in the repo, if you can reproduce the problem: https://github.com/aerospike/aerospike-client-go – Ronen Botzer Aug 26 '20 at 04:10

1 Answers1

1

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?.

Ronen Botzer
  • 6,951
  • 22
  • 41
  • he is testing with a single node. – pgupta Feb 16 '20 at 21:08
  • Seems like the client can't talk to the server, meaning a networking issue. – Ronen Botzer Feb 17 '20 at 05:26
  • While storing records in a loop, after few iterations, communication fails. First four or five records are stored in database without problem. – Tusshu Feb 18 '20 at 20:01
  • Please open an issue https://github.com/aerospike/aerospike-client-go . People use this client in production quite intensively, so something is up but no idea what. Add a code sample, output and not your server version, client version, OS at client and server. It’s a mystery – Ronen Botzer Feb 19 '20 at 04:25
  • Time format in my data might be causing some issues. Still investigating. – Tusshu Feb 22 '20 at 11:16