+3

SSL Error installing ajenti on ubuntu 16.04

Aurélien Massé 8 years ago updated by MJ Ray 5 years ago 1

Hi all,

I installed ajenti on my server Ubuntu 16.04 behind apache.

My apache configuration works but ajenti seems have troubles with SSL.

I have my certificates with Let's Encrypt so I updated the conf.json and change my certificate path like this:


"certificate_path": "/etc/letsencrypt/live/.........../fullchain.pem"



But I have this error:

Traceback (most recent call last):

File "/usr/lib/python2.7/dist-packages/gevent/greenlet.py", line 534, in run
result = self._run(*self.args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/gevent/baseserver.py", line 25, in _handle_and_close_when_done
return handle(*args_tuple)
File "/usr/lib/python2.7/dist-packages/gevent/server.py", line 126, in wrap_socket_and_handle
ssl_socket = self.wrap_socket(client_socket, **self.ssl_args)
File "/usr/lib/python2.7/dist-packages/gevent/_sslgte279.py", line 691, in wrap_socket
ciphers=ciphers)
File "/usr/lib/python2.7/dist-packages/gevent/_sslgte279.py", line 199, in __init__
self._context.load_cert_chain(certfile, keyfile)
SSLError: [SSL] PEM lib (_ssl.c:2603)
<Greenlet at 0x6ac61507d5f0: _handle_and_close_when_done(<bound method SocketIOServer.wrap_socket_and_handl, <bound method SocketIOServer.do_close of <SocketIO, (<socket at 0x6ac6147a0e90 fileno=[Errno 9] Bad fi)> failed with SSLError


Thanks a lot if you have an idea :)

You probably already figured this out, but ajenti wants a pem file containing the PRIVATE KEY (contents of privkey.pem in /etc/letsencrypt ) followed by the CERTIFICATE fullchain.