Page 1 of 1

Nginx and named doesnt start at boot

Posted: Mon Feb 29, 2016 7:27 pm
by leisegang
I have installed the VestaCP.

After about 3 days the nginx(frontend) and named stopped starting on boot. i have to manually open terminal and start it.

2016/02/29 20:08:33 [emerg] 719#0: bind() to x.x.x.x:80 failed (99: Cannot assign requested address)


Is there something i can do to try to fix this?
I have read loads of posts here but cant find a solution.

Is there a possibility to reset some settings to make it work?

Re: Nginx and named doesnt start at boot

Posted: Mon Feb 29, 2016 7:47 pm
by skamasle
Check if you dont lost any IP on reboot

ifconfig

And check if nginx not runing

ps aux |grep nginx

If runing kill pid or killall nginx

Then service nginx start

If you lost IPs, or remove ip from server and dont remove it from vesta nginx dont start.

Re: Nginx and named doesnt start at boot

Posted: Mon Feb 29, 2016 7:55 pm
by leisegang
When testing ifconfig i get this:

Re: Nginx and named doesnt start at boot

Posted: Mon Feb 29, 2016 8:02 pm
by skamasle
Yes there is one IP.

You need check if nginx try listing on same IP than you have venet0:0 or in orther one your x.x.x.x -> bind() to x.x.x.x:80 failed (99: Cannot assign requested address)

Re: Nginx and named doesnt start at boot

Posted: Mon Feb 29, 2016 8:03 pm
by leisegang
How do i do that?

Re: Nginx and named doesnt start at boot

Posted: Mon Feb 29, 2016 8:07 pm
by skamasle
Check if x.x.x.x:80 is same IP ad you have on vnet0:0

Re: Nginx and named doesnt start at boot

Posted: Mon Feb 29, 2016 8:22 pm
by leisegang
The venet and nginx ip is the same

Re: Nginx and named doesnt start at boot

Posted: Mon Feb 29, 2016 8:45 pm
by skamasle
CHeck if you have runing apache or other nginx

is use centos

Code: Select all

ps aux |grep httpd
on debian

Code: Select all

ps aux |grep apache2

ps aux |grep nginx
Or check if you dont have any orther application on port 80

Code: Select all

netstat -plnt