jitsi / docker-jitsi-meet

Jitsi Meet on Docker
https://hub.docker.com/u/jitsi/
Apache License 2.0
3.09k stars 1.37k forks source link

Quick start procedure seems to be broken #254

Closed scoopex closed 4 years ago

scoopex commented 4 years ago

I executed the steps described in https://github.com/jitsi/docker-jitsi-meet#quick-start.

Performed minor changes in the configuration:

# diff -u .env env.example 
--- .env        2020-03-21 18:11:20.318715551 +0100
+++ env.example 2020-03-21 17:36:54.383141765 +0100
@@ -3,7 +3,7 @@
 #

 # Directory where all configuration will be stored.
-CONFIG=/var/lib/docker-persistent/docker-marc/docker-jitsi-meet/jitsi-meet-cfg
+CONFIG=~/.jitsi-meet-cfg

 # Exposed HTTP port.
 HTTP_PORT=8000
@@ -12,7 +12,7 @@
 HTTPS_PORT=8443

 # System time zone.
-TZ=Europe/Berlin
+TZ=Europe/Amsterdam

 # Public URL for the web service.
 #PUBLIC_URL="https://meet.example.com"

The web container fails with the following error messages:

# docker logs  dockerjitsimeet_web_1 -f
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-set-timezone: executing... 
[cont-init.d] 01-set-timezone: exited 0.
[cont-init.d] 10-config: executing... 
generating self-signed keys in /config/keys, you can replace these with your own keys if required
Generating a RSA private key
.......................+++++
..............................................................................................+++++
writing new private key to '/config/keys/cert.key'
-----
[cont-init.d] 10-config: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /config/nginx/meet.conf:31
nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /config/nginx/meet.conf:31
nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /config/nginx/meet.conf:31
nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /config/nginx/meet.conf:31
nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /config/nginx/meet.conf:31

The file, the container complains about:

# cat /config/nginx/meet.conf
server_name _;

client_max_body_size 0;

root /usr/share/jitsi-meet;
index index.html
error_page 404 /static/404.html;

location ~ ^/([a-zA-Z0-9=\?]+)$ {
    rewrite ^/(.*)$ / break;
}

location /config.js {
    alias /config/config.js;
}

location /interface_config.js {
    alias /config/interface_config.js;
}

location /external_api.js {
    alias /usr/share/jitsi-meet/libs/external_api.min.js;
}

location / {
    ssi on;
}

# BOSH
location /http-bind {
    proxy_pass <no value>/http-bind;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host meet.jitsi;
}
SebastianKobs commented 4 years ago
proxy_pass <no value>/http-bind;

should be

proxy_pass http://xmpp.meet.jitsi:5280/http-bind;

which in turn is

XMPP_BOSH_URL_BASE=http://xmpp.meet.jitsi:5280

in .env.

scoopex commented 4 years ago

Sure, that is the default in the file i copied:

cd docker-jitsi-meet
# grep "XMPP_BOSH_URL_BASE" .env env.example
.env:XMPP_BOSH_URL_BASE=http://xmpp.meet.jitsi:5280
env.example:XMPP_BOSH_URL_BASE=http://xmpp.meet.jitsi:5280

But unfortunately the replacement did not work. After saving the file in the editor it magically worked....

SebastianKobs commented 4 years ago

@scoopex Maybe saving changed the linefeeds from CRLF to LF. I've seen this a couple of times on windows-machines with borked editor or git settings at least and nginx is picky about that. Glad that you found a solution.

scoopex commented 4 years ago

I use vim on ubuntu and that uses unix line endings.

saghul commented 4 years ago

I think it must have been a case of the file not being properly saved / read. We have never seen this report before.

supermar1010 commented 4 years ago

I have the same problem I'm using it with a rootless podman container, running on fedora31

saghul commented 4 years ago

@supermar1010 That's a different issue. Please follow https://github.com/jitsi/docker-jitsi-meet/issues/201 for Podman support.

Closing this one since there is no follow-up and I could never reproduce the problem.

ingokeck commented 2 years ago

I just did an update of an old jitsi docker install (did git pull, deleted all cotainers , the .jitsi_meet directories and images and then made compose up) and ran into the same issue. The nginx config file has "proxy_pass /http-bind;" on multiple places.

saghul commented 2 years ago

@ingokeck Do you have PUBLIC_URL set? It's necessary now. Also, doing git pull is not recommended. Get the latest release which has the images pinned: https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-docker#quick-start

saghul commented 2 years ago

How does your nginx config file look like?

ingokeck commented 2 years ago

I looked at the wrong logs. Sorry for the confusion. I'll delete the comment. I still have the problem of no connection and getting thrown out, but this may be down to the https forwarding configuration of the main webserver. I first need to look into that.

davebenvenuti commented 1 year ago

I seem to have hit this same problem in stable-8138-1. I had PUBLIC_URL set before I ran docker-compose up -d:

dave@shithouse:~/src/docker-jitsi-meet-stable-8138-1$ docker-compose logs web | tail -10
web_1      | nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /config/nginx/meet.conf:63
web_1      | nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /config/nginx/meet.conf:63
web_1      | nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /config/nginx/meet.conf:63
web_1      | nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /config/nginx/meet.conf:63
web_1      | nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /config/nginx/meet.conf:63
web_1      | nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /config/nginx/meet.conf:63
web_1      | nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /config/nginx/meet.conf:63
web_1      | nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /config/nginx/meet.conf:63
web_1      | nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /config/nginx/meet.conf:63
web_1      | nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /config/nginx/meet.conf:63

The relevant part of my ~/.jitsi-meet-cfg/web/nginx/meet.conf, around line 63:

# BOSH
location = /http-bind {
    proxy_pass <no value>/http-bind;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host <no value>;
}

The first thing I noticed is that unlike when this issue was originally filed, XMPP_BOSH_URL_BASE is nowhere to be found in env.example 🤔

I tried setting that in .env and that got me a little further. I then noticed the other proxy_set_header Host <no value>; two lines down. It seems XMPP_DOMAIN also isn't set.

The strange thing is, there appear to be defaults defined in the meet.conf template, but that doesn't seem to matter.

So I also added XMPP_DOMAIN=meet.jitsi to my .env, rebuilt everything, and now I'm up and running.

tl;dr adding this to my .env fixed it:

XMPP_BOSH_URL_BASE=http://xmpp.meet.jitsi:5280
XMPP_DOMAIN=meet.jitsi

but it seems the Quick start procedure as of stable-8138-1 isn't 100% working.

saghul commented 1 year ago

Are you using Docker Compose or any other type of setup?

davebenvenuti commented 1 year ago

Docker compose 1.29.2 Ubuntu 22.04 Kernel 5.15.0-48-generic

davebenvenuti commented 1 year ago

Oh wow after writing down that Docker Compose version I realize I'm way behind. I'll try again with a newer version 🤦