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

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

Could you replace “” 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

$ 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 to share the result.
$ vim

import requests

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

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

Beside, you can also use curl as below.
$ curl --header ‘Accept: application/json’ --header ‘Authorization: ApiKey yourkey’

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

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

import requests
endpoint = “
response = requests.get(endpoint)
user_id = response.json()[“user_id”]
print("user_id: ", user_id)

$ python

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.

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.