unable to publish geoprocessing service from python script

2127
1
03-18-2016 04:25 AM
jayasudha
New Contributor III

I have created a simple python script tool and run from ArcGIS desktop, it is works fine. The script is given below.

import arcpy

arcpy.env.workspace = "C:/project/pmms.gdb"

arcpy.SelectLayerByLocation_management('stops', 'intersect', 'adminarea')

-----------------------------------------------------------------------

But when the same script is published as geoprocessing service, it is failed to publish as server tool. The pmms.gdb (file geodatabase) is located under c:\project folder. I have registered folder c:\project with ArcGIS server. I have checked result map service check box.

There is no error / warning when analyzed before publishing geoprocessing service. Why the log says invalid layer when the folder is registered with server. The server log is given below. Please help me.

SEVERE Mar 18, 2016 4:06:16 PM Error executing tool.: ERROR 001369: Failed to create the service. Failed to execute (Publish Service Definition). System/PublishingTools.GPServer

SEVERE Mar 18, 2016 4:06:16 PM Failed to create the service.: ERROR: service failed to start, Cannot connect to this server. System/PublishingTools.GPServer

SEVERE Mar 18, 2016 4:06:16 PM Core server call to create service failed. System/PublishingTools.GPServer

SEVERE Mar 18, 2016 4:06:13 PM Unable to add Map Server configuration. selectlayer.GPServer

SEVERE Mar 18, 2016 4:06:10 PM Services containing process crashed. selectlayer.MapServer instance has crashed. Server

WARNING Mar 18, 2016 4:06:10 PM IgnoreCache property not found. selectlayer.MapServer

WARNING Mar 18, 2016 4:06:10 PM CacheOnDemand property not found. selectlayer.MapServer

WARNING Mar 18, 2016 4:06:10 PM IsCached property not found. selectlayer.MapServer

WARNING Mar 18, 2016 4:05:57 PM Invalid layer STOPS C:\project\pmms.gdb\STOPS selectlayer.GPServer

WARNING Mar 18, 2016 4:05:57 PM Invalid layer ADMINAREA C:\project\pmms.gdb\ADMINAREA selectlayer.GPServer

WARNING Mar 18, 2016 4:05:57 PM Invalid layer STOPS C:\project\pmms.gdb\STOPS selectlayer.GPServer

WARNING Mar 18, 2016 4:05:57 PM Invalid layer ADMINAREA C:\project\pmms.gdb\ADMINAREA selectlayer.GPServer

0 Kudos
1 Reply
AndrewKeith3
Occasional Contributor

First off, you need to check and see if the services are running in the System folder on the ArcGIS Server you are trying to publish to.  System/PublishingTools.GPServer

0 Kudos