[ https://issues.apache.org/jira/browse/RANGER-3668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17508986#comment-17508986 ]
Jeevan p edited comment on RANGER-3668 at 3/18/22, 5:56 PM: ------------------------------------------------------------ i can do everything on the UI, regarding the node it's hosted in , i checked i its network config, there seems to no restrictions on inbound or outbound, and , also an interesting thing to note is, when i misspell the host or port then i get an error saying max retires exceeded that's but misspelling the user or pass seems to have no effect on the Error in this issue was (Author: JIRAUSER286726): i can do everything on the UI, regarding the node it;s hosted in , i checked it's its network config, there seems to no restrictions on inbound or outbound, and , also an interesting thing to note is, when i misspell the host or port then i get an error saying max retires exceeded that's but misspelling the user or pass seems to have no effect on the Error in this issue > JSONDecodeError > --------------- > > Key: RANGER-3668 > URL: https://issues.apache.org/jira/browse/RANGER-3668 > Project: Ranger > Issue Type: Bug > Components: Ranger > Affects Versions: 2.2.0 > Environment: ranger is hosted on azure k8s service, im trying to > connect to it using apache-ranger python library > Reporter: Jeevan p > Priority: Major > Labels: JSON, apache-ranger, python > > {code:java} > from trino.dbapi import connect > from trino.auth import BasicAuthentication > from apache_ranger.model.ranger_service import * > from apache_ranger.client.ranger_client import * > from apache_ranger.model.ranger_policy import * > ranger_url = "http://dummy_host:0000" > ranger_auth = ("dummy_user", "dummy_pass") > ranger = RangerClient(ranger_url, ranger_auth) > for role in ranger.find_roles(): > print(str(role.id)) {code} > when i try to run the above code i get the below error > {code:java} > Traceback (most recent call last): > File "c:\Users\j.shimoga.prakash\Desktop\pls work - Copy\test.py", line 17, > in <module> > for role in ranger.find_roles(): > File "C:\Users\j.shimoga.prakash\Desktop\pls work - > Copy\venv\lib\site-packages\apache_ranger\client\ranger_client.py", line 254, > in find_roles > resp = self.__call_api(RangerClient.FIND_ROLES, filter) > File "C:\Users\j.shimoga.prakash\Desktop\pls work - > Copy\venv\lib\site-packages\apache_ranger\client\ranger_client.py", line 334, > in __call_api > raise RangerServiceException(api, response) > File "C:\Users\j.shimoga.prakash\Desktop\pls work - > Copy\venv\lib\site-packages\apache_ranger\exceptions.py", line 39, in __init__ > respJson = response.json() > File "C:\Users\j.shimoga.prakash\Desktop\pls work - > Copy\venv\lib\site-packages\requests\models.py", line 910, in json > return complexjson.loads(self.text, **kwargs) > File "C:\Users\j.shimoga.prakash\Desktop\pls work - > Copy\venv\lib\site-packages\simplejson\__init__.py", line 525, in loads > return _default_decoder.decode(s) > File "C:\Users\j.shimoga.prakash\Desktop\pls work - > Copy\venv\lib\site-packages\simplejson\decoder.py", line 370, in decode > obj, end = self.raw_decode(s) > File "C:\Users\j.shimoga.prakash\Desktop\pls work - > Copy\venv\lib\site-packages\simplejson\decoder.py", line 400, in raw_decode > return self.scan_once(s, idx=_w(s, idx).end()) > simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0) > {code} > also worth noting, giving in-correct user or pass does not change the error > received but changing the host or port does give a diff error (max retries > exceeded) -- This message was sent by Atlassian Jira (v8.20.1#820001)