Page 1 of 1

After importing admin-backup to new server nginx and apache wouldnt start because of the IP

Posted: Tue Jan 09, 2018 11:56 am
by BlueTurtle
Well obviously the new server is at another IP so nginx exits with this error after importing the backup from the previous VPS

Jan 09 11:50:16 edited.com nginx[4188]: nginx: [emerg] bind() to 45.76.87.181:80 failed (99: Cannot assign requested address)

Code: Select all

 service nginx start
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
root@ethearnal:~# systemctl status nginx.service
● nginx.service - nginx - high performance web server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2018-01-09 11:50:16 UTC; 16s ago
     Docs: http://nginx.org/en/docs/
  Process: 4188 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)

Jan 09 11:50:16 ethearnal.com systemd[1]: Starting nginx - high performance web server...
Jan 09 11:50:16 ethearnal.com nginx[4188]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Jan 09 11:50:16 ethearnal.com nginx[4188]: nginx: [emerg] bind() to 45.76.87.181:80 failed (99: Cannot assign requested address)
Jan 09 11:50:16 ethearnal.com nginx[4188]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jan 09 11:50:16 ethearnal.com systemd[1]: nginx.service: Control process exited, code=exited status=1
Jan 09 11:50:16 ethearnal.com systemd[1]: Failed to start nginx - high performance web server.
Jan 09 11:50:16 ethearnal.com systemd[1]: nginx.service: Unit entered failed state.
Jan 09 11:50:16 ethearnal.com systemd[1]: nginx.service: Failed with result 'exit-code'.

Re: After importing admin-backup to new server nginx and apache wouldnt start because of the IP

Posted: Tue Jan 09, 2018 4:13 pm
by wedge1001
go to the web-settings and change the IP to the new ones?
afaik vesta then should regenerate the settings with the new IP.

(or manually edit your nginx config files to the new ip)

Re: After importing admin-backup to new server nginx and apache wouldnt start because of the IP

Posted: Tue Jan 09, 2018 5:23 pm
by BlueTurtle
I did change it under IP (top bar) and DNS.
Then selected the new ip from the drop down menu, in EDIT for the domain.

then rebuilded the templates for the user ( do i need to do that actually?)
However, they still exit for the same error.

Re: After importing admin-backup to new server nginx and apache wouldnt start because of the IP

Posted: Wed Jan 10, 2018 8:33 am
by wedge1001
login via ssh and grep for the IP too look where it's written?

Since you haven't specified your OS etc. in your profile, i will asume debian or ubuntu from "/etc/nginx/" in your error.

login via ssh and get root-rights (either add sudo or be root)

Code: Select all

egrep -r "listen\s*45.76.87.181" /etc/nginx/*
egrep -r "listen\s*45.76.87.181" /home/*
check where it's still in the config files and change them.
If you need more help, post the resulsts of the search here.