Skip to content

客户端连接Nacos服务器报错 #338

@Zhao-Michael

Description

@Zhao-Michael

Describe what happened (or what feature you want)

客户端启动报错

Describe what you expected to happen

启动不报错

How to reproduce it (as minimally and precisely as possible)

Related code

fail: Nacos.V2.Config.NacosConfigService[0]
[NACOS ConnectException] currentServerAddr: http://xxxxxxxxxxxxxx:8848/, httpCode: BadGateway
fail: Nacos.V2.Config.NacosConfigService[0]
[NACOS ConnectException] currentServerAddr: http://xxxxxxxxxxxxxx:8848/, httpCode: BadGateway
fail: Nacos.V2.Config.NacosConfigService[0]
[NACOS ConnectException] currentServerAddr: http://xxxxxxxxxxxxxx:8848/, httpCode: BadGateway
fail: Nacos.V2.Config.NacosConfigService[0]
[NACOS ConnectException] currentServerAddr: http://xxxxxxxxxxxxxx:8848/, httpCode: BadGateway
fail: Nacos.V2.Config.NacosConfigService[0]
[fixed-xxxxxxxxxxxxxx_8848-] [check-update] get changed dataId exception
System.Exception: [NACOS HTTP-POST] The maximum number of tolerable server reconnection errors has been reached
at Nacos.V2.Config.Http.ServerHttpAgent.HttpRequest(String path, Dictionary2 headers, Dictionary2 paramValues, String encoding, Int64 readTimeoutMs, HttpMethod method)
at Nacos.V2.Config.Http.ServerHttpAgent.HttpPost(String path, Dictionary2 headers, Dictionary2 paramValues, String encoding, Int64 readTimeoutMs)
at Nacos.V2.Config.Impl.ConfigHttpTransportClient.CheckUpdateConfigStr(String probeUpdateString, Boolean isInitializingCacheList)
fail: Nacos.V2.Config.NacosConfigService[0]
longPolling error
System.Exception: [NACOS HTTP-POST] The maximum number of tolerable server reconnection errors has been reached
at Nacos.V2.Config.Http.ServerHttpAgent.HttpRequest(String path, Dictionary2 headers, Dictionary2 paramValues, String encoding, Int64 readTimeoutMs, HttpMethod method)
at Nacos.V2.Config.Http.ServerHttpAgent.HttpPost(String path, Dictionary2 headers, Dictionary2 paramValues, String encoding, Int64 readTimeoutMs)
at Nacos.V2.Config.Impl.ConfigHttpTransportClient.CheckUpdateConfigStr(String probeUpdateString, Boolean isInitializingCacheList)
at Nacos.V2.Config.Impl.ConfigHttpTransportClient.CheckUpdateDataIds(List1 cacheDatas, List1 inInitializingCacheList)
at Nacos.V2.Config.Impl.ConfigHttpTransportClient.b__33_0(Object x)

Tell us your environment

Anything else we need to know?

可能是服务器或者DNS不太稳定,workaround 也许可以添加重试次数,或者让重试次数可配置?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions