RuntimeError: Failed to authenticate through CAM. HTTP response does not contain 'cam_passport' cookie #772
Replies: 4 comments 13 replies
-
If you want to authenticate with USER, PASSWORD and NAMESPACE, don't pass the You can read about the different authentication modes here: by the way, you probably want to upgrade to TM1py 1.9: |
Beta Was this translation helpful? Give feedback.
-
Please post the stack trace and error message you get. Yes. It definitely makes sense to speak to the person that administrates the TM1 Environment. |
Beta Was this translation helpful? Give feedback.
-
@MariusWirtz as per doucmentation reference I kept gateway instead of username and password.. with TM1Service(address="192.168.XX.XX", port=4XXXX, ssl=True, namespace="XX", gateway="https://dc1XXXX:449/ibmcognos/bi/v1/disp") as tm1:
print(tm1.server.get_product_version()) Traceback messageTraceback (most recent call last):
File ".\test.py", line 31, in <module>
with TM1Service(address="192.168.80.30", port=40652, ssl=True, namespace="KM", gateway="https://dc1epmcatst1:449/ibmcognos/bi/v1/disp") as tm1:
File "E:\development\TariffModeling\venv1\lib\site-packages\TM1py\Services\TM1Service.py", line 15, in __init__
self._tm1_rest = RestService(**kwargs)
File "E:\development\TariffModeling\venv1\lib\site-packages\TM1py\Services\RestService.py", line 201, in __init__
self._start_session(
File "E:\development\TariffModeling\venv1\lib\site-packages\TM1py\Services\RestService.py", line 353, in _start_session
token = self._build_authorization_token(
File "E:\development\TariffModeling\venv1\lib\site-packages\TM1py\Services\RestService.py", line 472, in _build_authorization_token
return RestService._build_authorization_token_cam(user, password, namespace, gateway, verify)
File "E:\development\TariffModeling\venv1\lib\site-packages\TM1py\Services\RestService.py", line 494, in _build_authorization_token_cam
raise RuntimeError(
RuntimeError: Failed to authenticate through CAM. HTTP response does not contain 'cam_passport' cookie and What should I ask to tm1 adminstrator to verify for ? As per my debug information :response = requests.get(
gateway,
auth=HttpNegotiateAuth(),
verify=verify,params={"CAMNamespace": namespace}
) The above code is not returning cam_passport cookie. |
Beta Was this translation helpful? Give feedback.
-
#1 seems to suggest that your gateway URL is wrong. It has reached its maximum number of tries
#2 is clearer, the user name, password, namespace combo is invalid.
First I would ensure that gateway is available by trying it in a browser.
…Sent from my mobile device
On Aug 8, 2022 7:45 AM, omkar more ***@***.***> wrote:
Hi @MariusWirtz<https://github.com/MariusWirtz>
as per your suggetions the url : https://:/api/v1/$metadata is returning some xml data.
[Screenshot from 2022-08-08 17-08-12]<https://user-images.githubusercontent.com/52170865/183409961-23145a6d-1927-460d-90d7-1f1e95d7bbee.png>
But,
when i try to run :
with TM1Service(address="", port=40652, ssl=True, namespace="KM", gateway="http://web-host:80/ibmcognos/bi/v1/disp") as tm1:
print(tm1.server.get_product_version())
Error:
File ".\test.py", line 9, in <module>
with TM1Service(address="", port=40652, ssl=True, namespace="KM", gateway="http://web-host:80/ibmcognos/bi/v1/disp") as tm1:
File "E:\development\TariffModeling\venv1\lib\site-packages\TM1py\Services\TM1Service.py", line 15, in __init__
self._tm1_rest = RestService(**kwargs)
File "E:\development\TariffModeling\venv1\lib\site-packages\TM1py\Services\RestService.py", line 201, in __init__
self._start_session(
File "E:\development\TariffModeling\venv1\lib\site-packages\TM1py\Services\RestService.py", line 354, in _start_session
token = self._build_authorization_token(
File "E:\development\TariffModeling\venv1\lib\site-packages\TM1py\Services\RestService.py", line 473, in _build_authorization_token
return RestService._build_authorization_token_cam(user, password, namespace, gateway, verify)
File "E:\development\TariffModeling\venv1\lib\site-packages\TM1py\Services\RestService.py", line 487, in _build_authorization_token_cam
response = requests.get(gateway, auth=HttpNegotiateAuth(), verify=verify,
File "E:\development\TariffModeling\venv1\lib\site-packages\requests\api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "E:\development\TariffModeling\venv1\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "E:\development\TariffModeling\venv1\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "E:\development\TariffModeling\venv1\lib\site-packages\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "E:\development\TariffModeling\venv1\lib\site-packages\requests\adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='web-host', port=80): Max retries exceeded with url: /ibmcognos/bi/v1/disp?CAMNamespace=KM (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000002E4D6686550>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
And IF I RUN:
with TM1Service(address="192.168.80.30", port=40653, ssl=True, namespace="KM", user="ibmcognos", ***@***.***") as tm1:
print(tm1.server.get_product_version())
Error:
Traceback (most recent call last):
File ".\test.py", line 4, in <module>
with TM1Service(address="192.168.80.30", port=40653, ssl=True, namespace="KM", user="ibmcognos", ***@***.***") as tm1:
File "E:\development\TariffModeling\venv1\lib\site-packages\TM1py\Services\TM1Service.py", line 15, in __init__
self._tm1_rest = RestService(**kwargs)
File "E:\development\TariffModeling\venv1\lib\site-packages\TM1py\Services\RestService.py", line 201, in __init__
self._start_session(
File "E:\development\TariffModeling\venv1\lib\site-packages\TM1py\Services\RestService.py", line 369, in _start_session
response = self.GET(url=url, headers=additional_headers)
File "E:\development\TariffModeling\venv1\lib\site-packages\TM1py\Services\RestService.py", line 80, in wrapper
self.verify_response(response=response)
File "E:\development\TariffModeling\venv1\lib\site-packages\TM1py\Services\RestService.py", line 460, in verify_response
raise TM1pyRestException(response.text,
TM1py.Exceptions.Exceptions.TM1pyRestException: Text: '' - Status Code: 401 - Reason: 'Unauthorized' - Headers: {'Content-Type': 'text/plain', 'Content-Length': '0', 'Connection': 'keep-alive', 'Set-Cookie': 'TM1SessionId=9Xk1Djr6CfUALhlhZYNie2Zi8_I; Path=/api/; HttpOnly; Secure', 'WWW-Authenticate': 'CAMPassport https://DC1EPMCATST1:449/ibmcognos/bi/v1/disp, CAMNamespace'}
In both case , errors are different .
-
Reply to this email directly, view it on GitHub<#772 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AEK7GZR7ECJY5F3DAL7SKM3VYDXKFANCNFSM54ZKR67Q>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi , I am facing issue with connecting tm1 server
NOTE: single sign on is enabled for IBM Cognos Analytics and Planning Analytics
ERROR MESSAGE: Failed to authenticate through CAM. HTTP response does not contain 'cam_passport' cookie
Beta Was this translation helpful? Give feedback.
All reactions