Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting 404 for /socket-io/?EIO=3&transport=polling&t=NG2FwLh when netty-socketio server and tomcat run on same port #772

Closed
sansingh opened this issue Aug 18, 2020 · 4 comments

Comments

@sansingh
Copy link

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 #545 but no solution hint has been provided. Could someone please help here?

@vamsivammu
Copy link

Any solution for this issue? I want to run my REST endpoints and socketio server on same port

@pablojr
Copy link

pablojr commented Oct 21, 2021

You may want to take a look at port unification in underlying netty server.

@vamsivammu
Copy link

Thank you for the quick response. I will check that

@mrniko mrniko closed this as completed May 14, 2023
@XSWClevo
Copy link

XSWClevo commented Dec 6, 2023

Hello, has this issue been resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants