GP Service Publishing Issue

5341
12
12-31-2014 06:32 AM
BrianLeroux
Occasional Contributor III

Hi,

When publishing a gp service to AGS server 10.22 my service is failing. It works fine in desktop though. It seems to be a problem with the sde connection file during the service creation. Taking a look at the script uploaded to the v101 folder, the esri added variable looks like g_ESRI_variable_1 = u'..\\..\\..\\..\\..\\GP_Tools\\Database Connections\\GISDB_ArcSDE(PROD Server).sde'. This path is modified from my original path to the sde connection file on my computer Shakemap_Table_Target = os.path.join("D:\\agsResources\\GP_Tools\\GISDB_ArcSDE(PROD Server).sde", "ArcSDE.dbo.EQ_SHAKEMAPS").

When debugging, AGS Server can't seem to locate that location. Is this a known bug or something I may be doing incorrectly? I am able to fix the problems by modifying the script to point that variable at a server location where i store the sde files but I am wondering if there is a better solution. I have to jump through hoops to get access to the uploaded scripts on my production server and would rather this just work when publishing.

i appreciate any and all feedback.

Tags (2)
0 Kudos
12 Replies
DavidColey
Frequent Contributor

Yes, arcgis is adding variables to the python scripts created in the v101 folder of the arcgisinput system directory, as well as copying over sde connection file(s) as is the case with the data extract tool.

So to me it makes sense that arcgis would have to add a string variable to handle the change in location of the source connection.   To me, if you are still having issues, then look to a share or security issue with your domain account and associated directories.

0 Kudos
BrianLeroux
Occasional Contributor III

David - Thank you for the information. Knowing that the connection files are being copied over for you gives me some direction for troubleshooting.

0 Kudos
SørenNielsen
New Contributor

Hello Brian.

Now I am sitting in the same situation as you did two years ago. I would like to know if you found a better solution than changing the path in the published script.

Søren

0 Kudos