The system is running AICenter 24.10.2 connected to an external orchestrator in an online environment, but ML skills cannot be used because an invalid API key error occurs.
Resolution The secret aicenter-metering-apikey and OCR skill secret have to be edited with the cloud API key, and the skill deployment was restarted.
Step 1: Getting the API key from the cloud account: The APi Key is the AiUnits Api key from cloud account. This can be found in the cloud account under the AiUnits section in Admin menu -> Licenses -> Consumables -> Ai Units.
Step 2: Updating the secret with the new API key:
On the linux node logged as root user, run the following command to edit the secret for the metering API key: sudo su export PATH="$PATH:/usr/local/bin:/var/lib/rancher/rke2/bin" && export KUBECONFIG="/etc/rancher/rke2/rke2.yaml"
kubectl edit secret aicenter-metering-apikey -n uipath replace the metering_api_key value from the secret with the base64 encoded api_key fresh generated from the cloud account kuebctl -n uipath rollout restart deployment
Stept 3: Updating the secret for the failing skill: - identify the skill Kubernetes id with the UI name running the following command:
for pods in $(kubectl get po -n uipath | grep /3 | awk '{print $1}'); do echo "Pod: $pods"; kubectl -n uipath describe pod $pods | awk ' /Environment__AICenter__Skill__Name/ { if (!printed) { print "SKILL NAME: " $2; printed=1; } }';done
The output will prove a list with all the pods which are serving the available Ml skills from AiCenter UI. It must be identified the pod id which is corresponding for the AiCenter skill for which the errors occuring.
Using the pod id which was correlated with the ML Skill involved kubectl -n uipath edit secret POD_ID -o yaml replace the metering_api_key value from the secret with the base64 encoded api_key fresh generated from the cloud account on the previous step. kuebctl -n uipath rollout restart deployment for correspondent pod (the one which was recently edited)