【待反馈】无法添加站点 KeyError: 'to-port'
为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:9.2.0系统版本:
CentOS Stream 9 x86_64(Py3.7.16)
问题描述:
添加站点报错
相关截图(日志、错误):
出错了,面板运行时发生错误!KeyError: 'to-port'
REQUEST_DATE: 2024-09-15 14:19:52VERSION: CentOS Stream 9 x86_64(Py3.7.16) - 9.2.0 REMOTE_ADDR: 111.175.28.206 REQUEST_URI: POST /site?action=AddSiteREQUEST_FORM: {'path': '/www/wwwroot/e.domain.com', 'ftp': 'false', 'type': 'PHP', 'type_id': '0', 'ps': 'e.domain.com', 'port': '80', 'version': '81', 'need_index': '0', 'need_404': '0', 'sql': 'false', 'codeing': 'utf8mb4', 'webname': '{"domain":"e.domain.com","domainlist":[],"count":0}', 'add_dns_record': 'false'}
USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Traceback (most recent call last):File "/www/server/panel/BTPanel/__init__.py", line 2484, in publicObject res = run_obj.run(toObject, defs, get)File "/www/server/panel/BTPanel/__init__.py", line 2431, in run result = getattr(toObject, get.action)(get)File "/www/server/panel/class/panelSite.py", line 790, in AddSite self.test_80_port()File "/www/server/panel/class/panelSite.py", line 8938, in test_80_port rules = firewall.get_sys_firewall_rules()File "/www/server/panel/class/safeModel/firewallModel.py", line 3136, in get_sys_firewall_rules return self.__firewall_obj.recombine_rules()File "/www/server/panel/class/safeModel/firewallModel.py", line 3562, in recombine_rules firewalld_rules = self.GetAcceptPortList()File "/www/server/panel/class/safeModel/firewallModel.py", line 3530, in GetAcceptPortList tmp["to-port"] = p.attrib['to-port']KeyError: 'to-port'
您好,请问您那边是不是之前安装过稳定版9.0.0版本?然后又执行了正式版的安装脚本? 大炮运维V587 发表于 2024-9-15 16:58
您好,请问您那边是不是之前安装过稳定版9.0.0版本?然后又执行了正式版的安装脚本? ...
没有哈这个是正式服务器,年初的时候在bt官网复制的安装命令安装的,后面通过主页右上角更新过 lcy630409 发表于 2024-9-15 18:45
没有哈这个是正式服务器,年初的时候在bt官网复制的安装命令安装的,后面通过主页右上角更新过 ...
您好,给您的机器做个快照,然后bt 16看是否可以修复,如果无法修复,请执行以下命令
mv /www/server/panel/data/db/firewall.db /www/server/panel/data/db/firewall.db_bak
bt 1
页:
[1]