优化更新中英文文档-排障指南

This commit is contained in:
Kris 2024-05-14 00:53:08 +02:00
parent a8369feb86
commit 008835dcaa
No known key found for this signature in database
GPG Key ID: 36AFAA97D2910652
6 changed files with 203 additions and 122 deletions

24
docs/en_US/guide/agentq.md Normal file → Executable file
View File

@ -1,9 +1,21 @@
## Why the IP displayed in the admin panel and the actual IP of the Agent are not the same?
Please check [Dashboard - Why the IP displayed in the admin panel and the actual IP of the Agent are not the same?](/en_US/guide/dashboardq.html#why-the-ip-displayed-in-the-admin-panel-and-the-actual-ip-of-the-agent-are-not-the-same)
---
outline: deep
---
## Error on one-click script installation
### curl: Failed to connect to raw.githubusercontent.com...
Please check if your server can connect to Github, try again, or check [Other ways to install Agent](/en_US/guide/agent.html#other-ways-to-install-agent)
## The IP Displayed in the Admin Panel is Different from the Actual Agent IP?
Please refer to [Dashboard Related - Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP?](/en_US/guide/dashboardq.html#why-is-the-ip-displayed-in-the-admin-panel-different-from-the-actual-agent-ip). This will not be repeated here.
## Errors During One-Click Script Installation
### curl: Failed to connect to raw.githubusercontent.com......
This mostly occurs on servers in mainland China. Currently, the one-click script fetches the installation script directly from Github. You may try several times, or [manually install the Agent](/en_US/guide/agent.html#other-ways-to-install-agent). Additionally, you can find third-party Github acceleration services or mirrors and set them in the one-click installation script.
### sudo: command not found
Please install sudo first
Please manually install sudo first, for example, in Ubuntu:
```shell
apt install sudo
```

88
docs/en_US/guide/dashboardq.md Normal file → Executable file
View File

@ -1,54 +1,76 @@
## Why the IP displayed in the admin panel and the actual IP of the Agent are not the same?
First of all, explain how the IP displayed in the admin panel is gotten: the Agent will request the IP-API every once in a while, get the IP information and report it to the Dashboard, the IP-API currently used can be viewed here: [myip.go](https://github.com/nezhahq/agent/blob/main/pkg/monitor/myip.go)
If you find that the IP displayed in the admin panel is not the same as the IP provided to you by the service provider, the biggest possibility is that the service provider gave you the **entry IP**, but the Agent tested out your **exit IP**. This problem may also occur in BGP servers and Leased line.
---
outline: deep
---
## Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP?
First, let's explain how the IP displayed in the Admin panel is obtained: The Agent periodically requests IP-API to get IP information and reports it to the Dashboard. The currently used IP-API can be viewed here: [myip.go](https://github.com/nezhahq/agent/blob/main/pkg/monitor/myip.go).
If you find that the IP displayed in the Admin panel is different from the IP provided by your service provider, it is most likely that the service provider has given you an **entry IP**, but the Agent is testing your **exit IP**. This issue can also occur with multi-line servers and IPLC private lines.
::: tip
To take a simple and very common example, the service provider to provide you a anti-DDoS server, in order to meet the goals of both DDoS protection and low network disruption rate, the IP provided to you may be the mapped anti-DDoS IP and not the real exit IP of your server
For example, a common scenario is that the service provider gives you a high-defense server. To meet both high defense and low network interruption rate goals, the IP provided may be a mapped high-defense IP rather than your server's real exit IP.
:::
You can also test the exit IP by running the following command in the Agent server:
You can also test the exit IP on the Agent server by running the following commands:
```shell
curl https://ipapi.co/ip/
curl ip.sb
curl ip-api.com
```
## Forgot your access password or deleted your access password
Please view or edit the `/opt/nezha/dashboard/data/config.yaml` file.
The password is located in the site-viewpassword item.
## Forgot or Deleted Viewing Password
Please view or edit the `/opt/nezha/dashboard/data/config.yaml` file.
The password is located under the `site-viewpassword` item.
## Dashboard Installation/Restart/Update Failure: iptables ......
First, try restarting Docker before proceeding:
## Dashboard install/restart/update failed: iptables ......
First, try restarting docker and retrying again
```shell
systemctl status docker
systemctl restart docker
systemctl status docker
```
Restart and try to reinstall the Dashboard.
If you still get iptables... etc. errors, then consider simply closing iptables or even removing it.
This issue may also be kernel related, try replacing the official kernel as well.
## Dashboard reboot failed: Invalid hostPort: nz_site_port etc.
Usually this does not occur, if it does, you can modify the configuration through the installation script or edit `/opt/nezha/dashboard/docker-compose.yaml` directly.
After restarting, try reinstalling the Dashboard.
If iptables errors persist, consider disabling or removing iptables.
This issue might also be related to the kernel, so switching to the official kernel can be another solution.
## Wrong Dashboard layout, CSS resources cannot be loaded
If the Dashboard page has an incorrect layout, the usual reason is that the CSS file is missing or cannot be loaded.
When such an issue occurs, you can first try `Reboot and update the Dashboard`.
If the problem is not resolved after updating the Dashboard, then there may be an unsuitable configuration within your vhost configuration file. You can edit the vhost file or within the Aapanel to:
1. Find the site you configured when installing Dashboard in `Website` and click `Conf` on the right side
2. Select `Config` and delete the following from the config file:
````nginx
location ~ .*\.(js|css)?$
{
expires 12h;
error_log /dev/null;
access_log /dev/null;
}
````
3. Save the configuration and clear the cache in the browser, NginX, and CDN, then refresh the page and it should return to normal.
## Dashboard Restart Failure: Invalid hostPort: nz_site_port
If this issue occurs, you can modify the configuration via the installation script or directly edit the `/opt/nezha/dashboard/docker-compose.yaml` file.
## Dashboard Layout Error, CSS Resources Not Loading
If the Dashboard page layout is incorrect, it's usually due to missing or inaccessible CSS files.
To resolve this, try `restarting and updating the Dashboard` first.
If the problem persists after updating, the issue may be due to inappropriate configurations in your vhost file. You can edit the Nginx vhost file or use the aaPanel to:
1. Find the site configured during Dashboard installation in `Websites` and click `Settings` on the right.
2. Select `Configuration File` and remove the following lines:
```nginx
location ~ .*\.(js|css)?$
{
expires 12h;
error_log /dev/null;
access_log /dev/null;
}
```
3. Save the configuration, clear the browser, Nginx, and CDN caches, and refresh the page to see if it returns to normal.
## Dashboard Cannot Start: panic: Unable to find the configured DDNS provider...
## Dashboard cannot startpanic: 无法找到配置的DDNS提供者...
The value entered for the DDNS provider is incorrect. Currently, only `webhook`, `cloudflare`, `tencentcloud`, and `dummy` are supported.
## Dashboard DDNS Update Crash: panic: interface conversion: interface {} is nil, not []interface {}
## Dashboard crashes when updating DDNS: panic: interface conversion: interface {} is nil, not []interface {}
The DDNS `AccessID` or `AccessSecret` filled is incorrect.
The entered DDNS `AccessID` or `AccessSecret` is incorrect.
## Network Monitoring Page Shows: server monitor history not found
This error indicates that no TCP-Ping or ICMP-Ping type monitoring has been set in the services page or monitoring data has not yet been generated.
If it has been set up, wait for some time and then check again.

View File

@ -1,41 +1,58 @@
## Page refuses to connect or timeout after login callback
1. Your server cannot connect to Github, consider trying several times or switching to Gitlab.
2. You have configured the wrong callback URL, make sure your callback URL is correct and **port and protocol** are correct!
3. An unknown error occurred in Dashboard, you can use the script to check the logs.
---
outline: deep
---
## Stuck Page/Connection Refused/Long Response Time After Login Callback
These issues can manifest in various ways, but ultimately the browser cannot display correctly after login.
1. Your server cannot connect to Github/Gitee, which is most common when configuring Github on servers in mainland China. You may try several times or switch to Cloudflare Access.
2. You have configured the callback address incorrectly. Ensure that your callback address is correct and that both the **port and protocol** are accurate!
3. An unknown error occurred on the Dashboard. You can use a script to check the logs.
::: tip
What is a protocol?
In the browser, your domain name ending with `://` is the protocol, usually `http` and `https`. Since the Dashboard may be accessible by multiple protocols + domain + port combinations under normal deployment, please make sure to choose the most appropriate one as the callback.
In the browser, the string that ends your domain with `://` is the protocol, usually `http` or `https`. Since there may be multiple protocol+domain+port combinations available for accessing the Dashboard in a normal deployment, make sure to choose the most appropriate one as the callback.
:::
### How do I check if my callback URL is wrong?
Please make sure the protocol+domain+port displayed by your browser before login and the protocol+domain+port you jump to after login are the same.
Please make sure your path is `/oauth2/callback`, **all lowercase**.
### How to Check if My Callback Address is Wrong?
Ensure that the protocol+domain+port displayed in the browser before login and after the callback are consistent.
Ensure that your path is `/oauth2/callback`, **all in lowercase**.
## Errors After Logging into the Admin Panel
## Dashboard errors after login
### http: named cookie not present
1. Clear your browser cookies and log in again, or change your browser.
2. Check the callback address to ensure that your callback address is correct and that both **the port and protocol** are correct! The address from which the request is initiated needs to be in the same domain as the callback address, and the port, protocol, and domain name (or IP) all need to be consistent.
1. Clear cookies and log in again, or try a different browser.
2. Check the callback address to ensure it is correct and that both the **port and protocol** are accurate! The address initiating the request must be in the same domain as the callback address, with the port, protocol, and domain (or IP) all matching.
### lookup xxx
DNS resolution failure, in most cases, is due to iptables-related configuration changes.
It is recommended to restart docker first, `sudo systemctl restart docker`, and then use the script to restart the Dashboard.
If the lookup error still occurs, it is recommended to check whether there are other tools to control iptables, such as Aapanel Firewall.
This problem may also be related to the kernel, please try to change the official kernel.
### The authorization method is invalid, or the login callback URL is invalid, expired, or has been revoked
Suggest changing the authentication method to Github/Gitlab.
The container DNS resolution failed, usually due to modified iptables configurations.
It is recommended to restart Docker first, `sudo systemctl restart docker`, then restart the Dashboard using the script.
If the lookup error persists, check if there are other tools controlling iptables, such as firewall.
This issue might also be related to the kernel, so try switching to the official kernel.
### Invalid authorization method, or the login callback address is invalid, expired, or has been revoked
This issue appears only when using Gitee login, and the reason is unclear. Switching to GitHub is recommended.
### oauth2: server response missing access_token
It may be caused by a number of factors, the most likely is a network problem, we suggest to check the network and retry.
If you can't solve it, we suggest changing the authentication method to Github/Gitlab.
### This user is not the administrator or cannot login
You have logged into the wrong account or configured the wrong username, note that **username is not email**, you can use a script to modify it.
This could be caused by various factors, most likely a network issue. Check your network and try again.
If unresolved, switching to Github or another method is recommended.
### The user is not an admin of this site and cannot log in
You logged in with the wrong account or configured the wrong username. Note that **the username is not an email**, and you can use a script to modify it.
For Cloudflare Access users, note that your username is not an email but a User ID.
### dial tcp xxx:443 i/o timeout
If the server has network problems, you can restart docker first, `sudo systemctl restart docker`, and then use the script to restart the Dashboard.
You can also change to another OAuth method if necessary.
This is a network issue. Try restarting Docker first, `sudo systemctl restart docker`, then restart the Dashboard using the script.
If you are configuring Github login on a server in mainland China, switching to Cloudflare Access is recommended to avoid network interference.
### net/http: TLS handshake timeout
Same as above.

View File

@ -3,15 +3,19 @@ outline: deep
---
## 后台显示的 IP 和 Agent 实际 IP 不一致?
请查看 [Dashboard 相关-为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?](/guide/dashboardq.html#为什么管理面板中显示的ip和agent实际ip不一致)
在此不再赘述。
请查看 [Dashboard 相关-为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?](/guide/dashboardq.html#为什么管理面板中显示的ip和agent实际ip不一致)。在此不再赘述。
## 一键脚本安装时出错
### curl: Failed to connect to raw.githubusercontent.com......
多出现在国内主机中,目前一键脚本只从 Github 直接获取安装脚本,您可以多尝试几次,或者[手动安装 Agent](/guide/agent.html#其他方式安装agent)。
另外,也可以自行寻找第三方 Github 加速服务或者镜像,并在一键安装脚本中设置。
多出现在中国大陆的服务器中,目前一键脚本只从 Github 直接获取安装脚本,您可以多尝试几次,或者[手动安装 Agent](/guide/agent.html#其他方式安装agent)。另外,也可以自行寻找第三方 Github 加速服务或者镜像,并在一键安装脚本中设置。
### sudo: command not found
请先手动安装 sudo。
请先手动安装 sudo例如在 Ubuntu 中:
```shell
apt install sudo
```

View File

@ -3,13 +3,16 @@ outline: deep
---
## 为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?
首先解释管理面板中显示的IP是怎么得到的Agent 会每隔一段时间请求一遍 IP-API获取到 IP 信息后上报到 Dashboard目前使用的 IP-API 可在此查看:[myip.go](https://github.com/nezhahq/agent/blob/main/pkg/monitor/myip.go)。
如您发现管理面板中显示的 IP 和服务商提供给您的 IP 不一致,最大的可能是服务商给您的是**入口 IP**,但 Agent 测试的是您的**出口 IP**。这个问题也可能会出现在多线服务器和 IPLC 专线中。
::: tip
举个简单也十分常见的例子,服务商给您提供的是一台高防服务器,为了同时满足高防和低网络中断率的目标,提供给您的 IP 可能是经过映射后的高防 IP 而并非您服务器的真实出口 IP
举个简单也十分常见的例子,服务商给您提供的是一台高防服务器,为了同时满足高防和低网络中断率的目标,提供给您的 IP 可能是经过映射后的高防 IP 而并非您服务器的真实出口 IP
:::
您也可以在 Agent 服务器中运行以下命令测试出口IP:
您也可以在 Agent 服务器中运行以下命令测试出口 IP:
```shell
curl https://ipapi.co/ip/
curl ip.sb
@ -17,45 +20,57 @@ curl ip-api.com
```
## 忘记查看密码\删除查看密码
请查看或编辑 `/opt/nezha/dashboard/data/config.yaml` 文件。
密码位于 site-viewpassword 项中。
密码位于 `site-viewpassword` 项中。
## 面板安装/重启/更新失败: iptables ......
首先尝试重启 Docker 再操作
首先尝试重启 Docker 再操作:
```shell
systemctl status docker
systemctl restart docker
systemctl status docker
```
重启后尝试重新安装面板。
若依然出现 iptables... 等错误,则考虑直接关闭 iptables 甚至移除 iptables。
这个问题也可能与内核有关,也可以尝试更换官方内核。
## 面板重启失败Invalid hostPort: nz_site_port 等
如出现可以通过安装脚本修改配置,或者直接修改 `/opt/nezha/dashboard/docker-compose.yaml`文件。
如出现此问题,可以通过安装脚本修改配置,或者直接修改 `/opt/nezha/dashboard/docker-compose.yaml` 文件。
## 面板布局错误、CSS 资源无法被加载
如果出现 Dashboard 页面布局出现错误,通常的原因是 CSS 文件丢失或无法被加载
出现此类错误,可以先尝试 `重启并更新面板`
如果更新面板后问题没有得到解决,那么可能是你的 vhost 配置文件内有不适用的配置,你可以编辑 NginX 的 vhost 文件或在宝塔面板内:
1. 在`网站`中找到安装 Dashboard 时配置的站点,点击右侧`设置`
2. 选择`配置文件`,删除配置文件中的:
````nginx
location ~ .*\.(js|css)?$
{
expires 12h;
error_log /dev/null;
access_log /dev/null;
}
````
3. 保存配置并清空浏览器、NginX、CDN 中的缓存,此时刷新页面应恢复正常
## 面板无法启动panic: 无法找到配置的DDNS提供者...
填入的DDNS provider的值有误目前仅支持 `webhook``cloudflare``tencentcloud``dummy`
如果出现 Dashboard 页面布局错误,通常是 CSS 文件丢失或无法被加载。
出现此类错误,可以先尝试 `重启并更新面板`
如果更新面板后问题没有得到解决,那么可能是你的 vhost 配置文件内有不适用的配置,你可以编辑 Nginx 的 vhost 文件或在宝塔面板内:
## 面板更新DDNS崩溃panic: interface conversion: interface {} is nil, not []interface {}
填入的DDNS `AccessID``AccessSecret` 有误。
1. 在 `网站` 中找到安装 Dashboard 时配置的站点,点击右侧 `设置`
2. 选择 `配置文件`,删除配置文件中的:
```nginx
location ~ .*\.(js|css)?$
{
expires 12h;
error_log /dev/null;
access_log /dev/null;
}
```
3. 保存配置并清空浏览器、Nginx、CDN 中的缓存,此时刷新页面应恢复正常。
## 面板无法启动panic: 无法找到配置的 DDNS 提供者...
填入的 DDNS provider 的值有误,目前仅支持 `webhook``cloudflare``tencentcloud``dummy`
## 面板更新 DDNS 崩溃panic: interface conversion: interface {} is nil, not []interface {}
填入的 DDNS `AccessID``AccessSecret` 有误。
## 打开网络监控页显示server monitor history not found
出现此错误说明没有在服务页中设置 TCP-Ping 和 ICMP-Ping 类型的监控或者监控数据还未生成。
如已经设置完毕,可以等待一段时间后再查看。

View File

@ -3,45 +3,56 @@ outline: deep
---
## 登录回调后页面卡住\拒绝连接\响应时间过长
还有其他一些表现形式,总之登录后浏览器无法正常显示。
1. 您的服务器无法连接到 Github/Gitee最常见于国内服务器配置 Github 情况下,可以考虑多尝试几次或者切换到 Cloudflare Access。
2. 您配置错了回调地址,确保您的回调地址正确且**端口与协议**均正确!
3. Dashboard 发生未知错误,您可以使用脚本查看日志。
::: tip
什么是协议?
在浏览器中,您的域名以`://`结尾的字符串即为协议,通常为 `http``https` 两种。由于正常部署情况下面板可能有多种协议+域名+端口组合均可访问,请务必选一个最合适的作为回调。
在浏览器中,您的域名以 `://` 结尾的字符串即为协议,通常为 `http``https` 两种。由于正常部署情况下面板可能有多种协议+域名+端口组合均可访问,请务必选一个最合适的作为回调。
:::
### 如何检查我的回调地址是否错误?
请确保登录前浏览器显示的协议+域名+端口和登录后跳转到的协议+域名+端口一致。
请确保您的路径为`/oauth2/callback`**全部小写**
请确保您的路径为 `/oauth2/callback`**全部小写**
## 登录后面板报错
### http: named cookie not present
1. 清理 cookies 后重新登录,或换个浏览器
1. 清理 cookies 后重新登录,或换个浏览器。
2. 检查回调地址,确保您的回调地址正确且**端口与协议**均正确!发起请求的地址需要和回调地址处于同域,端口、协议和域名(或IP)都需要一致。
### lookup xxx
容器DNS解析失败多数情况下为修改了iptables相关配置。
建议先重启docker`sudo systemctl restart docker`,再使用脚本重启面板。
仍然出现lookup错误建议查看是否有其他控制iptables的工具如宝塔防火墙等。
容器 DNS 解析失败,多数情况下为修改了 iptables 相关配置。
建议先重启 docker`sudo systemctl restart docker`,再使用脚本重启面板。
仍然出现 lookup 错误建议查看是否有其他控制 iptables 的工具,如宝塔防火墙等。
这个问题也可能与内核有关系,请尝试更换官方内核。
### 授权方式无效,或者登录回调地址无效、过期或已被撤销
只出现在 Gitee 登录方式中,原因不明,建议更换到 GitHub。
### oauth2: server response missing access_token
可能由多种因素引起,最大可能性是网络问题,建议检查网络后重试。
无法解决的话建议更换 Github 等。
### 该用户不是本站点管理员,无法登录
您登陆错了账号或者配置错了用户名,注意**用户名不是邮箱**,可使用脚本修改。
Cloudflare Access 用户请注意您的用户名不是邮箱而是User ID。
Cloudflare Access 用户请注意,您的用户名不是邮箱,而是 User ID。
### dial tcp xxx:443 i/o timeout
网络问题,可先重启 Docker`sudo systemctl restart docker`,再使用脚本重启面板。
如为国内服务器配置 Github 登陆方式,则建议切换到 Cloudflare Access 以避免网络干扰。
### net/http: TLS handshake timeout
同上。