configurebackuplocation returns failed to generate token for user

333
5
11-24-2020 07:58 AM
AllanAxon1
New Contributor III

When attempting to run the configurebackuplocation.bat command, we get the following error:

d:\<datastoreinstallpath>\tools\configurebackuplocation.bat --location \\<uncpathtoshare>\relational --store relational --operation change
You are attempting to change the backup location of the data store. For a relational data store, existing backups will be copied to the new location and it could take a few moments. For a spatiotemporal big data store, the data store service could be restarted. Please do not interrupt the process once it has started.

Do you wish to continue (Yes or No)?Yes

Error encountered: Failed to generate a token for the user.

When we configured the relational datastore, we provided credentials for the ArcGIS Server hosting server (initial admin user). Isn't this command using the same credentials as the configuredatastore tool? describedatastore also shows no Portal URL because we set up the DataStore with the AGS hosting server before we federated it

 

Windows Server 2012

ArcGIS Server, DataStore 10.7.1

What credentials does this command use or can you pass it different credentials?

Tags (1)
0 Kudos
5 Replies
DavidColey
Regular Contributor III

Hi Allan - to me, you shouldn't have to be supplying any credentials for that command.  If you look in the help,

https://enterprise.arcgis.com/en/data-store/latest/install/windows/data-store-utility-reference.htm#...

It shows this:

Examples

In the first example, the backup location for a relational data store is set to a directory named fsdata_bu on a machine named myshare.

 

configurebackuplocation --operation change --store relational --location \\myshare\fsdata_bu 

You are going to change the backup location of the data store. Existing backups will be copied to the new location and it could take a few moments.
Please do not interrupt the process once it has started.

Do you want to continue (Yes or No)? Yes

 

So to  me, the account that needs read write to the changed backup location is the domain account running ArcGISServer.exe and ArcGISDataStore.exe services.

0 Kudos
AllanAxon1
New Contributor III

The AGS and DS domain accounts do have read/write/modify to the shared backup location. However, these Windows accounts are not in the AGS or Portal user stores (we are not using IWA). We used built-in ArcGIS Server accounts to set up the DataStore server. I would assume that these same credentials would be used to change the configuration of the datastore. We are using the initial AGS admin account that was created with the AGS site.

Also, what is the difference between using configurebackuplocation and changebackuplocation. I've used both tools and get the same "Error encountered: Failed to generate a token for the user." I think the datastore commands are using the credentials that were used to set up the datastore. I can manually get a token through the arcgis/admin site from the DataStore server. Hardly any of the DataStore tools can take a parameter for username/password, so I assume they are getting credentials to request the token from either the database or a configuration file I haven't found yet.

Thanks for the quick response

0 Kudos
DavidColey
Regular Contributor III

Yes, same as me you would have defined and used the same AGS primary site admin account and supplied that when running the post install of the datastore.  If the describedatastore is not showing the Portal url then you have federation problems as evidenced by the token error, and you'll probably have issues until that's resolved. Are you sure the Datastore is registered with Server correctly?  And then are you sure the Server site with datastore is correctly designated by Portal as the Hosting Site?  I would start there.

The help says changebackuploation is legacy and to use configure

 

0 Kudos
AllanAxon1
New Contributor III

David,

Thanks for the insights. I am looking to see if there is a way to add the portal url to the relational datastore configuration without having to unfederate and federate. Apparently, we are able to operate this DS with the AGS site in order to use these components as a hosting server because we have been able to host layers and items through the portal. I'm trying to run the webgisdr tool and found that we should have changed our backup location to a shared drive. Is there a way to add the portal url or do we have to reconfigure a new relational datastore using the portal credentials instead of the AGS credentials?

We configured the relational datastore before federation so we used an AGS admin credential. Should we have federated the AGS server first, then configured the datastore using a portal credential second, and then made this the hosting server third?

Thanks, Allan

0 Kudos
DavidColey
Regular Contributor III

Hi Allan - there's just no way to backdoor this stuff.  You have to have created your server site and then registered your datastore with the site before federation.  I am at 10.8.1 on Windows server 2016. Every time I upgrade I follow the steps outlined in the help here:

https://enterprise.arcgis.com/en/get-started/latest/windows/upgrade-arcgis-enterprise.htm

without fail.   It's possible you need to 'Alter relational data store account passwords'

following this guide,

https://enterprise.arcgis.com/en/portal/latest/administer/windows/alter-account-passwords.htm

but I don't know. I've never had to do this as I've always just followed the upgrade steps.  Sorry I can't be of more help

 

0 Kudos