Comments (7)
若客户端强制关闭,但是服务器还在从这个套接字通道读取数据,服务器会报“java.io.IOException: 远程主机强迫关闭了一个现有的连接。”。导致这种情况出现的原因就是,客户端异常关闭后,服务器的选择器会获取到与客户端套接字对应的套接字通道SelectionKey,并且这个key的兴趣是OP_READ,执行从这个通道读取数据时,客户端已套接字已关闭,所以会出现“java.io.IOException: 远程主机强迫关闭了一个现有的连接”的错误。通常可以忽略IOException
另外,我这边测试设置公网ip进行打包,不会报错.你再尝试下
from netty-websocket-spring-boot-starter.
我用公网ip设置host:服务器你上启动项目是不报错的,但是我客户端连接用公网ip加端口建立不起连接,然后就是那个ioException 我这边是配置host为0.0.0.0 或者 负载均衡ip 都会一直不停的报ioException
from netty-websocket-spring-boot-starter.
我设置了公网ip打包进行测试,发现项目启动的时候抛出了一个异常:java.net.BindException: Cannot assign requested address: bind 提示ip地址配置错误 所以建立不了连接:我的公网ip是设置在@serverendpoint(port=8081,host="") host中,所以我不是说很清楚为什么会出现这种情况呢?
from netty-websocket-spring-boot-starter.
我用公网ip设置host:服务器上启动项目是不报错的,但是我客户端连接用公网ip加端口建立不起连接,然后就是那个ioException 我这边是配置host为0.0.0.0 或者 负载均衡ip 都会一直不停的报ioException
from netty-websocket-spring-boot-starter.
你这边能给个联系方式吗?
from netty-websocket-spring-boot-starter.
from netty-websocket-spring-boot-starter.
你把微信号发我邮箱吧,QQ比较少用
from netty-websocket-spring-boot-starter.
Related Issues (20)
- BeforeHandshake关闭session后,nginx转发http响应的502 HOT 2
- 想问下服务器如何判断客户端掉线,然后通知他的好友 HOT 2
- writerIdleTimeSeconds配置使用${引用nacos配置},不能做到动态刷新 HOT 1
- 整合RocketMq后异常日志不全 HOT 2
- netty默认的Channel的通道id太长了,目前框架上支持这个id自定义吗? HOT 1
- 客户端断网后服务端不知道客户端断开了 HOT 1
- 请问如何处理数据库存储的客户端连接状态,假如单节点部署,重启过程中客户端离线,数据库的状态如何改变呢,有什么策略可以主动ping客户端吗 HOT 1
- 想问一下0.12版本客户端访问问题 HOT 1
- 使用@ServerEndpoint修饰但不用@Component时,其它Bean注入该Bean时会报 bean could not be found 异常 HOT 2
- 客户端在线,服务端离线 HOT 1
- 是否支持socketjs+stomp? HOT 1
- 连接报错,发送消息也报错。。。看内容吧。。。 HOT 3
- 能否支持自定义全局异常处理? HOT 1
- 能否进一步优化反射方法性能 HOT 1
- 0.12.0使用的netty版本和文档不一致 HOT 2
- 支持TCP吗?
- pojoClazz 不是单例的吗
- 不支持jdk17么?
- 支持SpringBoot3.2吗 HOT 2
- 如何控制@onClose的关闭时间
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netty-websocket-spring-boot-starter.