jitsi / docker-jitsi-meet

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

Hardcoded prosody port in mod_c2s.lua #1812

Open jmallach opened 4 months ago

jmallach commented 4 months ago

After changing the default XMPP_PORT to '5223', prosody was still trying to use 5222 in addition to 5223:

jitsi-prosody-1   jitsi/prosody:stable-9457-2   "/init"   prosody   16 minutes ago   Up 8 minutes    5222-5223/tcp, 5269/tcp, 5280/tcp, 5347/tcp

After inspecting the container, it looks like the jitsi prosody container has a hardcoded value for the default port, which does not use XMPP_PORT at all:

root@1b30451b8a46:/# rgrep 5222 /lib/prosody/
/lib/prosody/modules/mod_c2s.lua:       default_port = 5222;

In this setup, there's a Jitsi stack already running in parallel, using port 5222 for prosody, which is why I need to change it.

This results in jvb and jicofo being very unhappy:

jvb-1      | 2024-05-28T08:40:08.847079060Z org.jivesoftware.smack.SmackException$EndpointConnectionException: The following addresses failed: 'RFC 6120 A/AAAA Endpoint + [xmpp.meet.jitsi:5223] (xmpp.meet.jitsi/172.31.0.2:5223)' failed because: java.net.ConnectException: Connection refused
jicofo-1   | 2024-05-28T08:40:08.852750162Z org.jivesoftware.smack.SmackException$EndpointConnectionException: The following addresses failed: 'RFC 6120 A/AAAA Endpoint + [xmpp.meet.jitsi:5223] (xmpp.meet.jitsi/172.31.0.2:5223)' failed because: java.net.ConnectException: Connection refused

Am I doing anything wrong, or is it really a hardcoded value for 5222/tcp?

saghul commented 4 months ago

Ops, that might need to be templated, do you want to send a PR?

jmallach commented 4 months ago

I would have, but where on earth does the prosody container come from? I have not been able to find it. :sweat_smile: Gràcies!

saghul commented 4 months ago

Here it is: https://github.com/jitsi/docker-jitsi-meet/tree/master/prosody

jmallach commented 4 months ago

Ah, sorry, I knew about this after all: so I just need to template under rootfs/lib/prosody, I assume.

saghul commented 4 months ago

Correct!