Changed IP address, nginx won't start #160

Closed
mysty opened this Issue Dec 21, 2010 · 2 comments

Comments

Projects
None yet
2 participants
@mysty

mysty commented Dec 21, 2010

setup is: _Ubuntu 10.04 minimal in a Virtualbox vm, installed with all the optional additions, manually setting _MY_OWNIP (originally 192.168.0.104), _MY_HOSTN, and MY_FRONT.

Objective is to build the VM locally, and then push it to another network, where it is used in closed network for demos/training, and so at the moment I am struggling a bit with the service(s) reaction to changing _MY_OWNIP after the successful installation.

So, when on a different network bridged to a DHCP source (yes, I know..), I changed 192.168.0.104 to the new address it bound to, in

/etc/hosts  
/etc/nginx/conf.d/aegir.conf
/etc/bind/named.conf.options 

.. Restarted networking and bind, and then due to nginx start issues, restarted the server then tried to start nginx again with

nginx: [emerg] bind() to 192.168.0.104:80 failed (99: Cannot assign requested address)

Now this _MY_OWNIP address is no longer in the above files, or in /etc/nginx/* and I can't tell if nginx is looking to bind to confirm before starting, or where else it is getting this 192.168.0.104 from.

/var/log/nginx/error.log reports

2010/12/21 12:25:07 [emerg] 3039#0: bind() to 192.168.0.104:80 failed (99: Cannot assign requested address)

Is nginx trying to resolve itself via /etc/resolv.conf and not /etc/hosts as a check before starting up?

Maybe I should just start again without bind, but then again the issue might be nginx and not related to bind, or pdnsd, not that I can actually find the pdnsd config files (/etc/default/?).

Then I turned eth0 to a static rather than DHCP address, and to try and force some local resolution. Same issue. Knowing which files need updating on an address change would solve all the above, but I can't figure out where else _MY_OWNIP is set despite trying to read through its inner workings.

The LOCALHOST ON LOCAL NETWORK Barracuda script section sure looks interesting... despite - or because of - the warnings :)

Finally just to add that what was already an amazing script has moved on considerably since I last used it. Brilliant stuff, and happy to report I've evangelized a few people in to using Barracuda :) Thanks again!

@omega8cc

This comment has been minimized.

Show comment Hide comment
@omega8cc

omega8cc Dec 21, 2010

Owner

To change the IP of already installed Aegir system/hostmaster you need to start with some manual IP changes first in listed below files:

A. In the Barracuda main hostmaster:

/var/aegir/config/server_master/nginx/vhost.d/*

/var/aegir/config/server_master/nginx.conf

/var/aegir/config/server_master/nginx/pre.d/nginx_wild_ssl.conf

B. In the Octopus hostmaster (if used):

/data/disk/USER/config/server_master/nginx/vhost.d/*

C. Update the IP/name of database in your hostmaster site settings.php

Now you will be able to start Nginx:

killall -9 nginx; service nginx start

Now it is a time to log into the Aegir control panel and go to the server node edit form, where you need to change/update its IP address. It will cause all platforms re-verify. Then you can re-verify all sites to update their settings.php files.

Done.

Thanks for your kind words! :)

Owner

omega8cc commented Dec 21, 2010

To change the IP of already installed Aegir system/hostmaster you need to start with some manual IP changes first in listed below files:

A. In the Barracuda main hostmaster:

/var/aegir/config/server_master/nginx/vhost.d/*

/var/aegir/config/server_master/nginx.conf

/var/aegir/config/server_master/nginx/pre.d/nginx_wild_ssl.conf

B. In the Octopus hostmaster (if used):

/data/disk/USER/config/server_master/nginx/vhost.d/*

C. Update the IP/name of database in your hostmaster site settings.php

Now you will be able to start Nginx:

killall -9 nginx; service nginx start

Now it is a time to log into the Aegir control panel and go to the server node edit form, where you need to change/update its IP address. It will cause all platforms re-verify. Then you can re-verify all sites to update their settings.php files.

Done.

Thanks for your kind words! :)

@mysty

This comment has been minimized.

Show comment Hide comment
@mysty

mysty Dec 21, 2010

Wow you are so quick!!

After reading issue #34 I figured out A, and have nginx running now - hooray! So I came back to report and you've already answered!

But I would definitely have missed B and C!

Really much appreciated, with many thanks and very best wishes :D

mysty commented Dec 21, 2010

Wow you are so quick!!

After reading issue #34 I figured out A, and have nginx running now - hooray! So I came back to report and you've already answered!

But I would definitely have missed B and C!

Really much appreciated, with many thanks and very best wishes :D

@omega8cc omega8cc closed this May 22, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment