1. expired refresh token

expired refresh token

Home Forums FABRIC General Questions and Discussion expired refresh token

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3923
    Imtiaz Mahmud
    Participant

      Hi,

      I am trying to make a new slice. However, I whenever I run a code, I receive the following error:

       

      —————————————————————————
      SliceManagerException Traceback (most recent call last)
      /tmp/ipykernel_564/1606304804.py in <module>
      3 from fabrictestbed_extensions.fablib.fablib import FablibManager as fablib_manager
      4
      —-> 5 fablib = fablib_manager()

      /opt/conda/lib/python3.9/site-packages/fabrictestbed_extensions/fablib/fablib.py in __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)
      752 self.slice_manager = None
      753 self.resources = None
      –> 754 self.build_slice_manager()
      755
      756 def get_ssh_thread_pool_executor(self) -> ThreadPoolExecutor:

      /opt/conda/lib/python3.9/site-packages/fabrictestbed_extensions/fablib/fablib.py in build_slice_manager(self)
      914 # logging.error(f”{e}”)
      915 logging.error(e, exc_info=True)
      –> 916 raise e
      917
      918 return self.slice_manager

      /opt/conda/lib/python3.9/site-packages/fabrictestbed_extensions/fablib/fablib.py in build_slice_manager(self)
      900 )
      901
      –> 902 self.slice_manager = SliceManager(
      903 oc_host=self.orchestrator_host,
      904 cm_host=self.credmgr_host,

      /opt/conda/lib/python3.9/site-packages/fabrictestbed/slice_manager/slice_manager.py in __init__(self, cm_host, oc_host, token_location, project_id, scope, initialize)
      68 f”project_id={self.project_id}”)
      69 if initialize:
      —> 70 self.initialize()
      71
      72 def initialize(self):

      /opt/conda/lib/python3.9/site-packages/fabrictestbed/slice_manager/slice_manager.py in initialize(self)
      77 “””
      78 if not self.initialized:
      —> 79 self.__load_tokens()
      80 self.initialized = True
      81

      /opt/conda/lib/python3.9/site-packages/fabrictestbed/slice_manager/slice_manager.py in __load_tokens(self)
      124 refresh_token = os.environ.get(Constants.CILOGON_REFRESH_TOKEN)
      125 # Renew the tokens to ensure any project_id changes are taken into account
      –> 126 self.refresh_tokens(refresh_token=refresh_token)
      127
      128 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)
      161 self.tokens = tokens
      162 return tokens.get(CredmgrProxy.ID_TOKEN, None), tokens.get(CredmgrProxy.REFRESH_TOKEN, None)
      –> 163 raise SliceManagerException(tokens.get(CredmgrProxy.ERROR))
      164
      165 def revoke_token(self, *, refresh_token: str = None) -> Tuple[Status, Any]:

      SliceManagerException: b'{\n “errors”: [\n {\n “details”: “(invalid_grant) expired refresh token”,\n “message”: “Internal Server Error”\n }\n ],\n “size”: 1,\n “status”: 500,\n “type”: “error”\n}’

       

      Please help!

      • This topic was modified 1 year, 8 months ago by Ilya Baldin.
      #3924
      Devin Lane
      Participant

        Hello,

         

        Have you tried generating a new token and copying and pasting this into your id_token.json file? You can get to the token management page through the portal: portal -> Experiments -> Manage Tokens -> Open fabric credential manager -> Create token. You should be able to copy this value, open the token.json file in your fabric environment (may have to right click and press “open with editor” in jupyter), then restart the server.

         

        Hopefully this helps!

        #3925
        Imtiaz Mahmud
        Participant

          Thanks for the suggestion. Following your suggestion, I replaced the token at the location:

          echo $FABRIC_TOKEN_LOCATION
          /home/fabric/work/fabric_config/token.json

          Then I logged out and logged in, also tried with incognito, but same error comes 🙁

          #3926
          Devin Lane
          Participant

            Did you try to restart your server? I believe you can do this at File -> Hub Control Panel -> Stop My Server (you may have to click it twice). Let me know if this helps.

            #3927
            Imtiaz Mahmud
            Participant

              It worked! :). Thank you very much.

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.