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

ValueError: Attribute's length must be >= 1 and <= 64, but it was 66 #1251

Open
tanwarsh opened this issue Jan 8, 2025 · 2 comments
Open
Assignees

Comments

@tanwarsh
Copy link
Collaborator

tanwarsh commented Jan 8, 2025

Describe the bug
pipline fails with error and passes if tried multiple times:

EXCEPTION : Attribute's length must be >= 1 and <= 64, but it was 66
Traceback (most recent call last):
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\Scripts\fx.exe\__main__.py", line 7, in <module>
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\openfl\interface\cli.py", line 343, in entry
    error_handler(e)
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\openfl\interface\cli.py", line 262, in error_handler
    raise error
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\openfl\interface\cli.py", line 341, in entry
    cli(max_content_width=120)
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\click\core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\click\core.py", line 1082, in main
    rv = self.invoke(ctx)
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\click\core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\click\core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\click\core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\click\core.py", line 788, in invoke
    return __callback(*args, **kwargs)
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\Lib\site-packages\openfl\interface\aggregator.py", line 89, in _generate_cert_request
    generate_cert_request(fqdn)
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\Lib\site-packages\openfl\interface\aggregator.py", line 108, in generate_cert_request
    server_private_key, server_csr = generate_csr(common_name, server=True)
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\openfl\cryptography\participant.py", line 40, in generate_csr
    x509.NameAttribute(NameOID.COMMON_NAME, common_name),
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\cryptography\x509\name.py", line 152, in __init__
    raise ValueError(msg)
ValueError: Attribute's length must be >= 1 and <= 64, but it was 66
Traceback (most recent call last):
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "D:\a\openfl\openfl\tests\github\test_hello_federation.py", line 86, in <module>
    main()
  File "D:\a\openfl\openfl\tests\github\test_hello_federation.py", line 54, in main
    certify_aggregator(fqdn)
  File "D:\a\openfl\openfl\tests\github\utils.py", line 77, in certify_aggregator
    check_call(['fx', 'aggregator', 'generate-cert-request', '--fqdn', fqdn])
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['fx', 'aggregator', 'generate-cert-request', '--fqdn', 'fv-az586-245.tcyitnne5h1udiirmv1fr5uvod.phxx.internal.cloudapp.net']' returned non-zero exit status 1.

https://github.com/securefederatedai/openfl/actions/runs/12665433373/job/35295610936?pr=1216

To Reproduce
Steps to reproduce the behavior:

  1. Pipelines fails while runnning command "fx aggregator generate-cert-request --fqdn " intermittently when thelength of x is more then 64.

Expected behavior
Pipeline should not fail because of this error.

Desktop (please complete the following information):

  • OS: linux and windows
@tanwarsh tanwarsh self-assigned this Jan 8, 2025
@MasterSkepticista
Copy link
Collaborator

Known issue, refer to the fix in #1015.

@rahulga1
Copy link
Collaborator

@pasokan-intel @gbikkiintel Can you please take care of this?
It will surely help the stability of the pipeline.

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