Problems Accessing Services After a Reboot When Running ArcGIS for Server on a VM

If you are running ArcGIS for Server on a VM with the Web Adaptor installed, you might find that you are no longer able to access your services after a reboot.  In some environments such as Amazon, the Web Adaptor is configured against the internal IP of the machine if it is not part of a domain.  As this dynamically changes when the machine is rebooted, the Web Adaptor will need reconfiguring against this internal IP as it will have changed.

To prevent you having to reconfigure your web adaptor manually, it's possible to configure it from the command line.  This is documented in the online help here using the command:

ConfigureWebAdaptor /m <Mode> /w <WebAdaptorURL> /g <URL> /u <Username> /p <Password> /a <AdminAccessEnabled>

(More details, parameters and examples are provided in the help link above) 

Once you have constructed the script with the parameters for your environment, it can be saved as a batch file and set to run as a scheduled task triggered 'At Startup' so that the re-configuration will be carried out automatically. Note: either make sure that all services have been started before the script is run or build in a delay of 15 minutes to give sufficient time for all the services to start.

*Hint* if you create your instance in a VPC you don’t need to run this script as the internal IP is static.

 Co-authored by Chris Adams