0
Besvaret

Why does Ajenti sometimes require Apache restart to function again?

Jason Sauders 10 år siden opdateret af Eugene Pankov (Project coordinator) 10 år siden 4
I'm running Ajenti on my home server running Ubuntu server LTS. On about four occasions just in the last two days that I've been running Ajenti I've suddenly lost accessibility to the web interface. Restarting Ajenti via SSH continually says not running at first but it says it starts without error. Restart again and says not running. Now if I restart Apache first and then Ajenti the web interface comes back and we're good to go. Last time this happened I simply changed the password to a test user that I wasn't even logged in as and restarted Ajenti through the web interface, but it failed to come back until I ran SSH to restart Apache and then Ajenti. Is anybody else seeing this or am I goofing something up without realizing it?
Undersøger

This looks like Ajenti port being taken by other application.

Could you please check with 'netstat -tlnp | grep <port>' once the panel becomes unavailable again?

I'm actually having a lot of issues (SSL wise) on both my main server and my test server. Tonight I was troubleshooting the samba issue (posted about it in another thread with the web GUI not passing smb passwd -a properly) and ended up restarting Ajenti within the web UI. After that, it all went downhill. For what it's worth, on my test server I did run the netstat command, here's what I found:


root@neptune:/etc/ajenti# netstat -tlnp | grep 8000
tcp  0  0 0.0.0.0:8000  0.0.0.0:*  LISTEN  3944/stunnel4   


While on topic (since currently I cannot get Ajenti to work on either box...) what exactly is needed for SSL to work? the quad 0's there concerns me and makes me wonder that I did something wrong in the config page. In order to get the thing fired up again I have to switch the port back to 8000 within the config.json file, restart apache, restart ajenti, and go back in... but even when I go back in, I'm of course not using SSL and I have a notification at the top saying I should enable it. But when I enable it, we go around in circles again. I'm just a little confused on what in the web UI needs to be altered in order to have an effective SSL connection without issue.

I don't see an edit button but I wanted to include some recent findings. I ended up getting frustrated enough that I just did an apt-get remove --purge ajenti and reinstalled ajenti. After that I set up SSL and everything is working flawlessly. I'm trying to duplicate whatever I managed to do on two servers yet I cannot... 


What originally happened was after I changed the port and saved/restarted ajenti, I lost my connection to the web UI. Even if I restarted apache and ajenti via SSH terminal, I had nothing. I then edited the config.json file to switch the port back. Sometimes this would work, other times it would not. Ultimately the apt-get remove --purge and reinstall seems to have fixed it, which leaves me happy it's running but confused over what in the world took place. Based on my findings here, can you verify if I did anything wrong? Are you not supposed to touch config.json? Am I to do an apache reload or anything when I adjust those settings? I just can't place what exactly took place, so this working-yet-not-sure-how state leaves me in a bittersweet position. Anything to add that might shed some light?


Also, thanks for all of your help. :)

For what it's worth, just ran into it again. This time all I did was create a new Ajenti user and restarted Ajenti. When I did, it didn't come back up. I had to SSH in to see what was up. Below are the commands I ran.


So you can see, Ajenti was not running, despite me hitting "restart" and waiting for it. Each time I tried to start it, it said not running BUT said it was starting. Next time I restarted it, still said 'not running'. As you can see, once I restarted Apache2 and then Ajenti, things worked fine.


As always, thanks for your help! 




ason@pluto:~$ sudo service ajenti restart

[sudo] password for jason: 

Stopping Ajenti:

 * not running

Starting Ajenti:

22.11.2013 09:26 INFO  Using config file /etc/ajenti/config.json

 * started

jason@pluto:~$ sudo service ajenti restart

Stopping Ajenti:

 * not running

Starting Ajenti:

22.11.2013 09:26 INFO  Using config file /etc/ajenti/config.json

 * started

jason@pluto:~$ sudo service apache2 restart

 * Restarting web server apache2                                                                                                                                          apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

 ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

                                                                                                                                                                   [ OK ]

jason@pluto:~$ sudo service ajenti restart

Stopping Ajenti:

 * not running

Starting Ajenti:

22.11.2013 09:26 INFO  Using config file /etc/ajenti/config.json

 * started

jason@pluto:~$ sudo service ajenti restart

Stopping Ajenti:

 * stopped

Starting Ajenti:

22.11.2013 09:26 INFO  Using config file /etc/ajenti/config.json

 * started


Can you reproduce it? If so, could you also attach output of netstat... (see below) before and after Apache restart?

Kundesupport af UserEcho