Failed WebSocket connection

I am trying to connect to the websocket that I have deployed on my service but it never ends up connecting…

View.308bf5e6.js:1 WebSocket connection to ‘wss://’ failed:

I always get that error… I am using an application in NodeJS where I have port 3000 for common requests and port 5000 for websocket…

// Starting the server
const server = app.listen(app.get("port"), () => {
  console.log(`Server is running on: ${app.get("port")}`);

// Websocket
const { Server } = require(""); = new Server(5000);, next) => {
  if (tokenValidation.socket(socket.handshake.auth)) {
  } else {
    next(new Error("NOT_AUTHENTICATED"));
});"connection", (socket) => {
  // notify existing users
  console.log("Someone connected");

Hi there,
A webservice can only expose a single port so you can’t use 3000 and 5000,


John B

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.