You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I was trying to run a net new setup with Ansible I was getting the following error returned while running Ansible:
fatal: [test-domjointest-0]: UNREACHABLE! => {"changed": false, "msg": "credssp: Server did not response with a CredSSP token after step Credential exchange - actual 'Negotiate, Kerberos, http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/https/mutual, Basic realm=\"WSMAN\", CredSSP'", "unreachable": true}
I came to this repo after getting this error as I was stumped as to why the CredSSP auth wasn't working. I used the command on the README.md to run the command via Python and this is the stack trace:
>>> r = requests.post(f"https://{server}:5986/wsman", auth=credssp_auth,verify=False)
/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py:1056: InsecureRequestWarning: Unverified HTTPS request is being made to host 'test-domjointest.moxehealth.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 710, in send
r = dispatch_hook("response", hooks, r, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/hooks.py", line 30, in dispatch_hook
_hook_data = hook(hook_data, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests_credssp/credssp.py", line 199, in response_hook
response = self.handle_401(response, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests_credssp/credssp.py", line 233, in handle_401
in_token = self._get_credssp_token(response, credssp_regex, step_name)
File "/usr/local/lib/python3.10/site-packages/requests_credssp/credssp.py", line 264, in _get_credssp_token
raise AuthenticationException(error_msg)
requests_credssp.exceptions.AuthenticationException: Server did not response with a CredSSP token after step Credential exchange - actual 'Negotiate, Kerberos, http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/https/mutual, Basic realm="WSMAN", CredSSP'
This stack trace guided me to what the actual issue was - a 401 Unauthorized response, which led me to check the permissions for the account that Ansible was assuming and resolve the issue.
Thus there are two fixes we can do here:
It would be more helpful for the user if the 401 unauthorized error bubbled up instead of the Server did not response error.
Server did not response with a CredSSP token after step is improper grammar and should probably be instead Server did not respond with a CredSSP token after step (from here and here)
When I was trying to run a net new setup with Ansible I was getting the following error returned while running Ansible:
I came to this repo after getting this error as I was stumped as to why the CredSSP auth wasn't working. I used the command on the README.md to run the command via Python and this is the stack trace:
This stack trace guided me to what the actual issue was - a 401 Unauthorized response, which led me to check the permissions for the account that Ansible was assuming and resolve the issue.
Thus there are two fixes we can do here:
Server did not response
error.Server did not response with a CredSSP token after step
is improper grammar and should probably be insteadServer did not respond with a CredSSP token after step
(from here and here)Versions installed:
The text was updated successfully, but these errors were encountered: