查看 Apigee Edge 說明文件。
前往
Apigee X說明文件。 資訊
問題
透過 Edge UI 或 Edge Management API 部署 API Proxy 修訂版本會失敗,並失敗 ZooKeeper 錯誤「擷取路徑的子項時發生錯誤」。
錯誤訊息
Error in deployment for environment prod. The revision is deployed, but traffic cannot flow. com.apigee.repository.RepositoryException{ code = repository.zookeeper.UnExpectedError, message = Unexpected error Error while fetching children for path : /organizations/myorg/environments/prod/apiproxies/tinkerbell/revisions, associated contexts = []};
可能原因
這項錯誤的常見原因是訊息處理器之間的網路連線問題 以及 ZooKeeper。
診斷
注意:只有 Edge Private Cloud 使用者可以執行下列步驟。如果發生以下情況: 已在 Edge Public Cloud 中,請與 Apigee Edge 支援團隊聯絡。
- 使用
下列 Management API 呼叫:
curl -v http://<management-server-IPaddress>:<port#>/organizations/<orgname>/environments/<envname>/apis/<apiname>/deployments -u <username>
顯示錯誤訊息的部署狀態輸出範例:
{ "environment" : [ { "name" : "prod", "revision" : [ { "configuration" : { "basePath" : "/", "steps" : [ ] }, "name" : "1", "server" : [ { "error" : "com.apigee.repository.RepositoryException: com.apigee.zookeeper.ZooKeeperException{ code = zookeeper.ErrorFetchingChildren, message = Error while fetching children for path : /organizations/gsc/environments/prod/apiproxies/apigee_test/revisions, associated contexts = []}", "status" : "error", "type" : [ "message-processor" ], "uUID" : "01fc5b23-8ad3-40bf-b059-2fc82cdac111" },
- 檢查訊息處理器
(
/opt/apigee/var/log/edge-message-processor/system.log
)。訊息處理器記錄中的錯誤範例
2017-05-29 01:25:40,592 main ERROR KERNEL - MicroKernel.deployAll() : MicroKernel.deployAll() : Error in deploying the deployment : WebService com.apigee.zookeeper.ZooKeeperException: Error while checking path existence for path : /regions/dc-2/pods/gateway/servers/099c2603-93a4-4b73-ae03-a55d130adb80/reachable at com.apigee.zookeeper.impl.ZooKeeperServiceImpl.exists(ZooKeeperServiceImpl.java:410) ~[zookeeper-1.0.0.jar:na] at com.apigee.zookeeper.impl.ZooKeeperServiceImpl.exists(ZooKeeperServiceImpl.java:394) ~[zookeeper-1.0.0.jar:na] at com.apigee.services.repository.zookeeper.ZKRepository.exists(ZKRepository.java:280) ~[repository-impl-1.0.0.jar:na] at com.apigee.services.repository.RepositoryServiceImpl.exists(RepositoryServiceImpl.java:234) ~[repository-impl-1.0.0.jar:na] at com.apigee.registration.info.StatusBuilder.build(StatusBuilder.java:26) ~[registration-1.0.0.jar:na] at com.apigee.registration.ServerRegistrationServiceImpl.buildServerInfo(ServerRegistrationServiceImpl.java:856) ~[registration-1.0.0.jar:na] at com.apigee.registration.ServerRegistrationServiceImpl.start(ServerRegistrationServiceImpl.java:122) ~[registration-1.0.0.jar:na] at com.apigee.kernel.service.deployment.ServiceDeployer.startService(ServiceDeployer.java:167) ~[microkernel-1.0.0.jar:na] at com.apigee.kernel.service.deployment.ServiceDeployer.deploy(ServiceDeployer.java:70) ~[microkernel-1.0.0.jar:na] at com.apigee.kernel.service.deployment.ServiceDeployer.deployDependantServices(ServiceDeployer.java:356) ~[microkernel-1.0.0.jar:na] at com.apigee.kernel.service.deployment.ServiceDeployer.deploy(ServiceDeployer.java:76) ~[microkernel-1.0.0.jar:na] at com.apigee.kernel.service.deployment.ServiceDeployer.deployDependantServices(ServiceDeployer.java:356) ~[microkernel-1.0.0.jar:na] at com.apigee.kernel.service.deployment.ServiceDeployer.deploy(ServiceDeployer.java:76) ~[microkernel-1.0.0.jar:na] at com.apigee.kernel.MicroKernel.deployAll(MicroKernel.java:178) [microkernel-1.0.0.jar:na] at com.apigee.kernel.MicroKernel.start(MicroKernel.java:139) [microkernel-1.0.0.jar:na] at com.apigee.kernel.MicroKernel.start(MicroKernel.java:135) [microkernel-1.0.0.jar:na] at com.apigee.kernel.MicroKernel.main(MicroKernel.java:84) [microkernel-1.0.0.jar:na] Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /regions/dc-2/pods/gateway/servers/099c2603-93a4-4b73-ae03-a55d130adb80/reachable at org.apache.zookeeper.KeeperException.create(KeeperException.java:99) ~[zookeeper-3.4.6.jar:3.4.6-1569965] at org.apache.zookeeper.KeeperException.create(KeeperException.java:51) ~[zookeeper-3.4.6.jar:3.4.6-1569965] at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1045) ~[zookeeper-3.4.6.jar:3.4.6-1569965] at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1073) ~[zookeeper-3.4.6.jar:3.4.6-1569965] at com.apigee.zookeeper.impl.ZooKeeperServiceImpl.exists(ZooKeeperServiceImpl.java:402) ~[zookeeper-1.0.0.jar:na] ... 16 common frames omitted
- 如果您發現與上述範例類似的錯誤,請執行以下程式碼:
步驟:
- 測試從 Message Processor 到 ZooKeeper 伺服器 (位於通訊埠 2181) 的連線能力
步驟如下:
- 如果有 telnet,請使用 telnet:
telnet <ZooKeeper-IP> 2181
- 如果無法使用 telnet,請依照下列步驟使用 netcat 檢查連線:
nc -vz <ZooKeeper-IP> 2181
- 如果收到「Connection Refused」回應或「連線逾時」,請 網路營運團隊請參閱下方的「解析度」一節。
- 如果有 telnet,請使用 telnet:
- 測試從 Message Processor 到 ZooKeeper 伺服器 (位於通訊埠 2181) 的連線能力
步驟如下:
- 如果有其他問題,請與 Apigee Edge 支援團隊聯絡。
解析度
注意:只有 Edge Private Cloud 使用者可以執行下列步驟。如果發生以下情況: 已在 Edge Public Cloud 中,請與 Apigee Edge 支援團隊聯絡。
- 與聯播網團隊合作,達成以下目標:
-
- 確保訊息處理器與所有 ZooKeeper 之間可連線 通訊埠 2181 的節點
- 請將所有防火牆限製或安全性規則設定從郵件處理器中移除,以便: 允許連線至 ZooKeeper 伺服器上的通訊埠 2181。
- 如果訊息處理器發生網路問題,請重新啟動
顯示錯誤的訊息處理器 (如部署狀態輸出內容) 可能會修正
問題。重新啟動特定的訊息處理器:
/opt/apigee/apigee-service/bin/apigee-service edge-message-processor restart
如果問題仍未解決,請與 Apigee Edge 支援團隊聯絡。
-