Nginx doesn't open port 9091 to connect web-socket

I have setup a VM with: jicofo, prosody, nginx and another VM with: jvb, my dns is:
And then I saw this error in js console:

So I follow this guide to config proxy: jitsi-videobridge/ at master · jitsi/jitsi-videobridge · GitHub

But when I used netstat -plant | grep 9091 to check opened port at 9091 but no 9091 port opened

Can someone please help me fix this issues

This is my Nginx config at /etc/nginx/sites-enabled/

This is my jvb.conf at /etc/jitsi/videobridge/jvb.conf:

And this is my error log at /var/log/nginx/error.log:

First, that should be:

server-id = "jvb2"

Then, why do you have a port definition in the websocket block?

1 Like

Thank you for replying me.
If I don’t add a port definition, the websocket will use port 9090, but in my /etc/nginx/sites-enabled/, I setup web-socket listen to jvb2 in port 9091, so I add port 9091 definition in jvb.conf to make them using the same port

But you have port 9090 defined. If you want to use port 9091, then that line in your videobridge block should be changed to reflect that, not add another line/port in the websockets block.

1 Like

I have updated my jvb.conf as below and restart videobridge:

This is Nginx error log:

Check your jvb.conf server-id line again

Is this right? I see the server-id line is the same as your guide and the same as proxy_pass in nginx config file

Almost. Remove that line "proxy_set....;".

I have updated Nginx config and restart nginx.service:

But then nginx error log still the same:

And I use netstat -plant | grep 9091 to check if port 9091 is opened, but it not be opened

Well, did you open the port? Specifying the port in jvb.conf does not open it.

According to this post: How To Create a Self-Signed SSL Cert for Nginx in Ubuntu 18.04 | DigitalOcean

I change listen port in the first server block to 9091:

And the port 9091 is opened:

But Nginx error log a new error like image below:

This is steps I used to setup nginx:
1 apt update
2 apt-get -y install jitsi-meet
3 wget -qO - | sudo apt-key add -
4 sudo sh -c “echo ‘deb stable/’ > /etc/apt/sources.list.d/jitsi-stable.list”
5 sudo apt-get -y update
6 apt install nginx

Since JVB2 and Nginx are not on the same server, you cannot redirect websockets using
And it seems that you did many incorrect changes, difficult to revert…

Thank you for replying me
Can you please share an sample of setup Nginx when jvb2 on a different server, I cannot resolve it :frowning:

1 Like

Follow your guide, the websocket problem was fixed, thank you so much

1 Like