#1  
Old 6th June 2009, 16:04
Murder4Al Murder4Al is offline
Junior Member
 
Join Date: Apr 2007
Posts: 12
Thanks: 1
Thanked 3 Times in 2 Posts
Default Multiserver setup bug

HI there,

I was setup up multi-server setup where my mysql server was split of to a separate box.
This tripped a bug in the slave-stuff since on that machine the $conf["dbmaster_host"] and $conf["db_host"] are identical.

This clashes with lib/app.inc.php line 47 resulting in my local db being used as a master.
The piece of code reads:
if($conf["dbmaster_host"] != '' && $conf["dbmaster_host"] != $conf["db_host"]) { -- Config master -- } else { --User local as master--}

Is there any reason for this double check to be here? I would assume that the fact that a master server is present should be enough to use it.

So in my opinion, either the check needs to be removed or you need to change it to check the dabase names instead of the hosts.

** Edit
Looks like a similar check is in place @ lib/classes/modules.inc.php line 86.
I changed the line to:
if($app->db->dbName != $app->dbmaster->dbName) {

Now it's working like a charm ;-)

**

Greets
Kobe

Last edited by Murder4Al; 6th June 2009 at 16:31.
Reply With Quote
Sponsored Links
  #2  
Old 7th June 2009, 14:32
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,011
Thanks: 826
Thanked 5,378 Times in 4,225 Posts
Default

In a master / slave setup with a separate dtabase server, $conf["dbmaster_host"] and $conf["db_host"] can not be identical. If they are identical in your setup, its a problem how you setup your server and not with the code.

Quote:
Is there any reason for this double check to be here? I would assume that the fact that a master server is present should be enough to use it.
Yes, it is. The slave will and shall not have permissions to write to the amster server db except of the log table.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 7th June 2009, 15:12
Murder4Al Murder4Al is offline
Junior Member
 
Join Date: Apr 2007
Posts: 12
Thanks: 1
Thanked 3 Times in 2 Posts
Default

Till,

Care to elaborate on that? I don't see any error in my setup (it works fine).

I have one dedicated mysql server that hosts the main ISPConfig database and the local slave database, so the ispconfig install on this machine (this is a slave machine) has the conf["dbmaster_host"] and $conf["db_host"] being 'localhost' since both databases are on the local machine.
Note that I do NOT have mysql on my ISPConfig master server!

The dbNames of both are evidently different, and I think you should put your check on those and not on the actual servername.

One can easily fix this by changing one of both to a local alias af course, but that's not the cleanest solution.

Greets
Reply With Quote
  #4  
Old 8th June 2009, 12:52
Murder4Al Murder4Al is offline
Junior Member
 
Join Date: Apr 2007
Posts: 12
Thanks: 1
Thanked 3 Times in 2 Posts
Default

Till,

I believe I now see what's the issue.
If I'm not mistaking the multi-server setup assumes that each slave has a local MySQL server.

If you drop this assumption then the master & local instance can be the same.

Greets
Kobe
Reply With Quote
  #5  
Old 9th June 2009, 16:27
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by Murder4Al View Post
If I'm not mistaking the multi-server setup assumes that each slave has a local MySQL server.
Yes, that's right.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiserver setup with mysql-only server Croydon Developers' Forum 4 21st February 2011 22:04
ISPconfig setup - DNS, router and general access problems ingvar Installation/Configuration 6 31st July 2010 13:13
Multiserver setup design documentation agoston Developers' Forum 4 4th June 2009 13:53
Bug in legacy Redhat setup AaronNGray Installation/Configuration 0 12th March 2006 19:15
Debian perfect setup network problem reddogg Installation/Configuration 2 18th January 2006 22:04


All times are GMT +2. The time now is 10:29.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.