联网环境变化后prometheus无法启动
Organization Name: Advantech
Short summary about the issue/question:在有外网连接的情况下安装openPAI,安装成功后,把外网的网线拔出,只保留内网。这时候,openPAI的prometheus无法启动。watchdog报错,提示: request cancelled。然后再把外网网线插回,prometheus又可以启动了,watchdog可以正常启动。
使用curl http://
Brief what process you are following:
How to reproduce it:
OpenPAI Environment: cluster
- OpenPAI version: 0.8.3
- Cloud provider or hardware configuration:
- OS (e.g. from /etc/os-release):
- Kernel (e.g.
uname -a): - Hardware (e.g. core number, memory size, storage size, GPU type etc.):
- Others:
Anything else we need to know:
prometheus 不能启动,显示的日志是什么?
watchdog 的日志能贴完整些么?
prometheus的log看起来正常,但是curl http://
prometheus listen 的是 9091,不是 9101,9101 是 watchdog listen 的,你给的日志是说 watchdog 无法 listen 那个端口,因为被占用,9101 无法在这种情况下 curl 是正常的。
你可以通过浏览器访问 9091 端口看是否能访问 prometheus。
你能看看是哪个进程在 listen 9101 端口么?
[图片]
我们的Ubuntu里面只有openpai,手动kill掉这个占用9101的进程也不行,watchdog的日志如下: 2019-02-18 02:52:12,806 - WARNING - watchdog.py:169 - unkown pod batch-job-hadoop-shfmm 2019-02-18 02:52:12,807 - WARNING - watchdog.py:169 - unkown pod etcd-server-10.0.64.14 2019-02-18 02:52:12,832 - INFO - transport.py:1746 - Connected (version 2.0, client OpenSSH_7.2p2) 2019-02-18 02:52:12,955 - INFO - transport.py:1746 - Authentication (password) successful! 2019-02-18 02:52:12,960 - INFO - watchdog.py:140 - Executing the command on host [10.0.64.14]: sudo systemctl is-active docker | if [ $? -eq 0 ]; then echo "active"; else exit 1 ; fi 2019-02-18 02:52:13,206 - INFO - transport.py:1746 - Connected (version 2.0, client OpenSSH_7.2p2) 2019-02-18 02:52:13,318 - INFO - transport.py:1746 - Authentication (password) successful! 2019-02-18 02:52:13,323 - INFO - watchdog.py:140 - Executing the command on host [10.0.64.15]: sudo systemctl is-active docker | if [ $? -eq 0 ]; then echo "active"; else exit 1 ; fi 2019-02-18 02:52:13,570 - INFO - transport.py:1746 - Connected (version 2.0, client OpenSSH_7.2p2) 2019-02-18 02:52:13,642 - INFO - transport.py:1746 - Authentication (password) successful! 2019-02-18 02:52:13,655 - INFO - watchdog.py:140 - Executing the command on host [10.0.64.16]: sudo systemctl is-active docker | if [ $? -eq 0 ]; then echo "active"; else exit 1 ; fi 2019-02-18 02:52:43,974 - WARNING - watchdog.py:169 - unkown pod batch-job-hadoop-shfmm 2019-02-18 02:52:43,975 - WARNING - watchdog.py:169 - unkown pod etcd-server-10.0.64.14 2019-02-18 02:52:44,003 - INFO - transport.py:1746 - Connected (version 2.0, client OpenSSH_7.2p2) 2019-02-18 02:52:44,115 - INFO - transport.py:1746 - Authentication (password) successful! 2019-02-18 02:52:44,122 - INFO - watchdog.py:140 - Executing the command on host [10.0.64.14]: sudo systemctl is-active docker | if [ $? -eq 0 ]; then echo "active"; else exit 1 ; fi 2019-02-18 02:52:44,367 - INFO - transport.py:1746 - Connected (version 2.0, client OpenSSH_7.2p2) 2019-02-18 02:52:44,437 - INFO - transport.py:1746 - Authentication (password) successful! 2019-02-18 02:52:44,452 - INFO - watchdog.py:140 - Executing the command on host [10.0.64.15]: sudo systemctl is-active docker | if [ $? -eq 0 ]; then echo "active"; else exit 1 ; fi 2019-02-18 02:52:44,703 - INFO - transport.py:1746 - Connected (version 2.0, client OpenSSH_7.2p2) 2019-02-18 02:52:44,811 - INFO - transport.py:1746 - Authentication (password) successful! 2019-02-18 02:52:44,819 - INFO - watchdog.py:140 - Executing the command on host [10.0.64.16]: sudo systemctl is-active docker | if [ $? -eq 0 ]; then echo "active"; else exit 1 ; fi
你的这个日志是 watchdog 正常启动的
另外,你的配置文件里面是不是写的外网地址,你用内网地址重新部署下试试?
K8s的watchdog上显示: Back-off restarting failed container Readiness probe failed: Get http://10.0.64.14:9101/: net/http: request canceled (Client.Timeout exceeded while awaiting headers) 并没有启动成功,我们确定是使用Openstack internal IP部署的
这个 http://10.0.64.14:9101/ 是你们的内网还是外网?
这个是内网
这个可能是由于 make_server 的第一个参数的问题,pai 使用的是空字符串,可能会绑定到外网的网卡上,关于这点你能验证下么?
我们在 0.9 版本切换到了 twisted。你可以试试 0.9 是不是可以解决这个问题。
@hellocandy - upgrade to 0.9.0 guide is in the release note: https://github.com/Microsoft/pai/releases/tag/v0.9.0
我们的部署环境断开外网是从集群的上一层断掉的,Cluster IP在断网前后不会产生变化。