ArcGIS Server issue: I am not able to access Admin properties from a my secured (https) published service properties with python code, every time i am getting below SSLerror but not getting any SSL errors while doing admin page with browser.
" URLError: <urlopen error [Errno 1] _ssl.c:503: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol> "
Python Code is
import arcpy
import os
import httplib, urllib, urllib2, json
import getpass, shutil
import sys
def stopStartServices(server, port, adminUser, adminPass, stopStart, serviceList, token):
services = serviceList.split(';')
#modify the services(s)
for service in services:
service = urllib.quote(service.encode('utf8'))
op_service_url = "https://{}:{}/arcgis/admin/services/{}/{}?token={}&f=json".format(server, port, service, stopStart, token)
print(op_service_url)
status = urllib2.urlopen(op_service_url, ' ').read()
if 'success' in status:
print(str(service) + " === " + str(stopStart))
else:
print(status)
return
############################# Main #################################
arcpy.env.overwriteOutput = True
sqlFeatureClasspath = r"Database Connections\*********************************************"
oracleFeatureclassPath = r"Database Connections\*********************************************"
server = "*************************************"
port = "6443"
adminUser = "*****"
adminPass = "******"
serviceList = "WaterTapsLeadInspection/MLGWWaterTaps.MapServer"
token = "kLlQXyfenVdKFLSFzn06TNiATgEdBnrmm4yB_G3Y42gyRhwPoq-iEYSUtV1PAekR"
stopStartServices(server, port, adminUser, adminPass, "STOP", serviceList, token)
#arcpy.Delete_management(sqlFeatureClasspath)
arcpy.Copy_management(oracleFeatureclassPath, sqlFeatureClasspath)
stopStartServices(server, port, adminUser, adminPass, "START", serviceList, token)