Esri / ops-server-config

Operations Server Configuration scripts
Apache License 2.0
34 stars 13 forks source link

CreateOpsServer.py does not catch errors when creating new ArcGIS Server site #728

Open elinz opened 9 years ago

elinz commented 9 years ago

Encountered issue with authorizing ArcGIS Server, which prevented the ArcGIS Server site from being created; an error message was displayed to standard output, but script did not pause.

This is the generated error:

--Create ArcGIS Server Site...

    -Setting up required properties for config store...
    Done.

    -Creating Python dictionaries representing server directories
            (arcgiscache, arcgisjobs, arcgisoutput, arcgissystem)...
    Done.

    -Serializing server directory information to JSON...
    Done.

    -Constructing URL to create a new site...
    Done.

    -Setting up parameters for the request to create new site...
    Done.

    -Making request to create new site...

Error: JSON object returns an error. {u'status': u'error', u'code': 500, u'messages': [u'Failed to create the site. The machine does not have a valid license. Please authorize ArcGIS Server by clickin g Start > Programs > ArcGIS > ArcGIS for Server > Software Authorization']} ERROR: Error returned by operation. {"status":"error","messages":["Failed to create the site. The machine does not have a valid license. Please authorize ArcGIS Server by clicking Start > Prog rams > ArcGIS > ArcGIS for Server > Software Authorization"],"code":500}

elinz commented 9 years ago

Additional information: The execution of CreateOpsServer.py is paused after it tries to create the first local enterprise geodatabase, which "initializes" the catid files (see output below). Should really interrogate the return message from the create new site code and pause immediately after if there is a failure.

    -Creating local enterprise geodatabases (this will take a few minutes)...

            Creating geodatabase 'rtds'...

Creating catid files C:\Users\blahblah\AppData\Local\ESRI\Server10.3\Configuration\CATID\arcgis-response-streamer.catid.ecfg Create JARID File... outfile=C:\Users\blahblah\AppData\Local\ESRI\Server10.3\Configuration\JARID\arcgis-response-streamer.jarid.ecfg Creating catid files C:\Users\blahblah\AppData\Local\ESRI\Server10.3\Configuration\CATID\arcgis_indexer.catid.ecfg Create JARID File... outfile=C:\Users\blahblah\AppData\Local\ESRI\Server10.3\Configuration\JARID\arcgis_indexer.jarid.ecfg

ERROR: Configuration of Ops Server ArcGIS Server/Site was NOT completed successfully.


* ERROR: error encountered. ErrorLevel code: 1 * Pausing script execution. * * Close command prompt to stop script execution. \ Press any key to continue with script execution.


Press any key to continue . . .