Select to view content in your preferred language

Failed to start ArcGIS Server service using service.start() method

300
0
11-09-2022 02:32 AM
DusanOstojic
New Contributor II

Hi all,

 

I am trying to create script which would programmatically restart ArcGIS Server Map Services.

For that I would use gis.admin.servers module as described on https://developers.arcgis.com/python/guide/managing-your-gis-servers/

We have implemented ArcGIS Server 10.9.1 and we are using Python 3.7.11.

 

Initial stopping services works very good using stop() method and I can stop all services on my server.

 

The problem comes when I need to start them again. One of the Map Services on the ArcGIS Server is very heavy and manual startup through ArcGIS Server Manager takes around 10 minutes. When I execute start() method on this server it seems that the service enters some sort of inconsistent state.

Here is chronologically what happens:

1. service.start() is executed as the part of the script

2. After some 60 secs in the ArcGIS Server Manager message “Starting…” appears, while Python still hangs on service.start()

                            DusanOstojic_6-1667989030692.png

3. After some 3 mins from initial service.start() execution, in the ArcGIS Server Manager message “Started” appears

                            DusanOstojic_7-1667989030692.png

4. Shortly after, python moves to the next command without throwing an error message

5. Some half of the minute after in the ArcGIS Server Manager message “Stopping…” appears.

Just to mention I didn’t execute any command (programmatically or manually)

                             DusanOstojic_8-1667989030693.png

6. At that moment Service entered an inconsistent state and do not respond any more.

If I check status of the Service object, I can see that the start command is accepted but not executed accepted

             DusanOstojic_9-1667989030693.png

7. On the Logs page I see following message, although there is nobody else working on the server except me

                    DusanOstojic_10-1667989030694.png

8. In order to get service back consistent state, I have to click stop button manually on the services page of the ArcGIS Server Manager

                        DusanOstojic_11-1667989030695.png

All other services which are significantly smaller, are starting with the method start() without any issue.

I would appreciate and hint or comment on my problem.

Thanks in advance,

Dušan

0 Kudos
0 Replies