Problem: Unable to start or stop services in ArcGIS for Server
When starting, stopping, or deleting a service in ArcGIS Server Manager, the service stays in a starting or stopping state and returns the following error in the Server logs:
Error: Could not undeploy services from one or more machines.
Note: The error message displays information about the server machine and path that is causing this error to be returned.
The following are possible causes for this error.
- The service is locked. This can be caused when the service is being configured by another administrative operation.
- Insufficient privileges to access the path and folder.
- Domain accounts with different privileges are used to access the path.
Solution or Workaround
The following are possible solutions for fixing this error.
- Restart the ArcGIS Server Windows Service. Restarting the service removes the locks previously placed on the service.
- Navigate to Windows Start.
- Type services in the search bar and click the Services icon.
- In the Services console, navigate to the ArcGIS Server service and click Restart.
Note: If restarting the ArcGIS Server Windows service did not release the locks, then the physical ArcGIS for Server machine must be restarted. The following Knowledge Base article explains this in detail: FAQ: Why do file geodatabase .lock files remain after a process is finished?.
Note: Allocate a suitable time when restarting production machines to prevent critical failures during peak business hours.
- Grant sufficient privileges to the desired path and folder. The following document describes this in detail: ArcGIS for Server: Make your data accessible to ArcGIS Server.
Note: Best practice for a multi-server/cluster environment is for the same service account login to be used amongst these servers.
- Clear the ArcGIS Services Directory cache. The following blog post explains this in detail: Clearing the ArcGIS Services Directory cache the easy way.
- Stop the ArcGIS for Server Windows service, and run icacls from the Windows command prompt to apply stored privileges to specific directories. Users accessing the following path, Program Files\ArcGIS\Server, must be given full control to its folders and sub-folders. The following document describes this in detail: Microsoft TechNet: Icacls.
Note: In a multi-server/cluster environment, the icacls command must be run on each individual machine.