AnsweredAssumed Answered

Offline areas management packaging failed issue

Question asked by fraserhand on Jun 2, 2020
Latest reply on Jun 24, 2020 by JQuinn-esristaff


We are running ArcGIS Enterprise 10.8 in Azure behind App GW. We have a base deployment and a federated GIS Server. Both GIS servers have contexts of /server (base deployment) and /server1 (federted GIS server).


Server1 has a dynamic map service with imagery which is cached.


When managing offline areas and attempting to create a offline map service image cache, we can see the output map cache get created in the e:\arcgisserver\directories\arcgisoutput\aerialmapimageservice directory (on server1).


However the packaging fails. We see this in the portal logs:


Item 'd4ff17894c764c4ea5c6bab170dc38d9' added from URL 'https://.../arcgis/rest/directories/arcgisoutput/../Aerial_Imagery_MapServer/_ags1282724663_ch/Map.tpk?token='.




Failed to add item 'd4ff17894c764c4ea5c6bab170dc38d9' from URL 'https://.../arcgis/rest/directories/arcgisoutput/.../Aerial_Imagery_MapServer/_ags1282724663_ch/Map.tpk?token=b4sE98g0vDiOCWgiftcu6F7ieOqL4KiOZhPdqxsgPZMm6whuBnpKfVt_oiBD-zlFvqOipQ9rmkb4ZxY09u6G949kc-NmNT4hSYuY5nqo8Qg3rbz4A2yMCBocARuSKaTV3XK3kMwQQ2N6rzX_XnrLVHmz-mGMxplESHZh6w5-In6-WZw28NGoTMv8jejoFSHJo7dNQiMDloJZgOUyrwVoLbkqdkkocx-L-J98UvdFmf7jG9zbhkvCKdWuwIDMT30C'. Data length is zero


Which is expected as the server context is /server1/ not /arcgis/


Following the requests going into the submitJob for the SetUpMapArea everything looks right and the outputs in the jobs directory (result etc) all have the right urls in it. So it looks like the Offline packaging tools are creating everything as expected but something somewhere is writing arcgis instead of portal.


Has anyone had a similar issue?

Jonathan Quinn

Trevor Hart

Scott Tansley




EDIT: So it looks like there is a bug in the REST API

The tpk works for the map service and is available in the output directory - it looks like the wrong url is returned by a call to the REST API.

When this URL is called



the API returns this:


folders: [ ],
files: [
name: "Map.tpk",
url: "https://myurl/arcgis/rest/directories/arcgisoutput/service/Aerial_Imagery_MapServer/_ags1066105292_ch/Map.tpk"

So the response being written seems to be ignoring the WebContextURL and defaulting to ArcGIS.

This is easily patched in the Offline Areas tools but can't be patched for collector as Collector calls that url directly.




Bruce Harold - Seen this before Bruce? I'm assuming the calls to /arcgisoutput/someservice/..MapServer/_ags<ran>_ch are handled by the API