WebGISDR Backup fails with "Failed to generate token for Portal for ArcGIS. Verify that the credentials you entered are correct"

16071
42
Jump to solution
02-26-2021 04:09 AM
Labels (1)
MatthiasHahn2
New Contributor II

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!

 

2 Solutions

Accepted Solutions
JonathanQuinn
Esri Notable Contributor

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"

View solution in original post

KrystalPhaneuf2
Occasional Contributor

@JonathanQuinn 

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

View solution in original post

42 Replies
George_Thompson
Esri Frequent Contributor

I would reach out to Esri Technical Support on this issue.

--- George T.
0 Kudos
JakeSkinner
Esri Esteemed Contributor

Hi @MatthiasHahn2 ,

I would try and recreate the .properties file and then re-execute the webgisdr utility.

0 Kudos
by Anonymous User
Not applicable

Hello Matthias

Have you tried Web Adapter address or LB address?

Regards,

Bing

 

 

0 Kudos
JonathanQuinn
Esri Notable Contributor

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"

MatthiasHahn2
New Contributor II

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) 

Sander
by
New Contributor III

Hello Matthias, can you share a litlle bit more detail. I am not yet able to find the table in which I need to change (remove) this value.

Thanks in advance

Sander

0 Kudos
JonathanQuinn
Esri Notable Contributor

@Sander my suggestion is to go through a more "supported" approach following my instructions here.

If you have updated the hostname.properties file, update the hostname there instead.

NoorSyazanaMdYusof
New Contributor

Hi @MatthiasHahn2 , can I know how to sign in and access this gwdb?

 

0 Kudos
EricAnderson_DHS
Occasional Contributor

Hi @JonathanQuinn 

 

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? 

0 Kudos