Multi Server with Master on WAN

Discussion in 'Installation/Configuration' started by SamTzu, Mar 20, 2018.

  1. SamTzu

    SamTzu Active Member

    I'm trying to install a ISPConfig3 multiserver setup where the control-panel is on WAN and all other servers are on LAN but I can't get the slaves to sync.

    Any ideas what is wrong? All the slave DB's can access master and on master ISPC panel you can see the slave clearly registered.

    I thought it has something to do with split DNS but now I'm thinking this is actually a problem with our FW cluster.
    When I do "netstat -tapn |grep mysql" on master ISPC I can see that mysql is connected to one of the FW cluster nodes that has different IP address than is recorded on dbispconfig.

    Now what?
     
    Last edited: Mar 20, 2018
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You might have to adjust the hostname or IP of the ispcsrv* users in mysql on the master. Most likely the master sees the connecting slaves with a different IP or hostname then the one that the ispcsrv* user is set to.
     
  3. SamTzu

    SamTzu Active Member

    Looks like it's partly a FW configuration problem.
    I'm seeing a lot of connection attempts from master to FW (which is not configured to NAT mysql).
    I thought master's MYSQL would not try to connect to slave?

    Code:
    tcp6       0      0 master:3306     FW:37906    TIME_WAIT   -              
    tcp6       0      0 master:3306     FW:59532    TIME_WAIT   -              
    tcp6       0      0 master:3306     FW:61203    TIME_WAIT   -              
    tcp6       0      0 master:3306     FW:32060    TIME_WAIT   -              
    tcp6       0      0 master:3306     FW:28264    TIME_WAIT   -              
    tcp6       0      0 master:3306     FW:50089    TIME_WAIT   -              
    tcp6       0      0 master:3306     FW:45412    TIME_WAIT   -              
    tcp6       0      0 master:3306     FW:17532    TIME_WAIT   -              
    tcp6       0      0 master:3306     FW:41373    TIME_WAIT   -              
    tcp6       0      0 master:3306     FW:59661    TIME_WAIT   -        
     
  4. SamTzu

    SamTzu Active Member

    I have now configured FW to allow MySQL traffic trough bothways using multi-directional NAT.
    MySQL does not generate logs by default. Where should I start looking on dbispconfig DB to find out what setting to modify?
    Both ends can now connect to each other with MySQL so I think mysql database user table is fine now.

    Sam
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    That's not a setting in dbispconfig, this is about ispcsrv* users which are in the default tables of the 'mysql' database. To test the connection, use the dbmaster user credentials from file /usr/local/ispconfig/server/lib/config.inc.php on the slave to do a test connection with the mysql command from slave to master.
     
  6. SamTzu

    SamTzu Active Member

    That was the problem.
    The password defined in /usr/local/ispconfig/server/lib/config.inc.php is wrong.
    How do I change that password on the slave config?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    This place is the master place for the password, so it can't be wrong there. If something is wrong, then it's in the mysql user database on the master. But I doubt that your problem is the password, the most likely source of your problem is the hostname of the ispcsrv user as mentioned in my first answer.
     
  8. SamTzu

    SamTzu Active Member

    :) You underestimate my ability to create chaos :)
    Looks like you are right about the credentials.
    I debugged this with MySQL logging on and noticed that the master server does not allow slave connections.
    Code:
                   6665 Connect   [email protected] as anonymous on dbispconfig
                     6665 Connect   Access denied for user 'ispcsrv4'@'mail3.ic4.eu' (using password: YES)
    
    It seems I have modified the passwords ones too many times.

    How can I match the master/mysql/user table password with the slave/config.inc.php password?
    Code:
    //** Database settings for the master DB. This setting is only used in multiserver setups             
    $conf['dbmaster_type']                  = 'mysql';
    $conf['dbmaster_host']                  = 'sx.ic4.eu';                                                
    $conf['dbmaster_port']                  = '3306';
    $conf['dbmaster_database']              = 'dbispconfig';                                              
    $conf['dbmaster_user']                  = 'ispcsrv4';                                                
    $conf['dbmaster_password']              = '8bcf6ce09bab5da45858503747cd8c5e';
    I'm getting the feeling I may have to install phpMyAdmin on the slave :)
     
  9. SamTzu

    SamTzu Active Member

    I figured it out. Interesting exercise.
    Thx 4 Ur help.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    The password is on the master only, so no need for PHPMyAdmin on the slave :) Just login to PHPMyAdmin on the master and edit the ispcsrv* users there, by using the user editor that is built into the phpmyadmin. Plese keep in mind that I suspect this is a hostname issue and not password issue, so when you set the password again and it still does not work, then check the hostname. From MySQL error, you can not see if it's the password or if it's the hostname that causes the rejection. If you need help by remote login to sort this out, then please contact Florian from ISPConfig business support.
     
    ahrasis likes this.
  11. SamTzu

    SamTzu Active Member

    I managed to get it to work.
    Next: Updating Letsencrypt to Certbot :)
     

Share This Page