Forum

Results 1 to 15 of 15
  1. #1
    Join Date
    December 2009
    Location
    Hungary
    Posts
    404

    Exclamation [CRITICAL] Server crash (db_exec failed and assertion failed)

    Hi,

    Suddenly our server crashed (beta 26) and it's database become corrupted:

    Code:
    2010-08-09 14:50:44.018058|INFO    |VirtualServer |  1| client connected 'mEksz'(id:20752) from 94.21.40.128:1928
    2010-08-09 14:50:44.636911|INFO    |VirtualServer |  1| client connected 'bala'(id:2951) from 212.92.15.70:40095
    2010-08-09 14:50:47.432531|INFO    |VirtualServer |  1| client disconnected 'Crash'(id:21006) reason 'reasonmsg=connection lost'
    2010-08-09 14:50:47.433600|ERROR   |DatabaseQuery |   | db_exec failed database disk image is malformed
    2010-08-09 14:50:47.433702|ERROR   |DatabaseQuery |   | db_exec() insert into log (server_id, log_timestamp, log_level, log_channel, log error: database disk image is malformed
    2010-08-09 14:50:52.828422|INFO    |VirtualServer |  1| client connected 'Crash'(id:21006) from 82.95.75.117:32768
    2010-08-09 14:50:52.829386|ERROR   |DatabaseQuery |   | db_exec failed database disk image is malformed
    2010-08-09 14:50:52.829455|ERROR   |DatabaseQuery |   | db_exec() insert into log (server_id, log_timestamp, log_level, log_channel, log error: database disk image is malformed
    2010-08-09 14:50:58.412658|INFO    |VirtualServer |  1| client disconnected '[B.H.T.]/eXp! N!cky'(id:18533) reason 'reasonmsg=kilépett'
    2010-08-09 14:50:58.413922|ERROR   |DatabaseQuery |   | db_exec failed database disk image is malformed
    2010-08-09 14:50:58.414007|ERROR   |DatabaseQuery |   | db_exec() insert into log (server_id, log_timestamp, log_level, log_channel, log error: database disk image is malformed

    ...and later:

    Code:
    2010-08-09 14:57:18.139708|ERROR   |DatabaseQuery |   | db_exec failed database disk image is malformed
    2010-08-09 14:57:18.139787|ERROR   |DatabaseQuery |   | db_exec() insert into clients( server_id,  client_unique_id,  client_nickname,   error: database disk image is malformed
    2010-08-09 14:57:18.140363|CRITICAL|Client        |  1| Assertion "m_ClientDBID != 0" failed at common/chanclients/client.cpp:235; 
    2010-08-09 14:57:18.141168|ERROR   |DatabaseQuery |   | db_exec failed database disk image is malformed
    2010-08-09 14:57:18.141228|ERROR   |DatabaseQuery |   | db_exec() insert into log (server_id, log_timestamp, log_level, log_channel, log error: database disk image is malformed
    After I tried to restart the server:

    Code:
    2010-08-09 15:03:59.970227|INFO    |SQL           |   | pruning old database log entries where timestamp is older than 90 days
    2010-08-09 15:03:59.971730|ERROR   |DatabaseQuery |   | db_exec failed database disk image is malformed
    2010-08-09 15:03:59.971795|ERROR   |DatabaseQuery |   | db_exec() delete from log where log_timestamp <= 1273590239; error: database disk image is malformed
    2010-08-09 15:03:59.971840|CRITICAL|SQL           |   | unable to remove old log entries error: database error
    So I was not able to start the server.

    Our database has the same size for weeks! Dante said that this is normal. Now I don't think so. Can you help us to repair our database? I've backups but they are the same size so I'm worried that my backups are corrupted too. The server starts with the backup database but I'm afraid that the server will crash in the next days. We have hundreds of channels and hundreds of users, many icons, files, avatars, we definetely don't want to rebuild a new database. Thank you.
    Last edited by Slater; August 10th, 2010 at 02:07 AM.

  2. #2
    Join Date
    May 2010
    Posts
    6,310
    Hello

    Edit your backup database and find all that is not consistent. As a customer who would be in a group that no longer exists.

    We use a script to detect this kind of problem. And as I said in a previous post, this kind of inconsistency is very large with the old beta version.

    If you have a web server (cause this script) I can give you this one to clean your database. Or if you want I can try to clean it for you.

  3. #3
    Join Date
    December 2009
    Location
    Hungary
    Posts
    404
    Hi,

    I would be glad if you could send me the script. I use Ubuntu root server so running the script is not a problem.

  4. #4
    Join Date
    May 2010
    Posts
    6,310
    Hum... just a question :

    You use SQlite or MySql ?

    http://forum.teamspeak.com/showthread.php?t=55624

  5. #5
    Join Date
    December 2009
    Location
    Hungary
    Posts
    404
    SQLite but if its necessary I can convert it to MySQL. Is it better to use MySQL?

  6. #6
    Join Date
    May 2010
    Posts
    6,310
    Sqlite or Mysql ?

    In fact this two databse if for two TS usage :

    If you have only or 2 server for private utilisation, sqlite is the most simpliest solution.
    If you have several servers with many users with web interface for your users or customers, Mysql is the better solution.

    In all this cases, MySQL is more flexible and easier to administer than sqlite. MySQL is a server, sqlite is a simple file.


    Now for your problem :

    If you want you can try to convert your database.
    For use this script, just edit the 4 first line with your configuration and start the script.

  7. #7
    Join Date
    December 2009
    Location
    Hungary
    Posts
    404
    Thank you, I'll try to run this script. God, I don't want to recreate the database, I'll go mad if it can't be repaired...

  8. #8
    Join Date
    May 2010
    Posts
    6,310
    Don't panic

    We can always be repaired with patience.
    If you have a problem, contact me.

  9. #9
    Join Date
    December 2009
    Location
    Hungary
    Posts
    404
    If I'm correct I need to convert it to MySQL, right?

  10. #10
    Join Date
    May 2010
    Posts
    6,310
    Yes, or if you want I can re write this script to work with sqlite database.
    (For the end of this week)

  11. #11
    Join Date
    December 2009
    Location
    Hungary
    Posts
    404
    I have an error, can you help me what is the problem? Thx:

    Code:
    CREATE TABLE clients (  client_id               integer PRIMARY KEY auto_increment NOT NULL,  server_id               integer unsigned,  client_unique_id        varchar(40),  client_nickname         varchar(40),  client_login_name       varchar(20) UNIQUE,  client_login_password   varchar(40),  client_lastconnected    integer unsigned,  client_totalconnections integer unsigned default 0,  client_month_upload     integer unsigned default 0,  client_month_download   integer unsigned default 0,  client_total_upload     integer unsigned default 0,  client_total_download   integer unsigned default 0);
    
    [...]
    
    INSERT INTO `clients` VALUES(16017,1,'7Zr4jnanfhgR42iegIqeuFJ1KiU=','Legjobbika\Zoli\',NULL,NULL,1278493751,10,0,0,0,154616);
    INSERT INTO `clients` VALUES(16019,1,'u4L4eiFKwXDUjynF9/mJc42c7qM=','Fricc2',NULL,NULL,1280833733,13,0,0,0,127624);
    INSERT INTO `clients` VALUES(16021,1,'wO/yDUxkrXov8BbjzRcoCQBX8Tw=','benő',NULL,NULL,1278529824,39,0,0,0,3541848);
    INSERT INTO `clients` VALUES(16023,1,'BiJ6Or4U3YGUwR9T9Nr4MZvjAsY=','Csibidi',NULL,NULL,1278261468,19,0,0,0,332156);
    INSERT INTO `clients` VALUES(16025,1,'6phhEsUyo4nPhFodPcVEfZipX6c=','Brezo',NULL,NULL,1278319498,4,0,0,0,1995637);
    INSERT INTO `clients` VALUES(16029,1,'vVHNW6O0ZvNlIdahkGMoO5BTIyk=','jani',NULL,NULL,1278106050,2,0,0,0,273382);
    INSERT INTO `clients` VALUES(16030,1,'C6piicDMJHpwVtai0FGqAfWqBxY=','Norbi',NULL,NULL,1278319519,5,0,0,0,654751);
    INSERT INTO `clients` VALUES(16031,1,'0QxNPiMpn6xz9I9a4fv8mpmKi5A=','Prot',NULL,NULL,1278357687,10,0,0,0,231090);
    INSERT INTO `clients` VALUES(16032,1,'c8GFk88AdsI0f4xdhneI/[...]

  12. #12
    Join Date
    May 2010
    Posts
    6,310
    What is this error ?

    You have a problem to convert you database or to use the script ?

  13. #13
    Join Date
    December 2009
    Location
    Hungary
    Posts
    404
    I try to insert via phpMyAdmin

    Code:
    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'u4L4eiFKwXDUjynF9/mJc42c7qM=','Fricc2',NULL,NULL,1280833733,13,0,0,0,127624);
    I' at line 1

  14. #14
    Join Date
    May 2010
    Posts
    6,310
    Use DBConvert to put the sqlite data directly in your mysql database.

  15. #15
    Join Date
    December 2009
    Location
    Hungary
    Posts
    404
    I successfully imported and started the server but the special characters are gone. (Á, É, Ő, Ű)...etc. What Character encoding should I use? I choose utf8_unicode_ci. Is it correct? Thx.
    Last edited by Slater; August 10th, 2010 at 04:20 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Resolved] Server crash (Assertion failed)
    By Bluscream in forum Server Support
    Replies: 2
    Last Post: October 2nd, 2015, 08:30 PM
  2. db_exec failed database disk image is malformed Help please
    By tsbrazucas in forum Server Support
    Replies: 0
    Last Post: April 14th, 2012, 10:56 PM
  3. db_exec failed duplicate column name: client_lastip
    By neobsen in forum Linux / FreeBSD
    Replies: 3
    Last Post: September 27th, 2011, 10:29 AM
  4. Assertion failed when using the plugin API
    By Knocky in forum Bug Reports [EN/DE]
    Replies: 2
    Last Post: August 23rd, 2011, 02:39 PM
  5. [CRITICAL] Server crash (db_exec failed and assertion failed)
    By Slater in forum Bug Reports [EN/DE]
    Replies: 8
    Last Post: August 10th, 2010, 09:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •