netty-socketio
netty-socketio copied to clipboard
Getting 404 for /socket-io/?EIO=3&transport=polling&t=NG2FwLh when netty-socketio server and tomcat run on same port
I'm trying to configure a Sprint Boot REST app that uses port 8080 to also use SocketIOServer on port 8080.
if i use another port for SocketIOServer, it works fine.
if i use port 8080, i get a port in use error unless i set the following:
@Bean
public SocketIOServer socketIOServer() {
com.corundumstudio.socketio.Configuration config =
new com.corundumstudio.socketio.Configuration();
config.setHostname(nwtNasaWebsocketServer);
config.setPort(Integer.parseInt(nwtNasaWebsocketPortString));
SocketConfig sockConfig = new SocketConfig();
sockConfig.setReuseAddress(true);
config.setSocketConfig(sockConfig);
return new SocketIOServer(config);
}
but then when i try to connect from the socket io client, i get a 404 for below call:
http://localhost:8080/socket-io/?EIO=3&transport=polling&t=NG2FwLh
I see similar issue opened previously https://github.com/mrniko/netty-socketio/issues/545 but no solution hint has been provided. Could someone please help here?
Any solution for this issue? I want to run my REST endpoints and socketio server on same port
You may want to take a look at port unification in underlying netty server.
Thank you for the quick response. I will check that
Hello, has this issue been resolved