Cyberbolt/cfw

bug:unblock_time设为0后cfw无法启动

Closed this issue · 1 comments

omaidb commented
# 解封 IP 的时间。此处默认 IP 被封禁后 600 秒将自动解封。若此处值为 0,则永久封禁。
unblock_time: 600
image

错误日志

8月 17 06:38:25 ocserv-jp1 systemd[1]: Stopping CFW Sercice...
8月 17 06:38:25 ocserv-jp1 python[1851]: INFO:     Shutting down
8月 17 06:38:25 ocserv-jp1 python[1851]: INFO:     Waiting for application shutdown.
8月 17 06:38:25 ocserv-jp1 python[1851]: INFO:     Application shutdown complete.
8月 17 06:38:25 ocserv-jp1 python[1851]: INFO:     Finished server process [1851]
8月 17 06:38:25 ocserv-jp1 systemd[1]: cfw.service: Succeeded.
8月 17 06:38:25 ocserv-jp1 systemd[1]: Stopped CFW Sercice.
8月 17 06:38:25 ocserv-jp1 systemd[1]: Started CFW Sercice.
8月 17 06:38:26 ocserv-jp1 python[7212]: Traceback (most recent call last):
8月 17 06:38:26 ocserv-jp1 python[7212]:   File "/etc/cfw/server.py", line 4, in <module>
8月 17 06:38:26 ocserv-jp1 python[7212]:     import cfw
8月 17 06:38:26 ocserv-jp1 python[7212]:   File "/etc/cfw/cfw/__init__.py", line 1, in <module>
8月 17 06:38:26 ocserv-jp1 python[7212]:     from .extensions.iptables import (
8月 17 06:38:26 ocserv-jp1 python[7212]:   File "/etc/cfw/cfw/extensions/__init__.py", line 1, in <module>
8月 17 06:38:26 ocserv-jp1 python[7212]:     from .iptables import shell
8月 17 06:38:26 ocserv-jp1 python[7212]:   File "/etc/cfw/cfw/extensions/iptables.py", line 13, in <module>
8月 17 06:38:26 ocserv-jp1 python[7212]:     from .log import Log
8月 17 06:38:26 ocserv-jp1 python[7212]:   File "/etc/cfw/cfw/extensions/log.py", line 7, in <module>
8月 17 06:38:26 ocserv-jp1 python[7212]:     from ..config import config
8月 17 06:38:26 ocserv-jp1 python[7212]:   File "/etc/cfw/cfw/config.py", line 108, in <module>
8月 17 06:38:26 ocserv-jp1 python[7212]:     load_config()
8月 17 06:38:26 ocserv-jp1 python[7212]:   File "/etc/cfw/cfw/config.py", line 48, in load_config
8月 17 06:38:26 ocserv-jp1 python[7212]:     raise ConfigurationCFWError(
8月 17 06:38:26 ocserv-jp1 python[7212]: cfw.CFWError.ConfigurationCFWError: The 'unblock_time' parameter does not exist.
8月 17 06:38:26 ocserv-jp1 systemd[1]: cfw.service: Main process exited, code=exited, status=1/FAILURE
8月 17 06:38:26 ocserv-jp1 systemd[1]: cfw.service: Failed with result 'exit-code'.
8月 17 06:38:26 ocserv-jp1 systemd[1]: cfw.service: Service RestartSec=100ms expired, scheduling restart.
8月 17 06:38:26 ocserv-jp1 systemd[1]: cfw.service: Scheduled restart job, restart counter is at 1.
8月 17 06:38:26 ocserv-jp1 systemd[1]: Stopped CFW Sercice.
8月 17 06:38:26 ocserv-jp1 systemd[1]: Started CFW Sercice.
8月 17 06:38:27 ocserv-jp1 python[7220]: Traceback (most recent call last):
8月 17 06:38:27 ocserv-jp1 python[7220]:   File "/etc/cfw/server.py", line 4, in <module>
8月 17 06:38:27 ocserv-jp1 python[7220]:     import cfw
8月 17 06:38:27 ocserv-jp1 python[7220]:   File "/etc/cfw/cfw/__init__.py", line 1, in <module>
8月 17 06:38:27 ocserv-jp1 python[7220]:     from .extensions.iptables import (
8月 17 06:38:27 ocserv-jp1 python[7220]:   File "/etc/cfw/cfw/extensions/__init__.py", line 1, in <module>
8月 17 06:38:27 ocserv-jp1 python[7220]:     from .iptables import shell
8月 17 06:38:27 ocserv-jp1 python[7220]:   File "/etc/cfw/cfw/extensions/iptables.py", line 13, in <module>
8月 17 06:38:27 ocserv-jp1 python[7220]:     from .log import Log
8月 17 06:38:27 ocserv-jp1 python[7220]:   File "/etc/cfw/cfw/extensions/log.py", line 7, in <module>
8月 17 06:38:27 ocserv-jp1 python[7220]:     from ..config import config
8月 17 06:38:27 ocserv-jp1 python[7220]:   File "/etc/cfw/cfw/config.py", line 108, in <module>
8月 17 06:38:27 ocserv-jp1 python[7220]:     load_config()
8月 17 06:38:27 ocserv-jp1 python[7220]:   File "/etc/cfw/cfw/config.py", line 48, in load_config
8月 17 06:38:27 ocserv-jp1 python[7220]:     raise ConfigurationCFWError(
8月 17 06:38:27 ocserv-jp1 python[7220]: cfw.CFWError.ConfigurationCFWError: The 'unblock_time' parameter does not exist.
8月 17 06:38:27 ocserv-jp1 systemd[1]: cfw.service: Main process exited, code=exited, status=1/FAILURE
8月 17 06:38:27 ocserv-jp1 systemd[1]: cfw.service: Failed with result 'exit-code'.
8月 17 06:38:27 ocserv-jp1 systemd[1]: cfw.service: Service RestartSec=100ms expired, scheduling restart.
8月 17 06:38:27 ocserv-jp1 systemd[1]: cfw.service: Scheduled restart job, restart counter is at 2.
8月 17 06:38:27 ocserv-jp1 systemd[1]: Stopped CFW Sercice.
8月 17 06:38:27 ocserv-jp1 systemd[1]: Started CFW Sercice.
8月 17 06:38:28 ocserv-jp1 python[7222]: Traceback (most recent call last):
8月 17 06:38:28 ocserv-jp1 python[7222]:   File "/etc/cfw/server.py", line 4, in <module>
8月 17 06:38:28 ocserv-jp1 python[7222]:     import cfw
8月 17 06:38:28 ocserv-jp1 python[7222]:   File "/etc/cfw/cfw/__init__.py", line 1, in <module>
8月 17 06:38:28 ocserv-jp1 python[7222]:     from .extensions.iptables import (
8月 17 06:38:28 ocserv-jp1 python[7222]:   File "/etc/cfw/cfw/extensions/__init__.py", line 1, in <module>
8月 17 06:38:28 ocserv-jp1 python[7222]:     from .iptables import shell
8月 17 06:38:28 ocserv-jp1 python[7222]:   File "/etc/cfw/cfw/extensions/iptables.py", line 13, in <module>
8月 17 06:38:28 ocserv-jp1 python[7222]:     from .log import Log
8月 17 06:38:28 ocserv-jp1 python[7222]:   File "/etc/cfw/cfw/extensions/log.py", line 7, in <module>
8月 17 06:38:28 ocserv-jp1 python[7222]:     from ..config import config
8月 17 06:38:28 ocserv-jp1 python[7222]:   File "/etc/cfw/cfw/config.py", line 108, in <module>
8月 17 06:38:28 ocserv-jp1 python[7222]:     load_config()
8月 17 06:38:28 ocserv-jp1 python[7222]:   File "/etc/cfw/cfw/config.py", line 48, in load_config
8月 17 06:38:28 ocserv-jp1 python[7222]:     raise ConfigurationCFWError(
8月 17 06:38:28 ocserv-jp1 python[7222]: cfw.CFWError.ConfigurationCFWError: The 'unblock_time' parameter does not exist.
8月 17 06:38:28 ocserv-jp1 systemd[1]: cfw.service: Main process exited, code=exited, status=1/FAILURE
8月 17 06:38:28 ocserv-jp1 systemd[1]: cfw.service: Failed with result 'exit-code'.
8月 17 06:38:28 ocserv-jp1 systemd[1]: cfw.service: Service RestartSec=100ms expired, scheduling restart.
8月 17 06:38:28 ocserv-jp1 systemd[1]: cfw.service: Scheduled restart job, restart counter is at 3.
8月 17 06:38:28 ocserv-jp1 systemd[1]: Stopped CFW Sercice.
8月 17 06:38:28 ocserv-jp1 systemd[1]: Started CFW Sercice.
8月 17 06:38:29 ocserv-jp1 python[7224]: Traceback (most recent call last):
8月 17 06:38:29 ocserv-jp1 python[7224]:   File "/etc/cfw/server.py", line 4, in <module>
8月 17 06:38:29 ocserv-jp1 python[7224]:     import cfw
8月 17 06:38:29 ocserv-jp1 python[7224]:   File "/etc/cfw/cfw/__init__.py", line 1, in <module>
8月 17 06:38:29 ocserv-jp1 python[7224]:     from .extensions.iptables import (
8月 17 06:38:29 ocserv-jp1 python[7224]:   File "/etc/cfw/cfw/extensions/__init__.py", line 1, in <module>
8月 17 06:38:29 ocserv-jp1 python[7224]:     from .iptables import shell
8月 17 06:38:29 ocserv-jp1 python[7224]:   File "/etc/cfw/cfw/extensions/iptables.py", line 13, in <module>
8月 17 06:38:29 ocserv-jp1 python[7224]:     from .log import Log
8月 17 06:38:29 ocserv-jp1 python[7224]:   File "/etc/cfw/cfw/extensions/log.py", line 7, in <module>
8月 17 06:38:29 ocserv-jp1 python[7224]:     from ..config import config
8月 17 06:38:29 ocserv-jp1 python[7224]:   File "/etc/cfw/cfw/config.py", line 108, in <module>
8月 17 06:38:29 ocserv-jp1 python[7224]:     load_config()
8月 17 06:38:29 ocserv-jp1 python[7224]:   File "/etc/cfw/cfw/config.py", line 48, in load_config
8月 17 06:38:29 ocserv-jp1 python[7224]:     raise ConfigurationCFWError(
8月 17 06:38:29 ocserv-jp1 python[7224]: cfw.CFWError.ConfigurationCFWError: The 'unblock_time' parameter does not exist.
8月 17 06:38:29 ocserv-jp1 systemd[1]: cfw.service: Main process exited, code=exited, status=1/FAILURE
8月 17 06:38:29 ocserv-jp1 systemd[1]: cfw.service: Failed with result 'exit-code'.
8月 17 06:38:29 ocserv-jp1 systemd[1]: cfw.service: Service RestartSec=100ms expired, scheduling restart.
8月 17 06:38:29 ocserv-jp1 systemd[1]: cfw.service: Scheduled restart job, restart counter is at 4.
8月 17 06:38:29 ocserv-jp1 systemd[1]: Stopped CFW Sercice.
8月 17 06:38:29 ocserv-jp1 systemd[1]: Started CFW Sercice.
8月 17 06:38:30 ocserv-jp1 python[7226]: Traceback (most recent call last):
8月 17 06:38:30 ocserv-jp1 python[7226]:   File "/etc/cfw/server.py", line 4, in <module>
8月 17 06:38:30 ocserv-jp1 python[7226]:     import cfw
8月 17 06:38:30 ocserv-jp1 python[7226]:   File "/etc/cfw/cfw/__init__.py", line 1, in <module>
8月 17 06:38:30 ocserv-jp1 python[7226]:     from .extensions.iptables import (
8月 17 06:38:30 ocserv-jp1 python[7226]:   File "/etc/cfw/cfw/extensions/__init__.py", line 1, in <module>
8月 17 06:38:30 ocserv-jp1 python[7226]:     from .iptables import shell
8月 17 06:38:30 ocserv-jp1 python[7226]:   File "/etc/cfw/cfw/extensions/iptables.py", line 13, in <module>
8月 17 06:38:30 ocserv-jp1 python[7226]:     from .log import Log
8月 17 06:38:30 ocserv-jp1 python[7226]:   File "/etc/cfw/cfw/extensions/log.py", line 7, in <module>
8月 17 06:38:30 ocserv-jp1 python[7226]:     from ..config import config
8月 17 06:38:30 ocserv-jp1 python[7226]:   File "/etc/cfw/cfw/config.py", line 108, in <module>
8月 17 06:38:30 ocserv-jp1 python[7226]:     load_config()
8月 17 06:38:30 ocserv-jp1 python[7226]:   File "/etc/cfw/cfw/config.py", line 48, in load_config
8月 17 06:38:30 ocserv-jp1 python[7226]:     raise ConfigurationCFWError(
8月 17 06:38:30 ocserv-jp1 python[7226]: cfw.CFWError.ConfigurationCFWError: The 'unblock_time' parameter does not exist.
8月 17 06:38:30 ocserv-jp1 systemd[1]: cfw.service: Main process exited, code=exited, status=1/FAILURE
8月 17 06:38:30 ocserv-jp1 systemd[1]: cfw.service: Failed with result 'exit-code'.
8月 17 06:38:30 ocserv-jp1 systemd[1]: cfw.service: Service RestartSec=100ms expired, scheduling restart.
8月 17 06:38:30 ocserv-jp1 systemd[1]: cfw.service: Scheduled restart job, restart counter is at 5.
8月 17 06:38:30 ocserv-jp1 systemd[1]: Stopped CFW Sercice.
8月 17 06:38:30 ocserv-jp1 systemd[1]: cfw.service: Start request repeated too quickly.
8月 17 06:38:30 ocserv-jp1 systemd[1]: cfw.service: Failed with result 'exit-code'.
8月 17 06:38:30 ocserv-jp1 systemd[1]: Failed to start CFW Sercice.

感谢您的反馈,该问题已修复。

请先卸载旧的cfw,并重新安装
卸载:sudo curl https://raw.githubusercontent.com/Cyberbolt/cfw/main/uninstall.py | python3
安装:sudo curl https://raw.githubusercontent.com/Cyberbolt/cfw/main/install.py | python3

我们会持续关注项目中的问题,如果您还有任何疑问、建议或意见,请随时与我们联系,我们将非常乐意为您提供帮助。