nezhahq / nezha

:trollface: Self-hosted, lightweight server and website monitoring and O&M tool
https://nezha.wiki
Apache License 2.0
7.66k stars 1.32k forks source link

经测试 1.0.15依然存在重启问题 #532

Closed cnmars closed 1 hour ago

cnmars commented 1 day ago

Environment

6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux

Agent Version

1.0.2

Describe the bug

root@x:/opt/nezha/dashboard# ./dashboard-linux-amd64  -v
1.0.15
root@x:/opt/nezha/dashboard# ./dashboard-linux-amd64 
2024/12/02 09:44:17 NEZHA>> init i18n failed: open translations/auto/LC_MESSAGES/nezha.po: file does not exist
2024/12/02 09:44:17 NEZHA>> Dashboard::START 8008
[GIN] 2024/12/02 - 09:44:30 | 200 |    3.651863ms |  207.32.219.181 | GET      "/"
[GIN] 2024/12/02 - 09:44:34 | 200 |    1.402693ms |   141.11.133.43 | GET      "/api/v1/server"
[GIN] 2024/12/02 - 09:44:34 | 200 |     318.386µs |   141.11.133.43 | GET      "/api/v1/setting"
[GIN] 2024/12/02 - 09:44:35 | 200 |     140.976µs |   141.11.133.43 | GET      "/dashboard"
[GIN] 2024/12/02 - 09:44:35 | 200 |     762.326µs |   141.11.133.43 | GET      "/api/v1/server"
[GIN] 2024/12/02 - 09:44:35 | 200 |     225.064µs |   141.11.133.43 | GET      "/api/v1/setting"
[GIN] 2024/12/02 - 09:44:35 | 200 |      582.67µs |   141.11.133.43 | GET      "/api/v1/server-group"
[GIN] 2024/12/02 - 09:44:35 | 200 |     261.921µs |   141.11.133.43 | GET      "/api/v1/profile"
[GIN] 2024/12/02 - 09:44:36 | 200 |     542.307µs |   141.11.133.43 | GET      "/api/v1/refresh-token"
[GIN] 2024/12/02 - 09:44:38 | 200 |     394.385µs |   141.11.133.43 | GET      "/api/v1/profile"
[GIN] 2024/12/02 - 09:44:38 | 200 |     432.711µs |   141.11.133.43 | GET      "/api/v1/server-group"
[GIN] 2024/12/02 - 09:44:38 | 200 |     187.767µs |   141.11.133.43 | GET      "/api/v1/setting"
[GIN] 2024/12/02 - 09:44:42 | 200 |     504.127µs |   141.11.133.43 | GET      "/api/v1/setting"
[GIN] 2024/12/02 - 09:44:42 | 200 |     573.277µs |   141.11.133.43 | GET      "/api/v1/server"
[GIN] 2024/12/02 - 09:44:45 | 200 |     626.343µs |   141.11.133.43 | GET      "/api/v1/service"
[GIN] 2024/12/02 - 09:44:45 | 200 |      701.35µs |   141.11.133.43 | GET      "/api/v1/server"
[GIN] 2024/12/02 - 09:44:45 | 200 |     424.559µs |   141.11.133.43 | GET      "/api/v1/notification-group"
[GIN] 2024/12/02 - 09:44:46 | 200 |     675.526µs |   141.11.133.43 | GET      "/api/v1/server-group"
[GIN] 2024/12/02 - 09:44:46 | 200 |      273.79µs |   141.11.133.43 | GET      "/api/v1/setting"
[GIN] 2024/12/02 - 09:44:46 | 200 |     522.531µs |   141.11.133.43 | GET      "/api/v1/server"
[GIN] 2024/12/02 - 09:44:52 | 200 |     406.972µs |   141.11.133.43 | GET      "/api/v1/setting"
[GIN] 2024/12/02 - 09:44:52 | 200 |      506.48µs |   141.11.133.43 | GET      "/api/v1/server"
[GIN] 2024/12/02 - 09:44:53 | 200 |     704.545µs |   141.11.133.43 | GET      "/api/v1/notification-group"
[GIN] 2024/12/02 - 09:44:53 | 200 |     487.253µs |   141.11.133.43 | GET      "/api/v1/server"
[GIN] 2024/12/02 - 09:44:53 | 200 |     413.279µs |   141.11.133.43 | GET      "/api/v1/service"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xc8c546]

