1Panel-dev / 1Panel

🔥🔥🔥 Web-based linux server management control panel. / 现代化、开源的 Linux 服务器运维管理面板。
https://www.1panel.cn
GNU General Public License v3.0
21.68k stars 1.97k forks source link

[BUG] 在进入面板设置中的安全选项卡时会提示服务异常 #5339

Closed HappyMC-Dev closed 3 months ago

HappyMC-Dev commented 3 months ago

联系方式

huajibenji@outlook.com

1Panel 版本

v1.10.10-beta.1

问题描述

面板提示服务错误,并且在重启后问题依旧存在

重现步骤

在面板主页左侧找到面板设置->安全(上方)->提示服务错误

期待的正确结果

No response

相关日志输出

4-06-07 14:39:55] [INFO] listen at https://0.0.0.0:20513 [tcp4]  
[2024-06-07 14:39:56] [INFO] [AppStore] download file from https://apps-assets.fit2cloud.com/stable/1panel.json.zip  
[2024-06-07 14:39:56] [INFO] The App Store is at the latest version  
[2024-06-07 14:39:56] [DEBUG] [xpack] sync license successful!  
[2024-06-07 14:39:56] [DEBUG] 38 0 * * *  
[2024-06-07 14:39:56] [DEBUG] start to watch the directory /opt/1panel/apps/openresty/openresty/www/sites/litebans.xxxxxxx.top  

2024/06/07 14:41:06 [Recovery] 2024/06/07 - 14:41:06 panic recovered:
GET /api/v1/settings/ssl/info HTTP/2.0
Host: xxxxxxx.top:20513
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate, br, zstd
Accept-Language: zh
Cookie: csrftoken=ZDLkGEQtmzJUCKxn5xhR6Yzj6WH4vggr; 577851a3-d615-4675-b5af-82d91219210f=eyJsYXN0UmVxdWVzdFRpbWUiOjE3MTc3NDI0MjIxODYsImxvZ2luIjp0cnVlLCJ1c2VyTmFtZSI6Imh1YWppYmVuamkiLCJ1dWlkIjoiODZhZWZhY2Q2ZWY4NDE3ZmIwYjRmYmNlZDM1OTY5ZjciLCJ0b2tlbiI6Ijc5ZmJhYzQ3NzFjNzQyN2I4YjgyMTAyZmU1YjAyN2EyMTcxNzU3MzI0NTM1NyIsIl9leHBpcmUiOjE3MTc4Mjg4MjIxODcsIl9tYXhBZ2UiOjg2NDAwMDAwfQ==; 577851a3-d615-4675-b5af-82d91219210f.sig=oSSa1RIHtnOuNyyOun0YLLaZnYs; psession=e8589319-c6a4-438b-bf79-c14c48957c48
Priority: u=1, i
Referer: https://xxxxxxxxxx.top:20513/settings/safe
Sec-Ch-Ua: "Microsoft Edge";v="125", "Chromium";v="125", "Not.A/Brand";v="24"
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: "Windows"
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0

runtime error: invalid memory address or nil pointer dereference
runtime/panic.go:261 (0x456c57)
runtime/signal_unix.go:881 (0x456c25)
github.com/1Panel-dev/1Panel/backend/app/service/setting.go:383 (0x231c22b)
github.com/1Panel-dev/1Panel/backend/app/api/v1/setting.go:168 (0x2471966)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea)
github.com/1Panel-dev/1Panel/backend/middleware/password_expired.go:24 (0x2491d09)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea)
github.com/1Panel-dev/1Panel/backend/middleware/session.go:36 (0x249189a)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea)
github.com/1Panel-dev/1Panel/backend/middleware/jwt.go:15 (0x24915a8)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea)
github.com/1Panel-dev/1Panel/backend/middleware/loading.go:22 (0x24ce8a4)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea)
github.com/1Panel-dev/1Panel/backend/middleware/bind_domain.go:22 (0x24ce69a)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea)
github.com/1Panel-dev/1Panel/backend/middleware/ip_limit.go:25 (0x24ce215)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea)
github.com/1Panel-dev/1Panel/backend/middleware/operation.go:25 (0x24cc390)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc7f5d9)
github.com/gin-gonic/gin@v1.9.1/recovery.go:102 (0xc7f5c7)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc7e71c)
github.com/gin-gonic/gin@v1.9.1/logger.go:240 (0xc7e703)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc7dc0d)
github.com/gin-gonic/gin@v1.9.1/gin.go:620 (0xc7d89c)
github.com/gin-gonic/gin@v1.9.1/gin.go:576 (0xc7d3d1)
net/http/server.go:3137 (0x89cdad)
net/http/server.go:3745 (0x89edb0)
net/http/h2_bundle.go:6192 (0x8695fa)
runtime/asm_amd64.s:1695 (0x478c80)


2024/06/07 14:43:21 [Recovery] 2024/06/07 - 14:43:21 panic recovered:
GET /api/v1/settings/ssl/info HTTP/2.0
Host: xxxxxxxxxx.top:20513
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate, br, zstd
Accept-Language: zh
Cookie: csrftoken=ZDLkGEQtmzJUCKxn5xhR6Yzj6WH4vggr; psession=e8589319-c6a4-438b-bf79-c14c48957c48; 577851a3-d615-4675-b5af-82d91219210f=eyJsYXN0UmVxdWVzdFRpbWUiOjE3MTc3NDI2MDE4NTAsImxvZ2luIjp0cnVlLCJ1c2VyTmFtZSI6Imh1YWppYmVuamkiLCJ1dWlkIjoiODZhZWZhY2Q2ZWY4NDE3ZmIwYjRmYmNlZDM1OTY5ZjciLCJ0b2tlbiI6Ijc5ZmJhYzQ3NzFjNzQyN2I4YjgyMTAyZmU1YjAyN2EyMTcxNzU3MzI0NTM1NyIsIl9leHBpcmUiOjE3MTc4MjkwMDE4NTEsIl9tYXhBZ2UiOjg2NDAwMDAwfQ==; 577851a3-d615-4675-b5af-82d91219210f.sig=ndZUClYZUF-I9YjGh1PWwYJvip8
Priority: u=1, i
Referer: https://xxxxxxxx.top:20513/settings/safe
Sec-Ch-Ua: "Microsoft Edge";v="125", "Chromium";v="125", "Not.A/Brand";v="24"
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: "Windows"
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0

