Jitsi (latest version) + Cloudflare = Error 520

I too am running into this issue. I am running on Debian 10 Buster using the apt packages.
Did a fresh install, as well.

cat /etc/os-release
PRETTY_NAME=“Debian GNU/Linux 10 (buster)”

Package: jitsi-meet
Architecture: all
Version: 1.0.1072-1

Any suggestions to try would be much appreciated!

2 Likes

Wow… thought I was the only one with this issue. I installed it 2 weeks ago and it worked just fine but the VM crashed and I installed it anew and I got this error, thought it was something on my end. Hopefully a quick fix is nearby!

1 Like

Any luck on this? I’m experiencing the same issue.

anyone???

I as well experienced this issue when trying to reinstall today. It appears to be something to due with the nginx configuration; a successful workaround for me was to switch the web server to apache2.

1 Like

Thanks buddy for the tip! After another deep dive into nginx logs and related topics in this forum, I finally found a solution that worked for me while not requiring a replacement of the web server engine. What I did was simply:

sudo apt purge jitsi-meet-turnserver and systemctl restart nginx

I’m running a VPS instance based on Ubuntu 18.04.4 LTS (Bionic Beaver)

Hope this will help others as well)

@msokol

sudo apt purge jitsi-meet-turnserver and systemctl restart nginx

These option Take the jitsi server offline.

@jhosman

Just checked once again by rebooting the server. All services restarted successfully including jitsi. The web page is accessible and is proxied by Cloudflare.

A short history of me investigating the issue.

  1. By analyzing log files I found a post describing similar issue, although not related to Cloudflare. The error description was the same as in my case.
  2. I tried to edit the corersponding file /etc/nginx/modules-enabled/60-jitsi-meet.conf as suggested in the post but ended in Nginx failure to restart.
  3. I didn’t want to dig further and continued googling which brought me to another solution of such a problem that has resolved my issue completely. In the previous message, I wrote 2 commands that have made my jitsi-server up and running.

Check your logs, maybe we have different errors.

Good luck!

The error log of nginx:

2020/05/07 22:42:09 [error] 15447#15447: *70 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.126.118, server: 0.0.0.0:443, upstream: "127.0.0.1:4445", bytes from/to client:0/0, bytes from/to upstream:0/0
2020/05/07 22:42:09 [error] 15447#15447: *72 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.126.136, server: 0.0.0.0:443, upstream: "127.0.0.1:4445", bytes from/to client:0/0, bytes from/to upstream:0/0
2020/05/07 22:42:25 [error] 15447#15447: *74 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.126.142, server: 0.0.0.0:443, upstream: "127.0.0.1:4445", bytes from/to client:0/0, bytes from/to upstream:0/0

Any idea?

restart the server, so it will reload everything.

# apt purge jitsi-meet-turnserver && systemctl restart nginx
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias       
Leyendo la información de estado... Hecho
Los paquetes indicados a continuación se instalaron de forma automática y ya no son necesarios.
  coturn libevent-core-2.1-6 libevent-extra-2.1-6 libevent-openssl-2.1-6 libevent-pthreads-2.1-6 libhiredis0.13 libmysqlclient20 libpq5 mysql-common
Utilice «sudo apt autoremove» para eliminarlos.
Los siguientes paquetes se ELIMINARÁN:
  jitsi-meet-turnserver*
0 actualizados, 0 nuevos se instalarán, 1 para eliminar y 0 no actualizados.
Se liberarán 25,6 kB después de esta operación.
¿Desea continuar? [S/n] s
(Leyendo la base de datos ... 143983 ficheros o directorios instalados actualmente.)
Desinstalando jitsi-meet-turnserver (1.0.4074-1) ...
(Leyendo la base de datos ... 143976 ficheros o directorios instalados actualmente.)
Purgando ficheros de configuración de jitsi-meet-turnserver (1.0.4074-1) ...
# reboot

Server Down

# Error 521 <small>Ray ID: 590440fe89b70461 • 2020-05-08 15:36:01 UTC</small>
## Web server is down

How to I can change nginx to apache?

Also the log say you that turnserver broke up.

In the easy install manual there’s a line for the right way to uninstall jitsi

I don’t want to uninstall Jitsi, just work for Apache or Java (as it natively does in the previous version)

Via java is completely not suggested, apache sucks

I think it’s no more possible now

Any fix to CloudFlare (cloud orange record)?

I’m not familiar with CloudFlare but it can be related the healtcheck mechanism of CloudFlare. The ssl_preread_alpn_protocols mapping of Jitsi may cause this problem if CloudFlare checks the SSL connection.

You can test it as the followings:

Change the line in /etc/nginx/modules-enabled/60-jitsi-meet.conf

map $ssl_preread_alpn_protocols $upstream {
~\bh2\b         web;
~\bhttp/1\.     web;
default         turn;
}

to

map $ssl_preread_alpn_protocols $upstream {
~\bh2\b         web;
~\bhttp/1\.     web;
default         web;
}

And restart Nginx

systemctl restart nginx

How did you configure your DNS on Cloudflare? I want to try your proposed fix but first want to make sure I am mirroring your CDN/DNS config.

@Qrakz, I’m not using CloudFlare

Sorry about that. You clearly stated that at the beginning of your post. You were kind to not remind me of that, haha. Anyhow, what are your A and CNAME records set at? My A record is @ (domain dot com) pointed at MY_IP_ADDRESS. My cname is www pointed at domain dot com. My Jitsi install is on www dot domain dot com, so the subdomain is necessary for the DNS to resolve. I am just curious if that is how others have done it. I have tried various DNS configurations with success, but none work with Cloudflare when I set it to proxy. I am interested in what you or others are doing in regards to the DNS configuration.

(This discourse install is limiting my ability to state the domains more clearly in this post)

Did anyone ever find a fix for this? I tried @msokol’s suggestion, but it didn’t workf or me. I got the following:

Building dependency tree
Reading state information… Done
E: Unable to locate package and
E: Unable to locate package restart

Anyone manage to fix this issue? Still can’t run Jitsi with Cloudflare proxy on. :confused: