Connection Issue Multi-server Setup

Discussion in 'General' started by Chris23, Apr 15, 2019.

  1. Chris23

    Chris23 New Member

    Hi,
    Not sure If this is correct. But we have a multi server setup and when trying to configure mail routing. The change does not take affect.
    The red circle at the top just says datalog_status_u_server.
    is there a way to check the connection between the 2 servers are fine? what type of ports does the main server need to be able to get to on the slave?
    Thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    It connects trough mysql. Try if you can connect with mysql command from slave to master server with the ispcsrv* user and password that you can find in the ispconfig config.inc.php file.
     
  3. Chris23

    Chris23 New Member

    Hi,
    So from the slave to the master, I cannot seem to connect using the username & password I found in : /usr/local/ispconfig/server/lib/config.inc.php
    mysql -u ispcsrv12 -p -h cp-01.enetworks.co.za
    Enter password:
    ERROR 1045 (28000): Access denied for user 'ispcsrv12'@'smtp-01.enetworks.co.za' (using password: YES)
    Is that the correct file that has the password and user?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, that's the correct file and the login error is the reason why the red dot does not go away.
     
  5. Chris23

    Chris23 New Member

    Alright, I have fixed access from slave to master, is there anything I need to restart?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    It should start picking up the changes automatically now, unless you commented out the server.sh cronjob on the slave.
     
  7. Chris23

    Chris23 New Member

    Nope, everything still there :
    * * * * * /usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    * * * * * /usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The red dot does not go away? What did you do to fix the login? The ispcsrv user has complex permissions, so it consists of various records in the mysql.* database tables. So if you altered just a hostname or IP in mysql.user, then you will have to fix the other records of the user in the same way.
     
  9. Chris23

    Chris23 New Member

    I simply granted that user rights to the ISPconfig database : GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'1.2.3.4' IDENTIFIED BY 'PASSWORD';
     
  10. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    That is bad for security, ISPConfig is specifically designed for the slave servers to have very minimal access to the master server, and you just gave the ISPConfig slave full access to all your master databases; you should undo that and find/fix the actual misconfiguration. Eg. maybe wrong hostname/ip in mysql.user table for this slave? Check your /etc/hosts file on the master and see if you have the correct ip address for your slave servers listed.
     
  11. Chris23

    Chris23 New Member

    Yes I know this is bad practice, our servers are heavily firewalled off, so I am not to worried about that right now.
    I just gave those rights, to see if the servers can communicate. However this still has not fixed the issue.

    The hosts file has the correct IPs for the slave
     
  12. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Are you still getting access denied errors in mysql?
     

Share This Page