runtime error: invalid memory address or nil pointer dereference
runtime/panic.go:261 (0x456c57)
runtime/signal_unix.go:881 (0x456c25)
github.com/1Panel-dev/1Panel/backend/app/service/setting.go:383 (0x231c22b)
github.com/1Panel-dev/1Panel/backend/app/api/v1/setting.go:168 (0x2471966)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea)
github.com/1Panel-dev/1Panel/backend/middleware/password_expired.go:24 (0x2491d09)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea)
github.com/1Panel-dev/1Panel/backend/middleware/session.go:36 (0x249189a)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea)
github.com/1Panel-dev/1Panel/backend/middleware/jwt.go:15 (0x24915a8)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea)
github.com/1Panel-dev/1Panel/backend/middleware/loading.go:22 (0x24ce8a4)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea)
github.com/1Panel-dev/1Panel/backend/middleware/bind_domain.go:22 (0x24ce69a)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea)
github.com/1Panel-dev/1Panel/backend/middleware/ip_limit.go:25 (0x24ce215)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea)
github.com/1Panel-dev/1Panel/backend/middleware/operation.go:25 (0x24cc390)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc7f5d9)
github.com/gin-gonic/gin@v1.9.1/recovery.go:102 (0xc7f5c7)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc7e71c)
github.com/gin-gonic/gin@v1.9.1/logger.go:240 (0xc7e703)
github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc7dc0d)
github.com/gin-gonic/gin@v1.9.1/gin.go:620 (0xc7d89c)
github.com/gin-gonic/gin@v1.9.1/gin.go:576 (0xc7d3d1)
net/http/server.go:3137 (0x89cdad)
net/http/server.go:3745 (0x89edb0)
net/http/h2_bundle.go:6192 (0x8695fa)
runtime/asm_amd64.s:1695 (0x478c80)


附加信息

No response

ssongliu commented 3 months ago

感谢反馈,可以先执行 1pctl reset https 暂时先关闭 ssl。

请问是选择的网站那边的证书吗?网站证书列表打开报错吗?

TIkc9 commented 3 months ago

v1.10.10-beta.2 也有这个问题 我用域名的证书绑定了1panel的ip 是不是这个原因? 报错链接:https://ip:port/api/v1/settings/ssl/info 报错截图如下: c3618f76aa8f785968b509ed92732c0

复现日志: 2024/06/07 17:12:20 [Recovery] 2024/06/07 - 17:12:20 panic recovered: GET /api/v1/settings/ssl/info HTTP/2.0 Host: ip:port Accept: application/json, text/plain, / Accept-Encoding: gzip, deflate, br, zstd Accept-Language: zh Cookie: wp-settings-time-1=1716279437; psession=88319ed3-3d1e-4d1c-8502-0829abfe0dec Dnt: 1 Priority: u=1, i Referer: https://ip:port/settings/safe Sec-Ch-Ua: "Microsoft Edge";v="125", "Chromium";v="125", "Not.A/Brand";v="24" Sec-Ch-Ua-Mobile: ?0 Sec-Ch-Ua-Platform: "Windows" Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin Sec-Gpc: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0

runtime error: invalid memory address or nil pointer dereference runtime/panic.go:261 (0x456c57) runtime/signal_unix.go:881 (0x456c25) github.com/1Panel-dev/1Panel/backend/app/service/setting.go:383 (0x231c22b) github.com/1Panel-dev/1Panel/backend/app/api/v1/setting.go:168 (0x2471986) github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea) github.com/1Panel-dev/1Panel/backend/middleware/password_expired.go:24 (0x2491d29) github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea) github.com/1Panel-dev/1Panel/backend/middleware/session.go:36 (0x24918ba) github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea) github.com/1Panel-dev/1Panel/backend/middleware/jwt.go:15 (0x24915c8) github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea) github.com/1Panel-dev/1Panel/backend/middleware/loading.go:22 (0x24ce8c4) github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea) github.com/1Panel-dev/1Panel/backend/middleware/bind_domain.go:22 (0x24ce6ba) github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea) github.com/1Panel-dev/1Panel/backend/middleware/ip_limit.go:25 (0x24ce235) github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc726ea) github.com/1Panel-dev/1Panel/backend/middleware/operation.go:25 (0x24cc3b0) github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc7f5d9) github.com/gin-gonic/gin@v1.9.1/recovery.go:102 (0xc7f5c7) github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc7e71c) github.com/gin-gonic/gin@v1.9.1/logger.go:240 (0xc7e703) github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xc7dc0d) github.com/gin-gonic/gin@v1.9.1/gin.go:620 (0xc7d89c) github.com/gin-gonic/gin@v1.9.1/gin.go:576 (0xc7d3d1) net/http/server.go:3137 (0x89cdad) net/http/server.go:3745 (0x89edb0) net/http/h2_bundle.go:6192 (0x8695fa) runtime/asm_amd64.s:1695 (0x478c80) 

TIkc9 commented 3 months ago

开两步验证时 点取消 也有这个报错

wanghe-fit2cloud commented 3 months ago

v1.10.10-lts 版本已发布。