Is there a way to stop and start a map/feature service in ArcGIS Server via python?
Solved! Go to Solution.
THANK YOU ALL SO VERY MUCH....SO VERY APPRECIATED.....Have a great thanksgiving...cheers
Thank you all for posting to this thread. It has been extremely useful for me. I did have one question regarding an error that I am receiving. When I run my script, it appears to run successfully until I hit this part of the code:
try:
# Request the token
with contextlib.closing(urllib2.urlopen(url, query_string)) as jsonResponse:
getTokenResult = json.loads(jsonResponse.read())
## Validate result
if "token" not in getTokenResult or getTokenResult == None:
raise Exception("Failed to get token: {}".format(getTokenResult['messages']))
else:
return getTokenResult['token']
except urllib2.URLError, e:
raise Exception("Could not connect to machine {} on port {}\n{}".format(server, port, e))
Once it hits this section, I am getting the following error. Any assistance as to why I am getting this error would be greatly appreciate.
Could not connect to machine <myserver> on port <myport>
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
Thanks in advance,
Craig
I don't know much about SSL and certificates, but maybe you can find an answer here.
I am not too familiar with this code snip as I received it through this post....but seems that its trying to authenticate a certificate on the server....
do you have valid certificates on the server?
Does the user specified have the appropriate permissions to do this task?
Callum Smith any thoughts?
Yes, valid certificates are on the server and the user specified in the code does have full permissions.