Select to view content in your preferred language

Please ensure gssapi is installed

3382
15
03-07-2023 01:17 AM
BerendVeldkamp
Occasional Contributor II

I'm trying to login in ArcGIS Enterprise, using a fairly standard call:

gis = GIS(portalUrl, user, pass)

 

This used to work, but now I get an error:

2023-03-07 10:08:59,110 - DEBUG - Connecting to portal: example.com
2023-03-07 10:08:59,114 - DEBUG - Starting new HTTPS connection (1): example.com:443
2023-03-07 10:09:00,029 - DEBUG - https://example.com:443 "GET /portal/info?f=json HTTP/1.1" 500 7058
2023-03-07 10:09:00,035 - DEBUG - https://example.com:443 "GET /portal/rest/info?f=json HTTP/1.1" 500 7058
2023-03-07 10:09:00,042 - DEBUG - https://example.com:443 "GET /portal/sharing/rest/info?f=json HTTP/1.1" 200 139
2023-03-07 10:09:00,048 - DEBUG - https://example.com:443 "GET /portal/rest/services?f=json HTTP/1.1" 500 7058
2023-03-07 10:09:00,157 - ERROR - Please ensure gssapi is installed
2023-03-07 10:09:00,171 - DEBUG - Traceback (most recent call last):
  File "D:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\auth\_auth\_winauth.py", line 75, in __init__
    creds = gssapi.raw.acquire_cred_with_password(
  File "gssapi\raw\ext_password.pyx", line 75, in gssapi.raw.ext_password.acquire_cred_with_password
gssapi.raw.exceptions.BadNameError: Major (131072): An invalid name was supplied, Minor (2529639136): Configuration file does not specify default realm 

During handling of the above exception, another exception occurred: Traceback (most recent call last):
  File "D:\Data\MOR\Migratie\Download-wf5.py", line 45, in <module>
    main()
  File "D:\Data\MOR\Migratie\Download-wf5.py", line 33, in main
    gis = GIS(settings.ARCGIS_PORTAL_URL, settings.ARCGIS_USER, settings.ARCGIS_PASS)
  File "D:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 585, in __init__
    raise e
  File "D:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 524, in __init__
    self._portal = _portalpy.Portal(
  File "D:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_portalpy.py", line 205, in __init__
    self.con = Connection(
  File "D:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 344, in __init__
    self._create_session()
  File "D:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 691, in _create_session
    self._session.auth = EsriWindowsAuth(
  File "D:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\auth\_auth\_winauth.py", line 84, in __init__
    raise Exception("Please ensure gssapi is installed")
Exception: Please ensure gssapi is installed

 

A few things to notice:

  • Some requests to the portal return HTTP 500
  • The first error is Configuration file does not specify default realm . Which configuration file could this be referring to?
  • The second error is Please ensure gssapi is installed

 

This is on a client's environment, so I'm not sure if anything relevant has changed recently. One thing that did change is an upgrade to ArcGIS Pro from 3.0 to 3.1.

 

0 Kudos
15 Replies
TonyContreras_Frisco_TX
Occasional Contributor III

@JCGuarneri Thank you for your contributions to this thread. I was also able to connect using "username@domain" however, it looks like attempts to call administration operations fail. The only way I was able to get it to work was to enable the psa and log in with those credentials. This is very much not ideal.

Were you able to log a bug with Esri Support, or are they still trying to blame it on a 3rd party library that they built their product around?

0 Kudos
JCGuarneri
Occasional Contributor II

@TonyContreras_Frisco_TX  You know, I forgot to file a bug report. Esri didn't quite lay the blame, but did say it wasn't supported. I just went to file a bug report and saw there is one from 4 days ago (perhaps by you?). I added some comments to that one. I'll also reach out to the tech support rep who was helping me and update him with my findings and that bug report.

0 Kudos
TonyContreras_Frisco_TX
Occasional Contributor III

Thanks for the update. I did enter the github bug and saw your comment. The information below is a tangent, but related to your experience and something that I hope the Esri Support management will correct.

"Outside the scope of Support" is the typical answer when the analyst does not want to continue working on the issue and there is a possibility that they could say the issue is with a hardware or software component not created by Esri.

In this case, the error referencing the gssapi module. Their aircgis python API utilizes many third party python libraries (including ones that are part of the core Python product that is installed with and required to use the software purchased from and "Supported by" Esri, ie. ArcGIS Pro, ArcGIS Server), so if you get an error that mentions any of those other libraries, Esri Support makes the customer prove that the issue is with their part of the product. Instead, they should work the case and collaborate with the product team until it can be proven that the issue is with a third-party software, especially in situations of a documented supported workflow.

The same goes for Enterprise products that are documented to support Windows, LDAP, and group managed service accounts, or that have products like Apache Tomcat at the core of the runtime of their products.

Juan_Toro-Killion
New Contributor III

Thanks for all of the info you've added on this issue. Experiencing it right now.... unfortunately for me, our email addresses are our usernames. So I think the whole double '@' thing in the username string is disallowing me to get that syntax to work. Getting "General error occurred: Invalid username or password."

0 Kudos
Ramitha
New Contributor II

I think I have a solution for connecting to a Portal that is using Integrated Windows Authentication from ArcGIS Pro 3.1. However, it only seems to work when connecting to the Active Portal in ArcGIS Pro.

Prior to ArcGIS Pro 3.1 my code looked like this:

 

gis1 = GIS("https://portalurl", username="userid@DOMAIN", password="pass")

 

On ArcGIS Pro 3.1 I had to change the username to include the fully-qualified domain in UPPERCASE:

 

gis1 = GIS("https://portalurl", username="userid@DOMAIN.COM.AU", password="pass")

 

 

Lowercase does not work! Something is definitely broken.

0 Kudos
AlonsoOrtiz
New Contributor

I was getting this error also, but based on comments i just try the following and it worked, i'm using AD User, so i just remove the username and password from the string like this:
gis = GIS("myportal_url",verify_cert=False)

and that worked, in case you need to run it with a different user like admin make sure to run the script as another user, probably using a batch file to do that or opening python or cmd terminal as another user, good luck.

0 Kudos