服务器重启后1panel无法打开面板,排查后可能是1panel服务没成功启动,但是ssh终端命令排查1panel服务是正常启动的,但是面板无法打开,排查端口开放正常,ssh终端重启1panel服务后面板可登录,尝试排查1panel服务是否开机自启时,查找命令失败,尝试设置失败。以下是命令输出结果
Authentication is required to start ‘1Panel.service’.
Authenticating as: pyjiang
Password:
==== AUTHENTICATION COMPLETE ===
Failed to start 1Panel.service: Unit 1Panel.service not found.
pyjiang@ubuntu:~$ sudo ufw status
Status: active
To Action From
22/tcp ALLOW Anywhere
80/tcp ALLOW Anywhere
443/tcp ALLOW Anywhere
37945/tcp ALLOW Anywhere
39000:40000/tcp ALLOW Anywhere
31508/tcp ALLOW Anywhere
20/tcp DENY Anywhere
21/tcp DENY Anywhere
888/tcp DENY Anywhere
8080/tcp ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
37945/tcp (v6) ALLOW Anywhere (v6)
39000:40000/tcp (v6) ALLOW Anywhere (v6)
31508/tcp (v6) ALLOW Anywhere (v6)
20/tcp (v6) DENY Anywhere (v6)
21/tcp (v6) DENY Anywhere (v6)
888/tcp (v6) DENY Anywhere (v6)
8080/tcp (v6) ALLOW Anywhere (v6)
pyjiang@ubuntu:~$ sudo ufw reload
Firewall reloaded
pyjiang@ubuntu:~$ sudo systemctl status 1Panel
Unit 1Panel.service could not be found.
pyjiang@ubuntu:~$ sudo systemctl start 1Panel
Failed to start 1Panel.service: Unit 1Panel.service not found.
pyjiang@ubuntu:~$ sudo journalctl -u 1Panel
– No entries –
pyjiang@ubuntu:~$ sudo ss -tuln | grep 31508
pyjiang@ubuntu:~$ ls -l /path/to/1Panel
ls: cannot access ‘/path/to/1Panel’: No such file or directory
pyjiang@ubuntu:~$ ls /etc/systemd/system/ | grep 1Panel
pyjiang@ubuntu:~$ sudo ls /etc/systemd/system/ | grep 1Panel
pyjiang@ubuntu:~$ sudo nano /etc/systemd/system/1Panel.service
pyjiang@ubuntu:~$ 1pctl status
● 1panel.service - 1Panel, a modern open source linux panel
Loaded: loaded (/etc/systemd/system/1panel.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2024-04-06 11:20:42 UTC; 3h 57min ago
Main PID: 891 (1panel)
Tasks: 20 (limit: 38170)
Memory: 106.9M
CPU: 2.179s
CGroup: /system.slice/1panel.service
└─891 /usr/bin/1panel
4月 06 11:20:42 ubuntu systemd[1]: Started 1Panel, a modern open source linux panel.
4月 06 11:20:42 ubuntu 1panel[891]: [2024-04-06 11:20:42] [INFO] init logger successfully
4月 06 11:20:42 ubuntu 1panel[891]: [2024-04-06 11:20:42] [INFO] init db successfully
4月 06 11:20:42 ubuntu 1panel[891]: [2024-04-06 11:20:42] [INFO] Migration run successfully
pyjiang@ubuntu:~$ 1pctl restart
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart ‘1panel.service’.
Authenticating as: pyjiang
Password:
==== AUTHENTICATION COMPLETE ===
● 1panel.service - 1Panel, a modern open source linux panel
Loaded: loaded (/etc/systemd/system/1panel.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2024-04-06 15:19:59 UTC; 9ms ago
Main PID: 19588 (1panel)
Tasks: 5 (limit: 38170)
Memory: 2.7M
CPU: 8ms
CGroup: /system.slice/1panel.service
└─19588 /usr/bin/1panel
4月 06 15:19:59 ubuntu systemd[1]: Started 1Panel, a modern open source linux panel.
pyjiang@ubuntu:~$ sudo systemctl is-enabled 1Panel.service
[sudo] password for pyjiang:
Failed to get unit file state for 1Panel.service: No such file or directory
pyjiang@ubuntu:~$ sudo ls /etc/systemd/system/ | grep 1Panel
pyjiang@ubuntu:~$ sudo systemctl enable 1Panel.service
Failed to enable unit: Unit file 1Panel.service does not exist.