Websocket in Spring Boot not working after deployment
Anonymous
TRIALOP

2 years ago

Hello. I was deploying a spring boot app with websockets. For some reason, the connection to the websocket is not happening. is there something i need to change in the railway dashboard? coz the app is running fine in local.

17 Replies

Anonymous
TRIALOP

2 years ago

ba58e211-41c6-4805-a274-4ea8e333027a


2 years ago

It should work fine on railway without any changes.

Where does the connection fail?


2 years ago

I think the only change I make when going from local to railway, is I use wss:// for secure websocket.


Anonymous
TRIALOP

2 years ago

im guessing in the frontend part itself.


Anonymous
TRIALOP

2 years ago


Anonymous
TRIALOP

2 years ago

can you share any github repo of yours where i can look into it? for reference


2 years ago

Yeah sure


2 years ago

There’s two repos


2 years ago

Here’s the frontend



2 years ago

Here’s the backend



Anonymous
TRIALOP

2 years ago

ok thanks. I'll look into it.


2 years ago

The frontend uses a websocket to connect to the backend websocket server


Anonymous
TRIALOP

2 years ago

https://github.com/shm-dsgn/springboot-chatapp

here's mine. it's in spring boot, maybe i need to add some additional properties in the backend itself. might be the case.


Anonymous
TRIALOP

2 years ago

I'll go through it. Thanks a lot


2 years ago

Welcome 🙏


Loading...