Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th September 2010, 06:12
tester321 tester321 is offline
Member
 
Join Date: Jul 2009
Posts: 34
Thanks: 7
Thanked 2 Times in 2 Posts
Question Any issues with replication of ISPConfigdb?

So after successfully implementing "How To Set Up MySQL Database Replication With SSL Encryption On Debian Lenny" and applying these tweaks for Drupal, I wanted to setup replication of the "ispconfigdb" -- any issues or concerns I should be aware of?

For example, any tables (temporary or otherwise) that I should avoid replicating from ispconfigdb?

(In case you are wondering, the two servers being replicated are identical, i.e., they started as the very same virtual machine but in two different locations/networks so I do want their ispconfig databases/ip addresses (and everything else about them) to remain exactly the same.)

Thanks in advance for your feedback.
Reply With Quote
Sponsored Links
  #2  
Old 11th September 2010, 15:05
tester321 tester321 is offline
Member
 
Join Date: Jul 2009
Posts: 34
Thanks: 7
Thanked 2 Times in 2 Posts
Default Strange, I received notification of a reply from Till, but now it is gone

Till, I received an email notification of a reply from you a few hours ago but now it is gone ...

I also searched around and found this post from waaaaay back in 2006:

which sounds like this shouldn't be a problem ... can someone confirm if this is valid for ISPConfig v2 today?

Thanks in advance
Reply With Quote
  #3  
Old 12th September 2010, 23:09
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

No, there will be no problems replicating the ISPConfig db.
__________________
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
The Following User Says Thank You to falko For This Useful Post:
tester321 (12th September 2010)
  #4  
Old 12th September 2010, 23:21
tester321 tester321 is offline
Member
 
Join Date: Jul 2009
Posts: 34
Thanks: 7
Thanked 2 Times in 2 Posts
Default Thanks Falko

I couldn't wait so I set it up ... the replication is working fine.

But, it seemed like the ISPConfig on the secondary server wasn't acting on the changes when they came over via replication (for example, add a new site, modify co-domains, etc etc etc). And I did verify that the items were replicated properly.

I will do more testing to verify (in fact I have a number of updates I will be making to the primary server to thoroughly test this out).

Thanks again

EDIT: BTW, I noticed that just one thing is not replicating in Drupal -- menu changes; if I change the menu structure/order/etc for a site, they don't seem to happen on the secondary server ... everything else is fine. Right now I can work around it by doing it manually, but I more than a little curious as to why since the entire Drupal database (except cache and search data) is being replicated)

Last edited by tester321; 12th September 2010 at 23:29.
Reply With Quote
  #5  
Old 13th September 2010, 04:16
tester321 tester321 is offline
Member
 
Join Date: Jul 2009
Posts: 34
Thanks: 7
Thanked 2 Times in 2 Posts
Default There is a problem with the ispconfigdb replication

Falko, as I mentioned, there does seem to be a problem.
  • The database changes replicate fine; no issue there.
  • But, ispconfig doesn't seem act on those changes

Example:
  • It did not create the webX group (as in the owner of /var/www/webX would normally be: www-data:webX -- that group is not created)

Here was my test:
  • Verify that replication is working via SHOW SLAVE STATUS \G;
  • Create new Drupal multisite on the primary server
  • (BTW, for some reason the ispconfig internal counter jumped a few positions from web58 to web66, for example)
  • Setup the new Drupal site from the web interface (i.e., create 1st user, setup DB name, user and password)
  • Verify that the various ipsconfigdb updates made it to the secondary (i.e., new site, admin user, email address, co-domains, etc etc etc -- everything in your Drupal/ISPConfig/Debian HowTo)
  • Go over to the secondary and try to call up the web site
  • It defaults to SharedIP html page
  • Even manually copied over settings.php etc.

It seems to me that the ispconfig on the secondary is not performing the actions like creating folders etc on the replicated information; even though the replicated information makes it over cleanly

Any ideas?

Last edited by tester321; 13th September 2010 at 04:19.
Reply With Quote
  #6  
Old 13th September 2010, 13:54
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by tester321 View Post
It seems to me that the ispconfig on the secondary is not performing the actions like creating folders etc on the replicated information; even though the replicated information makes it over cleanly
This happens because the backend (which reads the configuration from the database and writes it to the configuration files) is looking for the file /home/admispconfig/ispconfig/.run before it starts to act; if this file is missing, the backend doesn't do anything. This file is created automatically by the frontend whenever you do a change in the control panel. Since you don't use the control panel on the second server, it is missing there. Maybe you should set up rsync mirroring between the first and the second server as well.
__________________
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
  #7  
Old 13th September 2010, 17:04
tester321 tester321 is offline
Member
 
Join Date: Jul 2009
Posts: 34
Thanks: 7
Thanked 2 Times in 2 Posts
Default

Falko, is it possible then to setup a crontab to rsync the file over at regular intervals?

What is the interval that this file is wiped? i.e., is it erased after the actions are performed? Or on a regular schedule?

Would this work? Thanks

(Hmm, you are making me wonder if for some reason there is some similar type of semaphore being used by Drupal for the Menu changes -- the menu changes are the only thing that is not being replicated there ....)

Quote:
Originally Posted by falko View Post
This happens because the backend (which reads the configuration from the database and writes it to the configuration files) is looking for the file /home/admispconfig/ispconfig/.run before it starts to act; if this file is missing, the backend doesn't do anything. This file is created automatically by the frontend whenever you do a change in the control panel. Since you don't use the control panel on the second server, it is missing there. Maybe you should set up rsync mirroring between the first and the second server as well.

Last edited by tester321; 13th September 2010 at 17:06.
Reply With Quote
  #8  
Old 14th September 2010, 16:17
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by tester321 View Post
Falko, is it possible then to setup a crontab to rsync the file over at regular intervals?
Yes; for example, you could set up a cron job that runs every 5 minutes. This tutorial should give you the idea: http://www.howtoforge.com/mirroring_with_rsync

Quote:
Originally Posted by tester321 View Post
What is the interval that this file is wiped? i.e., is it erased after the actions are performed? Or on a regular schedule?
Yes, it gets erased after the actions are performed.
__________________
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
  #9  
Old 15th September 2010, 12:13
tester321 tester321 is offline
Member
 
Join Date: Jul 2009
Posts: 34
Thanks: 7
Thanked 2 Times in 2 Posts
Question

Question: Why even copy the file (unless it has information in it that pertains to the updates to be acted on)? Why not just create the file every 5 minutes via cron on the secondary server using "touch"?

So, in effect, ispconfig would "flush" its cache (i.e., perform any pending updates) every 5 minutes on the secondary ... no matter what.

Why? Because I am not convinced that even doing an rsync every 5 minutes is going to "catch" the the /home/admispconfig/ispconfig/.run semaphore file -- i.e., it might be created/acted upon/deleted within a 5 minute cycle and rsync might never get to copy it from the primary.

Thoughts? (Sorry for all the questions, but I want to do to make sure I understand + use the most expedient method possible + keep additional "traffic" to a minimum)

Thanks

Quote:
Originally Posted by falko View Post
Yes; for example, you could set up a cron job that runs every 5 minutes. This tutorial should give you the idea: http://www.howtoforge.com/mirroring_with_rsync


Yes, it gets erased after the actions are performed.
Reply With Quote
  #10  
Old 16th September 2010, 14:59
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
 
Default

Quote:
Originally Posted by tester321 View Post
Why? Because I am not convinced that even doing an rsync every 5 minutes is going to "catch" the the /home/admispconfig/ispconfig/.run semaphore file -- i.e., it might be created/acted upon/deleted within a 5 minute cycle and rsync might never get to copy it from the primary.
Good point. Yes, I think creating the file every five minutes or so makes sense.
__________________
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

Tags
drupal, ispconfig2, mysql, replication, tweak

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
My SQL Replication issue ? jithinkcs Server Operation 5 10th September 2010 17:47
MYsql replication questions. scottrill2 Server Operation 7 3rd September 2010 18:53
Master Master replication questions and problems marchost HOWTO-Related Questions 5 4th October 2008 14:50
mysql replication issues Jamesk5 Server Operation 8 23rd September 2006 15:40
ISPConfig server also a MySQL replication slave jamesh Installation/Configuration 1 2nd August 2006 10:59


All times are GMT +2. The time now is 21:01.


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