IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 网络协议 -> java dubbo 连接 zk 报错 Session 0x0 for server 127.0.0.1/<unresolved>:2181 unexpected error closing so -> 正文阅读

[网络协议]java dubbo 连接 zk 报错 Session 0x0 for server 127.0.0.1/<unresolved>:2181 unexpected error closing so

可能的解决方式

配置正常,zk 启动正常,但是就是连接不上
看下是否是你的项目使用 JDK 版本过高
在这里插入图片描述
我这里使用的是 17 ,调成 1.8 版本即可

问题概述

provider 配置如下

<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
       xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
       http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
    <context:property-placeholder/>

    <dubbo:application name="demo-provider"/>

    <dubbo:registry address="zookeeper://127.0.0.1:2181"/>

    <dubbo:provider token="true"/>

    <bean id="demoService" class="com.dyinggq.dubbo3simpledemo.basic.impl.DemoServiceImpl"/>

    <dubbo:service interface="com.dyinggq.dubbo3simpledemo.basic.api.DemoService" ref="demoService"/>

</beans>

报错如下图
在这里插入图片描述


16:09:43.754 [main-SendThread(127.0.0.1:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server 127.0.0.1/<unresolved>:2181, unexpected error, closing socket connection and attempting reconnect
java.nio.channels.UnresolvedAddressException: null
	at java.base/sun.nio.ch.Net.checkAddress(Net.java:149)
	at java.base/sun.nio.ch.Net.checkAddress(Net.java:157)
	at java.base/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:816)
	at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:839)
	at org.apache.zookeeper.ClientCnxnSocketNIO.registerAndConnect(ClientCnxnSocketNIO.java:277)
	at org.apache.zookeeper.ClientCnxnSocketNIO.connect(ClientCnxnSocketNIO.java:287)
	at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1021)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1064)
16:09:43.757 [main-SendThread(127.0.0.1:2181)] DEBUG org.apache.zookeeper.ClientCnxnSocketNIO - Ignoring exception during shutdown input
java.net.SocketException: Socket is not connected
	at java.base/sun.nio.ch.Net.translateToSocketException(Net.java:181)
	at java.base/sun.nio.ch.Net.translateException(Net.java:217)
	at java.base/sun.nio.ch.Net.translateException(Net.java:223)
	at java.base/sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:392)
	at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:200)
	at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1250)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1174)
Caused by: java.nio.channels.NotYetConnectedException: null
	at java.base/sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:1098)
	at java.base/sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:390)
	... 3 common frames omitted
16:09:43.757 [main-SendThread(127.0.0.1:2181)] DEBUG org.apache.zookeeper.ClientCnxnSocketNIO - Ignoring exception during shutdown output
java.net.SocketException: Socket is not connected
	at java.base/sun.nio.ch.Net.translateToSocketException(Net.java:181)
	at java.base/sun.nio.ch.Net.translateException(Net.java:217)
	at java.base/sun.nio.ch.Net.translateException(Net.java:223)
	at java.base/sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:401)
	at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:207)
	at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1250)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1174)
Caused by: java.nio.channels.NotYetConnectedException: null
	at java.base/sun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:1115)
	at java.base/sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:399)
	... 3 common frames omitted
16:09:44.867 [main-SendThread(127.0.0.1:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server 127.0.0.1/<unresolved>:2181. Will not attempt to authenticate using SASL (unknown error)
16:09:44.867 [main-SendThread(127.0.0.1:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server 127.0.0.1/<unresolved>:2181, unexpected error, closing socket connection and attempting reconnect
java.nio.channels.UnresolvedAddressException: null
	at java.base/sun.nio.ch.Net.checkAddress(Net.java:149)
	at java.base/sun.nio.ch.Net.checkAddress(Net.java:157)
	at java.base/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:816)
	at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:839)
	at org.apache.zookeeper.ClientCnxnSocketNIO.registerAndConnect(ClientCnxnSocketNIO.java:277)
	at org.apache.zookeeper.ClientCnxnSocketNIO.connect(ClientCnxnSocketNIO.java:287)
	at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1021)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1064)
16:09:44.868 [main-SendThread(127.0.0.1:2181)] DEBUG org.apache.zookeeper.ClientCnxnSocketNIO - Ignoring exception during shutdown input
java.net.SocketException: Socket is not connected
	at java.base/sun.nio.ch.Net.translateToSocketException(Net.java:181)
	at java.base/sun.nio.ch.Net.translateException(Net.java:217)
	at java.base/sun.nio.ch.Net.translateException(Net.java:223)
	at java.base/sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:392)
	at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:200)
	at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1250)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1174)
Caused by: java.nio.channels.NotYetConnectedException: null
	at java.base/sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:1098)
	at java.base/sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:390)
	... 3 common frames omitted
16:09:44.868 [main-SendThread(127.0.0.1:2181)] DEBUG org.apache.zookeeper.ClientCnxnSocketNIO - Ignoring exception during shutdown output
java.net.SocketException: Socket is not connected
	at java.base/sun.nio.ch.Net.translateToSocketException(Net.java:181)
	at java.base/sun.nio.ch.Net.translateException(Net.java:217)
	at java.base/sun.nio.ch.Net.translateException(Net.java:223)
	at java.base/sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:401)
	at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:207)
	at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1250)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1174)
Caused by: java.nio.channels.NotYetConnectedException: null
	at java.base/sun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:1115)
	at java.base/sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:399)
	... 3 common frames omitted
16:09:45.975 [main-SendThread(127.0.0.1:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server 127.0.0.1/<unresolved>:2181. Will not attempt to authenticate using SASL (unknown error)
16:09:45.975 [main-SendThread(127.0.0.1:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server 127.0.0.1/<unresolved>:2181, unexpected error, closing socket connection and attempting reconnect
  网络协议 最新文章
使用Easyswoole 搭建简单的Websoket服务
常见的数据通信方式有哪些?
Openssl 1024bit RSA算法---公私钥获取和处
HTTPS协议的密钥交换流程
《小白WEB安全入门》03. 漏洞篇
HttpRunner4.x 安装与使用
2021-07-04
手写RPC学习笔记
K8S高可用版本部署
mySQL计算IP地址范围
上一篇文章      下一篇文章      查看所有文章
加:2022-02-16 13:30:42  更:2022-02-16 13:32:36 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/26 10:02:35-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码