[jitsi-users] Prosody, installed as a dependency for jitsi-meet, conflicts with previously installed ejabberd due to using the same ports



Considering the fact ejabberd listens to :: by default, any attempt in
changing default interfaces resulted in crashing. I think I might be
able get rid of the problem by configuring an IPv6 inteface, but I
just changed all the ports ejabberd used. That turned out to be faster
and more reliable.

Now, this is not a solution accetable for most people, but it worked
for me, with less then 10 people using the service.

I didn't solve the problem in a way I'd prefer, but it is somewhat mitigated now



2018-02-11 19:41 GMT+02:00 Boris Grozev <boris@jitsi.org>:


On 11/02/2018 06:30, А Д wrote:


I followed the instructions from
https://github.com/jitsi/jitsi-meet/blob/master/doc/quick-install.md and ran
a full installation. I encountered a problem

Prosody seems to be configured to use the same ports as Ejabberd, which is
running on the server I tried installing jitsi-meet to. It took me a long
time to figure out just why Jitsi refused to work, even though the web
interface opened. It wasn't until Ejabberd crashed and Jitsi suddenly worked
that I understood the reason.

Now, I have no need for Prosody to use the standard ports, those are for
Ejabberd, and I tried to reconfigure Prosody. But there is a problem.
Whereas Ejabberd is configured explicitly and all used ports are mentioned
in ejabberd.yml, /etc/prosody/prosody.cfg.lua and
/etc/prosody/conf.avail/[mysite].cfg.lua don't list used ports in their
config files and that makes it difficult to figure out how exactly they
should be overriden. And I have to override them all, so that Prosody
finally stops interfering with Ejabberd.

I tried to change /etc/prosody/prosody.cfg.lua, changing Apache config
files accordingly. For instance, I added

bosh_ports = { 15280 }

  just before the line

Include "conf.d/*.cfg.lua"

and changed

   ProxyPreserveHost on
   ProxyPass /http-bind http://localhost:5280/http-bind/
   ProxyPassReverse /http-bind http://localhost:5280/http-bind/


   ProxyPreserveHost on
   ProxyPass /http-bind http://localhost:15280/http-bind/
   ProxyPassReverse /http-bind http://localhost:15280/http-bind/

in my Apache config file.

This wouldn't stop Prosody from interfering with Ejabberd but I figured
such a configuration would at least work and let me take small steps. But
Jitsi simply failed to properly launch a room, much like it did with
Ejabberd running. So, either I should have used some other configuration, or
also change the port somewhere else. But I am not familiar with Prosody or
Lua or Jitsi, and that makes it hard for me to understand how to reconfigure

What should I do to make Prosody use non-standard ports only? What other
configuration files should I change for jitsi-meet to communicate with
Prosody via those non-standard ports?

Apart from 5280 we also use 5222 (for XMPP client-to-server) and 5437 (for
XMPP components). Most probably 5222 clashes with ejabberd, and
unfortunately it looks hard-coded in jicofo[0], so I don't think there is an
easy way to change it (someone please correct me if I am wrong).

Jitsi only needs it locally (to connect jicofo to prosody), so you might be
able to get away with using for prosody[1] and other
interfaces for ejabberd.

Port 5347 is probably not used by ejabberd (check with `netstat -plnv`), but
if it is you can change it by adding component_ports={15347} to prosody's
config, and changing the references to 5347 in /etc/jitsi/videobridge/config
and /etc/jitsi/jicofo/config.

[1] http://prosody.im/doc/ports#default_interfaces