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

name 'x509' is not defined error in client release 1.30.4 #6078

Closed
elehcim opened this issue Feb 10, 2023 · 2 comments
Closed

name 'x509' is not defined error in client release 1.30.4 #6078

elehcim opened this issue Feb 10, 2023 · 2 comments
Assignees
Milestone

Comments

@elehcim
Copy link

elehcim commented Feb 10, 2023

Description

Hello, using the rucio/rucio-clients image release 1.30.4 (latest) when I try to use the containerized client on a k8s installation I get this error.

[user@client ~]$ rucio -v whoami
2023-02-10 08:08:13,255	DEBUG	baseclient.py	No trace_host passed. Using rucio_host instead
2023-02-10 08:08:13,255	DEBUG	baseclient.py	No creds passed. Trying to get it from the config file.
2023-02-10 08:08:13,256	DEBUG	baseclient.py	No account passed. Trying to get it from the RUCIO_ACCOUNT environment variable or the config file.
2023-02-10 08:08:13,256	DEBUG	baseclient.py	No VO passed. Trying to get it from environment variable RUCIO_VO.
2023-02-10 08:08:13,256	DEBUG	baseclient.py	No VO found. Trying to get it from the config file.
2023-02-10 08:08:13,256	DEBUG	baseclient.py	No VO found. Using default VO.
2023-02-10 08:08:13,256	DEBUG	baseclient.py	get a new token
2023-02-10 08:08:13,256	DEBUG	baseclient.py	HTTP request: GET http://rucio-auth.k8s-endpoint.my-domain.me/auth/userpass
2023-02-10 08:08:13,256	DEBUG	baseclient.py	HTTP header:  X-Rucio-Auth-Token: [hidden]
2023-02-10 08:08:13,256	DEBUG	baseclient.py	HTTP header:  X-Rucio-VO: def
2023-02-10 08:08:13,256	DEBUG	baseclient.py	HTTP header:  Connection: Keep-Alive
2023-02-10 08:08:13,256	DEBUG	baseclient.py	HTTP header:  User-Agent: rucio-clients/1.30.4
2023-02-10 08:08:13,256	DEBUG	baseclient.py	HTTP header:  X-Rucio-Script: rucio::-v
2023-02-10 08:08:13,256	DEBUG	baseclient.py	HTTP header:  X-Rucio-Account: root
2023-02-10 08:08:13,256	DEBUG	baseclient.py	HTTP header:  X-Rucio-Username: 
2023-02-10 08:08:13,256	DEBUG	baseclient.py	HTTP header:  X-Rucio-Password: 
2023-02-10 08:08:13,343	DEBUG	baseclient.py	HTTP Response: 200 OK
2023-02-10 08:08:13,381	DEBUG	rucio	Traceback (most recent call last):
  File "/usr/local/bin/rucio", line 107, in new_funct
    return function(*args, **kwargs)
  File "/usr/local/bin/rucio", line 267, in whoami_account
    client = get_client(args)
  File "/usr/local/bin/rucio", line 235, in get_client
    logger=logger)
  File "/usr/local/lib/python3.6/site-packages/rucio/client/client.py", line 77, in __init__
    super(Client, self).__init__(**args)
  File "/usr/local/lib/python3.6/site-packages/rucio/client/baseclient.py", line 290, in __init__
    self.__authenticate()
  File "/usr/local/lib/python3.6/site-packages/rucio/client/baseclient.py", line 955, in __authenticate
    self.__get_token()
  File "/usr/local/lib/python3.6/site-packages/rucio/client/baseclient.py", line 844, in __get_token
    if not self.__get_token_userpass():
  File "/usr/local/lib/python3.6/site-packages/rucio/client/baseclient.py", line 477, in __get_token_userpass
    result = self._send_request(url, headers=headers, get_token=True)
  File "/usr/local/lib/python3.6/site-packages/rucio/client/baseclient.py", line 451, in _send_request
    ssl_expirydate = self.__check_ssl_expiry()
  File "/usr/local/lib/python3.6/site-packages/rucio/client/baseclient.py", line 981, in __check_ssl_expiry
    cert_data = x509.load_pem_x509_certificate(str.encode(pem_data))
NameError: name 'x509' is not defined

2023-02-10 08:08:13,381	ERROR	name 'x509' is not defined
2023-02-10 08:08:13,381	ERROR	
Rucio exited with an unexpected/unknown error.
Please rerun the last command with the "-v" option to gather more information.
If it's a problem concerning your experiment or if you're unsure what to do, please follow up at: https://github.com/rucio/rucio/issues/
If you're sure there is a problem with Rucio itself, please follow up at: https://github.com/rucio/rucio/issues/

Downgrading to 1.30.3 the error disappears.

Steps to reproduce

from the k8s-tutorial, follow the steps up to the installation of the client

Rucio Version

Client: 1.30.4, Server: 1.30.4

Additional Information

No response

@ThePhisch
Copy link
Contributor

Could you check if the module cryptography is installed on the container on which you run the client?

@bari12
Copy link
Member

bari12 commented Feb 13, 2023

We reverted the change causing this. Will be fixed in the next release.

@bari12 bari12 closed this as completed Feb 13, 2023
@bari12 bari12 added this to the 1.30.5 milestone Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants