Giter Club home page Giter Club logo

Comments (7)

YeautyYE avatar YeautyYE commented on May 22, 2024

若客户端强制关闭,但是服务器还在从这个套接字通道读取数据,服务器会报“java.io.IOException: 远程主机强迫关闭了一个现有的连接。”。导致这种情况出现的原因就是,客户端异常关闭后,服务器的选择器会获取到与客户端套接字对应的套接字通道SelectionKey,并且这个key的兴趣是OP_READ,执行从这个通道读取数据时,客户端已套接字已关闭,所以会出现“java.io.IOException: 远程主机强迫关闭了一个现有的连接”的错误。通常可以忽略IOException
另外,我这边测试设置公网ip进行打包,不会报错.你再尝试下

from netty-websocket-spring-boot-starter.

woxinfeixiang233 avatar woxinfeixiang233 commented on May 22, 2024

我用公网ip设置host:服务器你上启动项目是不报错的,但是我客户端连接用公网ip加端口建立不起连接,然后就是那个ioException 我这边是配置host为0.0.0.0 或者 负载均衡ip 都会一直不停的报ioException

from netty-websocket-spring-boot-starter.

woxinfeixiang233 avatar woxinfeixiang233 commented on May 22, 2024

我设置了公网ip打包进行测试,发现项目启动的时候抛出了一个异常:java.net.BindException: Cannot assign requested address: bind 提示ip地址配置错误 所以建立不了连接:我的公网ip是设置在@serverendpoint(port=8081,host="") host中,所以我不是说很清楚为什么会出现这种情况呢?

from netty-websocket-spring-boot-starter.

C644753271 avatar C644753271 commented on May 22, 2024

我用公网ip设置host:服务器上启动项目是不报错的,但是我客户端连接用公网ip加端口建立不起连接,然后就是那个ioException 我这边是配置host为0.0.0.0 或者 负载均衡ip 都会一直不停的报ioException

from netty-websocket-spring-boot-starter.

C644753271 avatar C644753271 commented on May 22, 2024

你这边能给个联系方式吗?

from netty-websocket-spring-boot-starter.

woxinfeixiang233 avatar woxinfeixiang233 commented on May 22, 2024

from netty-websocket-spring-boot-starter.

YeautyYE avatar YeautyYE commented on May 22, 2024

你把微信号发我邮箱吧,QQ比较少用

from netty-websocket-spring-boot-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.