Not removing mysql jobs in pool

Discussion in 'General' started by stresao, Mar 15, 2011.

  1. stresao

    stresao New Member

    Hi!

    I have a multiserver setup in mirror with master to master mysql replication. Lately I'm having severals problems with databases with ISPConfig.

    When I create or delete a database, the cron server.sh do it right but it does not dissapears from sys_datalog and the cron gets stucked the next time because the database exits.

    I have to manual delete the job from the sys_datalog sql to get things done... but I have to do that every time I manipulated any database trough ISPConfig.

    Can anybody help me?

    Regards.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats intended, jobs shall not be removed there when they are finished. Removing them manually or truncating the table will corrupt the system as it resets the ID. The jobs get kept there for 30 days. Instead of removing the job, the last processed job id is stored in the "updated" column of the server table.

    Did you mirror the ispconfig database or just the client databases?
     
  3. stresao

    stresao New Member

    Thanks for respondo Till,

    Every server has his own database (like docs says). The first server is dbispconfig1 and the second is dbispconfig2.

    About the database replication the dbispconfig1 does not exists in server2.

    when I added a new database and run server.sh I see:

    15.03.2011-17:34 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    15.03.2011-17:34 - DEBUG - Found 1 changes, starting update process.
    15.03.2011-17:34 - DEBUG - Calling function 'db_insert' from plugin 'mysql_clientdb_plugin' raised by event 'database_insert'.
    15.03.2011-17:34 - DEBUG - Created MySQL database: XXXXXX

    Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 96

    Warning: mysql_errno(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63

    Warning: mysql_error(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64
    15.03.2011-17:34 - DEBUG - Processed datalog_id 1391

    Warning: mysql_real_escape_string(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 176

    Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 96

    Warning: mysql_errno(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63

    Warning: mysql_error(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64

    Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 96

    Warning: mysql_errno(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63

    Warning: mysql_error(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64
    15.03.2011-17:34 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock

    Warning: mysql_real_escape_string(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 176

    Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 96

    Warning: mysql_errno(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63

    Warning: mysql_error(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64

    Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 96

    Warning: mysql_errno(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63

    Warning: mysql_error(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64
    finished.


    When I run server.sh again it says:



    15.03.2011-17:38 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    15.03.2011-17:38 - DEBUG - Found 1 changes, starting update process.
    15.03.2011-17:38 - DEBUG - Calling function 'db_insert' from plugin 'mysql_clientdb_plugin' raised by event 'database_insert'.
    15.03.2011-17:38 - DEBUG - Unable to create the database: Can't create database 'jon_arribas_1'; database exists

    Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 96

    Warning: mysql_errno(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63

    Warning: mysql_error(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64
    15.03.2011-17:38 - DEBUG - Processed datalog_id 1391

    Warning: mysql_real_escape_string(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 176

    Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 96

    Warning: mysql_errno(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63

    Warning: mysql_error(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64

    Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 96

    Warning: mysql_errno(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63

    Warning: mysql_error(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64
    15.03.2011-17:38 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock

    Warning: mysql_real_escape_string(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 176

    Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 96

    Warning: mysql_errno(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63

    Warning: mysql_error(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64
     
    Last edited: Mar 15, 2011
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so there seems a different problem. ISPConfig has to stop the processing because its not able to create the mysql database.

    Please check that the root login details which are required to create new mysql databases in the file /usr/local/ispconfig/server/lib/mysql_clientdb.conf are correct.

    And the ispconfig version that you use is 3.0.3.2?
     
  5. stresao

    stresao New Member

    Thanks again Till,

    It's incredible but the database is created!

    The version is 3.0.3.2 and the login details are correct.

    I'm going crazy! :)
     
  6. klocika

    klocika New Member

    Hi Till, Stresao,

    Same problem here. Did you find the solution?

    PHP Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 96
    PHP Warning: mysql_errno(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63
    PHP Warning: mysql_error(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64

    Thank you
     
  7. stresao

    stresao New Member

    Reinstall

    I had to Reinstall :-(

     
  8. klocika

    klocika New Member

    I'm sad as read this.

    My system is working fine, if I stop server.sh CRON. All I have to do is run server.sh when changing anything than kill.

    It would be nice to find the solution.

    My setup has 100+ websites, I don't want to rebuild.

    Anyway, thanks for your reply.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    I dont think that a reinstall is required. What exactly did you do or reconfigure or update on the server before the problem started?
     
  10. klocika

    klocika New Member

    Thanks for your reply Till,

    The problem is occured since I installed zend.
    My ISPConfig was 3.0.3.2, i've updated to 3.0.3.3 but still persists.

    ISPConfig can access the database, but the CRON crashes I have to kill it everytime.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Which exact zend product did you install?
     
  12. klocika

    klocika New Member

    I don't know it was few months ago. I installed a lot of packages in the same time (apt-get install zend*) that was a big mistake I think....
     
  13. klocika

    klocika New Member

  14. klocika

    klocika New Member

    Problem still persists. The errors in apache2/error.log are disappeared, but when I run the ISPconfig CRONs, there r still errors in /var/log/ispconfig/cron.log

    my log is full with this:

    PHP Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 96
    PHP Warning: mysql_errno(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63
    PHP Warning: mysql_error(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64

    I think the ISPconfig database is corrupted, how can I solve thisM?

    Thanks in advance

    Kind regards, Lorinc
     

Share This Page