Apache Geode Native Client 日志显示启动本机客户端时出现连接池错误

Apache Geode Native Client logs show a connection pool error on starting native client

我们 运行 一个本机客户端,当客户端启动时,我注意到缓存服务器日志中有一个 Failed to add endpoint to pool 错误。

我使用以下方法设置日志:

CacheFactory cacheFactory = new CacheFactory();
return cacheFactory
    .Set("log-file", "Geode.log")
    .Set("log-level", "ALL")
    .Set("name", "Dealer")
    .SetPdxReadSerialized(true)
    .Create();

Geode.log 文件显示如下:

[info 2020/09/03 12:40:57.906591 GMT Daylight Time ARGO:15580 11876] ClientMetadataService started for pool MyPool2
[debug 2020/09/03 12:40:57.986018 GMT Daylight Time ARGO:15580 25428] SerializationRegistry::deserialize typeId = -1 dsCode =  1
[debug 2020/09/03 12:40:57.986095 GMT Daylight Time ARGO:15580 25428] closing the connection locator1
[debug 2020/09/03 12:40:57.986117 GMT Daylight Time ARGO:15580 25428] closing the connection locator
[fine 2020/09/03 12:40:57.986205 GMT Daylight Time ARGO:15580 25428] Created new endpoint 1.2.3.4:40404 for pool MyPool2
[error 2020/09/03 12:40:57.986256 GMT Daylight Time ARGO:15580 25428] Failed to add endpoint 1.2.3.4:40404 to pool MyPool2
[debug 2020/09/03 12:40:57.986285 GMT Daylight Time ARGO:15580 25428] ThinClientRedundancyManager::maintainRedundancyLevel(): checking redundant list, size = 0
[debug 2020/09/03 12:40:57.986303 GMT Daylight Time ARGO:15580 25428] ThinClientRedundancyManager::maintainRedundancyLevel(): finding nonredundant endpoints, size = 1
[fine 2020/09/03 12:40:57.986321 GMT Daylight Time ARGO:15580 25428] Recovering subscriptions on endpoint [1.2.3.4:40404] from pool MyPool2
[fine 2020/09/03 12:40:57.986339 GMT Daylight Time ARGO:15580 25428] TcrEndpoint::createNewConnection: connectTimeout = m_needToConnectInLock=59000000 appThreadRequest =0
[debug 2020/09/03 12:40:57.986361 GMT Daylight Time ARGO:15580 25428] Tcrconnection const isSecondary = 0 and isClientNotification = 0, this = 00000202EDBAD790,  conn ref to endopint 1
[finest 2020/09/03 12:40:57.986438 GMT Daylight Time ARGO:15580 25428] Using socket send buffer size of 64240.
[finest 2020/09/03 12:40:57.986465 GMT Daylight Time ARGO:15580 25428] Using socket receive buffer size of 64240.
[debug 2020/09/03 12:40:57.986482 GMT Daylight Time ARGO:15580 25428] Creating plain socket stream

有人可以解释为什么我们会在这里看到错误吗?执行的代码在 ThinClientPoolDM.cpp 但错误似乎对客户端没有任何影响,我们可以看到 确实 建立了连接。虽然服务器端点似乎没有添加到处于 error 状态的池中,但我们几乎可以在说 recovering subscriptions on endpoint 后立即看到一条 fine 消息,它是同一个端点。

此代码中存在一个长期存在的错误,导致它在成功时在此处记录失败,vice-versa,这很可能是您遇到的问题。此问题已于 2020 年 4 月 6 日作为 GEODE-7930 的 PR #588 的一部分修复。请查看您的本地存储库中是否有此修复程序,如果有并且仍然遇到问题,请回复。