Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complexity in port of rundb_api_url when generating dbtoken #147

Closed
FaroutYLq opened this issue May 22, 2024 · 1 comment · Fixed by XENONnT/utilix#135
Closed

Complexity in port of rundb_api_url when generating dbtoken #147

FaroutYLq opened this issue May 22, 2024 · 1 comment · Fixed by XENONnT/utilix#135
Labels
bug Something isn't working

Comments

@FaroutYLq
Copy link
Collaborator

FaroutYLq commented May 22, 2024

Related discussion here

  • port 80 is whitelisted from OSG, but port 5000 is not
    • This should have been the case since 2022, but not sure why we kept using 5000 and nothing breaks
  • However, you cannot generate new token using 80 from everywhere

Temporary Solution:

  • rm -rf $HOME/.dbtoken$
  • Use 5000, run utilix.DB() in terminal to renew $HOME/.dbtoken$
  • switch to 80, submit outsource jobs
  • After 24 hours, all outsource jobs will fail because the token when submitting jobs expires
@FaroutYLq FaroutYLq added the bug Something isn't working label May 22, 2024
@FaroutYLq
Copy link
Collaborator Author

An example on "you cannot generate new token using 80 from everywhere"

>>> utilix.DB()
2024-05-23 09:59:06,824 - utilix - DEBUG - No token exists at /home/yuanlq/.dbtoken. Creating new one.
2024-05-23 09:59:06,824 - utilix - DEBUG - No token exists at /home/yuanlq/.dbtoken. Creating new one.
2024-05-23 09:59:06,824 - utilix - DEBUG - Creating a new token: doing API call now
2024-05-23 09:59:06,824 - utilix - DEBUG - Creating a new token: doing API call now
2024-05-23 09:59:06,916 - utilix - DEBUG - The response contains these keys: ['message']
2024-05-23 09:59:06,916 - utilix - DEBUG - The response contains these keys: ['message']
ERROR:root:API call to create new token failed. Here is the response:
{"message": "The method is not allowed for the requested URL."}
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/cvmfs/xenon.opensciencegrid.org/releases/nT/development/anaconda/envs/XENONnT_development/lib/python3.9/site-packages/utilix/rundb.py", line 191, in __init__
    token = Token(token_path)
  File "/cvmfs/xenon.opensciencegrid.org/releases/nT/development/anaconda/envs/XENONnT_development/lib/python3.9/site-packages/utilix/rundb.py", line 87, in __init__
    self.new_token()
  File "/cvmfs/xenon.opensciencegrid.org/releases/nT/development/anaconda/envs/XENONnT_development/lib/python3.9/site-packages/utilix/rundb.py", line 134, in new_token
    raise RuntimeError("Creating a new token failed.")
RuntimeError: Creating a new token failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant