MySQL Offline after ISPCONFIG MASTER/SLAVE replication

Discussion in 'Installation/Configuration' started by Frakass11, Jun 5, 2015.

  1. Frakass11

    Frakass11 New Member

    Hello everyone,
    First of all I wan't to thank you for your work, you helped me a lot with all your tutorials.

    So, here is my problem :
    I've got two Debian Jessie server (one master & one slave to make a failover system) connected in a DMZ to pfsense.
    Everything seems to work fine, mysql databases are synchronized until I install ISPConfig on the slave server. I'm able to get into expert mod, insert needed things and it is not giving me any error.

    BUT, when I connect to ISPConfig's panel, it shows me that mySQL is Offline on both servers

    And on the Slave monitor, it show me an error telling me that there is a replication error because it is read only...
    Replication failed. Error: (server) in MySQL server: (localhost) The MySQL server is running with the --read-only option so it cannot execute this statement # SQL: REPLACE INTO server

    And when I try to connect to the slave ISPConfig it gives me this :
    0 db->query(REPLACE INTO sys_session (session_id,date_created,last_updated,session_data,permanent) VALUES ('8l5hrk689m8csv8q21mdiuo6f3',NOW(),NOW(),'s|a:4:

    and so on..


    I understoud that there is a replication error but have no idea how to make things right :( I saw that read only thing so I looked over the internet to found a workaround but had no luck, every I tried didn't work...

    Any ideas?

    Thanks a lot to you guys.

    Clement.
     
  2. florian030

    florian030 Well-Known Member HowtoForge Supporter

    If you create a database on a slave, the values can´t be replicated to the master. If you need the the same data in the databases on both servers, you need a master-master-replication.

    I don´t think that your sql-servers are down. But you can check this with service mysql status.
     
  3. Frakass11

    Frakass11 New Member

    Hello sir,

    Thanks a lot for your help.

    I managed to make it work, finaly. I've made a MASTER to MASTER setup yesterday night and changed user rights, it seems to work now, but the sync is not automatic and the server status still shows me that there is a problem with MySQL on the slave server...
     
  4. florian030

    florian030 Well-Known Member HowtoForge Supporter

    A master-master-replaication thinks the data until it runs into an error. There are some replication-methods. You can run "show slave status\G" on both mysql-servers to see if the replication is running.
     
  5. Frakass11

    Frakass11 New Member

    Everything is working now (mysql doesn't show any error on the 2 servers) but the errors are still showing up in ISPConfig, plus, ISPConfig replicates mails, new DNS zones... but not the websites :(

    Thanks a lot for your time, sir. You're really kind.
     
  6. florian030

    florian030 Well-Known Member HowtoForge Supporter

    Did you check, that web2 is a mirror of web1? You can also debug the plugin. If every thing is replicated (beside the webs), there must be an error in your web-server-config.
     
  7. Frakass11

    Frakass11 New Member

    Yes, web2 is mirror of web1 :/

    Could you help me with that? :/ I find that the Mysql database was creating the databases for my 2 websites on web1 but not on web2, even if my MASTER MASTER config shows no error.
     
  8. florian030

    florian030 Well-Known Member HowtoForge Supporter

    web1 can connect using mysql to the master and also web2? If you replicate the mysql-data between web1 and web2: both servers use different ispconfig-databases?
     

Share This Page