阿里云搭建1Panel面板,多次异常重启

服务器环境

故障问题

12月13号服务器迁移至阿里云99机器上后开始随机时间莫名其妙无法访问,SSH端口也进不去,12月18日联系阿里云服务器运维排查,基本上每天都不定时的出现这种问题,必须将服务器重启之后才会恢复。

12月18日排查记录

目前已经禁用掉了APT的更新仓库元数据,但是故障依旧。

1Panel内应用OpenResty、MySQL5.7、Halo、Lsky-Pro

把 1panel stop 掉,然后再观察会不会重启

已经stop掉了,目前没有这种情况,早上9点左右重置的系统镜像服务等,12点多又不行了。

1pane 没有相关log日志可以排查这问题的吗?

/opt/1panel/log 下 是1Panel的运行日志

[2023-12-19 08:45:09] [INFO] init logger successfully  
[2023-12-19 08:45:09] [INFO] init db successfully  
[2023-12-19 08:45:10] [INFO] Migration run successfully  
[2023-12-19 08:45:10] [INFO] init cache successfully  
[2023-12-19 08:45:10] [INFO] init session successfully  
[2023-12-19 08:45:10] [DEBUG] synchronize system time with [pool.ntp.org] successful!  
[2023-12-19 08:45:13] [INFO] Starting synchronization with App Store...  
[2023-12-19 08:45:13] [INFO] listen at http://0.0.0.0:26484 [tcp4]  
[2023-12-19 08:45:13] [INFO] [AppStore] download file from https://apps-assets.fit2cloud.com/stable/1panel.json.zip  
[2023-12-19 08:45:13] [INFO] Starting synchronization of application details...  
[2023-12-19 08:45:24] [INFO] Synchronization of application details Success  
[2023-12-19 08:45:24] [INFO] Synchronization with the App Store was successful!  
[2023-12-19 08:46:00] [INFO] download app[OpenResty] from https://apps-assets.fit2cloud.com/stable/1panel/openresty/1.21.4.3-0-focal/openresty-1.21.4.3-0-focal.tar.gz  
[2023-12-19 08:46:10] [INFO] download app[MySQL] from https://apps-assets.fit2cloud.com/stable/1panel/mysql/5.7.44/mysql-5.7.44.tar.gz  
[2023-12-19 08:47:07] [INFO] create database halo_fzimzj successful!  
[2023-12-19 08:47:07] [INFO] download app[Halo] from https://apps-assets.fit2cloud.com/stable/1panel/halo/2.11.2/halo-2.11.2.tar.gz  
[2023-12-19 08:49:36] [INFO] recover website geekforum.cn from backup file /1panel/uploads/website/geekforum.cn/website_geekforum.cn_20231219081657.tar.gz  
[2023-12-19 08:49:36] [DEBUG] tar zxvfC /1panel/uploads/website/geekforum.cn/website_geekforum.cn_20231219081657.tar.gz /1panel/uploads/website/geekforum.cn  
[2023-12-19 08:49:52] [INFO] recover website geekforum.cn from backup file /1panel/uploads/website/geekforum.cn/geekforum.cn_20231219081452.tar.gz  
[2023-12-19 08:49:52] [DEBUG] tar zxvfC /1panel/uploads/website/geekforum.cn/geekforum.cn_20231219081452.tar.gz /1panel/uploads/website/geekforum.cn  
[2023-12-19 08:50:56] [DEBUG] tar zxvfC /1panel/uploads/app/halo/Halo/Halo_20231219081544.tar.gz /1panel/uploads/app/halo/Halo  
[2023-12-19 08:50:56] [DEBUG] tar --warning=no-file-changed --ignore-failed-read -zcf /1panel/tmp/app/Halo_20231219085056/app.tar.gz  --exclude *.sock -C /1panel/apps/halo Halo  
[2023-12-19 08:50:56] [INFO] start to mysqldump | gzip > /1panel/tmp/app/Halo_20231219085056/Halo.sql.gz.gzip  
[2023-12-19 08:50:56] [DEBUG] tar --warning=no-file-changed --ignore-failed-read -zcf /1panel/tmp/app/Halo_20231219085056.tar.gz  --exclude *.sock -C /1panel/tmp/app Halo_20231219085056  
[2023-12-19 08:50:57] [INFO] execute delete database sql successful, now start to drop uploads and records  
[2023-12-19 08:50:57] [INFO] create database halo_4k6smp successful!  
[2023-12-19 08:50:57] [DEBUG] tar zxvfC /1panel/uploads/app/halo/Halo/Halo_20231219081544/app.tar.gz /1panel/apps/halo  
[2023-12-19 08:53:02] [DEBUG] tar --warning=no-file-changed --ignore-failed-read -zcf /1panel/backup/app/mysql/MySQL/MySQL_20231219085302/app.tar.gz  --exclude *.sock -C /1panel/apps/mysql MySQL  
[2023-12-19 08:53:07] [DEBUG] tar --warning=no-file-changed --ignore-failed-read -zcf /1panel/backup/app/mysql/MySQL/MySQL_20231219085302.tar.gz  --exclude *.sock -C /1panel/backup/app/mysql/MySQL MySQL_20231219085302  
[2023-12-19 08:53:31] [DEBUG] tar zxvfC /1panel/uploads/app/mysql/MySQL/app_MySQL_20231219081658.tar.gz /1panel/uploads/app/mysql/MySQL  
[2023-12-19 08:53:31] [DEBUG] tar --warning=no-file-changed --ignore-failed-read -zcf /1panel/tmp/app/MySQL_20231219085331/app.tar.gz  --exclude *.sock -C /1panel/apps/mysql MySQL  
[2023-12-19 08:53:35] [DEBUG] tar --warning=no-file-changed --ignore-failed-read -zcf /1panel/tmp/app/MySQL_20231219085331.tar.gz  --exclude *.sock -C /1panel/tmp/app MySQL_20231219085331  
[2023-12-19 08:53:35] [DEBUG] tar zxvfC /1panel/uploads/app/mysql/MySQL/app_MySQL_20231219081658/app.tar.gz /1panel/apps/mysql  
[2023-12-19 08:56:51] [INFO] download app[Lsky-pro] from https://apps-assets.fit2cloud.com/stable/1panel/lsky-pro/latest/lsky-pro-latest.tar.gz  
2023/12/19 08:58:35 [INFO] acme: Registering account for server@geekforum.cn
2023/12/19 08:59:34 [INFO] acme: Registering account for server@geekforum.cn
[2023-12-19 09:00:15] [DEBUG] tar zxvfC /1panel/uploads/app/lsky-pro/Lsky-Pro/app_Lsky-Pro_20231219081658.tar.gz /1panel/uploads/app/lsky-pro/Lsky-Pro  
[2023-12-19 09:00:15] [DEBUG] tar --warning=no-file-changed --ignore-failed-read -zcf /1panel/tmp/app/Lsky-Pro_20231219090015/app.tar.gz  --exclude *.sock -C /1panel/apps/lsky-pro Lsky-Pro  
[2023-12-19 09:00:25] [DEBUG] tar --warning=no-file-changed --ignore-failed-read -zcf /1panel/tmp/app/Lsky-Pro_20231219090015.tar.gz  --exclude *.sock -C /1panel/tmp/app Lsky-Pro_20231219090015  
[2023-12-19 09:00:25] [DEBUG] tar zxvfC /1panel/uploads/app/lsky-pro/Lsky-Pro/app_Lsky-Pro_20231219081658/app.tar.gz /1panel/apps/lsky-pro  
[2023-12-19 09:02:43] [INFO] execute password change sql successful  
[2023-12-19 12:20:48] [INFO] init logger successfully  
[2023-12-19 12:20:48] [INFO] init db successfully  
[2023-12-19 12:20:48] [INFO] Migration run successfully  
[2023-12-19 12:20:52] [INFO] init cache successfully  
[2023-12-19 12:20:52] [INFO] init session successfully  
[2023-12-19 12:20:53] [DEBUG] synchronize system time with [pool.ntp.org] successful!  
[2023-12-19 12:20:56] [INFO] Starting synchronization with App Store...  
[2023-12-19 12:20:56] [INFO] listen at http://0.0.0.0:26484 [tcp4]  
[2023-12-19 12:20:56] [INFO] [AppStore] download file from https://apps-assets.fit2cloud.com/stable/1panel.json.zip  
[2023-12-19 12:20:56] [INFO] The App Store is at the latest version  
[2023-12-19 12:31:47] [INFO] init logger successfully  
[2023-12-19 12:31:47] [INFO] init db successfully  
[2023-12-19 12:31:47] [INFO] Migration run successfully  
[2023-12-19 12:31:50] [INFO] init cache successfully  
[2023-12-19 12:31:50] [INFO] init session successfully  
[2023-12-19 12:31:50] [DEBUG] synchronize system time with [pool.ntp.org] successful!  
[2023-12-19 12:31:53] [INFO] Starting synchronization with App Store...  
[2023-12-19 12:31:53] [INFO] listen at http://0.0.0.0:26484 [tcp4]  
[2023-12-19 12:31:53] [INFO] [AppStore] download file from https://apps-assets.fit2cloud.com/stable/1panel.json.zip  
[2023-12-19 12:31:53] [INFO] The App Store is at the latest version  

日志已贴,请帮忙看看。

1Panel 不会自动重启机器的
日志里没有异常 你检查一下定时任务吧

这个日志看起来,好像都是再请求一些资源,好像并没有太多信息。

并不是自动重启机器,只是个别时候请求很高,导致业务无法访问也没办法访问SSH,只能重启服务器恢复,定时任务目前是没有加的 都是凌晨的任务,今天早上的时候已经全部取消了。

看看应用的日志 可能被攻击了 或者被黑了

具体是哪个导致的异常重启 我建议你用排除法

  1. 不安装 1Panel
  2. 安装1Panel 但是不安装应用 不加定时任务
  3. 安装应用

不过大概率不是 1Panel 的问题
如果你机器配置低的话 也有可能是 CPU 内存 跑满了导致的