OneCDOnly / sherpa

A mini-package-manager for QNAP NAS
GNU General Public License v3.0
115 stars 13 forks source link

bug: `SABnzbd` unable to create new certs after enabling HTTPS #233

Closed OneCDOnly closed 1 year ago

OneCDOnly commented 1 year ago
2022-12-23 06:04:02,577::INFO::[SABnzbd:488] ionice binary... found (/opt/bin/ionice)
2022-12-23 06:04:02,860::INFO::[notifier:123] Sending notification: Error - Error creating SSL key and certificate (type=error, job_cat=None)
2022-12-23 06:04:02,860::ERROR::[misc:791] Error creating SSL key and certificate
2022-12-23 06:04:02,862::INFO::[misc:792] Traceback: 
Traceback (most recent call last):
  File "/share/CACHEDEV1_DATA/.qpkg/SABnzbd/repo-cache/sabnzbd/misc.py", line 787, in create_https_certificates
    private_key = generate_key(key_size=2048, output_file=ssl_key)
  File "/share/CACHEDEV1_DATA/.qpkg/SABnzbd/repo-cache/sabnzbd/utils/certgen.py", line 24, in generate_key
    private_key = rsa.generate_private_key(public_exponent=65537, key_size=key_size, backend=default_backend())
  File "/share/CACHEDEV1_DATA/.qpkg/SABnzbd/venv/lib/python3.10/site-packages/cryptography/hazmat/backends/__init__.py", line 8, in default_backend
    from cryptography.hazmat.backends.openssl.backend import backend
  File "/share/CACHEDEV1_DATA/.qpkg/SABnzbd/venv/lib/python3.10/site-packages/cryptography/hazmat/backends/openssl/__init__.py", line 6, in <module>
    from cryptography.hazmat.backends.openssl.backend import backend
  File "/share/CACHEDEV1_DATA/.qpkg/SABnzbd/venv/lib/python3.10/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 63, in <module>
    from cryptography.hazmat.bindings.openssl import binding
  File "/share/CACHEDEV1_DATA/.qpkg/SABnzbd/venv/lib/python3.10/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 14, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ModuleNotFoundError: No module named '_cffi_backend'
2022-12-23 06:04:02,871::INFO::[notifier:123] Sending notification: Warning - Disabled HTTPS because of missing CERT and KEY files (type=warning, job_cat=None)
2022-12-23 06:04:02,870::WARNING::[SABnzbd:1295] Disabled HTTPS because of missing CERT and KEY files
2022-12-23 06:04:02,880::INFO::[notifier:123] Sending notification: Warning - Disabled HTTPS because of invalid CERT and KEY files (type=warning, job_cat=None)
2022-12-23 06:04:02,880::WARNING::[SABnzbd:1305] Disabled HTTPS because of invalid CERT and KEY files
2022-12-23 06:04:02,882::INFO::[SABnzbd:1306] Traceback: 
Traceback (most recent call last):
  File "/share/CACHEDEV1_DATA/.qpkg/SABnzbd/repo-cache/SABnzbd.py", line 1302, in main
    trialcontext.load_cert_chain(https_cert, https_key)
FileNotFoundError: [Errno 2] No such file or directory
2022-12-23 06:04:02,888::INFO::[SABnzbd:1435] Starting web-interface on 0.0.0.0:8900
OneCDOnly commented 1 year ago

https://github.com/OneCDOnly/sherpa/commit/3e87ab85b6599e0350be0c9c9807592f0663bee7 has fixed this problem too.