检查节点连接

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

验证服务器到网关的连通性

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

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

    ../../../../_images/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 导航栏中,单击“管理”以打开“管理设置”页面。

  2. 提供者菜单中,选择企业资源:

    ../../../../_images/aen-admin-admin_enterpriseresources.png

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

  4. 验证 URL 字段的内容是否以http或开头 https

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