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

M2Crypto.BIO.BIOError: illegal zero content error with DIRAC==8.0 #7306

Closed
davehadley opened this issue Nov 24, 2023 · 4 comments
Closed

M2Crypto.BIO.BIOError: illegal zero content error with DIRAC==8.0 #7306

davehadley opened this issue Nov 24, 2023 · 4 comments

Comments

@davehadley
Copy link

With a fresh install on Ubuntu 20.04.1 installed with the command:

DIRAC_VERSION=8.0
curl -LO https://github.com/DIRACGrid/DIRACOS2/releases/latest/download/DIRACOS-Linux-$(uname -m).sh && \
    bash DIRACOS-Linux-$(uname -m).sh && \
    rm DIRACOS-Linux-$(uname -m).sh && \
    source diracos/diracosrc && \
    pip install DIRAC==${DIRAC_VERSION} && \
    dirac-proxy-init --nocs && \
    dirac-configure -F && \
    dirac-configure -F -S GridPP -C dips://dirac01.grid.hep.ph.ic.ac.uk:9135/Configuration/Server -I && \
    dirac-proxy-init -g t2k.org_user -M

I get the error:

M2Crypto.BIO.BIOError: illegal zero content

If I use DIRAC_VERSION=7.3.38, the error goes away and I can successfully create a proxy.

Full stack trace:

Traceback (most recent call last):
  File "/home/dave/work/dirac/diracos/bin/dirac-proxy-init", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/dave/work/dirac/diracos/lib/python3.11/site-packages/DIRAC/Core/Base/Script.py", line 75, in __call__
    return entrypointFunc._func()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dave/work/dirac/diracos/lib/python3.11/site-packages/DIRAC/FrameworkSystem/scripts/dirac_proxy_init.py", line 257, in main
    resultDoTheMagic = pI.doTheMagic()
                       ^^^^^^^^^^^^^^^
  File "/home/dave/work/dirac/diracos/lib/python3.11/site-packages/DIRAC/FrameworkSystem/scripts/dirac_proxy_init.py", line 236, in doTheMagic
    resultProxyUpload = pI.uploadProxy()
                        ^^^^^^^^^^^^^^^^
  File "/home/dave/work/dirac/diracos/lib/python3.11/site-packages/DIRAC/FrameworkSystem/scripts/dirac_proxy_init.py", line 148, in uploadProxy
    resultProxyUpload = ProxyUpload.uploadProxy(upParams)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dave/work/dirac/diracos/lib/python3.11/site-packages/DIRAC/FrameworkSystem/Client/ProxyUpload.py", line 146, in uploadProxy
    return gProxyManager.uploadProxy(proxy=chain, restrictLifeTime=restrictLifeTime)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dave/work/dirac/diracos/lib/python3.11/site-packages/DIRAC/FrameworkSystem/Client/ProxyManagerClient.py", line 213, in uploadProxy
    result = chain.generateChainFromRequestString(reqDict["request"], lifetime=chainLifeTime)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dave/work/dirac/diracos/lib/python3.11/site-packages/DIRAC/Core/Utilities/Decorators.py", line 188, in innerFunc
    return meth(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/dave/work/dirac/diracos/lib/python3.11/site-packages/DIRAC/Core/Utilities/Decorators.py", line 188, in innerFunc
    return meth(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/dave/work/dirac/diracos/lib/python3.11/site-packages/DIRAC/Core/Security/m2crypto/X509Chain.py", line 834, in generateChainFromRequestString
    return self.generateProxyToString(lifetime, diracGroup, None, limited, req.get_pubkey())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dave/work/dirac/diracos/lib/python3.11/site-packages/DIRAC/Core/Utilities/Decorators.py", line 188, in innerFunc
    return meth(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/dave/work/dirac/diracos/lib/python3.11/site-packages/DIRAC/Core/Utilities/Decorators.py", line 188, in innerFunc
    return meth(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/dave/work/dirac/diracos/lib/python3.11/site-packages/DIRAC/Core/Security/m2crypto/X509Chain.py", line 469, in generateProxyToString
    proxyKey.as_pem(cipher=None, callback=M2Crypto.util.no_passphrase_callback).decode("ascii"),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dave/work/dirac/diracos/lib/python3.11/site-packages/M2Crypto/EVP.py", line 449, in as_pem
    return bio.read_all()
           ^^^^^^^^^^^^^^
  File "/home/dave/work/dirac/diracos/lib/python3.11/site-packages/M2Crypto/BIO.py", line 204, in read
    return m2.bio_read(self.bio, m2.bio_ctrl_pending(self.bio))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
M2Crypto.BIO.BIOError: illegal zero content
@marianne013
Copy link
Contributor

I didn't even know anyone would run UIs on Ubuntu. It might be relevant, but GridPP currently recommends 8.0.31 for new UIs, your 8.0 looks a bit like a typo. If you haven't tried 8.0.31, could you try this please ?

@davehadley
Copy link
Author

Thanks for the help. Yes it works with pip install pip install DIRAC==8.0.31.

I was running pip install DIRAC==8.0 because this is what the user guide instructs. Probably it would be better to change the user guide to something like: pip install DIRAC>=8

@marianne013
Copy link
Contributor

Hi @davehadley
The UI version depends at least partially on the server version (they can only be so far out of step) and not all DIRAC servers are running the same version. As you are using the GridPP DIRAC server, you can always find the recommended version for this particular server here: https://www.gridpp.ac.uk/wiki/Quick_Guide_to_Dirac#Dirac_client_installation
(We try to not make our users update more than once per year, but bug-fixes happen!)

@fstagni
Copy link
Contributor

fstagni commented Nov 27, 2023

Docs updated in #7309.

The UI can be installed pretty much everywhere conda works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants