Utilities/PrintingTools service error token required status code 499

888
6
07-06-2023 03:12 AM
MichailMarinakis1
Occasional Contributor II

Hi all, 

We have a 10.9.1 ArcGIS Enterprise system with high availability and IWA. It has two ArcGIS Server machines. The PrintingTools REST API is available to everyone (in synchronous mode), no authentication is necessary.

We have  a custom C# Web .NET API, that is calling the REST API. The request that we sent includes the parameter WebMapAsJSON with three layers, all of them accessible to everyone too. 

Sometimes, not always, we receive the error message 499: token required, when we try to use the default PrintingTools. The issue is not systematic. Sometimes it is happening, sometimes it is not. It is happening in both ArcGIS Server machines. 

We suspect that something is interrupting the service or something is failing internally and that the error message is misleading and it should return an error message more helpful. 

Our question is:

How can we prevent the issue from happening? and 

Can we investigate if we can improve the error message to something more helpful?

Thanks! 

0 Kudos
6 Replies
A_Wyn_Jones
Esri Contributor

Could you run your ArcGIS Servers in Debug logging mode to troubleshoot this? A 499 could be your client closing the connection early, the fact that your message includes "token required" seems like it's coming from ArcGIS Server.

The logs may show more information. Are you using a Web adaptor? Is the Config store also highly available or in the cloud? 

Hope you can find something that helps!

"We've boosted the Anti-Mass Spectrometer to 105 percent. Bit of a gamble, but we need the extra resolution."
0 Kudos
MichailMarinakis1
Occasional Contributor II

Hi @A_Wyn_Jones , thanks for the fast reply! 

We are using web adaptor and the config store is in internal shared folder on a NAS system, highly available. 

Turning on the debug logging might be a good idea but we don't know when the issue is happening so we will have some trouble with space for the logs... I will see what we can do about this.

0 Kudos
A_Wyn_Jones
Esri Contributor

No problem!

Is the NAS system using DFS to be highly available? There's some requirements for immediate consistency which would provide an intermittent issue like this (if the issue is stemming from the config store connection).

https://enterprise.arcgis.com/en/server/latest/install/windows/choosing-a-nas-device.htm

As you say, there's a lot of components to this so the troubleshooting may take a while.

"We've boosted the Anti-Mass Spectrometer to 105 percent. Bit of a gamble, but we need the extra resolution."
0 Kudos
MichailMarinakis1
Occasional Contributor II

Hi @A_Wyn_Jones , thanks for the idea! The NAS is not using DFS. Apparently there is a High Availability NAS package? something like that. 

 

0 Kudos
David_Brooks
MVP Regular Contributor

@MichailMarinakis1 can you try deleting cookies on your browser and then running the print task? If successful, then the issue is likely due to a conflicting cookie on the browser. We have a similar bug on our system, whereby any users who access the Rest Directory, retrieve a cookie that conflicts with the Print Service. Currently our only workaround is to remind users to delete this specific cookie if they come across the error, however, it's only really affecting power users and GIS engineers who regularly access the rest directory


David
..Maps with no limits..
0 Kudos
MichailMarinakis1
Occasional Contributor II

Hi @David_Brooks , thank you for the reply!

The service is available to everyone, no authorization is required. We don't send the request from a browser, but from another C# Rest API, using HttpClient. In this case, we don't have cookies. 

0 Kudos