Select to view content in your preferred language

gis.admin.servers.list Hangs

378
4
01-29-2024 10:52 AM
NathanHeickLACSD
Regular Contributor

I'm migrating a Python script that starts and stops services from ArcGIS Enterprise 10.6.1 to 10.9.1.  In the ArcGIS API for Python, the function gis.admin.servers.list hangs now.  If you enter gis.admin.servers.__dict__, there is an attribute _server_list that is None.  Through the portal admin API, I can see our one server as being federated with the portal.  I did not setup the server so I don't know all the details of how it was set up.  I'm just wondering if anyone knows what direction to go.

0 Kudos
4 Replies
David_McRitchie
Esri Contributor

Hey Nathan,

Are you connecting to Enterprise using an administrator account? If possible could you try testing this on a copy of ArcGIS Pro installed on the Enterprise machine?

 

This should hopefully rule out permissions or networking from the issue.

Many thanks,

David

Esri UK -Technical Support Analyst
0 Kudos
NathanHeickLACSD
Regular Contributor

Hi David,

I will look into it.  I need to do more testing as to what is actually hanging.  I was trying to figure out what syntax to use for IWA authentication.  Apparently, you just need the server URL to make a GIS object.  It may have been that it was hanging when I passed in credentials to the server which is configured to use IWA.  I will confirm.  I did find out that when I used the correct parameters for IWA authentication, it wasn't actually hanging.  Instead, it was taking about 5 minutes 50 seconds to complete the list method.  I paused the code and after about 10 seconds, the IDE would eventually pause in some code that was making a connection to the server.  I did figure out that the part that was hanging was when the list method was building a ServiceDirectory object for the server, which was in turn trying to connect to the server.

It definitely was very quick on the old server and it was very slow on the new one.  Eventually, it does complete and gives a list of one server object.

0 Kudos
NathanHeickLACSD
Regular Contributor

Whether or not I include the username and password doesn't change the behavior.  It still takes 5 minutes to list the servers.  So, it's not hanging, it's just very slow.

When I use the Python 3 command prompt on the server to create a GIS object, I get an invalid username and password error if I just provide the url parameter.  If I provide a username and password, the list method completes very quickly.

0 Kudos
StefanUseldinger
Occasional Contributor II

I have had this issue yesterday. In my case, our notebook server service was offline while our federated arcgis server was online. gis.admin.servers.list() didn't even return a timeout after 30 minutes. It just hanged. Restarting the nbs service helped.

0 Kudos