ejabberd 22.10
This ejabberd 22.10 release includes six months of work, over 140 commits, including relevant improvements in MIX, MUC, SQL, and installers, and bug fixes as usual.
This version brings support for latest MIX protocol version, and significantly improves detection and recovery of SQL connection issues.
There are no breaking changes in SQL schemas, configuration, or commands API. If you develop an ejabberd module, notice two hooks have changed: muc_subscribed
and muc_unsubscribed
.
A more detailed explanation of those topics and other features:
Erlang/OTP 19.3
You may remember than in the previous ejabberd release, ejabberd 22.05, support for Erlang/OTP 25 was introduced, even if 24.3 is still recommended for stable deployments.
It is expected that around April 2023, GitHub Actions will remove Ubuntu 18 and it will not be possible to run automatic tests for ejabberd using Erlang 19.3, the lowest possible will be Erlang 20.0.
For that reason, the planned schedule is:
- ejabberd 22.10
- Usage of Erlang 19.3 is discouraged
- Anybody still using Erlang 19.3 is encouraged to upgrade to 24.3, or at least 20.0
- ejabberd 23.05 (or later)
- Support for Erlang 19.3 is deprecated
- Erlang requirement softly increased in
configure.ac
- Announce: no warranty ejabberd can compile, start or pass the Common Tests suite using Erlang 19.3
- Provide instructions for anybody to manually re-enable it and run the tests
- ejabberd 23.xx+1 (or later)
- Support for Erlang 19.3 is removed completely in the source code
New log_burst_limit_*
options
Two options were added in #3865 to configure logging limits in case of high traffic:
log_burst_limit_window_time
defines the time period to rate-limit log messages by.log_burst_limit_count
defines the number of messages to accept in that time period before starting to drop them.
Support ERL_DIST_PORT
option to work without epmd
The option ERL_DIST_PORT
is added to ejabberdctl.cfg
, disabled by default.
When this option is set to a port number, the Erlang node will not start epmd
and will not listen in a range of ports for erlang connections (typically used for ejabberdctl
and for clustering). Instead, the erlang node will simply listen in the configured port number.
Please note:
- Erlang/OTP 23.1 or higher is required to use
ERL_DIST_PORT
make relive
doesn’t supportERL_DIST_PORT
, neither rebar3 nor elixir- To start several ejabberd nodes in the same machine, configure a different port in each node
Support version macros in captcha_cmd
option
Support for the @VERSION@
and @SEMVER@
macros was added to the captcha_cmd
option in #3835.
Those macros are useful because the example captcha scripts are copied in a path like ejabberd-VERSION/priv/bin
that depends on the ejabberd version number and changes for each release. Also, depending on the install method (rebar3 or Elixir’s mix), that VERSION
may be in XX.YY
or in SEMVER
format (respectively).
Now, it’s possible to configure like this:
captcha_cmd: /opt/ejabberd-@VERSION@/lib/ejabberd-@SEMVER@/priv/bin/captcha.sh
Hook Changes
Two hooks have changed: muc_subscribed
and muc_unsubscribed
. Now they get the packet and room state, and can modify the sent packets. If you write source code that adds functions to those hooks, please notice that previously they were ran like:
ejabberd_hooks:run(muc_subscribed, ServerHost, [ServerHost, Room, Host, BareJID]);
and now they are ran like this:
{Packet2a, Packet2b} = ejabberd_hooks:run_fold(muc_subscribed, ServerHost, {Packet1a, Packet1b},
[ServerHost, Room, Host, BareJID, StateData]),
being Packet1b a copy of Packet1a without the jid
attribute in the muc_subscribe
element.
Translations Updates
Several translations were improved: Ukrainian, Chinese (Simplified), French, German, Russian, Portuguese (Brazil), Spanish and Catalan. Thanks to all this people that contribute in ejabberd at Weblate!
WebAdmin page for external modules
A new page is added in ejabberd’s WebAdmin to view available external modules, update their source code, install, upgrade and remove them. All this is equivalent to what was already available using API commands from the modules tag.
Many modules in the ejabberd-contrib git repository have been improved, and their documentation updated. Additionally, those modules are now automatically tested, at least compilation, installation and static code analysis.
Documentation Improvements
In addition to the normal improvements and fixes, two sections in the ejabberd Documentation are greatly improved:
ChangeLog
General
- Add
log_burst_limit_*
options (#3865) - Support
ERL_DIST_PORT
option to work without epmd - Auth JWT: Catch all errors from
jose_jwt:verify
and log debugging details (#3890) - CAPTCHA: Support
@VERSION@
and@SEMVER@
incaptcha_cmd
option (#3835) - HTTP: Fix unix socket support (#3894)
- HTTP: Handle invalid values in
X-Forwarded-For
header more gracefuly - Listeners: Let module take over socket
- Listeners: Don’t register listeners that failed to start in config reload
mod_admin_extra
: Handle empty roster group namesmod_conversejs
: Fix crash when mod_register not enabled (#3824)mod_host_meta
: Complain at start if listener is not encryptedmod_ping
: Fix regression onstop_ping
in clustering context (#3817)mod_pubsub
: Don’t crash on command failuresmod_shared_roster
: Fix cache invalidationmod_shared_roster_ldap
: Update roster_get hook to use#roster_item{}
prosody2ejabberd
: Fix parsing of scram password from prosody
MIX
- Fix MIX’s filter_nodes
- Return user jid on join
mod_mix_pam
: Add new MIX namespaces to disco featuresmod_mix_pam
: Add handling of IQs with newer MIX namespacesmod_mix_pam
: Do roster pushes on join/leavemod_mix_pam
: Parse sub elements of the mix join remote resultmod_mix_pam
: Provide MIX channels as roster entries via hookmod_mix_pam
: Display joined channels on webadmin pagemod_mix_pam
: Adapt to renaming ofparticipant-id
from mix_roster_channel recordmod_roster
: Change hook type from#roster{}
to#roster_item{}
mod_roster
: Respect MIX “ settingmod_roster
: Adapt to change of mix_annotate type to boolean in roster_querymod_shared_roster
: Fix wrong hook type#roster{}
(now#roster_item{}
)
MUC:
- Store role, and use it when joining a moderated room (#3330)
- Don’t persist
none
role (#3330) - Allow MUC service admins to bypass max_user_conferences limitation
- Show allow_query_users room option in disco info (#3830)
- Don’t set affiliation to
none
if it’s alreadynone
inmod_muc_room:process_item_change/3
- Fix mucsub unsubscribe notification payload to have muc_unsubcribe in it
- Allow muc_{un}subscribe hooks to modify sent packets
- Pass room state to muc_{un}subscribed hook
- The archive_msg export fun requires MUC Service for room archives
- Export
mod_muc_admin:get_room_pid/2
- Export function for getting room diagnostics
SQL
- Handle errors reported from begin/commit inside transaction
- Make connection close errors bubble up from inside sql transaction
- Make first sql reconnect wait shorter time
- React to sql driver process exit earlier
- Skip connection exit message when we triggered reconnection
- Add syntax_tools to applications, required when using ejabberd_sql_pt (#3869)
- Fix mam delete_old_messages_batch for sql backend
- Use
INSERT ... ON DUPLICATE KEY UPDATE
for upsert on mysql - Update mysql library
- Catch mysql connection being close earlier
Compile
make all
: Generate start scripts here, not inmake install
(#3821)make clean
: Improve this and “distclean”make deps
: Ensure deps configuration is ran when getting deps (#3823)make help
: Update with recent changesmake install
: Don’t leak DESTDIR in files copied by ‘make install’make options
: Fix error reporting on OTP24+make update
: configure also in this case, similarly tomake deps
- Add definition to detect OTP older than 25, used by ejabberd_auth_http
- Configure eimp with mix to detect image convert properly (#3823)
- Remove unused macro definitions detected by rebar3_hank
- Remove unused header files which content is already in xmpp library
Container
- Get ejabberd-contrib sources to include them
- Copy
.ejabberd-modules
directory if available - Do not clone repo inside container build
- Use
make deps
, which performs additional steps (#3823) - Support
ERL_DIST_PORT
option to work without epmd - Copy
ejabberd-docker-install.bat
from docker-ejabberd git and rename it - Set a less frequent healthcheck to reduce CPU usage (#3826)
- Fix build instructions, add more podman examples
Installers
- make-binaries: Include CAPTCHA script with release
- make-binaries: Edit rebar.config more carefully
- make-binaries: Fix linking of EIMP dependencies
- make-binaries: Fix GitHub release version checks
- make-binaries: Adjust Mnesia spool directory path
- make-binaries: Bump Erlang/OTP version to 24.3.4.5
- make-binaries: Bump Expat and libpng versions
- make-packages: Include systemd unit with RPM
- make-packages: Fix permissions on RPM systems
- make-installers: Support non-root installation
- make-installers: Override code on upgrade
- make-installers: Apply cosmetic changes
External modules
- ext_mod: Support managing remote nodes in the cluster
- ext_mod: Handle correctly when COMMIT.json not found
- Don’t bother with COMMIT.json user-friendly feature in automated user case
- Handle not found COMMIT.json, for example in GH Actions
- Add WebAdmin page for managing external modules
Workflows Actions
- Update workflows to Erlang 25
- Update workflows: Ubuntu 18 is deprecated and 22 is added
- CI: Remove syntax_tools from applications, as fast_xml fails Dialyzer
- Runtime: Add Xref options to be as strict as CI
Full Changelog
https://github.com/processone/ejabberd/compare/22.05…22.10
ejabberd 22.10 download & feedback
As usual, the release is tagged in the Git source code repository on GitHub.
The source package and installers are available in ejabberd Downloads page. To check the *.asc
signature files, see How to verify ProcessOne downloads integrity.
For convenience, there are alternative download locations like the ejabberd DEB/RPM Packages Repository and the GitHub Release / Tags.
The Docker image is in Docker Hub, and there’s an alternative Container image in GitHub Packages.
If you suspect that you’ve found a bug, please search or fill a bug report on GitHub Issues.