检查节点连接 (AEN 4.1.3)#

当AEN节点无法按预期相互通信时,可能会导致您的AEN平台安装出现问题。

验证服务器到网关的连接

  1. 在服务器上,在AEN导航栏中,点击Admin以打开Admin设置页面。

  2. 站点管理菜单中,选择数据中心:

    ../../../../_images/ae-notebooks/4.1.3/aen-admin-admin_datacenter1.png

  3. 对于列表中的每个数据中心,检查从服务器到该网关的连接性。

    示例:本例中的网关是 http://gateway.example.com:8089:

    root@server # curl --connect-timeout 5 http://gateway.example.com:8089 > /dev/null
    

验证网关到计算节点的连接性

  1. 在服务器上,在AEN导航栏中,点击Admin以打开管理设置页面。

  2. Providers菜单中,选择企业资源:

    ../../../../_images/ae-notebooks/4.1.3/aen-admin-admin_enterpriseresources.png

  3. 在资源部分打开每个计算节点。

  4. 验证URL字段的内容是否以httphttps开头。

    ../../../../_images/ae-notebooks/4.1.3/aen-admin-admin_er_editresource.png

  5. 从相应的网关检查到该URL的连接性。

    示例:本例中的网关是 http://gateway.example.com:8089

    root@gateway # curl --connect-timeout 5 http://compute.example.com:5002 > /dev/null
    

验证网关到服务器的连接

网关到服务器的路径由网关配置命令 wk-gateway-configure 使用。

  1. 验证网关是否在配置文件中链接到正确的服务器。

  2. 验证是否指定了完整的服务器URL。

  3. 检查与服务器的连接:

    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
    
  4. 如果连接失败:

    1. 确保在服务器上正确配置了网关(数据中心)和计算节点(企业资源)。

    2. 验证进程是否在配置的端口上监听:

      $ 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
      
    3. 检查两台主机上的防火墙设置和日志,确保数据包没有被阻止或丢弃。