Edge for Private Cloud v4.18.01
边缘路由器是使用 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
此值不符合要求。
要修正该错误,请执行以下操作:
- 从 /opt/nginx/conf.d 文件夹中的文件名中移除 .bad 后缀,使其以 .conf 结尾。
- 运行 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 - 修改 /opt/apigee/customer/application/router.properties,将 conf_load_balancing_load.balancing.driver.proxy.busy.buffer.size 设置为 128k。
- 移除了 /opt/nginx/conf.d 文件夹:
> rm -rf /opt/nginx/conf.d - 重启路由器:
> /opt/apigee/apigee-service/bin/apigee-service edge-router restart - 您应该不会再在 /opt/nginx/conf.d 文件夹中看到错误的配置文件。