spring boot+dubbo+zookeeper在使用者处引发错误:java.lang.illegalstateexception:未能检查服务的状态

dgiusagp  于 2021-07-08  发布在  Java
关注(0)|答案(0)|浏览(263)

脚本:
Springboot:2.0.4
dubbo:2.6.2
Zookeeper:3.6.1
zkclient:java库
所有这些装置都在Kubernetes运行。
Zookeeper:
使用zkcli.sh,我可以看到提供者已成功注册。但是当从消费者应用程序连接时,它抛出以下错误。
实际堆栈跟踪错误:

Caused by: java.lang.IllegalStateException: Failed to check the status of the service a.b.c.UploadFacade. No provider available for the service a.b.c.UploadFacade from the url zookeeper://zookeeper-svc:2181/com.alibaba.dubbo.registry.RegistryService?application=rest&dubbo=2.6.2&interface=a.b.c.UploadFacade&logger=slf4j&methods=getMerchants,uploadInstanceDetails&organization=abc&pid=1&register.ip=192.168.19.144&revision=1.0.12&side=consumer&timestamp=1606480530254 to the consumer 192.168.19.144 use dubbo version 2.6.2

我没有在谷歌上找到太多信息。
过帐前检查:
已验证springboot使用者能够访问zookeeper(已成功连接)。
已验证zookeeper已注册提供程序(使用zkcli.sh)
zookeeper日志:

