私有雲版本 4.17.09 版本
邊緣節點是透過 Nginx 路由器實作。在邊緣升級程序期間,或是您變更路由器設定時,可能會看到 Nginx 設定錯誤。發生這些錯誤時,Edge 會寫入導致問題到 /opt/nginx/conf.d
的 Nginx 設定檔。接著,您可以使用 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
」資料夾中應該不會再顯示錯誤設定檔。