+1
Écarté

Cannot access Ajenti on port 8000

Tiny Nas il y a 11 ans mis à jour par imran il y a 4 ans 60
I'm running Apache 2 on Raspbian and even though Ajenti installed and is running I cannot access it on the default port as my browser says there isn't anything to be displayed.

Does Apache take up the port 8000? You can check that by running:


sudo netstat -tlnp | grep 8000


If so, you can either reconfigure Apache (ports.conf) to use different port or change Ajenti port in /etc/ajenti/config.json

+29
For anyone else having the same problem:
make sure you're trying to access it via https

Maybe the http page could be made to redirect to the https one.
-2
I have the same problem. Everything worked well during installation and after that for some time. I could login and everything.

However, I set the server aside for a while and didn't use it. When I tried to login again, port 8000 was not available. The webserver is still running, as well as the applications, it is just not possible to access the Ajenti panel anymore.

Tried "sudo netstat -tlnp | grep 8000" and it did... nothing.

Access is tried with https.

Not sure what happened.
-2
Problem solved. An update / upgrade process solved the issue. No idea why but it did.
I am having same problem 
tried update and upgrade no luck 
+1
i am also having same problem can not open panel. opening with https and also allowed the port
+4
the same here.. is was working fine for few days and now i can't access to ajenti panel but is running
+1
Please follow the troubleshooting guide http://support.ajenti.org/topic/507352-troubleshooting/
-3
I'll post my results here, thank you!
+1
I have done all of the above suggestions, even tried changing the port to 9000, but I can not access ajenti on any port with https, nor with http.
I am running a fresh install of Ubuntu 14.10 with LAMP and OpenSSHserver; for the rest it is all standard.
During installation there were no errors.
+1
Me Neither. Running CentOS 6 and did not install anything less then Ajenti, nginx, etc. Nothing is happening. Ajenti is running, no strange errors when running in foreground with: ajenti-panel -v

Nginx is running fine but cant see any login page with or without https. 
+3
I have given up on Ajenti and I am now running ISPConfig version 3. I can highly recommend it.
Same here, have been trying for two weeks on CentOS 7, Centos 6.5 & CentOS 6.6.
In all of them the same issue, ajenti service running Ok, IPTables Ok (for tcp and udp), Port 8000 listening... Ajenti... never get to work on any browser with/without https.

Too bad, I was hopeful since I've heard in the past so many good things about it.
Moving now to CWP (Centos Web Panel).
Still will give the try on ISPConfig as recommended by Idso
+7
I´ve got the same problem, installation went well, but cant login on https or http. I´m running ubuntu 14.10 with apache2 installed.

i changed "enable ssl" from "true" to "false" in config.json and now im able to see the loginpanel. - So try that

It seems that something with ssl and apache2 needs to be changed.

what's the directory of config.json ? where do i find it ?

-2
I can confirmed that Daniels hot fix is working!

If we take a look in the config.json:
"bind": {
"host": "0.0.0.0",
"port": 8000
},

The host is 0.0.0.0? And just now I can´t see how the config.json are on my other 2 servers.
+16
I ran into the same problem yesterday and I found the real fix (without a risk of insecure connection) through upgrading gevent package with the next command:
pip install gevent --upgrade
In case of any troubles with upgrading, try to install its dependence:
aptitude install python-dev
+2
Nikita Lyubchich your fix is right but first run this 
aptitude install python-dev
and after this
aptitude install python-dev

because giving error witout install python
-1
This is the real fix. It needs to be added to main install script, because default recommendation is to use HTTPS connection. Thank you for the help
-2
Thanks Nikita, your fix it works for me.
+1

I know this is a year old but I wanted to thank you. It was the only thing that worked. Ajenti never even hinted this was needed during install, so I would have probably given up on it. Thanks!

+1
Hi the combination of Nikitas and SeLoRe_28 commands helped me to get in Ajenti per https 
First you have to follow SeLoRe's commands and to install missing packages and then do the same with Nikitas. After 4 Hours of Searching i can now get in. Thank you . 
+2
Hi all,

I had the same problem.

