Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partition map empty error from Aerospike on vm #400

Open
vishalpunj opened this issue Apr 26, 2023 · 7 comments
Open

Partition map empty error from Aerospike on vm #400

vishalpunj opened this issue Apr 26, 2023 · 7 comments

Comments

@vishalpunj
Copy link

vishalpunj commented Apr 26, 2023

I am having Aerospike v6.2.0.8 running on my virtual machine having OS RHEL 7.x. and using go client v6. I am able to successfully make connection with DB but when I am trying to fetch or insert records using Get() or Put() function, I am getting error as 'Partition map empty'.
However when I am running same version of Aerospike on docker, I am able to fetch and insert the records using the same code. Below is a snippet of sample code I am using to make connection and query the data:

clientPolicy := as.NewClientPolicy()
clientPolicy.User = "usename"
clientPolicy.Password = "password"
client, err := as.NewClientWithPolicy(clientPolicy, "host", 3000)
if err != nil {
	fmt.Println("Error connecting to Aerospike: ", err)
	return
}
key, err := as.NewKey("namespace", "setname", "keyname")
record, err := client.Get(nil, key)
if err != nil {
         fmt.Println(err)
}
fmt.Println(record)
@khaf
Copy link
Collaborator

khaf commented Apr 26, 2023

Is the namespace you are using for the key defined in your config file? Can you insert the same record via AQL?

@vishalpunj
Copy link
Author

aerospike.conf.zip
asinfo.txt
Yes namespace is defined in config file and attaching the config file and asinfo for reference. Also I am able to insert same record via AQL.

@khaf
Copy link
Collaborator

khaf commented Apr 27, 2023

Usually this happens when the client cannot connect to the server node and update the partition table. The easiest way to find out what's happening is to enable DEBUG logging in the client:

        import asl "github.com/aerospike/aerospike-client-go/v6/logger"
...
	asl.Logger.SetLevel(asl.DEBUG)

@vishalpunj
Copy link
Author

Cross checked the credentials they are correct but DEBUG log shows 'Authentication Failed'
Screenshot 2023-04-27 at 4 14 10 PM

@khaf
Copy link
Collaborator

khaf commented Apr 27, 2023

So this is an enterprise edition? Can you help me reproduce this? I need your setup steps to see if I can repro the issue.

@vishalpunj
Copy link
Author

Yes this is an enterprise edition. Following steps will be helpful to reproduce the issue.
Setting up Aerospike on VM with os RHEL 7.x.:
Step 1: downloaded image from https://aerospike.com/download/
Step 2: Extracted contents of the package: tar -xvf aerospike.tgz
Step 3: Installed server and tools
-rpm -Uvh aerospike-server-enterprise-6.2.0.0-1.el7.aarch64.rpm
-rpm -Uvh aerospike-tools-8.1.0-1.el7.aarch64.rpm
(Name of the package was different. It was related to v6.2.0.8)
Step 4: systemctl start aerospike
Setting up Client:

  1. Install go version go1.19.5 darwin/amd64
  2. Install aerospike go client using
  • go get github.com/aerospike/aerospike-client-go/v6
    Driver code is there in the issue description

@metallerok
Copy link

what does the command clien.IsConnected() return? Maybe client connection closed during request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants