1Panel 面板 refused to connect. 重启后正常

1Panel 面板 refused to connect. 重启后正常
1Panel 面板在每次服务器重启后,通过 IP 访问均报错 refused to connect.
使用 1pctl status 如下:
● 1panel.service - 1Panel, a modern open source linux panel
Loaded: loaded (/etc/systemd/system/1panel.service; enabled; preset: enabled)
Active: active (running) since Fri 2024-06-28 14:11:58 CST; 1min 24s ago
Main PID: 673 (1panel)
Tasks: 8 (limit: 18994)
Memory: 101.3M
CPU: 329ms
CGroup: /system.slice/1panel.service
└─673 /usr/bin/1panel

通过执行 1pctl restart 后即可正常使用
● 1panel.service - 1Panel, a modern open source linux panel
Loaded: loaded (/etc/systemd/system/1panel.service; enabled; preset: enabled)
Active: active (running) since Fri 2024-06-28 14:20:49 CST; 9ms ago
Main PID: 1640 (1panel)
Tasks: 5 (limit: 18994)
Memory: 5.2M
CPU: 9ms
CGroup: /system.slice/1panel.service
└─1640 /usr/bin/1panel

debian12 系统 v1.10.11-lts

cat /opt/1panel/log/1Panel.log 看看日志信息

[2024-07-03 08:56:02] [INFO] init logger successfully  
[2024-07-03 08:56:02] [INFO] init monitor db successfully  
[2024-07-03 08:56:02] [INFO] init db successfully  
[2024-07-03 08:56:02] [INFO] Migration run successfully  
[2024-07-03 09:12:37] [INFO] init logger successfully  
[2024-07-03 09:12:37] [INFO] init monitor db successfully  
[2024-07-03 09:12:37] [INFO] init db successfully  
[2024-07-03 09:12:37] [INFO] Migration run successfully  
[2024-07-03 09:12:37] [INFO] init cache successfully  
[2024-07-03 09:12:37] [INFO] init session successfully  
[2024-07-03 09:12:52] [ERROR] load remote time with [pool.ntp.org] failed, err: failed to read server response: read udp 192.168.10.253:49838->162.159.200.1:123: i/o timeout  
[2024-07-03 09:12:55] [INFO] [xpack] init db successfully  
[2024-07-03 09:12:55] [INFO] [xpack] migration run successfully  
[2024-07-03 09:12:55] [ERROR] init waf error openresty not found  
[2024-07-03 09:12:55] [INFO] Starting synchronization with App Store...  
[2024-07-03 09:12:55] [INFO] listen at http://0.0.0.0:8010 [tcp4]  
[2024-07-03 09:12:55] [INFO] [AppStore] download file from https://apps-assets.fit2cloud.com/stable/1panel.json.zip  
[2024-07-03 09:12:56] [INFO] Starting synchronization of application details...  
[2024-07-03 09:12:59] [INFO] Synchronization of application details Success  
[2024-07-03 09:12:59] [INFO] Synchronization with the App Store was successful!  

这是重启之后无法访问时候的日志吗?没有发现有什么异常

是的,debian 设备重启之后访问 1Panel 无法进入,使用命令:1pctl restart 之后即可正常使用,这就是上面的日志,没有其他操作。

我在怀疑,我没有使用安全入口,会不会是因为这个导致的问题?

不会,这个跟安全入口没啥关系
重启服务器后,先执行一下 netstat -tunlp | grep 8010 端口,然后检查检查一下防火墙是否开了,开了的话把防火墙关掉试试

不好使的话,可以加一波我微信,我远程看看啥情况
image

居然这个问题还没有修复,我也遇到了, 只要电脑重启,就会失效,需要手动重启

加我加我

解决这个问题了, 只需要添加延迟启动就好了, 总之应该和启动顺序有关系

sudo vim /etc/systemd/system/1panel.service
# 修改

[Service]
ExecStartPre=/bin/sleep 10