已解决 为什么禅道的数据库每天凌晨4点钟自动重启?

自从禅道升级到15.0版本之后,就发现禅道的数据库不停的有问题,现在是升级到了16.0版本,还是同样存在禅道的数据库每天凌晨4点钟自动重启的问题,导致每天都提示有数据表损坏,需要修复。


为什么禅道的数据库每天凌晨4点钟自动重启?怎么关闭这个定时任务?

看mysql_error.log内容如下:


2021-12-30  4:00:25 0 [Note] InnoDB: Using Linux native AIO
2021-12-30  4:00:25 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-12-30  4:00:25 0 [Note] InnoDB: Uses event mutexes
2021-12-30  4:00:25 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-12-30  4:00:25 0 [Note] InnoDB: Number of pools: 1
2021-12-30  4:00:25 0 [Note] InnoDB: Using SSE2 crc32 instructions
2021-12-30  4:00:25 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2021-12-30  4:00:25 0 [Note] InnoDB: Completed initialization of buffer pool
2021-12-30  4:00:25 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-12-30  4:00:25 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1605035
2021-12-30  4:00:25 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2021-12-30  4:00:25 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2021-12-30  4:00:25 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-12-30  4:00:25 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-12-30  4:00:25 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2021-12-30  4:00:25 0 [Note] InnoDB: 10.3.13 started; log sequence number 1605044; transaction id 9
2021-12-30  4:00:25 0 [Note] InnoDB: Loading buffer pool(s) from /opt/zbox/data/mysql/ib_buffer_pool
2021-12-30  4:00:25 0 [Note] InnoDB: Cannot open '/opt/zbox/data/mysql/ib_buffer_pool' for reading: No such file or directory
2021-12-30  4:00:25 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-12-30  4:00:25 0 [Note] Recovering after a crash using tc.log
2021-12-30  4:00:25 0 [Note] Starting crash recovery...
2021-12-30  4:00:25 0 [Note] Crash recovery finished.
2021-12-30  4:00:25 0 [Note] Server socket created on IP: '127.0.0.1'.
2021-12-30  4:00:25 6 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1932: Table 'mysql.gtid_slave_pos' doesn't exist in engine
2021-12-30  4:00:25 0 [Note] Reading of all Master_info entries succeded
2021-12-30  4:00:25 0 [Note] Added new Master_info '' to hash table
2021-12-30  4:00:25 0 [Note] /opt/zbox/run/mysql/mysqld: ready for connections.
Version: '10.3.13-MariaDB'  socket: '/opt/zbox/tmp/mysql/mysql.sock'  port: 3306  Source distribution
2021-12-30  4:01:02 8 [ERROR] mysqld: Table './zentao/zt_config' is marked as crashed and should be repaired
2021-12-30  4:01:02 8 [Warning] Checking table:   './zentao/zt_config'
2021-12-30  4:01:02 8 [ERROR] mysqld: Table './zentao/zt_lang' is marked as crashed and should be repaired
2021-12-30  4:01:02 8 [Warning] Checking table:   './zentao/zt_lang'
2021-12-30  4:01:02 8 [ERROR] mysqld: Table './zentao/zt_notify' is marked as crashed and should be repaired
2021-12-30  4:01:02 8 [Warning] Checking table:   './zentao/zt_notify'
2021-12-30  4:01:02 8 [ERROR] mysqld: Table './zentao/zt_todo' is marked as crashed and should be repaired
2021-12-30  4:01:02 8 [Warning] Checking table:   './zentao/zt_todo'
2021-12-30  7:06:11 1276 [ERROR] mysqld: Table './zentao/zt_action' is marked as crashed and should be repaired
2021-12-30  7:06:11 1276 [Warning] Checking table:   './zentao/zt_action'
2021-12-30  7:06:11 1276 [ERROR] mysqld: Table './zentao/zt_api' is marked as crashed and should be repaired
2021-12-30  7:06:11 1276 [Warning] Checking table:   './zentao/zt_api'
2021-12-30  7:06:11 1276 [ERROR] mysqld: Table './zentao/zt_apispec' is marked as crashed and should be repaired
2021-12-30  7:06:11 1276 [Warning] Checking table:   './zentao/zt_apispec'
2021-12-30  7:06:11 1276 [ERROR] mysqld: Table './zentao/zt_apistruct' is marked as crashed and should be repaired
2021-12-30  7:06:11 1276 [Warning] Checking table:   './zentao/zt_apistruct'
2021-12-30  7:06:11 1276 [ERROR] mysqld: Table './zentao/zt_apistruct_spec' is marked as crashed and should be repaired
2021-12-30  7:06:11 1276 [Warning] Checking table:   './zentao/zt_apistruct_spec'
2021-12-30  7:06:11 1276 [ERROR] mysqld: Table './zentao/zt_cron' is marked as crashed and should be repaired
2021-12-30  7:06:11 1276 [Warning] Checking table:   './zentao/zt_cron'
2021-12-30  7:06:11 1276 [ERROR] mysqld: Table './zentao/zt_doc' is marked as crashed and should be repaired
2021-12-30  7:06:11 1276 [Warning] Checking table:   './zentao/zt_doc'
2021-12-30  7:06:11 1276 [ERROR] mysqld: Table './zentao/zt_doclib' is marked as crashed and should be repaired
2021-12-30  7:06:11 1276 [Warning] Checking table:   './zentao/zt_doclib'
2021-12-30  7:06:11 1276 [ERROR] mysqld: Table './zentao/zt_file' is marked as crashed and should be repaired
2021-12-30  7:06:11 1276 [Warning] Checking table:   './zentao/zt_file'
2021-12-30  7:06:11 1276 [ERROR] mysqld: Table './zentao/zt_grouppriv' is marked as crashed and should be repaired
2021-12-30  7:06:11 1276 [Warning] Checking table:   './zentao/zt_grouppriv'
2021-12-30  7:06:11 1276 [ERROR] mysqld: Table './zentao/zt_history' is marked as crashed and should be repaired
2021-12-30  7:06:11 1276 [Warning] Checking table:   './zentao/zt_history'
2021-12-30  7:06:12 1276 [ERROR] mysqld: Table './zentao/zt_im_message' is marked as crashed and should be repaired
2021-12-30  7:06:12 1276 [Warning] Checking table:   './zentao/zt_im_message'
2021-12-30  7:06:12 1276 [ERROR] mysqld: Table './zentao/zt_im_messagestatus' is marked as crashed and should be repaired
2021-12-30  7:06:12 1276 [Warning] Checking table:   './zentao/zt_im_messagestatus'
2021-12-30  7:06:12 1276 [ERROR] mysqld: Table './zentao/zt_im_userdevice' is marked as crashed and should be repaired
2021-12-30  7:06:12 1276 [Warning] Checking table:   './zentao/zt_im_userdevice'
2021-12-30  7:06:12 1276 [ERROR] mysqld: Table './zentao/zt_module' is marked as crashed and should be repaired
2021-12-30  7:06:12 1276 [Warning] Checking table:   './zentao/zt_module'
2021-12-30  7:06:12 1276 [ERROR] mysqld: Table './zentao/zt_searchindex' is marked as crashed and should be repaired
2021-12-30  7:06:12 1276 [Warning] Checking table:   './zentao/zt_searchindex'
2021-12-30  7:06:12 1276 [ERROR] mysqld: Table './zentao/zt_stage' is marked as crashed and should be repaired
2021-12-30  7:06:12 1276 [Warning] Checking table:   './zentao/zt_stage'
2021-12-30  7:06:12 1276 [ERROR] mysqld: Table './zentao/zt_story' is marked as crashed and should be repaired
2021-12-30  7:06:12 1276 [Warning] Checking table:   './zentao/zt_story'
2021-12-30  7:06:12 1276 [ERROR] mysqld: Table './zentao/zt_task' is marked as crashed and should be repaired
2021-12-30  7:06:12 1276 [Warning] Checking table:   './zentao/zt_task'
2021-12-30  7:06:12 1276 [ERROR] mysqld: Table './zentao/zt_taskestimate' is marked as crashed and should be repaired
2021-12-30  7:06:12 1276 [Warning] Checking table:   './zentao/zt_taskestimate'
2021-12-30  7:06:12 1276 [ERROR] mysqld: Table './zentao/zt_taskspec' is marked as crashed and should be repaired
2021-12-30  7:06:12 1276 [Warning] Checking table:   './zentao/zt_taskspec'
2021-12-30  7:06:12 1276 [ERROR] mysqld: Table './zentao/zt_user' is marked as crashed and should be repaired
2021-12-30  7:06:12 1276 [Warning] Checking table:   './zentao/zt_user'



禅道版本 15.7.1 源码包
操作系统 CentOS
客户端浏览器 Chrome

提问者: yujiedu 悬赏: 5 日期: 2021-12-30 09:20:22 答案:1 点击:66
设置备注
答案列表
最佳答案
2021/12/30

您好,根据目前日志信息来看,首先需要确认下,禅道服务器是否有设置自动重启,或者有断过电,日志中有相关ERROR提示数据库表受损了,具体方案可以参考:

1.检查下服务器层面是否有设置定时重启

2.服务器操作系统层面检查下是否有设置禅道服务的定时重启

3.数据库表受损的问题:可以通过在目前禅道服务访问的IP地址后增加checktable.php,按照提示进行数据库修复看下呢。