OpenResty Edge™ 自检工具的使用方法
1. 下载
curl -O https://openresty.com/client/oredge/openresty-edge-self-check.sh
2. 使用
运行自检工具前,我们需要把工具传输到目标机器上。
2.1 默认模式
sudo bash openresty-edge-self-check.sh
2.2 详细模式
sudo bash openresty-edge-self-check.sh -v
3. 案例
3.1 案例一
sudo bash openresty-edge-self-check.sh -v
[INFO] Processor: 32
[INFO] Memory: 32 GB
[INFO] Disk:
[INFO] Filesystem Size Use%
[INFO] /dev/sda2 50G 3%
[INFO] Firewall is disabled.
[INFO] Internet(IPv4) is up.
[INFO] The or-client.crt and or-client.key is match.
[INFO] The certificate or-client.crt remaining time greater than 30 days.
[INFO] openresty-edge-node is installed.
[INFO] oredge-node is running.
[INFO] oredge-node is listening on ports: 20717 8090 8091 11212.
[WARN] oredge-node is not listening on ports: 80 443 11212 8090 8091.
[WARN] There are error logs in /usr/local/oredge-node/logs/error.log, please confirm.
[INFO] Connect to openresty package server(pkg.openresty.com:443), Succeeded.
[INFO] Connect to Edge Admin(xx.xx.xx.xx:xxxx), Succeeded.
[INFO] Connect to Edge Log Server(xx.xx.xx.xx:xxxx), Succeeded.
[WARN] For more information: https://doc.openresty.com/en/edge-admin/troubleshooting
我们主要关注 WARN 级别的输出,可以看到提示:
- Edge Node 进程没有在监听预期会监听的端口;
- 日志文件中有错误日志,需要检查一下;
- 展示了一个帮助页,这是由于有需要我们确认的内容。
优先查看错误日志,看是否有明显的错误消息; 然后到帮助页去看是否有对应的解决方案; 最后如果问题还无法解决,请直接联系我们。
3.2 案例二
sudo bash openresty-edge-self-check.sh -v
[INFO] Processor: 2
[INFO] Memory: 4 GB
[INFO] Disk:
[INFO] Filesystem Size Use%
[INFO] /dev/xvda1 40G 16%
[INFO] Firewall is disabled.
[INFO] Internet(IPv4) is up.
[INFO] The or-client.crt and or-client.key is match.
[INFO] The certificate or-client.crt remaining time greater than 30 days.
[INFO] openresty-edge-node is installed.
[INFO] oredge-node is running.
[INFO] oredge-node is listening on ports: 10808 8090 443 8091 12000 9090 11212 80 81.
[INFO] Connect to openresty package server(pkg.openresty.com:443), Succeeded.
[INFO] Connect to Edge Admin(xx.xx.xx.xx:xxxx), Succeeded.
[INFO] Connect to Edge Log Server(xx.xx.xx.xx:xxxx), Succeeded.
这个案例中所有检查都通过了。