<ph type="x-smartling-placeholder"></ph>
您正在查看 Apigee Edge 文档。
转到
Apigee X 文档。 信息
问题
通过 Edge 界面或 Edge Management API 部署 API 代理修订版本失败,并显示 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 公有云上,请与 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
- 如果您观察到类似上例所示的错误,请执行以下操作:
步骤:
<ph type="x-smartling-placeholder">
- </ph>
- 在端口 2181 上测试从消息处理器到 ZooKeeper 服务器的连接
:
<ph type="x-smartling-placeholder">
- </ph>
- 如果 telnet 可用,则使用 telnet:
telnet <ZooKeeper-IP> 2181
- 如果 telnet 不可用,请使用 netcat 检查连接,如下所示:
nc -vz <ZooKeeper-IP> 2181
- 如果您收到“连接遭拒”的响应或“连接超时”, 网络运营团队转到下面的解决方法部分。
- 如果 telnet 可用,则使用 telnet:
- 在端口 2181 上测试从消息处理器到 ZooKeeper 服务器的连接
:
<ph type="x-smartling-placeholder">
- 如果您观察到任何其他情况,请与 Apigee Edge 支持团队联系。
分辨率
注意:只有 Edge Private Cloud 用户可以执行以下步骤。如果您 位于 Edge 公有云上,请与 Apigee Edge 支持联系。
- 与您的广告联盟团队合作,共同完成以下事项:
<ph type="x-smartling-placeholder">
- </ph>
-
- 确保消息处理器和所有 ZooKeeper 之间允许连接 在端口 2181 上部署节点
- 移除消息处理器中的所有防火墙限制或安全规则设置, 允许连接到 ZooKeeper 服务器上的端口 2181。
- 如果消息处理器出现网络问题,
根据部署状态输出,显示错误的消息处理器可能会修复
问题。重启特定消息处理器:
/opt/apigee/apigee-service/bin/apigee-service edge-message-processor restart
如果问题仍然存在,请与 Apigee Edge 支持团队联系。
-