Esri/ArcREST

ArcRest "arcrest.agol.services.FeatureService.createReplica" works on one ArcGIS Online organization but not another

asmyrk opened this issue · 10 comments

ArcRest

I'm using the same exact script to create a replica and download a file geodatabase. All works well on one organization, but as soon as I modify to hit a different organization, it fails with the following error.

Runtime error
Traceback (most recent call last):
File "", line 24, in
File "C:\Python27\ArcGIS10.5\lib\site-packages\arcrest\security\security.py", line 1173, in init
urlInfo=urlInfo._replace(netloc= "%s.%s" % (portalSelf.urlKey, portalSelf.customBaseUrl))
File "C:\Python27\ArcGIS10.5\lib\site-packages\arcrest\manageorg_portals.py", line 331, in urlKey
self.__init()
File "C:\Python27\ArcGIS10.5\lib\site-packages\arcrest\manageorg_portals.py", line 235, in __init
proxy_url=self._proxy_url)
File "C:\Python27\ArcGIS10.5\lib\site-packages\arcrest\web_base.py", line 686, in _get
context=ctx)
File "C:\Python27\ArcGIS10.5\Lib\urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "C:\Python27\ArcGIS10.5\Lib\urllib2.py", line 429, in open
response = self._open(req, data)
File "C:\Python27\ArcGIS10.5\Lib\urllib2.py", line 447, in _open
'_open', req)
File "C:\Python27\ArcGIS10.5\Lib\urllib2.py", line 407, in _call_chain
result = func(*args)
File "C:\Python27\ArcGIS10.5\Lib\urllib2.py", line 1241, in https_open
context=self._context)
File "C:\Python27\ArcGIS10.5\Lib\urllib2.py", line 1198, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 11001] getaddrinfo failed>

I can't figure out what's different between these organizations. All settings look the same. I can create replicas manually from these feature services. Is there an ArcGIS Online setting that would cause this issue?

Thanks for the response Mike. I appreciate it very much. Neither organization's url is https, so I didn't try that before, but I did try now just in case, but I get the same error. On feature services... same thing. I've tried them with http and https, but the error message does not change.

Did you ensure the org URL is https, not just the feature service.

Could you post your script?

Does this work?
AGOLpics - Copy.zip

Here is the line - https://github.com/Esri/ArcREST/blob/master/src/arcrest/security/security.py#L1112

but looking at it, it is defaulting to https. So my next guess is the user name and password is wrong. ArcRest is case sensitive for both the username and password. Log into the organization with a browser and verify the username. That produces this error. This has caught a number of people.

I would also install fiddler and monitor the calls, looking at the response can help you figure out what is going on.