+1
Not a bug

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

Rajko Bezarevic 10 years ago updated by Neiroc 2 years ago 20
I cant seem to get ajenti to work after instalation a cant connect via https//ip:8000
when i run command ajenti-panel i get :
ERROR Could not bind to (u'0.0.0.0', 8000)
at the end i tried numerous suggestion from forums but no dice. please help any sugestions

Answer

Answer
Not a bug
This means that Ajenti port (8000) is used by other application. Check with 

sudo netstat -tlnp | grep 8000
Answer
Not a bug
This means that Ajenti port (8000) is used by other application. Check with 

sudo netstat -tlnp | grep 8000
+1
I have the same problem and I have nothing on my 8000 port, and I tried all kinds of other ports
May be an old thread, but I cant seem to find a solution to his either. The netstat replies 
tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN 
Btw, for those who are looking, I'm on CentOS 7 minimum install. To get netstat to work:
$ sudo yum install net-tools
Did I miss anything? I'm using the latest version as of today (1.2.22.3). I'd hate to start another topic. I'd be making a mess for helpseekers. Apache seems to be running so I should be close. 

Much appreciated in advance!
+1
Run netstat with -p to see which process took the port.
If you're running with -p, but don't see processes, add sudo.
Thanks Eugene for your quick reply. I tried both:
$ sudo netstat -p | grep 8000
$ netstat -p | grep 8000
None of them replied anything. I previously tried 
$ nmap -sT -O localhost

8000/tcp open  http-alt
Is that of any help?
I mean that you need -p in conjunction with all previous options, e.g. sudo netstat -tlnp | grep 8000
This is what I'm getting as result:
tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN      18538/python 
Looks like that solved the problem at some level. I'm getting this as results of ajenti-panel

Starting server on (u'0.0.0.0', 8000)
SSL enabled: /etc/ajenti/ajenti.pem
Starting new HTTP connection (1): meta.ajenti.org
I'm sure I've got ways to go, but at least this one is good (still "This webpage is not available". However, you pushed me the right direction. Thanks! If more issues appears, I'll make sure to put it in the right topic.
Probably firewall (blocks port 8000 in clean CentOS) or wrong URL.
It appears iptables got replaced with firewall-cmd. This is a working port opener.

firewall-cmd —permanent —zone=public —add-port=8000/tcp
firewall-cmd —reload
Oh and again, it's a CentOS 7 issue.
+2
Pardon, I think I made a mistake. It was supposed to be double "-". So again:
firewall-cmd --permanent --zone=public --add-port=8000/tcp
firewall-cmd --reload
This should be it. Not that last post. My apologies.
This is what i got:
-bash: firewall-cmd: command not found
+1

Please help, the same problem:

I have the same host - ISPconfig

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 127, in wrap_socket_and_handle
return self.handle(ssl_socket, address)
File "/usr/lib/python2.7/dist-packages/socketio/server.py", line 124, in handle
handler.handle()
File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 443, in handle
result = self.handle_one_request()
File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 658, in handle_one_request
self.handle_one_response()
File "/usr/lib/pymodules/python2.7/ajenti/http.py", line 25, in handle_one_response
return SocketIOHandler.handle_one_response(self)
File "/usr/lib/python2.7/dist-packages/socketio/handler.py", line 122, in handle_one_response
return self._do_handshake(handshake_tokens.groupdict())
File "/usr/lib/python2.7/dist-packages/socketio/handler.py", line 64, in _do_handshake
self.write_smart(data)
File "/usr/lib/python2.7/dist-packages/socketio/handler.py", line 88, in write_smart
self.write_plain_result(data)
File "/usr/lib/python2.7/dist-packages/socketio/handler.py", line 78, in write_plain_result
("Content-Type", "text/plain"),
File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 778, in start_response
raise UnicodeError("The value must be a native string", header, value)
UnicodeError: ('The value must be a native string', 'Access-Control-Max-Age', 3600)
failed with UnicodeError

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 127, in wrap_socket_and_handle
return self.handle(ssl_socket, address)
File "/usr/lib/python2.7/dist-packages/socketio/server.py", line 124, in handle
handler.handle()
File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 443, in handle
result = self.handle_one_request()
File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 658, in handle_one_request
self.handle_one_response()
File "/usr/lib/pymodules/python2.7/ajenti/http.py", line 25, in handle_one_response
return SocketIOHandler.handle_one_response(self)
File "/usr/lib/python2.7/dist-packages/socketio/handler.py", line 122, in handle_one_response
return self._do_handshake(handshake_tokens.groupdict())
File "/usr/lib/python2.7/dist-packages/socketio/handler.py", line 64, in _do_handshake
self.write_smart(data)
File "/usr/lib/python2.7/dist-packages/socketio/handler.py", line 88, in write_smart
self.write_plain_result(data)
File "/usr/lib/python2.7/dist-packages/socketio/handler.py", line 78, in write_plain_result
("Content-Type", "text/plain"),
File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 778, in start_response
raise UnicodeError("The value must be a native string", header, value)
UnicodeError: ('The value must be a native string', 'Access-Control-Max-Age', 3600)
failed with UnicodeError

Debian 9/10 you need install:

apt-get install python-pip && pip install gevent==1.1b4 && service ajenti restart && reboot