I am trying to execute service tool that written in python with arcpy. When I am executing the service I got submitted... Executing... Failed. I looked the logs, and I got there: Failed to execute(script_name) Error executing tool.

I tested that, and I realized that the script not even start to run. I tried to remove and publish several times with differences, and got nothing.

Details: Windows server 2012 R2 Arcgis server 10.3

After a lot of tests, I realized that this one line of code makes it fails.

arcpy.CreateFileGDB_management(out_folder_path, out_name)

The thing is, I executed it on my computer and it working(that's why I published it successfully) Only at the server it's not working.

The main problem is the createFileGDB_management function. Somebody knows why it doesn't work in the when executing Arcgis service tool in the Arcgis server?

  • Please edit the question to include your code.
    – Vince
    Mar 11 '15 at 18:23
  • I didn't include my code because I proof it's failed before the code began. I added arcpy.AddMessage to it, and no messages appears. Mar 11 '15 at 19:20
  • Messages are only displayed if the service is configured to display messages. Is it? The default is NONE.
    – Vince
    Mar 11 '15 at 22:58
  • How I check it? Mar 12 '15 at 9:55
  • 1
    Add arcpy.AddMessage(out_folder_path) and arcpy.AddMessage(out_name) in the script just before creating the geodatabase. This will show up in the execution log for the GP task. Mar 12 '15 at 16:53

The problem is the Arcgis service.

We have ran it as local system user instead of the machine user. Thus, it couldn't create nothing beside the local machine(I tried to create file gdb at network driver).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.