I have apache2 installed and ajenti (I follow the ajenti install steps from ajenti's web site) and fresh Server ubuntu 14.04.

I've changed the
"bind": {
"host": "0.0.0.0",
"port": 8000

to

"bind": {
"host": "myServerIp",
"port": 8000

restarted ajenti service and it works.




+3
ufw allow 8000
That was exactly what made the server running. Didn't notice that the ufw firewall was running in the server.
+3
Hi,

While running Ajenti in debug mode:

ajenti-panel -v
I encountered the following error:

SSLError: [SSL: HTTP_REQUEST] http request (_ssl.c:581)
One of the Traceback calls referenced a line in the ssl.py file, which for me was found here (your path may vary):

/usr/local/lib/python2.7/dist-packages/gevent-1.0.1-py2.7-linux-x86_64.egg/gevent/ssl.py

In that file I navigated to this line:

def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None)
and changed it to:

def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None)
Then ran:

service ajenti restart

Why? Well because as I understand it, newer versions of Debian (I'm on Jessie) or Ubuntu run the SSLv23 protocol whereas older libraries like gevent (even the latest I believe) are stuck on SSLv3. I believe this change was due to the poodle vulnerability.

Anyways there's also a good chance I have no idea what I'm talking about but I thought I'd share what worked for me.

Cheers.
Same here. I am using Ajenti under Debian 8 (Jessie) too and I get the same error message, so I can confirm this. If I turn off the ssl, everything is OK.
I'm agree with Ryan; same error, same solution.

But, is this a bug of the Ajenti package for Debian 8, or not?

I think that is a bug, and it's neccesary to fix it.

It should be fixed on the repo:

deb http://repo.ajenti.org/debian main main debian

+3
This error occur which clean install and "ssl" -> enabled : true
No solution found.
"SSL Content" error and etc occur in debug start.
For now SSL is False and work fine.
Big thanks for all support.

In short:
Debian 8.1 / OVH Classic / Fresh install / No connection (no panel) when go to httpS://website.com:8000 / Work fine witchout ssl
+28
Easy fix from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766867

Edit file /usr/lib/python2.7/dist-packages/gevent/ssl.py on line 84 :
-            ctx = SSLContext(ssl_version)
+            ctx = __ssl__.SSLContext(ssl_version)
This worked for me on two servers running Ubuntu 15.04 Thanks Axtux

Thank you! This worked for my server running Debian 8.2 (jessie)

Thank you! This is the only fix that worked for me on Debian 8.0 (jessie)

Solution from @Axtux worked for me too (Debian 8)!
Having the same issues running it on EC2 with port 8000 opened through security groups. Unfortunately the patch is currently not working anymore because ssl.py is updated to a newer version. Strange enough when changing the port to 80 and disabling the default nginx config, i can acces it through http, but i'm almost 100% sure the ports are opened.

Update: a port check confirms port 8000 is open. Still Ajenti is unable to bind to '0.0.0.0', 8000
+8
I have done following steps in ubuntu 14.04 server LTS, i can now access the panel.
1) run this commands:
#apt-get install python-pip
#pip install passlib
source: http://support.ajenti.org/topic/222149-need-to-pip-install-passlib/
2) in /etc/ajenti/config.json i changed
"SSL":{ enabled:true, ... }
to this
"SSL":{enabled:false, ...}
3) restart ajenti service
4) access ajenti with following address
http://my_servera_ip_address:8000
+1
OR YOU CAN
1) run this commands:
#apt-get install python-pip
#pip install passlib
source: http://support.ajenti.org/topic/222149-need-to-pip-install-passlib/
2) in /etc/ajenti/config.json i changed
"bind":{"host":"0.0.0.0", "port" : 8000}
to this
"bind":{"host":"my_server_ip_address", "port" : 8000}
3) restart ajenti service
4) access ajenti with following address
https://my_servera_ip_address:8000

+3
After some headaches, I find a solution here : https://bugs.launchpad.net/ajenti/+bug/1386049/comments/4


Have Fun !
+6
i am not so lucky so i got both Ajenti SSL problem and Blank screen after login :)
Using Debian Jessy 8.2, Ajenti v1.2.22.24

#1 problem in older software (before 2015-08 i think): ssl v3 (ajenti needs v2.3) fix in GitHub: https://github.com/ajenti/ajenti/issues/702
i missed this one:)

#2 still SSL problem, something with certificate (work around Mahdi post) install soft, enter server hosts ip and disable SSL #please don't do that on insecure networks!

How i get SSL working:
# sudo apt-get install python-pip && pip install passlib
# sudo apt-get install python-dev python-greenlet python-gevent python-vte python openssl python-crypto python-appindicator
Then insert the line "import ssl" to (line #10):
# nano /usr/lib/python2.7/dist-packages/gevent/ssl.py

looks like:
it requires `ssl package`_ to be installed.
"import ssl"
.. _`ssl package`:
http://pypi.python.org/pypi/ssl

And
#sudo apt-get install python-setuptools && easy_install -U gevent
SSL should be ok until 2015-09-22, then you get ajenti blank screen after login, not nice :)

#3 Ajenti blank screen after login it is happening because gevent-1.1b5, you need to downgrade it to gevent-1.1b3

# easy_install -U gevent==1.1b3
# sudo service ajenti restart

and it should work 2015-09-23, hope it helps :)
it maybe works on ubuntu 14.x and 15.x try it..
+8

Wow 2 years after the thread was started here there is still the bug. Left a bad taste in my mouth right out of the box. Logged in once and then during connection changed password. A few minutes later it stopped working. Really? Looked nice while it lasted. Going to debug and see if it starts working but not a good thing to start out with.

+1

I wonder why the panel can't work just right after installation. Why should I install lots of extra-packets for Python?

I can't still open the panel anyway.

I am more or less a newby.

Now, after an update/upgrade by using recommended update I got the same error.

After searching and trying out the things which are posted here the problem still persisits.

I access ajenti by https://myserverip:8000. It plays no role if I use 0.0.0.0 or myserverip. the problem is still the same.

I use ubuntu 14.04 LTS trusty.

