PDA

View Full Version : Second server installation not linked with master


wxman
26th April 2009, 00:24
I don't think I installed ISPConfig 3 correctly on my second server, because I don't see where it's syncing up with the master server.

I have two physical machines, each with two virtual servers running Ubuntu 8.04. A load balancer is one virtual, and the webserver is the second on each machine. I also have a second network card in each computer, and a crossover cable, as a bridge between the two physical computers.

ISPConfig was installed on the first webserver (WEB1) using the standard install. I have an IP address assigned to the crossover NIC on WEB1 as 192.168.0.202. I then installed ISPConfig on the second webserver (WEB2) using the expert install. I kept getting stopped where it asks for the master MYsql server name. When I used localhost, which is what I used in WEB1, it finished the install. I can get to both interfaces locally.

My problem is now how is ISPConfig on WEB2 going to sync with it on WEB1? Also, how do I force it to use my crossover to communicate if possible? I'm using the dedicated GB crossover just for master/master DB and rsync. I'm able to ping each server using the assigned IP's for the crossover, WEB1 is 192.168.0.202, and WEB2 is 192.168.0.212. Is there any other thing that needs to be done on the second install to tell it to connect to the master?

till
26th April 2009, 12:28
ISPConfig was installed on the first webserver (WEB1) using the standard install. I have an IP address assigned to the crossover NIC on WEB1 as 192.168.0.202. I then installed ISPConfig on the second webserver (WEB2) using the expert install. I kept getting stopped where it asks for the master MYsql server name. When I used localhost, which is what I used in WEB1, it finished the install. I can get to both interfaces locally.

Localhost is always the local server, so you now have to independant servers. As you installed the second server you must use the real hostname of the master server and not localhost. You will have to uninstall ispconfig on the second server and then reinstall it again as your current server can not be joined to the master after the installation.

wxman
26th April 2009, 14:39
So does that mean when it asks for the server name, I should use web1.example.com, or the IP address of the virtual server the master is on?

Also, is there a way to force it to use the crossover network? Possibly changing my hosts file?

I installed both systems using the help text file included with ISPConfig3, as well as the how-to at http://www.howtoforge.com/perfect-server-ubuntu-8.10-ispconfig-3.

Do I have to modify anything in MySql on web1, or web2 first, like permissions? Every time I try to install on web2 using web1.example.com, or 192.168.0.202, for the master server hostname, I get "Unable to connect to mysql server". I can still can ping server1 on both it's connections.

wxman
26th April 2009, 21:16
Good news bad news.
After adding permissions in the DB's on both servers to allow root privileges on both the server names, and the crossover IP's, I finally got it to install on the slave server. It took several try's to get there though. Now I have way too many DB users, and I need to figure out which to remove.

Now when I open ISPConfig on the master server, it shows three identical slave servers! Am I correct that I can fix that by deleting the two extra entries in dbispconfig table>server?

Am I wrong in assuming that this system will automatically update each other? I ask this because now I have both running, I notice that ISPConfig on web2 has no entries, and the monitor on web1 shows no information for web2 server. I'm going to be setting up master/master replication for any other DB's and rsync for all the other files.

till
27th April 2009, 14:59
Now when I open ISPConfig on the master server, it shows three identical slave servers! Am I correct that I can fix that by deleting the two extra entries in dbispconfig table>server?

yes.

Am I wrong in assuming that this system will automatically update each other? I ask this because now I have both running, I notice that ISPConfig on web2 has no entries, and the monitor on web1 shows no information for web2 server. I'm going to be setting up master/master replication for any other DB's and rsync for all the other files.

Only the master has an inteface. If you have installd an interface on the slave too then it will not work properly and you can not use this.

wxman
27th April 2009, 17:12
Only the master has an inteface. If you have installed an interface on the slave too then it will not work properly and you can not use this.
By Interface, do you mean the control panel you see when you get into the program? I had no idea I wasn't supposed to install that on the second server.

Since I'm using this as a load balancer with failover, should I keep the interface on the second server?

Does the dbispconfig DB keep mirrored automatically, or do I need to include it in my master/master replication? I noticed that the second server still shows no sites or clients. I tried to add a client to the master, but nothing changed in the slave.

