宝塔用户_fmaphj 发表于 2024-5-23 09:58:49

【待反馈】安全里面设置端口设置完,重新点开报错

面板、插件版本:
8.1.0
系统版本:
系统:CentOS 8.5.2111 x86_64(Py3.7.9)问题描述:
安全里面设置端口设置完,重新点开报错sqlite3.DatabaseError: file is not a database,
相关截图(日志、错误):
Traceback (most recent call last):File "class/db.py", line 312, in add    result = self.__DB_CONN.execute(sql,self.__to_tuple(param))sqlite3.DatabaseError: file is not a databaseDuring handling of the above exception, another exception occurred:Traceback (most recent call last):File "/www/server/panel/class/safeModel/firewallModel.py", line 58, in __init__    Sqlite()File "/www/server/panel/class/safeModel/firewallModel.py", line 3494, in __init__    self.create_table()File "/www/server/panel/class/safeModel/firewallModel.py", line 3524, in create_table    ('80', '网站默认端口', '0000-00-00 00:00:00', 'tcp', 'accept')File "class/db.py", line 319, in add    raise public.PanelError("数据库插入出错:" + "error: " + str(ex))public.PanelError: 面板运行时发生错误: 数据库插入出错:error: file is not a databaseThe above exception was the direct cause of the following exception:Traceback (most recent call last):File "/www/server/panel/BTPanel/__init__.py", line 2422, in publicObject    res = run_obj.run(toObject, defs, get)File "/www/server/panel/BTPanel/__init__.py", line 2369, in run    result = getattr(toObject, get.action)(get)File "/www/server/panel/class/panelSafeController.py", line 75, in model    result = PluginLoader.module_run(module_name,def_name,pdata)SystemError:returned a result with an error set
参考这个后还是依旧报错:https://www.bt.cn/bbs/forum.php?mod=viewthread&tid=130649&highlight=file%2Bis%2Bnot%2Ba%2Bdatabase
mv /www/server/panel/data/db /www/backup/db_backupaaa
bt 1


运维技术阿闯 发表于 2024-5-23 10:38:59

您好,您在ssh终端执行(非面板)执行bt 16修复一下
然后再看问题是否得到解决

如果上方方式没有解决的话删除下方文件后重启面板
/www/server/panel/data/db/firewall.db
页: [1]
查看完整版本: 【待反馈】安全里面设置端口设置完,重新点开报错