Ajenti Port Not Working on Debian

Posted February 17, 2016 12.1k views
PHP FrameworksControl PanelsLinux Commands

I installed Ajenti using 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'', 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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
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/", line 327, in run
    result = self._run(*self.args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/gevent/", 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/", line 382, in wrap_socket
  File "/usr/lib/python2.7/dist-packages/gevent/", 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=>>(<socket at 0x7f9175634950 fileno=12 sock=104.236.1, ('', 34586))> failed with NameError

There is a report on Ajenti’s GitHub issue tracker about this:

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.