Thursday 14 August 2014

Fixing SSL in sabnzbd

Following from my previous post, it seems Sabnzbd isn't working quite right....to be precise SSL is not enabled. In fact it wont even let me select it in the Sabnzbd server settings, the tickbox is greyed out.

After a bit of google research I realised Sabnzbd uses pyOpenSSL for SSL support.

Knowing where the Sabnzbd log file is located from my last post (/var/db/sabnzbd/logs), i had a quick look for OpenSSL errors:

# grep -i pyopenssl /var/db/sabnzbd/logs/sabnzbd.log2014-08-13 15:19:22,865::INFO::[SABnzbd:502] pyOpenSSL... NOT found - try apt-get install python-pyopenssl (SSL is optional)


interesting, where the hell has OpenSSL gone? I'll check Python:
# python
Python 2.7.6 (default, Dec 11 2013, 21:07:05)
[GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd9
Type "help", "copyright", "credits" or "license" for more information.
>>> from OpenSSl import SSL
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named OpenSSl
>>> exit()
As this is a FreeNAS boxed, and we are running in a jail based on FreeBSD we can't use apt-get, but can use pkg:

# pkg install security/py-opensslpkg: /var/db/pkg permissions (0777) too lax

More permissions errors, I fixed them with:

# chmod 755 /var/db/pkg# chmod 755 /var/db/pkg/*

*note: I'm not sure these are the right permissions but they worked for me

Lets try again to install pyOpenSSL:

# pkg install security/py-openssl
Updating repository catalogue
digests.txz                                             100% 1991KB   1.9MB/s   1.9MB/s   00:01    
packagesite.txz                                         100% 5169KB   5.1MB/s   5.1MB/s   00:01    
Incremental update completed, 23445 packages processed:
0 packages updated, 0 removed and 23445 added.
.......
FreeBSD repository is up-to-date
All repositories are up-to-date
Updating database digests format: 100%
The following 8 packages will be affected (of 0 checked):

New packages to be INSTALLED:
py27-openssl: 0.14
py27-cryptography: 0.4
indexinfo: 0.2
libffi: 3.0.13_1
py27-six: 1.5.2
py27-setuptools27: 5.4.1
py27-cffi: 0.8.6
py27-pycparser: 2.10

The process will require 6 MB more space
928 kB to be downloaded

Proceed with this action [y/N]: y
......
[Downloads] [1/8] Installing indexinfo-0.2: 100%
[Downloads] [2/8] Installing py27-setuptools27-5.4.1: 100%
[Downloads] [3/8] Installing libffi-3.0.13_1: 100%
[Downloads] [4/8] Installing py27-pycparser-2.10: 100%
[Downloads] [5/8] Installing py27-six-1.5.2: 100%
[Downloads] [6/8] Installing py27-cffi-0.8.6: 100%
[Downloads] [7/8] Installing py27-cryptography-0.4: 100%
[Downloads] [8/8] Installing py27-openssl-0.14: 100%

Eventually PyOpenSSL was installed, so I'll try to restart Sabnzbd and see if I can select SSL:

# service sabnzbd restart
Stopping sabnzbd.
Waiting for PIDS: 78667.
Starting sabnzbd.

Sure enough, I browsed to my jails IP on port 8080 and SSL was available and selected in the server settings.
Seems to have fixed it!



No comments:

Post a Comment