goroutine 66 [running]:
github.com/nezhahq/nezha/pkg/i18n.(*Localizer).T(0x0, {0x11ec003, 0x8})
        github.com/nezhahq/nezha/pkg/i18n/i18n.go:68 +0x26
github.com/nezhahq/nezha/service/singleton.checkStatus()
        github.com/nezhahq/nezha/service/singleton/alertsentinel.go:159 +0x488
github.com/nezhahq/nezha/service/singleton.AlertSentinelStart()
        github.com/nezhahq/nezha/service/singleton/alertsentinel.go:81 +0x2bc
created by main.main in goroutine 1
        github.com/nezhahq/nezha/cmd/dashboard/main.go:124 +0x371

To Reproduce

Additional Context

Validation

muzihuaner commented 1 day ago

https://github.com/nezhahq/nezha/issues/517 看我的解决办法,重新配置一下面板然后改回原来的秘钥

cnmars commented 1 day ago
024/12/02 10:19:26 NEZHA>> init i18n failed: open translations/auto/LC_MESSAGES/nezha.po: file does not exist
2024/12/02 10:19:26 NEZHA>> Dashboard::START 8008
[GIN] 2024/12/02 - 10:19:46 | 200 |     384.782µs |  207.32.219.181 | GET      "/"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xc8c546]

goroutine 72 [running]:
github.com/nezhahq/nezha/pkg/i18n.(*Localizer).T(0x0, {0x11ec003, 0x8})
        github.com/nezhahq/nezha/pkg/i18n/i18n.go:68 +0x26
github.com/nezhahq/nezha/service/singleton.checkStatus()
        github.com/nezhahq/nezha/service/singleton/alertsentinel.go:159 +0x488
github.com/nezhahq/nezha/service/singleton.AlertSentinelStart()
        github.com/nezhahq/nezha/service/singleton/alertsentinel.go:81 +0x2bc
created by main.main in goroutine 1
        github.com/nezhahq/nezha/cmd/dashboard/main.go:124 +0x371
2024/12/02 10:20:04 NEZHA>> init i18n failed: open translations/auto/LC_MESSAGES/nezha.po: file does not exist
2024/12/02 10:20:04 NEZHA>> Dashboard::START 8008
[GIN] 2024/12/02 - 10:20:06 | 200 |     328.613µs |   141.11.133.43 | GET      "/"
[GIN] 2024/12/02 - 10:20:07 | 200 |     513.899µs |   141.11.133.43 | GET      "/api/v1/profile"
[GIN] 2024/12/02 - 10:20:07 | 200 |     454.727µs |   141.11.133.43 | GET      "/api/v1/setting"
[GIN] 2024/12/02 - 10:20:07 | 200 |      522.16µs |   141.11.133.43 | GET      "/api/v1/server-group"
[GIN] 2024/12/02 - 10:20:10 | 200 |      163.03µs |   141.11.133.43 | GET      "/dashboard"
[GIN] 2024/12/02 - 10:20:10 | 200 |     405.488µs |   141.11.133.43 | GET      "/api/v1/setting"
[GIN] 2024/12/02 - 10:20:10 | 200 |    1.820577ms |   141.11.133.43 | GET      "/api/v1/server"
[GIN] 2024/12/02 - 10:20:10 | 200 |     389.905µs |   141.11.133.43 | GET      "/api/v1/profile"
[GIN] 2024/12/02 - 10:20:10 | 200 |     504.982µs |   141.11.133.43 | GET      "/api/v1/server-group"
[GIN] 2024/12/02 - 10:20:10 | 200 |     518.749µs |   141.11.133.43 | GET      "/api/v1/refresh-token"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xc8c546]

docker 里也一样

cnmars commented 1 day ago

517 看我的解决办法,重新配置一下面板然后改回原来的秘钥

不行啊 试过了

hexsen929 commented 1 day ago

517 看我的解决办法,重新配置一下面板然后改回原来的秘钥

不行啊 试过了

有大佬提交了,还没合并,着急的话可以自己fork编译

uubulb commented 1 hour ago

配置文件里语言是auto的改下,改成支持的代码比如 zh_CN