Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • funkwhale funkwhale
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 409
    • Issues 409
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhalefunkwhale
  • funkwhalefunkwhale
  • Issues
  • #1975
Closed
Open
Issue created Nov 22, 2022 by Philipp Wolfer@phwGuest

AttributeError: module 'lib' has no attribute 'SSL_CTX_set_ecdh_auto' on docker develop build

Using the currently latest develop image funkwhale/api with ID 26a4a2440cfa gives the below error on start:

2022-11-22 07:04:20,117 funkwhale_api.config DEBUG    No env file found at /config/.env
2022-11-22 07:04:20,118 funkwhale_api.config INFO     Running with the following plugins enabled: funkwhale_api.contrib.scrobbler, funkwhale_api.contrib.listenbrainz, funkwhale_api.contrib.maloja
2022-11-22 07:04:20,122 plugins      DEBUG    Calling handlers for filter plugins_dependencies
2022-11-22 07:04:20,122 plugins      DEBUG    Calling handlers for filter plugins_apps
2022-11-22 07:04:20,122 plugins      DEBUG    Calling handlers for filter middlewares_before
2022-11-22 07:04:20,122 plugins      DEBUG    Calling handlers for filter middlewares_after
Traceback (most recent call last):
  File "/app/manage.py", line 16, in <module>
    django.setup()
  File "/venv/lib/python3.10/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/venv/lib/python3.10/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/venv/lib/python3.10/site-packages/django/apps/config.py", line 124, in create
    mod = import_module(mod_path)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/venv/lib/python3.10/site-packages/daphne/apps.py", line 6, in <module>
    import daphne.server  # noqa: F401
  File "/venv/lib/python3.10/site-packages/daphne/server.py", line 7, in <module>
    from twisted.internet import asyncioreactor  # isort:skip
  File "/venv/lib/python3.10/site-packages/twisted/internet/asyncioreactor.py", line 19, in <module>
    from twisted.internet.posixbase import (
  File "/venv/lib/python3.10/site-packages/twisted/internet/posixbase.py", line 19, in <module>
    from twisted.internet import error, tcp, udp
  File "/venv/lib/python3.10/site-packages/twisted/internet/tcp.py", line 38, in <module>
    from twisted.internet._newtls import (
  File "/venv/lib/python3.10/site-packages/twisted/internet/_newtls.py", line 18, in <module>
    from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
  File "/venv/lib/python3.10/site-packages/twisted/protocols/tls.py", line 50, in <module>
    Connection(Context(TLSv1_METHOD), None)
  File "/venv/lib/python3.10/site-packages/OpenSSL/SSL.py", line 674, in __init__
    res = _lib.SSL_CTX_set_ecdh_auto(context, 1)
AttributeError: module 'lib' has no attribute 'SSL_CTX_set_ecdh_auto'

The docker image with ID 4c216fd05773 from 5 days ago works without issue.

Maybe this change in OpenSSL is behind it. Old (working) image:

Python 3.10.8 (main, Nov 10 2022, 12:59:17) [GCC 11.2.1 20220219] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> print(ssl.OPENSSL_VERSION)
OpenSSL 1.1.1s  1 Nov 2022

New (broken) image:

Python 3.10.8 (main, Oct 26 2022, 16:58:21) [GCC 12.2.1 20220924] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> print(ssl.OPENSSL_VERSION)
OpenSSL 3.0.7 1 Nov 2022

I can't try building the image right now, but the alpine update in abfa971e might have introduced this.

Edited Nov 22, 2022 by Philipp Wolfer
Assignee
Assign to
Time tracking