排查边缘路由器问题

适用于私有云的 Edge v. 4.17.09

边缘路由器使用 Nginx 路由器实现。在 Edge 升级过程中,或者 更改路由器配置时,可能会看到 Nginx 配置错误。时间 Edge 会将导致此问题的 Nginx 配置文件写入到 /opt/nginx/conf.d。然后,您可以 使用 Nginx configtest 工具 以确定错误的原因。

例如,您在检查 /opt/nginx/conf.d 并看到以下内容 文件:

-rw-r--r-- 1 apigee apigee 522 Jul 20 08:41 0-default.conf.bad 
-rw-r--r-- 1 apigee apigee 577 Jul 20 08:42 0-fallback.conf
-rw-r--r-- 1 apigee apigee 1062 Jul 20 08:18 0-map.conf
-rw-r--r-- 1 apigee apigee 1887 Jul 20 08:42 custorg_test_default.conf.bad

请注意有几个文件的后缀为 .bad

导致这些错误通常是因为您对 /opt/apigee/customer/application/router.properties 或您对虚拟主机进行了错误的更改。例如,您添加了以下内容:

conf_load_balancing_load.balancing.driver.proxy.busy.buffer.size=32k

不允许使用此值。

要修正该错误,请执行以下操作:

  1. .bad /opt/nginx/conf.d 个文件夹 因此它们以.conf结尾
  2. 运行 Nginx configtest 工具显示失败原因:
    /opt/nginx/scripts/apigee-nginx configtest

    您将看到以下格式的输出:

    nginx: [emerg]
      "proxy_busy_buffers_size" must be equal to or greater than the maximum of the value of
      "proxy_buffer_size" and one of the "proxy_buffers" in /opt/nginx/conf/nginx.conf:47
  3. 修改 /opt/apigee/customer/application/router.properties 进行设置 conf_load_balancing_load.balancing.driver.proxy.busy.buffer.size 到 128k。
  4. 移除了 /opt/nginx/conf.d 目录:
    rm -rf /opt/nginx/conf.d
  5. 重启路由器:
    /opt/apigee/apigee-service/bin/apigee-service edge-router restart
  6. 您应该不会再在 /opt/nginx/conf.d 中看到错误的配置文件 文件夹中。