SQlite mod_security corrupt
I am experimentig and issue with SQLite of mod_security. Here is my log:
[[QUOTE]2018-05-12 19:04:29 -0500] E [/usr/local/cpanel/scripts/purge_modsec_log] The "/usr/local/cpanel/scripts/purge_modsec_log" command (process 7336) reported error number 255 when it ended.
as root /scripts/purge_modsec_log: [QUOTE] Cpanel::Exception::Database::Error/(XID 6ycjhs) The system received an error from the "SQLite" database "/var/cpanel/modsec/modsec.sqlite": SQLITE_CORRUPT (database disk image is malformed) at /usr/local/cpanel/Cpanel/Exception/CORE.pm line 336. Cpanel::Exception::create("Database::Error", ARRAY(0x20f3160)) called at /usr/local/cpanel/Cpanel/Exception.pm line 61 Cpanel::Exception::__ANON__(__CPANEL_HIDDEN__, ARRAY(0x20f3160)) called at /usr/local/cpanel/Cpanel/DBI.pm line 200 Cpanel::DBI::_create_exception(Cpanel::DBI::SQLite::db=HASH(0x20f2cc8), "DBD::SQLite::db do failed: database disk image is malformed", undef) called at /usr/local/cpanel/Cpanel/DBI.pm line 188 Cpanel::DBI::_error_handler("DBD::SQLite::db do failed: database disk image is malformed", Cpanel::DBI::SQLite::db=HASH(0x20f2cc8), undef) called at /usr/local/cpanel/Cpanel/ModSecurity/DB.pm line 319 Cpanel::ModSecurity::DB::purge_stale_records_from_database(7) called at /scripts/purge_modsec_log line 41 scripts::purge_modsec_log::run() called at /scripts/purge_modsec_log line 27
Any help? Thanks
as root /scripts/purge_modsec_log: [QUOTE] Cpanel::Exception::Database::Error/(XID 6ycjhs) The system received an error from the "SQLite" database "/var/cpanel/modsec/modsec.sqlite": SQLITE_CORRUPT (database disk image is malformed) at /usr/local/cpanel/Cpanel/Exception/CORE.pm line 336. Cpanel::Exception::create("Database::Error", ARRAY(0x20f3160)) called at /usr/local/cpanel/Cpanel/Exception.pm line 61 Cpanel::Exception::__ANON__(__CPANEL_HIDDEN__, ARRAY(0x20f3160)) called at /usr/local/cpanel/Cpanel/DBI.pm line 200 Cpanel::DBI::_create_exception(Cpanel::DBI::SQLite::db=HASH(0x20f2cc8), "DBD::SQLite::db do failed: database disk image is malformed", undef) called at /usr/local/cpanel/Cpanel/DBI.pm line 188 Cpanel::DBI::_error_handler("DBD::SQLite::db do failed: database disk image is malformed", Cpanel::DBI::SQLite::db=HASH(0x20f2cc8), undef) called at /usr/local/cpanel/Cpanel/ModSecurity/DB.pm line 319 Cpanel::ModSecurity::DB::purge_stale_records_from_database(7) called at /scripts/purge_modsec_log line 41 scripts::purge_modsec_log::run() called at /scripts/purge_modsec_log line 27
Any help? Thanks
-
Hello, Can you let us know the size of the /var/cpanel/modsec/modsec.sqlite file? EX: du -sh /var/cpanel/modsec/modsec.sqlite
Also, can you confirm if you made any manual changes to this file in the past, or if it's ever been restored or recovered? Thank you.0 -
[QUOTE]du -sh /var/cpanel/modsec/modsec.sqlite 14M /var/cpanel/modsec/modsec.sqlite
Also, can you confirm if you made any manual changes to this file in the past, or if it's ever been restored or recovered?
Well, one month ago I had disk issues that generated problems with all my InnoDB databases.0 -
Well, one month ago I had disk issues that generated problems with all my InnoDB databases.
Hello @urgido, It's possible the issue with your drive also lead to the corruption of the /var/cpanel/modsec/modsec.sqlite file. You can use the following commands to generate a new instance of this file:/scripts/restartsrv_tailwatchd --stop mv /var/cpanel/modsec/modsec.sqlite /var/cpanel/modsec/modsec.sqlite.old1 /usr/local/cpanel/scripts/setup_modsec_db /scripts/restartsrv_tailwatchd --start
Let us know if this helps. Thank you.0 -
Hello @urgido, It's possible the issue with your drive also lead to the corruption of the /var/cpanel/modsec/modsec.sqlite file. You can use the following commands to generate a new instance of this file:
/scripts/restartsrv_tailwatchd --stop mv /var/cpanel/modsec/modsec.sqlite /var/cpanel/modsec/modsec.sqlite.old1 /usr/local/cpanel/scripts/setup_modsec_db /scripts/restartsrv_tailwatchd --start
Let us know if this helps. Thank you.
Solved. Thanks a lot. Regards0 -
Thanks a lot.
I'm glad to see that helped. I've marked this thread as solved. Thanks!0 -
Please My cpanel gives the following message The system received an error from the "SQLite" database "/var/cpanel/bandwidth/onletkrp.sqlite": SQLITE_CORRUPT (database disk image is malformed) Please Please, what solution can I follow? Thank you 0 -
Hello @Nord Stage, Your cPanel Forums profile shows your access level as Reseller Owner. As a reseller, you'll want to report that error message to your reseller hosting provider so they can move the corrupted /var/cpanel/bandwidth/username.sqlite file to another location if necessary. Thank you. 0
Please sign in to leave a comment.
Comments
7 comments