Multiple Servers & Mirrors

Discussion in 'Installation/Configuration' started by brainsys, Jun 12, 2015.

  1. brainsys

    brainsys New Member

    I have been running standalone instances of (the latest) ISPConfig and am very impressed with your work. Thank you. I now want to create a cluster. I have read the documentation and it would be great if I could get some clarity on a couple of questions before I begin.

    The issue I have is that in a Multiple Server set up - if I lose one of the slaves I should be able to recover by removing the account entries on the Master and re-installing the accounts from a backup onto one of the remaining servers and/or add a replacement server. However, what happens if I lose the master? No control panel - how would one control the remaining servers?

    Is having both a Multiple and a Mirror Server of the Multiple Master a sensible solution? So if I lose the Master, I can, with a bit of fiddling with /etc/hosts (as it will have a different IP), substitute the Mirror for the Master and regain control of the slaves?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Normally you create backups of all servers, so you wont ever loose a server (neither slave bor master) as you can always recover it from a backup. If the master fails or is offline, then the slaves are not affected. You wont be able to add new websites off course until you restore the master again.

    Thats possible as well.
  3. brainsys

    brainsys New Member

    Thank you. Unfortunately I have fallen at the first hurdle - the mirror.

    MySQL on both servers fails to restart when the master-xxxx lines added to the my.cnf files. Comment them out and they do restart. The reported errors are

    * mysqld_safe can't log into error log and syslog at the same time
    * Can't connect to local MySQL through socket /var/run/mysqld/mysqld.sock (it doesn't exist).

    Prior to that I had been following a hybrid of the manual instructions based on 'Squeeze' and the HowToForge 'Jessie' instructions so there may be an inconsistency. Could it be the substitution of MariaDB?
  4. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    Which master-xxxx lines? If you need a replication, you can´t use this keywords with mysql 5.something. Use "CHANGE MASTER TO MASTER ..." instead.
  5. brainsys

    brainsys New Member

    This is the documented section I am inserting (with different IP & password obv):

    master-host =
    master-user = slaveuser
    master-password = slave_user_password
    master-connect-retry = 60

    These are the lines causing the problem. But I can't find any documentation that says I should be doing in differently. I have the latest manual. Sorry to be a bit thick about this.
  6. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    You can´t use this lines with an actual mysqld. You must set the values in mysql directly.
    CHANGE MASTER TO MASTER_HOST=, master_user='slaveuser', master_password='slave_user_password';
    Then start the slave with start slave;
  7. brainsys

    brainsys New Member

    Thank you both for all your help. I now have two mirrored servers that seem to work.

    Only one weird glitch so far - FTP. I can log into Server1 FTP accounts just fine. FTP accounts mirror to server 2 just fine. But on Server2 I get 530 authentication errors. Yet the correct password is being held there (if I change it on Server2 - it shows up on Server1 just fine).

    Pure_FTP is booting OK. This is all I get in the message log:

    Jun 19 15:44:56 v2 pure-ftpd: ([email protected]) [INFO] New connection from
    Jun 19 15:44:56 v2 pure-ftpd: ([email protected]) [INFO] SSL/TLS: Enabled TLSv1/SSLv3 with AES256-GCM-SHA384, 256 secret bits cipher
    Jun 19 15:45:00 v2 pure-ftpd: ([email protected]) [INFO] PAM_RHOST enabled. Getting the peer address
    Jun 19 15:45:06 v2 pure-ftpd: ([email protected]) [WARNING] Authentication failed for user [defaultd4l]
    Jun 19 15:45:06 v2 pure-ftpd: ([email protected]) [INFO] Logout.

    I've tried with and without TLS. Any ideas? Is it safe to purge pure-ftp-mysql and try re-installing or will that screw the ISPConfig setup?
    Last edited: Jun 19, 2015
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    you will have to rerun the ispconfig update and choose to reconfigure services, but beside that, its ok to purge and reinstall the package.

Share This Page