seb646
By:
seb646

Ajenti Port Not Working on Debian

February 17, 2016 2.9k views
Control Panels PHP Frameworks Linux Commands

I installed Ajenti using http://support.ajenti.org/topic/349864-installing-on-debian/. Everything looks okay from the ssh, it says;

:: Done! Open https://<address>:8000 in browser

When I open it in Chrome, I get:

No data received - ERR_EMPTY_RESPONSE

Also, when I try Debian's debug, ajenti-panel -v, I get:

ERROR Could not bind to (u'0.0.0.0', 8000)

After checking on if there is something else listening to the port, I find Python. I've tried killing Python and the process dies, but I still cannot get Ajenti to work. The only thing I have installed now are the basic LAMP stuff (apache, mysql, etc).

Any help would be great! :)

1 comment
2 Answers

When running ajenti-panel -v the Python process that is already bound to the port is Ajenti itself. First, stop the Ajenti service with:

  • service ajenti stop

Now, when you run ajenti-panel -v, you will see the real problem. Here's the Python Traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gevent/greenlet.py", line 327, in run
    result = self._run(*self.args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/gevent/server.py", line 102, in wrap_socket_and_handle
    ssl_socket = self.wrap_socket(client_socket, **self.ssl_args)
  File "/usr/lib/python2.7/dist-packages/gevent/ssl.py", line 382, in wrap_socket
    ciphers=ciphers)
  File "/usr/lib/python2.7/dist-packages/gevent/ssl.py", line 84, in __init__
    ctx = SSLContext(ssl_version)
NameError: global name 'SSLContext' is not defined
<Greenlet at 0x7f916b28e910: <bound method SocketIOServer.wrap_socket_and_handle of <SocketIOServer at 0x7f916acd6f10 fileno=6 address=0.0.0.0:8000>>(<socket at 0x7f9175634950 fileno=12 sock=104.236.1, ('162.243.191.67', 34586))> failed with NameError

There is a report on Ajenti's GitHub issue tracker about this: https://github.com/ajenti/ajenti/issues/702

In a fresh Debian 8 (Jessie) install, Ajenti would timeout when I tried to connect through HTTP.

I only had to disable SSL in the new /etc/ajenti/config.yml to get it working. But it's simpler (and more secure) to use HTTPS, and that worked out-of-the-box.

Have another answer? Share your knowledge.