AutoML “401 UNAUTHORIZED” problem

Could you disable firewall and retry?

ufw disable

More, please make sure the ngc key is correct.

I disable firewall and generate new ngc key and follow
NVIDIA NGC” to setup, but still get the same error.

Could you run similar command as below to check if it can work?
$ curl -k https://127.0.1.1:32080/api/v1/login/bDNyourkey

I try both https and http.

Please try the new key since your key is already updated.

I follow “NVIDIA NGC” to setup and change the “ngc_api_key” in “quickstart_api_bare_metal/tao-toolkit-api-ansible-values.yml”.
Still get the same error.

How about
$ curl -k https://127.0.1.1:32080/api/v1/login/yournewkey

Could you replace “127.0.1.1” with the ip address of your master node and retry the curl command?

Get the same error.

Please help collect some logs.
$ kubectl get pods

then
$ kubectl logs tao-toolkit-api-app-pod-5858d657f9-5zqzr | sed “/health/d”

Where the exact pod name can be found with “kubectl get pods”

Please run below test.py to share the result.
$ vim test.py

import requests

key = “yourkey” # FIXME: use your latest NGC API KEY
r = requests.get(‘https://authn.nvidia.com/token’, headers={‘Accept’: ‘application/json’, ‘Authorization’: 'ApiKey ’ + key})
print(r.status_code)

$ export PYTHONPATH=/usr/lib/python3/dist-packages:$PYTHONPATH
$ python test.py

Beside test.py, you can also use curl as below.
$ curl --header ‘Accept: application/json’ --header ‘Authorization: ApiKey yourkey’ https://authn.nvidia.com/token

2023-01-11 08-48-17 的螢幕擷圖

So, the key seems to be correct.
Could you run with below test_1.py ?
$ vim test_1.py

import requests
endpoint = “http://127.0.1.1:32080/api/v1/login/yourkey
response = requests.get(endpoint)
user_id = response.json()[“user_id”]
print("user_id: ", user_id)

$ python test_1.py

That is the cell content of the notebook.
If not working, try to modify line3 as below and re-run.
response = requests.get(endpoint, verify=False)

I try both “requests.get(endpoint)” and “requests.get(endpoint, verify=False)”.
Both get <Response [401]>.

Suggest you to follow the method in 401 unauthorized: why?how to fix it? to narrow down.

There is no update from you for a period, assuming this is not an issue anymore.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

More, when you fix the issue in your another topic AutoML installation problem [Waiting for the Cluster to become available] - #8 by Morganh , could you share the result of below commands?
I am asking this in order to make sure the tao-api setup is successful.
$ kubectl get pods
$ kubectl logs tao-toolkit-api-app-pod-5858d657f9-5zqzr (Where the exact pod name can be found with “kubectl get pods”)
$ kubectl describe pods tao-toolkit-api-app-pod-5858d657f9-5zqzr (Where the exact pod name can be found with “kubectl get pods”)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.