6

I am using websocket bundle on a symfony based web portal while everything seems to work on localhost things break down when I moved the portal on production server.

On localhost the host i am using is 127.0.0.1 and the port is 8080 so when I moved to the production I had to change the ip to the production ip and I had to then tell ubuntu server to open the port 8080 using the following command

sudo ufw allow 8080/tcp which gave me the output of

Rule added 
Rule added (v6)

I then ran the command sudo ufw status to see if the port has been added in firewall and i can see that it is

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere
80/tcp                     ALLOW       Anywhere
8080                       ALLOW       Anywhere
8080/tcp                   ALLOW       Anywhere
22 (v6)                    ALLOW       Anywhere (v6)
80/tcp (v6)                ALLOW       Anywhere (v6)
8080 (v6)                  ALLOW       Anywhere (v6)
8080/tcp (v6)              ALLOW       Anywhere (v6)

However the error remains

WebSocket connection to 'ws://111.222.333.44:8080/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

I also tried the command telnet 111.222.333.44 8080 and this gives me the following error

Trying 111.222.333.44...
telnet: connect to address 111.222.333.44: Connection refused
telnet: Unable to connect to remote host

So this tells me the port 8080 is not open, what commands do I need to use to open this? I am using Ubuntu 15.10

Any help will be really appreciated.

Shairyar
  • 3,268
  • 7
  • 46
  • 86

1 Answers1

-2

Try opening port 6001, this is the port that websockets use:

sudo ufw allow 6001/tcp
jtate
  • 2,612
  • 7
  • 25
  • 35
Delroy Brown
  • 33
  • 1
  • 1
  • 9