Outpup for sudo netstat -tlnp | grep 8000
tcp 0 0 myserverip:8000 0.0.0.0:* LISTEN 20381/python


ajenti-panel -V gives following output:

core.py:121 ERROR Could not bind to (u'myserverip', 8000)

after killing 20381 I get following with ajenti-panel -V:

26.02.2016 08:55 feedback.py:35 DEBUG Feedback << {"status": "ok"}


After try to access ajenti I get :

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 327, in run
result = self._run(*self.args, **self.kwargs)
File "/usr/local/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/local/lib/python2.7/dist-packages/gevent/_ssl2.py", line 410, in wrap_socket
ciphers=ciphers)
File "/usr/local/lib/python2.7/dist-packages/gevent/_ssl2.py", line 86, in __init__
cert_reqs, ssl_version, ca_certs)
File "/usr/lib/pymodules/python2.7/ajenti/compat.py", line 107, in new_sslwrap
context = __ssl__.SSLContext(ssl_version)
AttributeError: 'module' object has no attribute 'SSLContext'
<Greenlet at 0x7fa5c5453050: <bound method SocketIOServer.wrap_socket_and_handle of <SocketIOServer at 0x7fa5c53dac10 fileno=5 address=myserverip:8000>>(<socket at 0x7fa5c5460e50 fileno=10 sock=192.168.1, ('client-ip', 46981))> failed with AttributeError


python-pip and passlib are also installed.


Any Idea/ help would be appreciated.

Thanks in advance! Heinz




Same problem here.

+1

Same problem on Ajenti 1.2.23.6 and Ubuntu Server 12.04.5

Solved in issue: https://github.com/ajenti/ajenti/issues/886

Today I got an additional update for ajenti. This fixed the problem for me.

The Version which fixed the problem for me was 1.2.23.7

Thank you all.

During the installation of Ajenti software noted a problem accessing the web interface at https potocolo , the problem has been solved by editing the following file into the server " /usr/lib/python2.7/dist-packages/gevent/ssl .py " . In this file on line number 84, the following information was exchanged :

of: ctx = SSLContext ( SSL_VERSION )

by: ctx = __ __ssl SSLContext ( SSL_VERSION ) .

Before this exchange made a backup of the original file that is stored at the following address :

/usr/lib/python2.7/dist-packages/gevent/BKP.ssl.py

After editing the information restarted the service application that has to respond with support for SSL
+1

This was pretty easy to fix for my needs. If you can use LetsEncrypt, as not all SSL is created equal... Simply go through the process of getting yourself a cert from LetsEncrypt. Then collapse the key and cert, like so:

cat /etc/letsencrypt/live/example.com/cert.pem >> /etc/ajenti/le_ajenti.cert
cat /etc/letsencrypt/live/example.com/privkey.pem >> /etc/ajenti/le_ajenti.cert

~ Next edit the Ajenti configuration file:

vi /etc/ajenti/config.json

~ Now, point to your newly created cert within the config and then restart ye' ole' Ajenti service and you're back in business.



systemctl restart ajenti

And donezo!

+1

Don't Worry Guyz.. Here is a Pay_Back Time, Follow this : -

After Automatic Installation, from Ajenti Homepage ..

Type this command from your Terminal - ajenti-panel

Now Your pannel is runnig ..

go to your browser and type - https://yourip:8000

Now except risk Allow port and tada .. login page open ..

login with root credentials and Enjoy..

Any feedback or help contact me on - thebeatlessaj on Facebook ..

Thanks.. !! :-p


Restart Ajenti !!!

I just registered to say f**k this s**t. 
Time to try ISPconfig or return to Plesk. 

+3

Run the command below, it worked for me. Taken from the troubleshoot page


iptables -A INPUT -p tcp --dport 8000 -j ACCEPT

Tried everything and the only thing that works for me here is using ISPconfig

+1

Insane. This is STILL a problem. I know this is free, so I'm not complaining, but if people are still bothering to develop this thing, it really doesn't make a good first impression when you have to hack the default install to get it to work, especially for a bug that has lasted half a decade.

Hi guys. I found same issue but that message that can't bind to port and ip it's not a ip address issue (in fact 0.0.0.0 address is any address so it's fine). In ajenti logs I found a SSLEOF error certificate and like in other ajenti threads managing that error, they replied that was a gevent python module, I tried to update as they told in that link and ajenti stopped working because it was calling functions defined in updated module, also I tried to update it to newest gevent version with pip and also same issue, in both cases I had to reinstall virtual machine through image. I found the solution, although I don't discard stops working from time to time because of SSL certificate bad format. I changed  /etc/ajenti/config.json setting 

"SSL":{enabled:false, ...}, restarted ajenti but instead of connecting panel sending root password in plain text, I entered again in  /etc/ajenti/config.json and set "SSL":{ enabled:true, ... } and restarted ajenti again and it worked!!! By the way, I don't know if it's in this thread or another ajenti panel thread but python process listening in 8000 port is the own ajenti application, if you change ajenti port you will see that python process listening in the new configured port.

I hope someone can use this to fix if has same issue.

+1

Same problem.

Cant connect to admin panel with 8000 port