multi server setup issue for adding slave

Discussion in 'ISPConfig 3 Priority Support' started by budgierless, Nov 29, 2015.

  1. budgierless

    budgierless Member HowtoForge Supporter

    hi,
    re: https://www.howtoforge.com/how-to-r...-secondary-with-ispconfig-3-debian-squeeze-p2
    I had some issues when installing this config, so this time I will start again and tell you any errors I get which I did not do last time, but before I start I need to removed the tables that were added during installing multi setup, because the install will not let me move forward because of this:
    Code:
    ERROR: Stopped: Database already contains some tables.
    root@server2:/tmp/ispconfig3_install/install#
    but I need to remove them from server1 because I think the tables had an error when they were added, so i need to be sure, is their a mysql query for this?
    Note: just for what was adding from slave setup tables!!!!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You entered a database name that is already in use. This means either that you installed ispconfig a second time (e.g. after a failed install) without removing the old database and ispconfig mysql user first or you used the name of the database of the master server instead of a new database for the slave. Please take a look at the multiservers etup guides, they tell you exactly which database name has to be entered on which node at which stage of the setup.
     
  3. budgierless

    budgierless Member HowtoForge Supporter

    what guild are to talking about, because i did not see anything in the manual, please give a web link or manual page number for reference.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The manual is about using ispconfig and not about installing it, the installation guides are all available for free here at howtoforge and linked on the ISPConfig documentation page. There are several tutorials available with differents setups, pleases see ISPConfig.org documentation page, section "ISPConfig 3 in a Multiserver- and Cluster environment".

    http://www.ispconfig.org/page/en/documentation.html
     
  5. budgierless

    budgierless Member HowtoForge Supporter

    sorry but after looking into the tutorials, the only reference about the added database querys are about adding the root users of the other server along with their permissions to the master server, so i am sorry if i did not explan myself the right way, The querys what i am trying to remove are what ispconfig itself added to server1 mysql from the install of the secondary server2 ispconfig in expert mode, after it asked for the master servers host>root>password etc, it then connects to the server1 and adds data to the mysql, but i need to remove that data. I hope you understande what i mean now.

    reference of /tmp/ispconfig3_install/install line409:
    Code:
        //** Get MySQL root credentials
            $finished = false;
            do {
                $tmp_mysql_server_host = $inst->free_query('MySQL master server hostname', $conf['mysql']['master_host'],'mysql_master_hostname');
                $tmp_mysql_server_admin_user = $inst->free_query('MySQL master server root username', $conf['mysql']['master_admin_user'],'mysql_master_root_user');   
                $tmp_mysql_server_admin_password = $inst->free_query('MySQL master server root password', $conf['mysql']['master_admin_password'],'mysql_master_root_password');
                $tmp_mysql_server_database = $inst->free_query('MySQL master server database name', $conf['mysql']['master_database'],'mysql_master_database');
    
                //* Initialize the MySQL server connection
                if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password)) {
                    $conf['mysql']['master_host'] = $tmp_mysql_server_host;
                    $conf['mysql']['master_admin_user'] = $tmp_mysql_server_admin_user;
                    $conf['mysql']['master_admin_password'] = $tmp_mysql_server_admin_password;
                    $conf['mysql']['master_database'] = $tmp_mysql_server_database;
                    $finished = true;
                } else {
                    swriteln($inst->lng('Unable to connect to mysql server').' '.mysql_error());
                }
            } while ($finished == false);
            unset($finished);
    
            // initialize the connection to the master database
            $inst->dbmaster = new db();
            if($inst->dbmaster->linkId) $inst->dbmaster->closeConn();
            $inst->dbmaster->dbHost = $conf['mysql']["master_host"];
            $inst->dbmaster->dbName = $conf['mysql']["master_database"];
            $inst->dbmaster->dbUser = $conf['mysql']["master_admin_user"];
            $inst->dbmaster->dbPass = $conf['mysql']["master_admin_password"];
    
    My problem:
    Code:
    ERROR: Stopped: Database already contains some tables.
    root@mmg2:/tmp/ispconfig3_install/install#
    
    update.php dose not help, so need to remove and start again.
     
    Last edited: Nov 30, 2015
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    QUOTE="budgierless, post: 336795, member: 134749"]sorry but after looking into the tutorials, the only reference about the added database querys are about adding the root users of the other server along with their permissions to the master server[/QUOTE]
    You havent read the tutorial to the end then. Please read the part about running the ispconfig installer and where to use the local database and where to use the remote login.

    You either mixed up the local and remote database settings, the installer first asks for the local database details, the host is always localhost and then it asks for the login details on the remote server. Or you did not remove the database ON THE SLAVE server before you tried to reinstall ISPConfig. The error message that you posted happens when you accidently enter the remote login details instead of the localhost login details.

    That's not related to the error message in your first post. But of course you can remove that data as well even if it is unrelated and not causing your issue, the data is added to the dbispconfig.server database (there is a record with the hostnam of the slave) and a mysql login user ispcsrv* is added in mysql.
     
  7. budgierless

    budgierless Member HowtoForge Supporter

    Yes, that is true, and that is the steps a did, the error message shows after i enter the remote server details.
    No I did not remove data on slave only the ispconfig, will give that a try
    the dbispconfig.server database only contained the master server1 deatils, this was the root of the reason i attemped to reinstall, as i was sure the server2 details should of been added via the installer from slave(server2)ispconfig just as is shown in the tutorial.

    ispcsrv* was in the database two times, 1. 127.0.0.1, 2. server2.mydomain.com so i have removered the server2 part.
     
  8. budgierless

    budgierless Member HowtoForge Supporter

    UPDATE: all fixed and installed, after removing the querys from master and slave, thanks for your help.
     
  9. budgierless

    budgierless Member HowtoForge Supporter

    config question: Dose the SOA of the client domains need to be updated to include the second IP?
    example:
    Code:
    mydomain.com.     v=spf1 a mx ptr ip4:81.xx.xx.209 a:mydomain.com -all
    to:
    Code:
    mydomain.com.     v=spf1 a mx ptr ip4:81.xx.xx.209,81.xx.xx.210 a:mydomain.com -all
    or something like that?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    The SPF record has to contain all IP's that shall be able to send emails for this domain, so if you want to send email for this domain from the second server, then add the second IP.
     

Share This Page