Unable to make a Websockets connection when running on Docker but able to do so when running locally. #517
Unanswered
somduttasinha
asked this question in
Content
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using React and Typescript for my client. I am unable to create a WebSocket connection using
new WebSocket(ws:/api-gateway/8002)
when running on a Docker container, however when I run this on my local machine (usingnew WebSocket(ws:/localhost/8002)
), the connection works. Furthermore, when running the project on Docker, I am able to use a test websockets client (wscat) to connect to the server from the client environment, demonstrating that the hostnameapi-gateway
should be able to be recognised by the client. I have no idea how to troubleshoot this error. Any help is much appreciated!Beta Was this translation helpful? Give feedback.
All reactions