Not authenticated error in client.info_node()

I am connected earlier with client.connect(user,password).

Now I am trying to access the information inside the python client using client.info_node("namespace",('127.0.0.1', 4333, tls-name)).

It is giving me the error

error: (80, 'not authenticated, 127.0.0.1:4333', 'src/main/client/info_node.c', 198, False)

Looks like you’re not authenticated

How to attach user and password here. Because I am using the credentials during client.connect(). But didn’t get anything about client.info_node() from the docs @Albot

I’m not sure if you’re authenticating the client earlier or what the rest of the code looks like, but traditionally I’ve had trouble trying to call info with typing the nodes in. Not much exp in python, but maybe try having the info_node use a node thats fetched from the client node list instead of statically defining it like you’ve done? aerospike-client-python/info_node.py at master · aerospike/aerospike-client-python · GitHub In this example it’s using the node fetched from the client connecting prior to this.

Are you using Enterprise or Community edition?

Community doesn’t support authentication.

I am using enterprise version.

  1. I have generated the certs(ca,server,user) using open ssl.
  2. Signed it from ca.
  3. My user has the privileges of sys-adm, user-adm.
  4. When I am doing SSL enabled client connection (passing the user and password inside client.connect), it is not throwing any error.
  5. After connection, I have to fetch the prameter write_q using client.info_node, where I am unable to. It is showing authentication failed.

So if I have to pass user and password inside client.info_node as well, how can I do that. Otherwise what could be the way of authentication. Because

  1. I am able to connect with the user and password in client.connect().
  2. I tried accessing write_q from asadm using the same user , I can access.

I don’t know much about python at all, but the info command itself doesn’t seem to be correct.

It should either be namespaces (which will just give you the list of namespaces) or namespace/<namespace-name> which will give you statistics for the specific namespace.

Having said that, I would have expected a ‘better’ error message if the authentication and permission succeeded and the problem was the info command itself. I am pretty sure this is not an authorization issue since reading stats would not require any permission but it does require authentication, so even if the command was not formed properly, I would expect a different error code/message.

Are you able to try:

  • Without tls/user
  • With only tls and without user.
  • With only user and without tls.

That may give some clue.

Otherwise, as you have an Enterprise License, I would encourage reaching out to Support.