ZooKeeper JMX enabled by default
Using config: /opt/bitnami/zookeeper/bin/../conf/zoo.cfg
2020-11-27 09:07:48,119 [myid:] - INFO  [main:QuorumPeerConfig@173] - Reading configuration from: /opt/bitnami/zookeeper/bin/../conf/zoo.cfg
2020-11-27 09:07:48,142 [myid:] - INFO  [main:QuorumPeerConfig@459] - clientPortAddress is 0.0.0.0:2181
2020-11-27 09:07:48,142 [myid:] - INFO  [main:QuorumPeerConfig@463] - secureClientPort is not set
2020-11-27 09:07:48,142 [myid:] - INFO  [main:QuorumPeerConfig@479] - observerMasterPort is not set
2020-11-27 09:07:48,143 [myid:] - INFO  [main:QuorumPeerConfig@496] - metricsProvider.className is org.apache.zookeeper.metrics.impl.DefaultMetricsProvider
2020-11-27 09:07:48,147 [myid:1] - INFO  [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2020-11-27 09:07:48,148 [myid:1] - INFO  [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2020-11-27 09:07:48,148 [myid:1] - INFO  [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2020-11-27 09:07:48,148 [myid:1] - WARN  [main:QuorumPeerMain@138] - Either no config or no quorum defined in config, running in standalone mode
2020-11-27 09:07:48,152 [myid:1] - INFO  [main:ManagedUtil@44] - Log4j 1.2 jmx support found and enabled.
2020-11-27 09:07:48,160 [myid:1] - INFO  [main:QuorumPeerConfig@173] - Reading configuration from: /opt/bitnami/zookeeper/bin/../conf/zoo.cfg
2020-11-27 09:07:48,161 [myid:1] - INFO  [main:QuorumPeerConfig@459] - clientPortAddress is 0.0.0.0:2181
2020-11-27 09:07:48,161 [myid:1] - INFO  [main:QuorumPeerConfig@463] - secureClientPort is not set
2020-11-27 09:07:48,161 [myid:1] - INFO  [main:QuorumPeerConfig@479] - observerMasterPort is not set
2020-11-27 09:07:48,162 [myid:1] - INFO  [main:QuorumPeerConfig@496] - metricsProvider.className is org.apache.zookeeper.metrics.impl.DefaultMetricsProvider
2020-11-27 09:07:48,162 [myid:1] - INFO  [main:ZooKeeperServerMain@122] - Starting server
2020-11-27 09:07:48,181 [myid:1] - INFO  [main:ServerMetrics@62] - ServerMetrics initialized with provider org.apache.zookeeper.metrics.impl.DefaultMetricsProvider@37f1104d
2020-11-27 09:07:48,185 [myid:1] - INFO  [main:FileTxnSnapLog@124] - zookeeper.snapshot.trust.empty : false
2020-11-27 09:07:48,198 [myid:1] - INFO  [main:ZookeeperBanner@42] -
2020-11-27 09:07:48,198 [myid:1] - INFO  [main:ZookeeperBanner@42] -   ______                  _
2020-11-27 09:07:48,198 [myid:1] - INFO  [main:ZookeeperBanner@42] -  |___  /                 | |
2020-11-27 09:07:48,198 [myid:1] - INFO  [main:ZookeeperBanner@42] -     / /    ___     ___   | | __   ___    ___   _ __     ___   _ __
2020-11-27 09:07:48,198 [myid:1] - INFO  [main:ZookeeperBanner@42] -    / /    / _ \   / _ \  | |/ /  / _ \  / _ \ | '_ \   / _ \ | '__|
2020-11-27 09:07:48,198 [myid:1] - INFO  [main:ZookeeperBanner@42] -   / /__  | (_) | | (_) | |   <  |  __/ |  __/ | |_) | |  __/ | |
2020-11-27 09:07:48,199 [myid:1] - INFO  [main:ZookeeperBanner@42] -  /_____|  \___/   \___/  |_|\_\  \___|  \___| | .__/   \___| |_|
2020-11-27 09:07:48,199 [myid:1] - INFO  [main:ZookeeperBanner@42] -                                               | |
2020-11-27 09:07:48,199 [myid:1] - INFO  [main:ZookeeperBanner@42] -                                               |_|
2020-11-27 09:07:48,199 [myid:1] - INFO  [main:ZookeeperBanner@42] -
2020-11-27 09:07:48,202 [myid:1] - INFO  [main:Environment@98] - Server environment:zookeeper.version=3.6.1--104dcb3e3fb464b30c5186d229e00af9f332524b, built on 04/21/2020 15:01 GMT
2020-11-27 09:07:48,203 [myid:1] - INFO  [main:Environment@98] - Server environment:host.name=mgmt-zookeeper-7848488d77-zxk85
2020-11-27 09:07:48,203 [myid:1] - INFO  [main:Environment@98] - Server environment:java.version=11.0.8
2020-11-27 09:07:48,203 [myid:1] - INFO  [main:Environment@98] - Server environment:java.vendor=BellSoft
2020-11-27 09:07:48,204 [myid:1] - INFO  [main:Environment@98] - Server environment:java.home=/opt/bitnami/java
2020-11-27 09:07:48,204 [myid:1] - INFO  [main:Environment@98] - Server environment:java.class.path=/opt/bitnami/zookeeper/bin/../zookeeper-server/target/classes:/opt/bitnami/zookeeper/bin/../build/classes:/opt/bitnami/zookeeper/bin/../zookeeper-server/target/lib/*.jar:/opt/bitnami/zookeeper/bin/../build/lib/*.jar:/opt/bitnami/zookeeper/bin/../lib/zookeeper-prometheus-metrics-3.6.1.jar:/opt/bitnami/zookeeper/bin/../lib/zookeeper-jute-3.6.1.jar:/opt/bitnami/zookeeper/bin/../lib/zookeeper-3.6.1.jar:/opt/bitnami/zookeeper/bin/../lib/snappy-java-1.1.7.jar:/opt/bitnami/zookeeper/bin/../lib/slf4j-log4j12-1.7.25.jar:/opt/bitnami/zookeeper/bin/../lib/slf4j-api-1.7.25.jar:/opt/bitnami/zookeeper/bin/../lib/simpleclient_servlet-0.6.0.jar:/opt/bitnami/zookeeper/bin/../lib/simpleclient_hotspot-0.6.0.jar:/opt/bitnami/zookeeper/bin/../lib/simpleclient_common-0.6.0.jar:/opt/bitnami/zookeeper/bin/../lib/simpleclient-0.6.0.jar:/opt/bitnami/zookeeper/bin/../lib/netty-transport-native-unix-common-4.1.48.Final.jar:/opt/bitnami/zookeeper/bin/../lib/netty-transport-native-epoll-4.1.48.Final.jar:/opt/bitnami/zookeeper/bin/../lib/netty-transport-4.1.48.Final.jar:/opt/bitnami/zookeeper/bin/../lib/netty-resolver-4.1.48.Final.jar:/opt/bitnami/zookeeper/bin/../lib/netty-handler-4.1.48.Final.jar:/opt/bitnami/zookeeper/bin/../lib/netty-common-4.1.48.Final.jar:/opt/bitnami/zookeeper/bin/../lib/netty-codec-4.1.48.Final.jar:/opt/bitnami/zookeeper/bin/../lib/netty-buffer-4.1.48.Final.jar:/opt/bitnami/zookeeper/bin/../lib/metrics-core-3.2.5.jar:/opt/bitnami/zookeeper/bin/../lib/log4j-1.2.17.jar:/opt/bitnami/zookeeper/bin/../lib/json-simple-1.1.1.jar:/opt/bitnami/zookeeper/bin/../lib/jline-2.11.jar:/opt/bitnami/zookeeper/bin/../lib/jetty-util-9.4.24.v20191120.jar:/opt/bitnami/zookeeper/bin/../lib/jetty-servlet-9.4.24.v20191120.jar:/opt/bitnami/zookeeper/bin/../lib/jetty-server-9.4.24.v20191120.jar:/opt/bitnami/zookeeper/bin/../lib/jetty-security-9.4.24.v20191120.jar:/opt/bitnami/zookeeper/bin/../lib/jetty-io-9.4.24.v20191120.jar:/opt/bitnami/zookeeper/bin/../lib/jetty-http-9.4.24.v20191120.jar:/opt/bitnami/zookeeper/bin/../lib/javax.servlet-api-3.1.0.jar:/opt/bitnami/zookeeper/bin/../lib/jackson-databind-2.10.3.jar:/opt/bitnami/zookeeper/bin/../lib/jackson-core-2.10.3.jar:/opt/bitnami/zookeeper/bin/../lib/jackson-annotations-2.10.3.jar:/opt/bitnami/zookeeper/bin/../lib/commons-lang-2.6.jar:/opt/bitnami/zookeeper/bin/../lib/commons-cli-1.2.jar:/opt/bitnami/zookeeper/bin/../lib/audience-annotations-0.5.0.jar:/opt/bitnami/zookeeper/bin/../zookeeper-*.jar:/opt/bitnami/zookeeper/bin/../zookeeper-server/src/main/resources/lib/*.jar:/opt/bitnami/zookeeper/bin/../conf:

2020-11-27 09:07:48,204 [myid:1] - INFO  [main:Environment@98] - Server environment:java.library.path=/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
2020-11-27 09:07:48,204 [myid:1] - INFO  [main:Environment@98] - Server environment:java.io.tmpdir=/tmp
2020-11-27 09:07:48,204 [myid:1] - INFO  [main:Environment@98] - Server environment:java.compiler=<NA>
2020-11-27 09:07:48,206 [myid:1] - INFO  [main:Environment@98] - Server environment:os.name=Linux
2020-11-27 09:07:48,206 [myid:1] - INFO  [main:Environment@98] - Server environment:os.arch=amd64
2020-11-27 09:07:48,206 [myid:1] - INFO  [main:Environment@98] - Server environment:os.version=4.14.158-129.185.amzn2.x86_64
2020-11-27 09:07:48,206 [myid:1] - INFO  [main:Environment@98] - Server environment:user.name=?
2020-11-27 09:07:48,206 [myid:1] - INFO  [main:Environment@98] - Server environment:user.home=?
2020-11-27 09:07:48,206 [myid:1] - INFO  [main:Environment@98] - Server environment:user.dir=/
2020-11-27 09:07:48,206 [myid:1] - INFO  [main:Environment@98] - Server environment:os.memory.free=957MB
2020-11-27 09:07:48,207 [myid:1] - INFO  [main:Environment@98] - Server environment:os.memory.max=989MB
2020-11-27 09:07:48,207 [myid:1] - INFO  [main:Environment@98] - Server environment:os.memory.total=989MB
2020-11-27 09:07:48,208 [myid:1] - INFO  [main:ZooKeeperServer@128] - zookeeper.enableEagerACLCheck = false
2020-11-27 09:07:48,208 [myid:1] - INFO  [main:ZooKeeperServer@136] - zookeeper.digest.enabled = true
2020-11-27 09:07:48,208 [myid:1] - INFO  [main:ZooKeeperServer@140] - zookeeper.closeSessionTxn.enabled = true
2020-11-27 09:07:48,209 [myid:1] - INFO  [main:ZooKeeperServer@1434] - zookeeper.flushDelay=0
2020-11-27 09:07:48,209 [myid:1] - INFO  [main:ZooKeeperServer@1443] - zookeeper.maxWriteQueuePollTime=0
2020-11-27 09:07:48,209 [myid:1] - INFO  [main:ZooKeeperServer@1452] - zookeeper.maxBatchSize=1000
2020-11-27 09:07:48,209 [myid:1] - INFO  [main:ZooKeeperServer@241] - zookeeper.intBufferStartingSizeBytes = 1024
2020-11-27 09:07:48,211 [myid:1] - INFO  [main:BlueThrottle@141] - Weighed connection throttling is disabled
2020-11-27 09:07:48,213 [myid:1] - INFO  [main:ZooKeeperServer@1246] - minSessionTimeout set to 4000
2020-11-27 09:07:48,213 [myid:1] - INFO  [main:ZooKeeperServer@1255] - maxSessionTimeout set to 40000
2020-11-27 09:07:48,214 [myid:1] - INFO  [main:ResponseCache@45] - Response cache size is initialized with value 400.
2020-11-27 09:07:48,214 [myid:1] - INFO  [main:ResponseCache@45] - Response cache size is initialized with value 400.
2020-11-27 09:07:48,215 [myid:1] - INFO  [main:RequestPathMetricsCollector@111] - zookeeper.pathStats.slotCapacity = 60
2020-11-27 09:07:48,215 [myid:1] - INFO  [main:RequestPathMetricsCollector@112] - zookeeper.pathStats.slotDuration = 15
2020-11-27 09:07:48,215 [myid:1] - INFO  [main:RequestPathMetricsCollector@113] - zookeeper.pathStats.maxDepth = 6
2020-11-27 09:07:48,216 [myid:1] - INFO  [main:RequestPathMetricsCollector@114] - zookeeper.pathStats.initialDelay = 5
2020-11-27 09:07:48,216 [myid:1] - INFO  [main:RequestPathMetricsCollector@115] - zookeeper.pathStats.delay = 5
2020-11-27 09:07:48,216 [myid:1] - INFO  [main:RequestPathMetricsCollector@116] - zookeeper.pathStats.enabled = false
2020-11-27 09:07:48,218 [myid:1] - INFO  [main:ZooKeeperServer@1471] - The max bytes for all large requests are set to 104857600
2020-11-27 09:07:48,218 [myid:1] - INFO  [main:ZooKeeperServer@1485] - The large request threshold is set to -1
2020-11-27 09:07:48,218 [myid:1] - INFO  [main:ZooKeeperServer@329] - Created server with tickTime 2000 minSessionTimeout 4000 maxSessionTimeout 40000 clientPortListenBacklog -1 datadir /bitnami/zookeeper/data/version-2 snapdir /bitnami/zookeeper/data/version-2
2020-11-27 09:07:48,259 [myid:1] - INFO  [main:Log@169] - Logging initialized @776ms to org.eclipse.jetty.util.log.Slf4jLog
2020-11-27 09:07:48,369 [myid:1] - WARN  [main:ContextHandler@1520] - o.e.j.s.ServletContextHandler@3cce5371{/,null,UNAVAILABLE} contextPath ends with /*
2020-11-27 09:07:48,369 [myid:1] - WARN  [main:ContextHandler@1531] - Empty contextPath
2020-11-27 09:07:48,389 [myid:1] - INFO  [main:Server@359] - jetty-9.4.24.v20191120; built: 2019-11-20T21:37:49.771Z; git: 363d5f2df3a8a28de40604320230664b9c793c16; jvm 11.0.8+10-LTS
2020-11-27 09:07:48,430 [myid:1] - INFO  [main:DefaultSessionIdManager@333] - DefaultSessionIdManager workerName=node0
2020-11-27 09:07:48,431 [myid:1] - INFO  [main:DefaultSessionIdManager@338] - No SessionScavenger set, using defaults
2020-11-27 09:07:48,432 [myid:1] - INFO  [main:HouseKeeper@140] - node0 Scavenging every 600000ms
2020-11-27 09:07:48,439 [myid:1] - INFO  [main:ContextHandler@825] - Started o.e.j.s.ServletContextHandler@3cce5371{/,null,AVAILABLE}
2020-11-27 09:07:48,455 [myid:1] - INFO  [main:AbstractConnector@330] - Started ServerConnector@58cbafc2{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2020-11-27 09:07:48,457 [myid:1] - INFO  [main:Server@399] - Started @973ms
2020-11-27 09:07:48,457 [myid:1] - INFO  [main:JettyAdminServer@178] - Started AdminServer on address 0.0.0.0, port 8080 and command URL /commands
2020-11-27 09:07:48,463 [myid:1] - INFO  [main:ServerCnxnFactory@169] - Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory
2020-11-27 09:07:48,464 [myid:1] - WARN  [main:ServerCnxnFactory@309] - maxCnxns is not configured, using default value 0.
2020-11-27 09:07:48,465 [myid:1] - INFO  [main:NIOServerCnxnFactory@666] - Configuring NIO connection handler with 10s sessionless connection timeout, 1 selector thread(s), 2 worker threads, and 64 kB direct buffers.
2020-11-27 09:07:48,466 [myid:1] - INFO  [main:NIOServerCnxnFactory@674] - binding to port 0.0.0.0/0.0.0.0:2181
2020-11-27 09:07:48,478 [myid:1] - INFO  [main:WatchManagerFactory@42] - Using org.apache.zookeeper.server.watch.WatchManager as watch manager
2020-11-27 09:07:48,478 [myid:1] - INFO  [main:WatchManagerFactory@42] - Using org.apache.zookeeper.server.watch.WatchManager as watch manager
2020-11-27 09:07:48,480 [myid:1] - INFO  [main:ZKDatabase@132] - zookeeper.snapshotSizeFactor = 0.33
2020-11-27 09:07:48,480 [myid:1] - INFO  [main:ZKDatabase@152] - zookeeper.commitLogCount=500
2020-11-27 09:07:48,485 [myid:1] - INFO  [main:SnapStream@61] - zookeeper.snapshot.compression.method = CHECKED
2020-11-27 09:07:48,486 [myid:1] - INFO  [main:FileTxnSnapLog@470] - Snapshotting: 0x0 to /bitnami/zookeeper/data/version-2/snapshot.0
2020-11-27 09:07:48,489 [myid:1] - INFO  [main:ZKDatabase@289] - Snapshot loaded in 9 ms, highest zxid is 0x0, digest is 1371985504
2020-11-27 09:07:48,489 [myid:1] - INFO  [main:FileTxnSnapLog@470] - Snapshotting: 0x0 to /bitnami/zookeeper/data/version-2/snapshot.0
2020-11-27 09:07:48,490 [myid:1] - INFO  [main:ZooKeeperServer@519] - Snapshot taken in 1 ms
2020-11-27 09:07:48,501 [myid:1] - INFO  [main:RequestThrottler@74] - zookeeper.request_throttler.shutdownTimeout = 10000
2020-11-27 09:07:48,514 [myid:1] - INFO  [main:ContainerManager@83] - Using checkIntervalMs=60000 maxPerMinute=10000 maxNeverUsedIntervalMs=0
2020-11-27 09:07:48,515 [myid:1] - INFO  [main:ZKAuditProvider@42] - ZooKeeper audit is disabled.
2020-11-27 09:08:28,946 [myid:1] - INFO  [SyncThread:0:FileTxnLog@284] - Creating new log file: log.1
2020-11-27 09:27:06,822 [myid:1] - WARN  [NIOWorkerThread-1:NIOServerCnxn@364] - Unexpected exception
EndOfStreamException: Unable to read additional data from client, it probably closed the socket: address = /127.0.0.1:53810, session = 0x10001f8ee150003
    at org.apache.zookeeper.server.NIOServerCnxn.handleFailedRead(NIOServerCnxn.java:163)
    at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:326)
    at org.apache.zookeeper.server.NIOServerCnxnFactory$IOWorkRequest.doWork(NIOServerCnxnFactory.java:522)
    at org.apache.zookeeper.server.WorkerService$ScheduledWorkRequest.run(WorkerService.java:154)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
2020-11-27 09:27:27,399 [myid:1] - INFO  [SessionTracker:ZooKeeperServer@600] - Expiring session 0x10001f8ee150003, timeout of 30000ms exceeded
2020-11-27 10:07:57,627 [myid:1] - INFO  [NIOWorkerThread-1:FourLetterCommands@223] - The list of known four letter word commands is : [{1936881266=srvr, 1937006964=stat, 2003003491=wchc, 1685417328=dump, 1668445044=crst, 1936880500=srst, 1701738089=envi, 1668247142=conf, -720899=telnet close, 1751217000=hash, 2003003507=wchs, 2003003504=wchp, 1684632179=dirs, 1668247155=cons, 1835955314=mntr, 1769173615=isro, 1920298859=ruok, 1735683435=gtmk, 1937010027=stmk}]
2020-11-27 10:07:57,627 [myid:1] - INFO  [NIOWorkerThread-1:FourLetterCommands@224] - The list of enabled four letter word commands is : [[mntr, srvr]]
2020-11-27 11:49:45,853 [myid:1] - WARN  [NIOWorkerThread-1:NIOServerCnxn@364] - Unexpected exception
EndOfStreamException: Unable to read additional data from client, it probably closed the socket: address = /127.0.0.1:58366, session = 0x10001f8ee15003c
    at org.apache.zookeeper.server.NIOServerCnxn.handleFailedRead(NIOServerCnxn.java:163)
    at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:326)
    at org.apache.zookeeper.server.NIOServerCnxnFactory$IOWorkRequest.doWork(NIOServerCnxnFactory.java:522)
    at org.apache.zookeeper.server.WorkerService$ScheduledWorkRequest.run(WorkerService.java:154)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
2020-11-27 11:50:07,400 [myid:1] - INFO  [SessionTracker:ZooKeeperServer@600] - Expiring session 0x10001f8ee15003c, timeout of 30000ms exceeded
2020-11-27 11:50:59,758 [myid:1] - WARN  [NIOWorkerThread-2:NIOServerCnxn@364] - Unexpected exception
EndOfStreamException: Unable to read additional data from client, it probably closed the socket: address = /127.0.0.1:53606, session = 0x10001f8ee15005d
    at org.apache.zookeeper.server.NIOServerCnxn.handleFailedRead(NIOServerCnxn.java:163)
    at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:326)
    at org.apache.zookeeper.server.NIOServerCnxnFactory$IOWorkRequest.doWork(NIOServerCnxnFactory.java:522)
    at org.apache.zookeeper.server.WorkerService$ScheduledWorkRequest.run(WorkerService.java:154)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
2020-11-27 11:51:25,399 [myid:1] - INFO  [SessionTracker:ZooKeeperServer@600] - Expiring session 0x10001f8ee15005d, timeout of 30000ms exceeded

我还观察了Zookeeper日志:

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题