We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Process Stopped on boot
Process Stopped on boot
Hello!
For no reason at all whenever I start my server Nginx and Apache2 wont start automatically.
(They are able to start when I manually click on the start button or write service apache2 start in the console it's pretty annoying to do it manually all the time).
Apache2 Error (The one causing it not to start I believe)
Regards,
Ocrion.
For no reason at all whenever I start my server Nginx and Apache2 wont start automatically.
(They are able to start when I manually click on the start button or write service apache2 start in the console it's pretty annoying to do it manually all the time).
Apache2 Error (The one causing it not to start I believe)
And for Nginx:[Tue Nov 12 17:57:26 2013] [notice] Graceful restart requested, doing restart
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Tue Nov 12 17:57:26 2013] [warn] NameVirtualHost 192.168.0.105:8443 has no VirtualHosts
Any tips?2013/11/15 15:34:29 [emerg] 2340#0: bind() to 192.168.0.105:80 failed (99: Cannot assign requested address)
Regards,
Ocrion.
Re: Process Stopped on boot
While apache error message doesn't looks serious, error from nginx does.
First of all make sure you have init script right in place and number in the apache script is higher than in nginx.
First of all make sure you have init script right in place and number in the apache script is higher than in nginx.
Code: Select all
root@adm:~# ls /etc/rc3.d/|grep -e "apache" -e "nginx"
S20nginx
S91apache2
Re: Process Stopped on boot
Hello!skid wrote:While apache error message doesn't looks serious, error from nginx does.
First of all make sure you have init script right in place and number in the apache script is higher than in nginx.Code: Select all
root@adm:~# ls /etc/rc3.d/|grep -e "apache" -e "nginx" S20nginx S91apache2
Back from the weekend, this is the output I got.
Code: Select all
root@purushost:~# ls /etc/rc3.d/|grep -e "apache" -e "nginx"
S01nginx
S03apache2
Re: Process Stopped on boot
This means that someone is using port 80 and nginx can't bind it. It might be a cron task which is trying to fetch data from webser like wget http://localhost/something2013/11/15 15:34:29 [emerg] 2340#0: bind() to 192.168.0.105:80 failed (99: Cannot assign requested address)
Re: Process Stopped on boot
But I haven't added any cron jobs other than the defaults that comes with vestaCP?
Re: Process Stopped on boot
As a quick workaround try this
Code: Select all
echo "service nginx restart" >> /etc/rc.local
Re: Process Stopped on boot
That did not work. I tried to make it start with Crontab as well but without success...skid wrote:As a quick workaround try thisCode: Select all
echo "service nginx restart" >> /etc/rc.local
Code: Select all
@reboot root /usr/bin/sleep 30 && /etc/init.d/nginx start
@reboot root /usr/bin/sleep 35 && /etc/init.d/apache2 start
Output:
Nov 20 12:10:08 purushost /usr/sbin/cron[3402]: (CRON) INFO (Running @reboot jobs)
Nov 20 12:10:11 purushost /USR/SBIN/CRON[3882]: (root) CMD (/usr/bin/sleep 35 && /etc/init.d/apache2 start)
Nov 20 12:10:11 purushost /USR/SBIN/CRON[3883]: (root) CMD (/usr/bin/sleep 30 && /etc/init.d/nginx start)
Re: Process Stopped on boot
Can you check who is listening on port 80?
Code: Select all
lsof -itcp:80
Re: Process Stopped on boot
Sure!skid wrote:Can you check who is listening on port 80?Code: Select all
lsof -itcp:80
Output:
Code: Select all
root@purushost:~# lsof -itcp:80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx 5517 root 17u IPv4 11645 0t0 TCP purushost.local:http (LISTEN)
nginx 5518 www-data 17u IPv4 11645 0t0 TCP purushost.local:http (LISTEN)
nginx 5519 www-data 17u IPv4 11645 0t0 TCP purushost.local:http (LISTEN)
Re: Process Stopped on boot
Do you still see "(99: Cannot assign requested address)" in the error log? If yes then something is definitely listening on a port 80 and right before nginx starts. Or maybe ip is not yet initialized. You can get some info by by adding following into rc.local file
Code: Select all
ifconfig >> /tmp/debug.log
lsof -itcp:80 >> /tmp/debug.log