An error occurred during authentication. back to login screen/var/log/vmware/vsphere-ui/logs/vsphere_client_virgo.log , the following error is observed:WARNING vsphere-ui 515 [vc@4413 threadName="agw-token-acq7" logger="com.vmware.vcenter.apigw.route.RoutingTable" 70000381 ###### 200021 RoutingTable ] Cannot route com.vmware.vcenter.authentication.token.null because vcenter ########-####-####-####-########### is not found
ERROR vsphere-ui 515 [vc@4413 threadName="agw-token-acq7" logger="com.vmware.vcenter.apigw.sso.tokenmgmt.impl.AsyncTokenProvider" 70000381 ###### 200021 AsyncTokenProvider ] Token acquisition failed for SSO domain vsphere.local(########-####-####-####-###########) com.vmware.vcenter.apigw.api.sso.tokenmgmt.TokenException: Failed to exchange JWT token for a SAML token for vcenterId 1#######-####-####-####-########### in domain vsphere.local(########-####-####-####-###########)
Caused by: com.vmware.vcenter.apigw.exception.VcenterIdNotFoundException: vCenter ID not found: '########-####-####-####-###########'.
ERROR vsphere-ui 515 [vc@4413 threadName="agw-token-####" logger="c.v.v.apigw.session.frontend.impl.FrontendSessionManagerImpl" ######## ###### 200021 FrontendSessionManagerImpl ] !!!!!!!!!! Failed to asynchronously acquire a local Act-As SAML token for front-end session '200021'. The session will be invalidated. java.util.concurrent.CompletionException: com.vmware.vcenter.apigw.api.sso.tokenmgmt.TokenException: Token acquisition failed for SSO domain vsphere.local(########-####-####-####-###########)
Caused by: com.vmware.vcenter.apigw.api.sso.tokenmgmt.TokenException: Token acquisition failed for SSO domain vsphere.local(########-####-####-####-###########)
Caused by: com.vmware.vcenter.apigw.exception.VcenterIdNotFoundException: vCenter ID not found: '########-####-####-####-############'.
ERROR vsphere-ui 2148 [vc@4413 threadName="http-nio-127.0.0.1-5090-exec-121" logger="com.vmware.vise.security.spring.DefaultAuthenticationProvider" 70008632 100149 200043 ] Unknown error during authentication com.vmware.vcenter.apigw.exception.ServiceClosedException: AsyncTokenProvider has been closed
/var/log/vmware/vsphere-ui/logs/apigw.log, the following error is observed: Caused by: com. vmware. vcenter. apigw. exception. VcenterIdNotFoundException: vCenter ID not found: '########-####-####-####-###########'.at com. vmware. vcenter. apigw. route.RoutingTable. tryRouteByVcId(Unknown Source)at com. vmware. vcenter. apigw. route. RoutingTable. route(Unknown Source)at com.vmware.vcenter.apigw.sso.tokenmgmt.impl. TokenExchangeServiceImpl$VcIdAwareApiProvider.invoke(Unknown Source)at com. vmware.vapi.internal. bindings. Stub. invoke (Stub. java: 331)at com.vmware.vapi.internal.bindings. Stub.invokeMethodAsync (Stub. java: 281)at com. vmware. vapi. internal. bindings. Stub. invokeMethod (Stub. java : 178)
AsyncTokenProvider to enter a closed state and the Suite Token to be missing from authorization requests.To resolve this either of the following can be used:
Option A: Using attached regen_csidentity.sh bash script:
chsh -s /bin/bash root
After upload, revert the shell:
chsh -s /bin/appliancesh rootchmod +x regen_csidentity.shbash: ./reset_machine_pw.sh: /bin/bash^M: bad interpreter: No such file or directory", run the following:sed -i -e 's/\r$//' regen_csidentity.shroot@vcenter [ ~ ]# ./regen_csidentity.sh
This script will regenerate the cs.identity service registration.
It is intended to be used when this service is missing the Node ID attribute.
See KB https://knowledge.broadcom.com/external/article/448977 for more details.
WARNING Node ID is missing from ########-####-####-####-###########!
WARNING Regeneration of cs.identity is required!
Would you like to proceed? (y/n): y
What is needed prior and after to executing this fix?
1: Offline snapshot or backup of the vCenter server.
2: SSO Admin Password
3: Restart all services afterward.
Have you taken snapshots/backups? (y/n): y
INFO Snapshot/backup confirmed.
INFO Continuing execution...
INFO prompting for password for administrator@<sso.domain>
🔐 Password for [email protected]: ********************
INFO Unregistering old service(s)...
INFO Old services successfully removed.
INFO Creating new service...
INFO only one registration found.
INFO A restart of all services is required for the change to take effect.
Restart all services now? (y/n):
Proceeding...
Operation not cancellable. Please wait for it to finish...
Performing stop operation on profile: ALL...
...
Operation not cancellable. Please wait for it to finish...
Performing start operation on service vmware-envoy-system-proxy...
...
root@vcenter [ ~ ]#NOTE: If needed, there will be a regen_csidentity.log file in the same directory for troubleshooting.Option B: Using lsdoctor for service re-registration
unzip lsdoctor.zip
cd lsdoctor-mainpython lsdoctor.py -r select Option 2 (Replace all services with new services) to rebuild all registrations based on a template.service-control --stop --all && service-control --start --all Option C: Manual steps for service re-registration:
cs.identity has a node ID:PNID=$(/usr/lib/vmware-vmafd/bin/vmafd-cli get-pnid --server-name localhost) && /usr/lib/vmware-lookupsvc/tools/lstool.py list --url https://$HOSTNAME/lookupservice/sdk --type cs.identity | awk -v IGNORECASE=1 "/Service Type/,/$PNID/" | grep "Node ID" | awk '{print $3}'PNID=$(/usr/lib/vmware-vmafd/bin/vmafd-cli get-pnid --server-name localhost)SSODOMAIN=$(/usr/lib/vmware-vmafd/bin/vmafd-cli get-domain-name --server-name localhost)/usr/lib/vmware-lookupsvc/tools/lstool.py list --url https://$HOSTNAME/lookupservice/sdk --type cs.identity | awk -v IGNORECASE=1 "/Service Type/,/$PNID/" | grep "Service ID" | awk '{print $3}'/usr/lib/vmware-lookupsvc/tools/lstool.py unregister --url https://$HOSTNAME/lookupservice/sdk --user administrator@$SSODOMAIN --password "$(systemd-ask-password)" --id <service ID from step 2> /usr/lib/vmware-sso/bin/sts-init-ls.sh --host-name $PNID --http-port 443service-control --stop --all && service-control --start --all