检查节点连接 (AEN 4.1.3)#
当AEN节点无法按预期相互通信时,可能会导致您的AEN平台安装出现问题。
验证服务器到网关的连接¶
在服务器上,在AEN导航栏中,点击Admin以打开Admin设置页面。
在站点管理菜单中,选择数据中心:
对于列表中的每个数据中心,检查从服务器到该网关的连接性。
示例:本例中的网关是
http://gateway.example.com:8089
:root@server # curl --connect-timeout 5 http://gateway.example.com:8089 > /dev/null
验证网关到计算节点的连接性¶
在服务器上,在AEN导航栏中,点击Admin以打开管理设置页面。
在Providers菜单中,选择企业资源:
在资源部分打开每个计算节点。
验证URL字段的内容是否以
http
或https
开头。从相应的网关检查到该URL的连接性。
示例:本例中的网关是
http://gateway.example.com:8089
:root@gateway # curl --connect-timeout 5 http://compute.example.com:5002 > /dev/null
验证网关到服务器的连接¶
网关到服务器的路径由网关配置命令 wk-gateway-configure
使用。
验证网关是否在配置文件中链接到正确的服务器。
验证是否指定了完整的服务器URL。
检查与服务器的连接:
root@gateway # grep WAKARI_SERVER /opt/wakari/wakari-gateway/etc/wakari/wk-gateway-config.json "WAKARI_SERVER": "http://wakari.example.com", root@gateway # curl --connect-timeout 5 http://wakari.example.com > /dev/null root@gateway # curl --connect-timeout 5 http://error.example.com > /dev/null curl: (7) Failed to connect to error.example.com port 80: Connection refused
如果连接失败:
确保在服务器上正确配置了网关(数据中心)和计算节点(企业资源)。
验证进程是否在配置的端口上监听:
$ sudo netstat -nplt Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program tcp 0 0 *:80 *:* LISTEN 26409/nginx tcp 0 0 *:22 *:* LISTEN 986/sshd tcp 0 0 127.0.0.1:25 *:* LISTEN 1063/master tcp 0 0 *:5000 *:* LISTEN 26192/python tcp 0 0 127.0.0.1:27017 *:* LISTEN 29261/mongod tcp 0 0 *:22 *:* LISTEN 986/sshd tcp 0 0 127.0.0.1:25 *:* LISTEN 1063/master
检查两台主机上的防火墙设置和日志,确保数据包没有被阻止或丢弃。