The Portal Installation has been updated from 10.7.1 to 10.8.1.
I am not sure if webgisdr worked after update. But now I got the following error in the webgisdr log:
2021-02-26 12:53:32 ERROR [main] com.esri.arcgis.webgis.client.WebGISDR - Failed to generate token for Portal for ArcGIS. Verify that the credentials you entered are correct. Check the WebGIS DR utility logs and the Portal for ArcGIS logs for more information.
I double checked the password 🙂
In the logback.xml in the webgis directory I set the loglevel to DEBUG. After that I saw the following exception.
Caused by: java.lang.RuntimeException: The response returned HTTP status code 404. Requested URL: https://[fqdn of internal portal url]:7443/arcgis/portaladmin/sharing/rest/generateToken
I got the same response in a browser.
The url to the generateToken endpoint is:
https://[fqdn of internal portal url]:7443/arcgis/sharing/rest/generateToken
without the portaladmin directory
Did I miss something?
Thanks!
Solved! Go to Solution.
This is a bug:
BUG-000135171 If the portal hostname changes, the DR tool fails to run with the error "Failed to generate token for Portal for ArcGIS"
We are attempting this in our development environment today. Just want to clarify the name should change in the Portal Admin > Machines > Machine name. We have installed the Enterprise Sites 3 patch that was supposed to correct the behavior. We plan to:
Update the C:\Program Files\ArcGIS\Portal\framework\etc\hostname.properties file to the shortname
Restart the Portal
check the admin page for shortname
Change the short name back to the FQDN in the hostname.properties file
Restart Portal
Check admin name again for FQDN
Retry webgisdr
I would reach out to Esri Technical Support on this issue.
Hi @MatthiasHahn2 ,
I would try and recreate the .properties file and then re-execute the webgisdr utility.
Hello Matthias
Have you tried Web Adapter address or LB address?
Regards,
Bing
This is a bug:
BUG-000135171 If the portal hostname changes, the DR tool fails to run with the error "Failed to generate token for Portal for ArcGIS"
The german support team helped me out 👍
There is a (very unsupported) workaround for this bug.
Sign in to the Portal DB (gwdb) and update the Admin-URL of the Portal. (remove the directory portaldmin)
We're also hitting this exact issue at 10.8.1, but our Portal hostname has never changed. This is currently a HA Portal and the primary Portal admin URL shows as :7443/arcgis/portaladmin, while the standby shows as :7443/arcgis (checking from webadaptor.domain/webadaptor/portaladmin/machines page).
Is there any *supported* way to update the admin URL for our primary machine and remove the /portaladmin reference?
There may be some incorrect logic to determine when the hostname changes, so we're looking into that. What you can do though is:
1) Install the patch
2) Determine the IP address of the portal machine
3) In the etc\hosts file, resolve the short name of the machine to the IP address. This ensures that the Web Adaptor and everything else continues to work, because the short name will resolve to the same machine
10.0.0.1 portal #FQDN is portal.domain.com
4) Restart the portal service
5) Verify that the Machines API within the Portaladmin API returns the correct information, albeit with the short name
6) Remove the etc\hosts entry
7) Restart the portal service
8 ) Verify that the Machines API within the Portaladmin API returns the correct information, using the FQDN.
You may need to unregister the standby first, as hostname changes should be blocked if the portal is HA.
Thanks @JonathanQuinn !
We tried your suggestion, however, after adding a line in the etc\hosts file with the IP of the Portal machine and the Portal shortname, it does not update the machine name from the Portaladmin end-point (Still shows FQDN, not shortname). And of course this means the Admin URL of the machine still points to https://fqdn:7443/arcgis/portaladmin.
We noticed when pinging the machine via shortname, it was resolving to IPv6, but we updated this using the steps below so it prefered IPv4 instead, but this still did not work for us.
https://docs.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-ipv6-in-windows
Let me know if you have any other suggestions to fix that Admin URL and thanks a bunch for all your help so far!
Jonathon,
Which patch is supposed to fix this?
Thanks,
Dan