Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

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

Open
asmyrk opened this issue Aug 23, 2017 · 10 comments

Comments

@asmyrk
Copy link

asmyrk commented Aug 23, 2017

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?

@MikeMillerGIS
Copy link
Member

MikeMillerGIS commented Aug 23, 2017 via email

@asmyrk
Copy link
Author

asmyrk commented Aug 23, 2017

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.

@MikeMillerGIS
Copy link
Member

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

@asmyrk
Copy link
Author

asmyrk commented Aug 23, 2017 via email

@MikeMillerGIS
Copy link
Member

Could you post your script?

@asmyrk
Copy link
Author

asmyrk commented Aug 23, 2017

Does this work?
AGOLpics - Copy.zip

@MikeMillerGIS
Copy link
Member

MikeMillerGIS commented Aug 24, 2017 via email

@asmyrk
Copy link
Author

asmyrk commented Aug 24, 2017 via email

@MikeMillerGIS
Copy link
Member

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.

@asmyrk
Copy link
Author

asmyrk commented Aug 24, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants