mrniko / netty-socketio

Socket.IO server implemented on Java. Realtime java framework
Apache License 2.0
6.77k stars 1.65k forks source link

SocketIO server start failed at port: 10001! #698

Open ChristinRay opened 5 years ago

ChristinRay commented 5 years ago

socketIOServer.start() failed,please tell me why???? [ERROR] 2019-08-16 10:09:32 [nioEventLoopGroup-5-1] c.c.socketio.SocketIOServer - SocketIO server start failed at port: 10001! [WARN ] 2019-08-16 10:09:32 [main] o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nettySocketServiceImpl': Invocation of init method failed; nested exception is java.nio.channels.UnresolvedAddressException

lovebing commented 5 years ago

Sometimes, if the process exits suddenly(killed), some tcp connections may remain FIN_WAIT1 state for a few minutes, so the port is unavailable to be bound. you can modify system config to reduce the remaining time.