How to construct an admin input service for Manage Map Server Cache Tiles between Python 2.7 & 3.6

652
4
12-03-2020 11:38 AM
Kara_Shindle
Occasional Contributor III

So I had an old model that was converted to Python from ArcMap 10.4, meaning it was exported in 2.7.

The model includes the Manage Map Server Cache Tiles tool, and running it in 2.7 works.  

However, this script needs converted to 3.6 and will not work due to the following error:

Error: Failed to execute. Parameters are not valid.
ERROR 001265: Admin or publisher connection required.
Failed to execute (ManageMapServerCacheTiles).

I am working off of the ESRI tool reference page, but I cannot get this Admin input service to work. 

The examples include the connection File being speicifed (and I have tried including that), but naturally the tool export does not.

I've tried it two different ways - with the 6080 port specified and below, which is the redirected server address.\

This is what model exported as:

 

"GIS Servers\\arcgis on <MyServer>_6080 (admin)\\FranklinHostedGIS\\FC_TaxRecords.MapServer"

 

These are my various attempts

Try 1: 

 

"GIS Servers\\arcgis on <MyServer> (admin)\\FranklinHostedGIS\\FC_TaxRecords.MapServer"

 

try 2: 

 

connectionFile = r"C:\Users\<username>\AppData\Roaming\ESRI\Desktop10.4\ArcCatalog"
server = "arcgis on MyServer_6080 (admin)"
serviceName = "FC_TaxRecords.MapServer"
inputService = connectionFile + "\\" + server + "\\" + serviceName

 

 

try 3:

Try using the ArcPro documentation 

 

connectionFile = r"C:\Users\arcgis\AppData\Roaming\ESRI\Desktop10.4\ArcCatalog"
server = "admin on <myServer>.ags"
serviceName = "FC_TaxRecords.MapService"
inputService = connectionFile + "\\" + server + "\\" + serviceName

 

Any suggestions?

0 Kudos
4 Replies
DanPatterson
MVP Esteemed Contributor

The reference page for Pro is

Manage Map Server Cache Tiles (Server)—ArcGIS Pro | Documentation


... sort of retired...
0 Kudos
Kara_Shindle
Occasional Contributor III

Yes thank you, that was Try 3 -  My issue is trying to format the first variable for these tools.

0 Kudos
dgiersz_cuyahoga
Occasional Contributor

Did you ever figure this out? I am having the same problem. The tool won't recognize my .ags connection as being an admin in Pro.

#CLE #sloth
0 Kudos
Kara_Shindle
Occasional Contributor III

No - from what I read here - a ArcGIS Enterprise federated server means that ArcGIS Pro only supports connections that allow you to use services, not publish or administer them.