检查节点连接#

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

验证服务器到网关的连接#

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

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

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

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

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

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

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

  2. 提供商菜单中,选择“企业资源”

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

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

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