私有雲版本 4.17.05 版本
邊緣節點是透過 Nginx 路由器實作。在邊緣升級程序期間,或是您變更路由器設定時,可能會看到 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_anger_buffers_size" 必須等於或大於「proxy_buffer_option 」的最大值 - 編輯 /opt/apigee/customer/application/router.properties,將 conf_load_balancing_load.balancing.driver.proxy.anger.buffer.size 設為 128k。
- 已移除 /opt/nginx/conf.d 資料夾:
> rm -rf /opt/nginx/conf.d - 重新啟動路由器:
> /opt/apigee/apigee-service/bin/apigee-servce Edge-router restart - /opt/nginx/conf.d 資料夾中應該不會再顯示錯誤設定檔。