New self hosted install issue - nginx - WSL 2

Greetings, I’ve been running a self hosted installed on Windows 10 WSL (version 1) for a few years. I didn’t have too much issues getting it going. I just rebuilt a machine and installed Windows 10 WSL (version 2) and Ubuntu 22.04.1 LTS. I’ve installed Jitsi Meet using ’ apt-get -y install jitsi-meet’, using my public IP address for the hostname (as I have before), and I generated a self signed cert.

I disabled ufw (firewall) and the Windows firewall was also turned off (even though I carried the port settings from my old installation).

From the same server machine where this is running, I can use 127.0.0.1 and get to Jitsi Meet, but when I use the external IP address (from the same server machine) , I cannot connect. When I use the LAN address of the machine (192.168.x.x), I cannot connect either.

The nginx configuration has my external IP address as a configuration under sites-available and there is a symlink to that same file from the sites-enabled directory.

I don’t know if this is a nginx config issue or a firewall issue. I’m not sure what to try next. I did change the ssl port from 443 to 44443 in the nginx config file. I can provide any other useful info if requested.

Suggestions?

-Scott

n2qv@LAPTOP-J1J4964S:/etc/nginx/sites-enabled$ sudo  netstat -tulpn
[sudo] password for n2qv:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:5280            0.0.0.0:*               LISTEN      237/lua5.2
tcp        0      0 0.0.0.0:5222            0.0.0.0:*               LISTEN      237/lua5.2
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      665/nginx: master p
tcp        0      0 0.0.0.0:5269            0.0.0.0:*               LISTEN      237/lua5.2
tcp        0      0 0.0.0.0:44443           0.0.0.0:*               LISTEN      665/nginx: master p
tcp6       0      0 :::5280                 :::*                    LISTEN      237/lua5.2
tcp6       0      0 :::9090                 :::*                    LISTEN      149/java
tcp6       0      0 :::5222                 :::*                    LISTEN      237/lua5.2
tcp6       0      0 :::80                   :::*                    LISTEN      665/nginx: master p
tcp6       0      0 127.0.0.1:8080          :::*                    LISTEN      149/java
tcp6       0      0 :::5269                 :::*                    LISTEN      237/lua5.2
tcp6       0      0 :::8888                 :::*                    LISTEN      94/java
tcp6       0      0 :::44443                :::*                    LISTEN      665/nginx: master p
n2qv@LAPTOP-J1J4964S:/etc/nginx/sites-enabled$ ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 18:31 ?        00:00:00 /init
root         9     1  0 18:31 ?        00:00:00 /init
jicofo      94     9  0 18:32 ?        00:00:56 java -Xmx3072m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -Dj
jvb        149     9  1 18:32 ?        00:01:32 java -Xmx3072m -XX:+UseG1GC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDump
prosody    237     9  0 18:32 ?        00:00:19 lua5.2 /usr/bin/prosody -D
root       365     1  0 19:04 ?        00:00:00 /init
root       366   365  0 19:04 ?        00:00:01 /init
n2qv       367   366  0 19:04 pts/0    00:00:00 -bash
root       665   366  0 19:52 ?        00:00:00 nginx: master process /usr/sbin/nginx
www-data   666   665  0 19:52 ?        00:00:00 nginx: worker process
www-data   667   665  0 19:52 ?        00:00:00 nginx: worker process
www-data   668   665  0 19:52 ?        00:00:00 nginx: worker process
www-data   669   665  0 19:52 ?        00:00:00 nginx: worker process
www-data   670   665  0 19:52 ?        00:00:00 nginx: worker process
www-data   671   665  0 19:52 ?        00:00:00 nginx: worker process
www-data   673   665  0 19:52 ?        00:00:00 nginx: worker process
www-data   674   665  0 19:52 ?        00:00:00 nginx: worker process
n2qv       715   367  0 20:30 pts/0    00:00:00 ps -ef

What is the result?
Timeout…? Default Nginx page…?

Can you ping it from LAN?

@emrah Thanks for the response, my friend.

So I am going to answer my own question here. I found there is a networking difference in Windows between WSL 1 and WSL 2. WSL 2 “has a virtualized ethernet adapter with its own unique IP address” , so you must setup port forwarding from within Windows to the virtual adapter using the Windows ‘netsh’ command.

However - what just found out is that netsh does not support forwarding UDP. It only supports TCP. I suspect this ultimately means Jitsi Meet can’t be run from WSL 2, at least not without some hack to forward UDP (like running some software in windows to do the forwarding).

-Scott

You can run jvb directly in windows

Thanks @damencho for the clarification, I didn’t think of your solution, since JVB is the process that uses UDP, it could run directly on Windows.

Just to clarify using the Ubuntu install instructions and WSL 1 it just works out of the box. You can downgrade WSL 2 to WSL 1 with one command. As soon as I downgraded to WSL, everything was working as expected.