Forum Replies Created
-
AuthorPosts
-
It works now, thanks so much for the help!
Hello Paul,
I’m trying to create a slice on Fabric Testbed after the maintenance. However, the
invalid refresh token
still shows up. I think I missed something when I try to create the slice but cannot find where I did wrong. I was wondering if it was possible to schedule a zoom call with you.Thanks for your help,
XushengI haven’t had a slice work before, but I will try that after the maintenance. If it didn’t work out, a zoom call would be perfect. Thanks so much !!
Hello,
Sorry to bother, but (invalid_grant) invalid refresh token happened again, when I tried to create a slice. I’v tried to find a solution online last week, but it seems none of the solution works for me. I was wondering if you could hint me what might cause it happen. Thank you very much in advance.
—
SliceManagerException Traceback (most recent call last)
/tmp/ipykernel_130/23525788.py in <module>
4
5
—-> 6 slice_manager = SliceManager(oc_host=os.environ[‘FABRIC_ORCHESTRATOR_HOST’],
7 cm_host=os.environ[‘FABRIC_CREDMGR_HOST’] ,
8 project_name=’all’,
SliceManagerException: (invalid_grant) invalid refresh token
—Thanks,
XushengThank you so much for the clarification
No, it didn’t work out. I think it is because the same issue of invalid refresh token. I much appreciate your time and help, please see the information below,
The error happened at line:
slice_manager = SliceManager(oc_host=os.environ['FABRIC_ORCHESTRATOR_HOST'], cm_host=os.environ['FABRIC_CREDMGR_HOST'] , project_name='all', scope='all')
error information:
—————————————————————————
SliceManagerException Traceback (most recent call last)
/tmp/ipykernel_68/23525788.py in <module>
4
5
—-> 6 slice_manager = SliceManager(oc_host=os.environ[‘FABRIC_ORCHESTRATOR_HOST’],
7 cm_host=os.environ[‘FABRIC_CREDMGR_HOST’] ,
8 project_name=’all’,/opt/conda/lib/python3.9/site-packages/fabrictestbed/slice_manager/slice_manager.py in __init__(self, cm_host, oc_host, token_location, project_name, scope, initialize)
61 self.initialized = False
62 if initialize:
—> 63 self.initialize()
64
65 def initialize(self):/opt/conda/lib/python3.9/site-packages/fabrictestbed/slice_manager/slice_manager.py in initialize(self)
70 “””
71 if not self.initialized:
—> 72 self.__load_tokens()
73 self.initialized = True
74/opt/conda/lib/python3.9/site-packages/fabrictestbed/slice_manager/slice_manager.py in __load_tokens(self)
113 # First time login, use environment variable to load the tokens
114 refresh_token = os.environ[Constants.CILOGON_REFRESH_TOKEN]
–> 115 self.refresh_tokens(refresh_token=refresh_token)
116
117 def get_refresh_token(self) -> str:/opt/conda/lib/python3.9/site-packages/fabrictestbed/slice_manager/slice_manager.py in refresh_tokens(self, refresh_token)
151 self.tokens = tokens
152 return tokens.get(CredmgrProxy.ID_TOKEN, None), tokens.get(CredmgrProxy.REFRESH_TOKEN, None)
–> 153 raise SliceManagerException(tokens.get(CredmgrProxy.ERROR))
154
155 def revoke_token(self, *, refresh_token: str = None) -> Tuple[Status, Any]:SliceManagerException: (invalid_grant) invalid refresh token
Hello Paule,
I have tired to restart the kernel and also log out/in my account, but I still cannot get new Fabric Identity Token and update Fabric Refresh Token. Same error as before.
Thanks,
Thanks for the illustration.
I am using the FABRIC Jupyterhub.
Hello Paul,
If my bastion account hasn’t been created, will that cause error like this? I’v submitted my public Key to Fabric, but the account may not be created yet.
Thanks,
try: refresh_res = credmgr_proxy.refresh(project_name='all', scope='all', refresh_token=fabric_refresh_token) print("New Tokens received: {}".format(json.dumps(refresh_res))) fabric_id_token = refresh_res['id_token'] fabric_refresh_token = refresh_res['refresh_token'] print() print("New Refresh Token:{}".format(fabric_refresh_token))print() print("Stored new Refresh Token") %store fabric_refresh_token except Exception as e: print("Exception occurred while getting tokens:{}".format(e))
Exception occurred while getting tokens:Object of type Status is not JSON serializable
print(refresh_res)
(<Status.FAILURE: 3>, {‘error’: ‘(invalid_grant) invalid refresh token’, ‘created_at’: ‘2022-01-23 19:35:59’})- This reply was modified 2 years, 11 months ago by Xusheng Ai.
- This reply was modified 2 years, 11 months ago by Xusheng Ai.
-
AuthorPosts