Can publish GP Service but cannot run it on ArcGIS Server 10.5.1

2501
12
Jump to solution
08-07-2017 07:27 AM
JeremyRead1
New Contributor III

I have a GP tool that I had no issue running on ArcGIS Server 10.3.1, but when trying to setup the service on a 10.5.1 machine, I am running into an issue that I've been unable to resolve:

The tool runs in ArcMap fine and publishes successfully, but when I run it I get the following error:

Error 000732 Network: Dataset ______ does not exist or is not supported.

I thought that for some reason the arcgis user could not access the folder, so I gave it permissions on the entire C:\arcgisserver directory

That did not fix it, so I navigated to the copied .SDE connection file in ArcCatalog at: C:\arcgisserver\directories\arcgissystem\arcgisinput\Tool.GPServer\extracted\v101\connection.sde

I was able to connect and view the data with no issues.

So then I tried a simpler tool that just lists the feature classes in a geometric network. Same issue. I noticed in the error, though, that it is automatically stripping out the "Database.SchemaOwner" heading on the data. I manually entered these back in and the tool worked.

Going back to the first tool, I noticed the same thing. The tool is looking for this and failing:

\connection.sde\FeatureDataset\Network_Net

When it is supposed to be looking for:

\connection.sde\Database.SchemaOwner.FeatureDataset\Database.SchemaOwner.Network_Net

Why is it stripping these values out? It seems to do this on its own without me telling it to. I even went into the extracted copy of the python script and explicitly added the paths into the code, and it is still doing this at runtime anyway. Since it is doing this, it cannot find the data it is looking for and thus failing to run.

0 Kudos
12 Replies
JeremyRead1
New Contributor III

Hi Michael,

I do not have any others that I have tested yet. Both of the ones I'm testing work with network datasets. Below are the details of the servers/environments I'm using:

ArcGIS Server Machine:

  • Windows Server 2012 R2
  • ArcGIS Server 10.5.1
  • ArcGIS Desktop 10.5.1

Geodatabase Machine:

  • Windows Server 2012 R2
  • SQL Server 2014
  • Geodatabase version 10.5.1 (was originally trying on a 10.3.1 geodatabase, but both versions produce the same error) 

I am interested to know if you run into the same issue.

Thanks,

Jeremy

0 Kudos
JeremyRead1
New Contributor III

One more thing I've noticed: 

When navigating to the copied .sde file: C:\arcgisserver\directories\arcgissystem\arcgisinput\Tool.GPServer\extracted\v101\connection.sde

I noticed that it is setup as an "Application Server" connection under "Database Platform" in the connection properties, and has this weird string in the "Service:" field. This was not how it worked in ArcGIS Server 10.3.1 as it just created a regular SQL Server connection file. I changed the .sde file back to a regular SQL Server connection and verified that it worked, but when re-running the tool I ran into the same issue as before.

0 Kudos
JeremyRead1
New Contributor III

Well, I never did figure out why this was happening, but I finally have a work-around that was successful. I wanted to share it in case anyone else runs into this issue:

  1. Do not use the built in database connections; create a .sde connection file somewhere on the server (C:\MyConnections\connection.sde) and use that to load data into the GP tool.

  2. Run the tool and publish it.

  3. After publishing, navigate to the staging folder and find the toolbox in there: 

    C:\Users\username\AppData\Local\ESRI\Desktop10.5\Staging\arcgis on server.domain.com_6080 (admin)\sddraftToolboxes\MyToolbox.tbx

  4. Copy the above toolbox, then navigate to the export folder for the service:

    C:\arcgisserver\directories\arcgissystem\arcgisinput\MyService.GPServer\extracted\v101\MyToolbox.tbx

  5. Paste the copied toolbox from the staging folder over the same toolbox in the export folder and replace it.

  6. Restart the published GP Service so that it pulls in the change.

  7. The GP Service should now run correctly.

I am not sure why this is happening, but the above steps seem to fix it. Something is happening to the toolbox when it is published that is causing its parameter validation to fail. I was looking in the Python code for the tool until I realized that the code never actually ran; it was failing at parameter validation. Also, it did not like if I used a connection file within the systems "Database Connections" path; it wanted a .sde file sitting on the C: drive that it could easily find.

I hope this helps someone else.