Error 20: Partition map empty ( Issue for java client )
keshav10kumar opened this issue · 8 comments
Hi,
Thanks for this great library, but i have got an issue "Error 20: Partition map empty" , i will try to explain exactly what i am trying to do:
i have 2 systems A and B with following configurations.
System A ------------------------------------------------------------------------------------------->
OS version:
[u3a@radius-dev8 SOAP]$ cat /etc/centos-release
Rocky Linux release 8.6 (Green Obsidian)
Java Client Version from maven : 4.4.20
[u3a@radius-dev8 SOAP]$ aql -p3020
Seed: 127.0.0.1
User: None
Config File: /etc/aerospike/astools.conf /home/u3a/.aerospike/astools.conf
Aerospike Query Client
Version 3.23.0
C Client Version 4.6.9
Copyright 2012-2019 Aerospike. All rights reserved.
aql>
System B --------------------------------------------------------------------------------------------->
OS version:
[u3a@radius-dev ~]$ cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
Java Client Version from maven : 4.4.20
[u3a@radius-dev ~]$ aql -p3020
Aerospike Query Client
Version 3.15.2.1
C Client Version 4.3.0
Copyright 2012-2017 Aerospike. All rights reserved.
aql>
Case 1: ( Not Working ) -----------------------------------------------------------
On Server A and B Aerospike server is running. When i am trying to connect from System A to B through aql its working fine but
for Java Cleint its to working.
Below Error i am getting:
11:37:22.577 [ajp-nio-0:0:0:0:0:0:0:0-8009-exec-1] DEBUG o.s.ws.server.MessageDispatcher.processEndpointException 324 - Endpoint invocation resulted in exception - responding with Fault
com.aerospike.client.AerospikeException$InvalidNamespace: Error 20: Partition map empty
at com.aerospike.client.cluster.Partition.read(Partition.java:48)
at com.aerospike.client.command.ReadCommand.(ReadCommand.java:45)
at com.aerospike.client.AerospikeClient.get(AerospikeClient.java:836)
Case 2: ( Working ) ----------------------------------------------------------------------
Only On B Aerospike server is running( i shutdown aerospike server on System A ) . When i am trying to connect from System A to B through aql and Java Client both way its working fine.
"Partition map empty" means the java client can't connect/retrieve the server's partition map. Subscribe to the client log to see the cluster tend errors that resulted in this transaction exception. See https://developer.aerospike.com/client/logging
Hello please find the logs for both scenario.
Case 1: ( Not Working ) ---------------------------------------------------------------------
11:57:13.530 [ajp-nio-0:0:0:0:0:0:0:0-8009-exec-1] INFO c.i.a.db.repo.as.ASRepo$LogCallBack.log 86 - LogCallBack running callback function message :Add node BCDDBB1AF565000 127.0.0.1 3020
11:57:13.531 [ajp-nio-0:0:0:0:0:0:0:0-8009-exec-1] INFO c.i.a.db.repo.as.ASRepo$LogCallBack.log 86 - LogCallBack running callback function message :Remove node BCDDBB1AF565000 127.0.0.1 3020
11:57:13.544 [tend] INFO c.i.a.db.repo.as.ASRepo$LogCallBack.log 86 - LogCallBack running callback function message :Node BCDDBB1AF565000 127.0.0.1 3020 refresh failed: com.aerospike.client.AerospikeException: Error -1: Node name has changed. Old=BCDDBB1AF565000 New=BCD4BDE85565000
at com.aerospike.client.cluster.Node.verifyNodeName(Node.java:304)
at com.aerospike.client.cluster.Node.refresh(Node.java:242)
at com.aerospike.client.cluster.NodeValidator.validatePeers(NodeValidator.java:107)
at com.aerospike.client.cluster.NodeValidator.seedNode(NodeValidator.java:75)
at com.aerospike.client.cluster.Cluster.seedNode(Cluster.java:559)
at com.aerospike.client.cluster.Cluster.tend(Cluster.java:476)
at com.aerospike.client.cluster.Cluster.run(Cluster.java:443)
at java.lang.Thread.run(Thread.java:750)
Case 2: ( Working ) ------------------------------------------------------------------------------
12:16:14.316 [ajp-nio-0:0:0:0:0:0:0:0-8009-exec-1] INFO c.i.a.db.repo.as.ASRepo$LogCallBack.log 86 - LogCallBack running callback function message :Invalid address 127.0.0.1:3020. access-address is probably not configured on server.
12:16:14.320 [ajp-nio-0:0:0:0:0:0:0:0-8009-exec-1] INFO c.i.a.db.repo.as.ASRepo$LogCallBack.log 86 - LogCallBack running callback function message :Add node BCDDBB1AF565000 192.168.207.148 3020
Query :
In Both the cases from the logs its clear that its try to connect with "127.0.0.1 3020" (localhost) but in my configuration file only i configured to connect with "192.168.207.148 3020" . Its first try to connect with "127.0.0.1 3020" in both the cases ,Please let me know how to avoid to connect with "127.0.0.1 3020" behavior.
Thanks,
Keshav.
Whats are the client seeds (hostnames/IP addresses)?
How many nodes should be in the cluster?
What are the IP addresses for each node in the cluster?
It looks like access-address needs to be configured in each of your server node configurations to an externally reachable IP address: https://docs.aerospike.com/server/operations/configure/network/general
Please find below details:
System client seeds (hostnames/IP addresses) Port
- System A 192.168.207.149 3020
- System B 192.168.207.148 3020
A and B are 2 different Systems not cluster.
For System A( 192.168.207.149) General Network Configuration find below ,
network {
service {
address any
access-address 127.0.0.1
port 3020
}
heartbeat {
mode multicast
multicast-group 239.1.99.222
port 9920
address 127.0.0.1
interval 150
timeout 10
}
fabric {
address 127.0.0.1
port 3021
}
info {
port 3023
}
}
For System B( 192.168.207.148) General Network Configuration find below ,
network {
service {
address any
access-address 127.0.0.1
port 3020
}
heartbeat {
mode multicast
multicast-group 239.1.99.232
port 9920
address 127.0.0.1
interval 150
timeout 10
}
fabric {
address 127.0.0.1
port 3021
}
info {
port 3023
}
}
Please let me know if you need any other information.
Thanks.
The access-address (currently 127.0.0.1) must be reachable from the client machine. Is the client running on the same machine as the server?
Hii Brian
The access-address (currently 127.0.0.1) is reachable from the client machine. client and server both running on different machine. Client running on System A ( 192.168.207.149 ) server running on System B ( 192.168.207.148 ).
I am not sure you understood the problem Please allow me to explain you one more time.
we are trying to connect to a remote server( System B) , the connection fails when a different server is running on the local system(System A ) (that we are not trying to connect to)
System A ( 192.168.207.149 )
System B ( 192.168.207.148 )
Please let me know if you understand the issue or need some more information.
Thanks,
Keshav
+968 94301821
On System A server config, set access-address to 192.168.207.149.
On System B server config, set access-address to 192.168.207.148.
Thank you Brian, After setting access address now its working.