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.
[SOLVED]Sites not avaible after reboot (nginx failed to start)
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Sites not avaible after reboot
You need to run nginx -t when your nginx has failed to start. That is when you will find the cause of the problem
Re: Sites not avaible after reboot
Ok,
I've restarted the server, the error occured, i did the nginx -t and this is the message
And still have this message in /var/log/nginx/error.log from the hour of the restart :
I've restarted the server, the error occured, i did the nginx -t and this is the message
Code: Select all
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Code: Select all
2017/12/30 09:53:27 [emerg] 2122#2122: bind() to 163.XXX.XXX.59:80 failed (99: Cannot assign requested address)
Re: Sites not avaible after reboot
Try to this
Code: Select all
killall nginx
service nginx start
Re: Sites not avaible after reboot
@imperio
I just tried it and nginx starts succesfully after being killed. I even tried "nginx -t" after killing it (and still configuration ok).
I just tried it and nginx starts succesfully after being killed. I even tried "nginx -t" after killing it (and still configuration ok).
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Sites not avaible after reboot
When you reboot the server what exactly happens :
1. Nginx doesn't start... does it start when you manually do service nginx restart
or
2. it starts only when you kill the procoesses as Imperio mentioned ?
I suspect Nginx is not able to bind itself to your IP at startup. May be something in your network config or some service is using port 80 at startup. (then releases it after a few minutes because you say
resrearch and read your error : https://www.google.com/search?q=nginx+error%3A+(99%3A+Cannot+assign+requested+address
1. Nginx doesn't start... does it start when you manually do service nginx restart
or
2. it starts only when you kill the procoesses as Imperio mentioned ?
I suspect Nginx is not able to bind itself to your IP at startup. May be something in your network config or some service is using port 80 at startup. (then releases it after a few minutes because you say
resrearch and read your error : https://www.google.com/search?q=nginx+error%3A+(99%3A+Cannot+assign+requested+address
Re: Sites not avaible after reboot
Yes when i reboot the server, nginx doesn't start but if i manually start it (with "service nginx start") it starts and run perfectly (without killing it first).
I thought i would ask vesta forum before doing my research, since i thought it was vesta related, but i'll have to look over the web and do some tests.
EDIT: I actually did research meanwhile but it's hard to find something because it only happens while booting. After no problem. Majority of the posts talks about ip changes and my ip didn't changed. Moreover i can start nginx manually. So if you have any idea it will be welcome :\
EDIT 2 : This is the working solution : https://stackoverflow.com/questions/204 ... 6#20532666
Thanks for your time
I thought i would ask vesta forum before doing my research, since i thought it was vesta related, but i'll have to look over the web and do some tests.
EDIT: I actually did research meanwhile but it's hard to find something because it only happens while booting. After no problem. Majority of the posts talks about ip changes and my ip didn't changed. Moreover i can start nginx manually. So if you have any idea it will be welcome :\
EDIT 2 : This is the working solution : https://stackoverflow.com/questions/204 ... 6#20532666
Thanks for your time
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: [SOLVED]Sites not avaible after reboot (nginx failed to start)
As I already said, it had something to do with your network config... the IP is not available for Nginx to bind. Congratulations on resolving your issue, feel proud and always research your way through the forums to learn more.
If you need any more help, we are always here.
Happy New Year
If you need any more help, we are always here.
Happy New Year