Hello everyone.
We have a single-machine ArcGIS Enterprise deployment with ArcGIS Server and Portal with Web Adaptors and SSL installed on one machine and Datastore and Postgresql installed on another. The server was federated to the Portal as a hosting server we had a relational and tilecache datastores configured with the server.
Recently a colleague of mine tried to install and configure the Notebook server. That did not work out for some reason and he uninstalled it. That somehow messed with our deployment, changed the machine name to DOCKER.INTERNAL or something like that etc.
I reinstalled the ArcGIS Server, reconfigured Web Adaptor and solved those issues but now when validating the server on the Portal page there is a red exclamation mark and when validating on the portaladmin page the response is:
Error: The server at 'https://<url>:6443/arcgis/admin/info' returned an error. Could not decrypt token. Token may not be valid.
Also tried to unfederate server in the admin API and got:
Failed to unfederate server '<url>:6443 (id: e7u1ld3kF221N50v)'. The server at 'https://<url>:6443/arcgis/admin/mode' returned an error. Could not decrypt token. Token may not be valid.
On the other side, in the manager site of the server the data stores disappeared. I tried restarting the datastore service and machine. I also tried to reconfigure the datastores trough the configuration wizard again but on the last step when I click finish I get this response:
Attempt to configure data store failed. Caused by: Machine 'https://<url>:6443/arcgis/admin/generateToken' returned an error. 'Failed to log in. Invalid username or password specified.'
I can see in the network inspector that the credentials passed are OK. I was also able to successfully generate a token using the same credentials on https://<url>:6443/arcgis/admin/generateToken.
Sorry for the long post. Hope someone can help me out.