There's also still no information about the second server showing up on either interface. It says it's there, but there is no information on any of the monitor points.

till
28th April 2009, 10:28
Since I'm using this as a load balancer with failover, should I keep the interface on the second server?

As long as you never login to the second interface, it does not matter. If you login there and change something then you will break the setup.

There's also still no information about the second server showing up on either interface. It says it's there, but there is no information on any of the monitor points.

Then there is a configuration problem with the permissions of your mysql server. You have to enter the hostname of the amster when you install ispconfig on the second server and this hostname must be resolvable in dns by the master and slave server.

wxman
28th April 2009, 21:20
I uninstalled the slave ISPC, and the DB entries for it on both servers. I reinstalled without the interface, and used web1.tlthost.net as the master host. It installed fine, and shows up in the master interface, but still no monitor information is making it. It even has it listed in the server listing. Does web2 have to be listed in the DNS tab?

Then there is a configuration problem with the permissions of your mysql server. You have to enter the hostname of the amster when you install ispconfig on the second server and this hostname must be resolvable in dns by the master and slave server.
That's going to be a problem when you have a dedicated network card and crossover cable to handle only the file transfers.

Right now eth0 is the Xen virtual network card, and eth1 is the crossover. My hosts file for web1, the master web server, looks like this:
127.0.0.1 localhost.localdomain localhost
127.0.1.1 web1.tlthost.net web1
192.168.31.202 web1.tlthost.net web1
192.168.31.200 server1.tlthost.net server1
192.168.31.210 server2.tlthost.net server2
192.168.31.201 lb1.tlthost.net lb1
192.168.31.211 lb2.tlthost.net lb2
192.168.31.212 web2.tlthost.net web2

Web2, the slave web server, is nearly the same:
127.0.0.1 localhost.localdomain localhost
127.0.1.1 web2.tlthost.net web2
192.168.31.212 web2.tlthost.net web2
192.168.31.210 server2.tlthost.net server1
192.168.31.210 server2.tlthost.net server2
192.168.31.201 lb1.tlthost.net lb1
192.168.31.211 lb2.tlthost.net lb2
192.168.31.202 web1.tlthost.net web1
The xxx.xxx.31.xxx addresses are the Xen interfaces. I want the replicating traffic to use the crossover ones that have addresses of xxx.xxx.0.xxx. SO if I tell ISPConfig slave on web2 during the install to use the MySql master at web1.tlthost.net, it's not going to use the crossover. If I change the host file so web1.tlthost.net points to 192.168.0.202, the the Xen connections will be messed up. I guess if I have to, the ISPC traffic won't go on the crossover, but all the other backups can. I'd rather have it all go there if possible.

wxman
29th April 2009, 18:47
Now I'm really going to sound dense.

Have I been looking at this all wrong, and I should install ISPC as a standard installation on both servers, and sync them with master/master replication? Remember, I'm using the two servers in a load balancer/fail over capacity, not as two different servers.

If this is true, what directories/files would you recommend with an ISPC 3 setup, to mirror?

till
30th April 2009, 15:57
Sorry, I did not recognize that you use this as a load balancer. The best is to install ispconfig just on one server and then sync the databases and config files with rsync to all slave nodes. The ispconfig interface can be accessed only on one node as having two interfaces might corrupt everything and ispconfig will not be able to deterine which configuration is written to which server already in a mysql master master setup.

wxman
30th April 2009, 17:58
Sorry, I did not recognize that you use this as a load balancer. The best is to install ispconfig just on one server and then sync the databases and config files with rsync to all slave nodes. The ispconfig interface can be accessed only on one node as having two interfaces might corrupt everything and ispconfig will not be able to deterine which configuration is written to which server already in a mysql master master setup.

So ISPConfig database does need to be synced by me. If I do the replication of the entire ISPC DB, won't that make the stored IP's wrong on the slave?

With no interface on the second server/slave/node, what happens if the primary server is down? There's no way left to edit the sites.

I saw somewhere you, or Falko, saying which files are needed too mirror in a typical ISPConfig web server setup, but I can't find it again. I don't suppose you remember?

Lastly, is there anything that ISPC could do in it's own server that could be messing up an HAProxy load balancer on the other? I'm having problems getting the load balancer to point at the correct server.