PROBLEM
Attempts to run a Python script to perform ArcGIS Server processes (for instance the process described in Example: Write properties of all services to a CSV file) fail after changing port 6080 to port 6443 in the script. The following error message may be returned as well:
Error: Error while fetching tokens from admin URL. Please check the URL and try again.
The ArcGIS Server protocol is set to 'HTTP Only'. ArcGIS Server uses certain ports to communicate with machines, for example, HTTP port 6080 and HTTPS port 6443. Refer to ArcGIS Enterprise: Ports used by ArcGIS Server for more information.
Change the ArcGIS Server REST endpoint protocol to 'HTTP and HTTPS'
http://machine.domain.com:6080/arcgis/admin
Article ID: 000026418
Get help from ArcGIS experts
Download the Esri Support App