URGENT! Cannot add secondary server to ISPConfig 3 installl

Discussion in 'Installation/Configuration' started by ginner159, May 5, 2014.

  1. ginner159

    ginner159 New Member

    Hi all,

    Im struggling to add a secondary server to make a multi server environment.

    I had them set up before but in the process of upgrading to debian 7 i managed to break it majorly so im back to reinstalling

    The problem im having is that during the ispconfig setup when it asks for the MASTER server details it is saying it cannot connect.

    I have the firewall totally open, mysql my.cnf set as #bind 127.0.0.1 so it listens on everthing ive read others posts but it just aint wokring :(

    I need to get this set up asap as its my secondary name server and my clients cannot swap name servers until this is active again.

    both hostname and hostname -f say the same thing (ns1.doman.com on master, ns2.domain.com 2nd nameserver)

    I just cant find what im doing wrong
     
  2. diablo666

    diablo666 Active Member HowtoForge Supporter

    Try to check if mysql is reachable in the remote host

    Code:
    nmap -p 3306 XXX.XXX.XXX.XXX
    he had to look something like

    Code:
    Host is up (0.00010s latency).
    PORT     STATE SERVICE
    3306/tcp open  mysql
     
  3. ginner159

    ginner159 New Member

    i get this:
    Code:
    Starting Nmap 6.00 ( http://nmap.org ) at 2014-05-05 16:31 BST
    route_dst_netlink: can't find interface "venet0"
    
    says the same on both the master and the new server

    Forgot to mention its a vps
     
  4. diablo666

    diablo666 Active Member HowtoForge Supporter

    Ah ok, maybe nmap not working on some vps, heappen to me too....

    Try this

    Code:
    [email protected]:~# telnet xxx.xxx.xxx.xxxx 3306
    you should see something like this

    Code:
    Trying xxx.xxx.xxx.xxxx...
    Connected to xxx.xxx.xxx.xxxx.
    Escape character is '^]'.
    S
    5.5.34-31.1-log
     
  5. ginner159

    ginner159 New Member

    thanks for your help i now get this
    Code:
    [email protected]:/tmp/ispconfig3_install/install# telnet ns1.mdhosting.co.uk 3306
    Trying 78.129.133.84...
    Connected to ns1.mdhosting.co.uk.
    Escape character is '^]'.
    T
    5.5.37-0+wheezy1{W"BdTTr"PJe>F%"|j"mysql_native_passwordPuTTYConnection closed by foreign host.
    
     
  6. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Just a thought:
    Did you create a mysql root user that has access rights from other hosts than localhost?
     
  7. ginner159

    ginner159 New Member

    I've followed the perfect server multiserver guides (on mobile will link later). I had it all connected and working fine before I had to reinstall.

    Just can't see why it's failing. I can't see anything in the logs either

    It wouldn't make a difference if I've already got active websites?
     
    Last edited: May 6, 2014
  8. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    What about
    Code:
    SHOW GRANTS FOR 'root'@'%';
    and
    Code:
    SHOW GRANTS FOR 'root'@'localhost';
    in mysql on the master?
     
  9. ginner159

    ginner159 New Member

    Will try later tonight (been busy doin family stuff)
     
  10. ginner159

    ginner159 New Member

    Code:
    ERROR 1141 (42000): There is no such grant defined for user 'root' on host '%'
    and

    Code:
    SHOW GRANTS FOR 'root'@'localhost';
    +----------------------------------------------------------------------------------------------------------------------------------------+
    | Grants for [email protected]                                                                                                              |
    +----------------------------------------------------------------------------------------------------------------------------------------+
    | GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*--removed obvs--*' WITH GRANT OPTION |
    | GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION                                                                           |
    +----------------------------------------------------------------------------------------------------------------------------------------+
    2 rows in set (0.00 sec)
    
     
  11. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    So, no wonder you cannot add a secondary server. You have not granted access to the database to root from any server but localhost.

    Code:
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'YOURPASSWORD';
    Should solve your problem.
     
  12. ginner159

    ginner159 New Member

    no luck yet ....

    Hi thanks for your help,

    Unfortunately its still not letting me connect :(

    ive rebooted and tried reloaded privileges

    my main server fqdm is ns1.domain.co.uk
    the one im trying to add is ns2.domain.co.uk

    Im filling in my details as required, using the default ispconfig username and generating a password, selecting yes to connect to other server.

    then entering
    Code:
    MySQL master server hostname []: ns1.domain.co.uk
    
    MySQL master server root username [root]: (return)
    
    MySQL master server root password []: my password
    
    MySQL master server database name [dbispconfig]: (return)
    
    which returns
    Unable to connect to mysql server

    ????

    thanks again
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    please pst the output of:

    netstat -tap | grep mysql

    and

    iptables -L

    from the master server. Additionally you should chcek if there is any firewall in front of the master server.
     
  14. ginner159

    ginner159 New Member

    Code:
    [email protected]:~# netstat -tap | grep mysql
    tcp        0      0 *:mysql                 *:*                     LISTEN      2251/mysqld
    
    and

    Code:
    [email protected]:~# iptables -L
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    fail2ban-dovecot-pop3imap  tcp  --  anywhere             anywhere             multiport dports pop3,pop3s,imap2,imaps
    fail2ban-pureftpd  tcp  --  anywhere             anywhere             multiport dports ftp
    fail2ban-sasl  tcp  --  anywhere             anywhere             multiport dports smtp
    fail2ban-ssh  tcp  --  anywhere             anywhere             multiport dports ssh
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain fail2ban-dovecot-pop3imap (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere
    
    Chain fail2ban-pureftpd (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere
    
    Chain fail2ban-sasl (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere
    
    Chain fail2ban-ssh (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere
    
    thanks again guys
     
  15. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Please show current status of
    Code:
    SHOW GRANTS FOR 'root'@'%';
    on the master.

    I have the feeling it is still not right.
     
  16. ginner159

    ginner159 New Member

    here you go.

    Code:
    mysql> SHOW GRANTS FOR 'root'@'%';
    +--------------------------------------------------------------------------------------------------------------------------------+
    | Grants for root@%                                                                                                              |
    +--------------------------------------------------------------------------------------------------------------------------------+
    | GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY PASSWORD 'password removed' WITH GRANT OPTION |
    +--------------------------------------------------------------------------------------------------------------------------------+
    1 row in set (0.01 sec)
    
    
     
  17. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Can you login via command line from the slave server?
    mysql -u root -h masterserver.tld -D dbispconfig -p
     
  18. ginner159

    ginner159 New Member

    success!! i had been using the master server password not the root user of ns2 password (i assumed this was a safer option incase of database hacking)

    Think the script should say password of connecting user not master server pass. That way people wont be as silly as me.

    once installing tho i did receive these messages

    Code:
    Configuring BIND
    Configure Firewall Server (y,n) [y]: y
    
    Configuring Bastille Firewall
    Install ISPConfig Web Interface (y,n) [n]: n
    
    chmod: cannot access `/usr/local/ispconfig/interface/lib/lang': No such file or directory
    chmod: cannot access `/usr/local/ispconfig/interface/web/sites/aps_meta_packages': No such file or directory
    chmod: cannot access `/usr/local/ispconfig/server/aps_packages': No such file or directory
    PHP Warning:  chown(): No such file or directory in /tmp/ispconfig3_install/install/lib/installer_base.lib.php on line 2046
    PHP Warning:  chmod(): No such file or directory in /tmp/ispconfig3_install/install/lib/installer_base.lib.php on line 2047
    PHP Warning:  chown(): No such file or directory in /tmp/ispconfig3_install/install/lib/installer_base.lib.php on line 2048
    PHP Warning:  chmod(): No such file or directory in /tmp/ispconfig3_install/install/lib/installer_base.lib.php on line 2049
    PHP Warning:  chown(): No such file or directory in /tmp/ispconfig3_install/install/lib/installer_base.lib.php on line 2050
    PHP Warning:  chmod(): No such file or directory in /tmp/ispconfig3_install/install/lib/installer_base.lib.php on line 2051
    Configuring DBServer
    Installing ISPConfig crontab
    Installation completed.
    [email protected]:/tmp/ispconfig3_install/install#
    
    so not sure if it actually worked properly, but it does not show up in my ispconfig panel

    Big thanks to everyone and sorry ive been so stupid!

    Should i worry about the php warnings?
     

Share This Page