Can not add slave server

Discussion in 'ISPConfig 3 Priority Support' started by muekno, Nov 11, 2020.

  1. muekno

    muekno Active Member HowtoForge Supporter

    Had problems to update slave to 3.2 could not connect to master database, while normal config updates like adding new DNS records or setting debug, the slave ist secondary nameserver, work. Last time I had this removeing the server from the configuration and resinstall ISPconfig whith adding ist to the multiserver system worked. So I tried this again, no success. then I set up a wireguard VPN tunnel between the master and the slave no success.
    Configuration.
    Master=ns1 web smtp sql servers are VMs behind a firewall server using iptables. Each server has an own external IP and an internal IP in 10.x.x.x net.
    The secondary nameserver ist behind a fritz Box with fix external IP an in an internal 172.x.x.x net.
    The wireguard VPN between master and ns2 ist just peer to in a 192.168.x.x net.
    /etc/host have the correct addresses.
    Master and ns2 are Debian 10 servers build and configured after your tutorial and the ISPCong 3 Manual

    If I login to maria db as root "mysql -u root -p -h masterserver" and the root password from any server in the 10.x.x.x net and say "show databases;" I see all databases.
    If I do the same from ns2 via the 192.x.x.x address or vi the official IP (firewall is configured to route mysql port) "mysql -u root -p -h 192.x.x.x or 62.x.x.x" and I say "show databases;" I see only the | information_schema.

    need help hint
    Thanks Rainer
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    That looks like the root user from that host does not have permissions to the other databases.
    Refer to the ISPConfig Manual on how to setup database users for multiserver setup.
     
    Jesse Norell likes this.
  3. muekno

    muekno Active Member HowtoForge Supporter

    The basic system especialy the master server exists since years and was build up referring the ISPconfig manual. Every thing worked fine at my old home till mid last year. There I had a similar setup as where the master server is DSL Modem firewallserver ns2 on internal net.
    Now in my new home I just have a Fritz Box as the alternativ is only an expensive LANCOM Router in case of VDSL. And since move the ns2 to here I have the problems
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Did the IP-numbers of the hosts change?
     
  5. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    As @Taleman said, refer to the multiserver guide for mysql commands to grant correct permissions. Once you're set on how the connection will be (eg. not chaning vpns/connecting addrs/etc.), determine what ip address the master sees for slave connections, and use that in your /etc/hosts entry on the master, then grant permissions for that same hostname and that same ip address.
     
  6. muekno

    muekno Active Member HowtoForge Supporter

    OK the IP addresses have changed. I added missing root access, as documented in ISPconfig manual page 30 and 31, for the tunnel address and the ns2 local private address. Root access for server name of ns2 and public address did exist.
    Still I can not see all databases login in from ns2 to mysql as root.
    @Jesse Norell whow can I determine which address/host mariadb sees login in with root.

    Thanks

    Rainer
     
  7. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Failed login attempts should be logged in /var/log/mysql/error.log.
    If that is not sufficient, increase logging level in mariadb or mysql, whichever you run. Remember to decrease it back, it logs a lot.
     
  8. muekno

    muekno Active Member HowtoForge Supporter

    Login with 'mysql -u root -p -h <masterserver full qualified name = tunnel address> gives no error but show datsbases did only show the informational schema.
    Trying to install ISPconfig the error shows me the ns2 full qualified name, which still exist in the user db with root access. So I deleted and recreated it.
    Same problem, no error login in via shell but do see not all, installing ISPconfig same problem.
    Thanks for help Rainer
     
  9. muekno

    muekno Active Member HowtoForge Supporter

    Sorry it works now, fort the GRANT PRIVILEGES at recreating ns2 User
    Thank you
     
    Th0m likes this.

Share This Page