processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6k stars 1.5k forks source link

reload_config does not reconfigure STUN server IP address #4134

Open nandlab opened 6 months ago

nandlab commented 6 months ago

In the issue STUN/TURN support for dynamic public IP address a user proposed a workaround script, which, on public IP address change, adjusts the config file and restarts ejabberd with ejabberdctl restart. ejabberdctl reload_config alone apparently does not change the STUN IP address. Why is that? reload_config would be faster than to restart the complete ejabberd server.

Neustradamus commented 6 months ago

@weiss, @badlop: What do you think?

licaon-kter commented 6 months ago

@nandlab do keep in mind that it's not only STUN/TURN that needs no be reconfigured, if your IP changed more internal stuff needs to be reconfigured.

Also, regarding "faster", how fast do you reconfigure DNS? How fast is that propagating? Etc

nandlab commented 6 months ago

do keep in mind that it's not only STUN/TURN that needs no be reconfigured, if your IP changed more internal stuff needs to be reconfigured.

Then what are the limitations of reload_config? It would be helpful, if it was at least documented more explicitly. sudo ejabberdctl help reload_config prints a vague Description: Reload config file in memory. Which configurations can be updated on the fly and which can not?

Also, regarding "faster", how fast do you reconfigure DNS? How fast is that propagating? Etc

DynDNS can be reconfigured in a few seconds. It is an A entry which is updated on a nameserver once a day.

licaon-kter commented 6 months ago

DynDNS can be reconfigured in a few seconds. It is an A entry which is updated on a nameserver once a day.

So your users DNS will have the wrong IP for a day? Faster reload is your last problem :)

nandlab commented 6 months ago

It is a DSL connection where the router gets a new IP address once a day. Then it is directly updated on the DynDNS server.

weiss commented 6 months ago

Then what are the limitations of reload_config?

It's supposed to reload everything, so the fact that it doesn't work for TURN relay IP addresses is a bug (as I mentioned elsewhere). Would be nice if we could fix that. Once it's fixed, I'd probably still prefer restarting ejabberd on IP address change.