Home › Forums › FABRIC General Questions and Discussion › Unable to use fablib.manager
Tagged: hello fabric, project_id, refresh_token
- This topic has 2 replies, 2 voices, and was last updated 11 months, 2 weeks ago by Shams Gozalova.
-
AuthorPosts
-
January 12, 2024 at 1:25 pm #6326
Hi everyone,
I am new to FABRIC and trying to run a simple tutorial on Hello, Fabric, however I get stuck on the first ever step of the notebook. I have configured the environment with necessary details, but I keep running on token and project uuid problems. I am using the 1.6.0 version
The project ID that I am using is 488bd68e-9703-447b-bd77-069da4f438a6.
Here are the traces:
--------------------------------------------------------------------------- SliceManagerException Traceback (most recent call last) Cell In[1], line 3 1 from fabrictestbed_extensions.fablib.fablib import FablibManager as fablib_manager ----> 3 fablib = fablib_manager() 5 fablib.show_config(); File /opt/conda/lib/python3.10/site-packages/fabrictestbed_extensions/fablib/fablib.py:809, in FablibManager.__init__(self, fabric_rc, credmgr_host, orchestrator_host, fabric_token, project_id, bastion_username, bastion_key_filename, log_level, log_file, data_dir, output, execute_thread_pool_size, offline) 806 self.facility_ports = None 808 if not offline: --> 809 self.build_slice_manager() File /opt/conda/lib/python3.10/site-packages/fabrictestbed_extensions/fablib/fablib.py:984, in FablibManager.build_slice_manager(self) 981 except Exception as e: 982 # logging.error(f"{e}") 983 logging.error(e, exc_info=True) --> 984 raise e 986 return self.slice_manager File /opt/conda/lib/python3.10/site-packages/fabrictestbed_extensions/fablib/fablib.py:970, in FablibManager.build_slice_manager(self) 960 try: 961 logging.info( 962 f"oc_host={self.orchestrator_host}," 963 f"cm_host={self.credmgr_host}," (...) 967 f"scope='all'" 968 ) --> 970 self.slice_manager = SliceManager( 971 oc_host=self.orchestrator_host, 972 cm_host=self.credmgr_host, 973 project_id=self.project_id, 974 token_location=self.fabric_token, 975 initialize=True, 976 scope="all", 977 ) 979 # Initialize the slice manager 980 self.slice_manager.initialize() File /opt/conda/lib/python3.10/site-packages/fabrictestbed/slice_manager/slice_manager.py:80, in SliceManager.__init__(self, cm_host, oc_host, token_location, project_id, scope, initialize, project_name) 76 raise SliceManagerException(f"Invalid initialization parameters: cm_proxy={self.cm_proxy}, " 77 f"oc_proxy={self.oc_proxy}, token_location={self.token_location}, " 78 f"project_id={self.project_id}, project_name={self.project_name}") 79 if initialize: ---> 80 self.initialize() File /opt/conda/lib/python3.10/site-packages/fabrictestbed/slice_manager/slice_manager.py:89, in SliceManager.initialize(self) 83 """ 84 Initialize the Slice Manager object 85 - Load the tokens 86 - Refresh if needed 87 """ 88 if not self.initialized: ---> 89 self.__load_tokens() 90 self.initialized = True File /opt/conda/lib/python3.10/site-packages/fabrictestbed/slice_manager/slice_manager.py:139, in SliceManager.__load_tokens(self) 135 raise SliceManagerException(f"Unable to refresh tokens: no refresh token found!") 136 #self.logger.warning("Unable to refresh tokens: no refresh token found!") 137 #return 138 # Renew the tokens to ensure any project_id changes are taken into account --> 139 self.refresh_tokens(refresh_token=refresh_token) File /opt/conda/lib/python3.10/site-packages/fabrictestbed/slice_manager/slice_manager.py:196, in SliceManager.refresh_tokens(self, refresh_token) 194 self.tokens = tokens 195 return tokens.get(CredmgrProxy.ID_TOKEN, None), tokens.get(CredmgrProxy.REFRESH_TOKEN, None) --> 196 raise SliceManagerException(tokens.get(CredmgrProxy.ERROR)) SliceManagerException: b'{n "errors": [n {n "details": "error: Core API error occurred status_code: 404 message: b'{\\n \"errors\": [\\n {\\n \"details\": \"No match for Project with uuid = \\'<488bd68e-9703-447b-bd77-069da4f438a6>\\'\",\\n \"message\": \"Not Found\"\\n }\\n ],\\n \"size\": 1,\\n \"status\": 404,\\n \"type\": \"error\"\\n}', refresh_token: XXX",n "message": "Internal Server Error"n }n ],n "size": 1,n "status": 500,n "type": "error"n}'
Before this, I was running on the error on the screen attached.
It is mentioned that the token should be refreshed automatically, but even when I try to generate a new one via hub portal and restart the service the issue pertains. Has anyone faced the same issue before? Any suggestions on how to resolve this?
Thanks in advance
- This topic was modified 11 months, 2 weeks ago by Shams Gozalova.
- This topic was modified 11 months, 2 weeks ago by Shams Gozalova.
January 12, 2024 at 1:38 pm #6331Hi Shams,
Could you please remove <> enclosing the project id in
/home/fabric/work/fabric_config/fabric_rc
and restart your JH container via File -> Hub Control Panel -> Stop Container followed by Start Container?Please try your notebook again and let us know if you still observe this error.
Thanks,
Komal
January 12, 2024 at 1:46 pm #6333Hi Komal,
Thank you so much, it worked just fine!
-
AuthorPosts
- The topic ‘Unable to use fablib.manager’ is closed to new replies.