Ejabberd improvements + ejabberd 20.03

@stephdl is there not supposed to be a chat window on webtop after installation?

1 Like

You need to configure:

http://docs.nethserver.org/en/v7/webtop5.html#chat-integration

2 Likes

thank mates…

What I would like to demonstrate is there is no regressions, so in short, firs we install the stable, then we upgrade and check you can create a salon, talk with mates, do upload of files etc etc

1 Like

Thanks for new ejabberd! I really appreciate it as I like to test some XMPP web clients.

I updated my VPS and got following error in /var/log/messages:

Apr 4 02:01:23 nethserver sh: /bin/sh: /opt/ejabberd-20.01/bin/ejabberdctl: No such file or directory

I saw /usr/lib/systemd/system/ejabberd.service points to the old ejabberd 20.01, we have 20.03.

ExecStart=/bin/sh -c "/opt/ejabberd-20.01/bin/ejabberdctl start && /opt/ejabberd-20.01/bin/ejabberdctl started"
ExecStop=/bin/sh -c "/opt/ejabberd-20.01/bin/ejabberdctl stop && /opt/ejabberd-20.01/bin/ejabberdctl stopped"
ExecReload=/bin/sh -c "/opt/ejabberd-20.01/bin/ejabberdctl reload_config"

After changing version and another systemctl daemon-reload ejabberd was working properly.

  • Create room works
  • Chat and upload/download works

Found some warnings in /var/log/ejabberd:

2020-04-04 02:41:08.147 [warning] <0.106.0>@ejabberd_config_transformer:warn_removed_option:539 Option 'log_rotate_date' is deprecated and has no effect anymore. Please remove it from the configuration.
2020-04-04 02:41:08.147 [warning] <0.106.0>@ejabberd_config_transformer:warn_removed_option:539 Option 'log_rate_limit' is deprecated and has no effect anymore. Please remove it from the configuration.
2020-04-04 02:41:08.315 [warning] <0.106.0>@gen_mod:warn_soft_dep_fail:582 Module mod_mam is recommended for module mod_muc but is not found in the config

I tested with Xabber on Android and Pidgin on Windows. More tests will follow (encryption etc)

4 Likes

Example of configuration, please look all, there are a lot of changes between NethServer ejabberd configuration, example you use 5223 by default and it is not here:

loglevel: info:
-> https://github.com/processone/ejabberd/commit/e4a8afb15d6c995b294a60ed150b86775e2f6805

OMEMO part, 5223 part, BOSH part, …

Several options need to be in Nethgui/Cockpit…

Warning: Pidgin is the best bad XMPP client, please do not use it.

Computer: Psi/Psi+ is the best with Gajim.

my bad but a big thank you, I do the changes and open a real issue to track this update

1 Like

need to check, new obsolete settings, did I never say that I do not like this software :slight_smile:

2020-04-04 11:34:21.255 [warning] <0.106.0>@ejabberd_config_transformer:warn_removed_option:539 Option 'log_rotate_date' is deprecated and has no effect anymore. Please remove it from the configuration.
2020-04-04 11:34:21.255 [warning] <0.106.0>@ejabberd_config_transformer:warn_removed_option:539 Option 'log_rate_limit' is deprecated and has no effect anymore. Please remove it from the configuration.

1 Like

@stephdl: Please revert for introduce: “20.03” to “20.01”.

never heard about git cherry-pick ?

Do not cache authentication (introduced by 20.03) -> Do not cache authentication (introduced by 20.01)

It was introduced in 20.01 not in 20.03.

I cannot cherry-pick your changes some have been rejected until NS 7.8 has been introduced

Ready for testing: https://github.com/NethServer/dev/issues/6108

Please also have a look to the logrotate part :wink:

Thanks!

Like I have noted previously here: Ejabberd improvements + ejabberd 20.03
-> https://github.com/processone/ejabberd/commit/e4a8afb15d6c995b294a60ed150b86775e2f6805

Have you seen for “loglevel: info”

from your link we use the info level

Screenshot (27)

but because we are not humans but developers we prefer the machine language :smiley:

check the /etc/ejabberd/ejabberd.yml

loglevel: 4
log_rotate_count: 0

since it is a default option we could even remove it, or not :stuck_out_tongue:

I did some more ejabberd tests on my homeserver, a VPS and a test VM and it’s working as expected.

  • Ejabber service starts and runs without error
  • Logrotate works
  • users can chat and create rooms
  • OMEMO encryption still working
  • LDAP/AD working
  • uploads working

Tested with following clients

  • Gajim
  • Psi+
  • XMPPJabberClient
  • Xabber

I found one warning:

[warning] <0.359.0>@mod_mam:start:98 Mnesia backend for mod_mam is not recommended: it's limited to 2GB and often gets corrupted when reaching this limit. SQL backend is recommended. Namely, for small servers SQLite is a preferred choice because it's very easy to configure.

Can a chat archive reach 2GB when uploads are not stored?
I don’t know if it’s worth the effort but when we have an ejabberd database we may think about storing things from other ejabberd modules too…
It works with postgresql and mariadb102.

nethserver-postgres:

sudo -u postgres psql
CREATE USER ejabberd WITH CREATEDB PASSWORD 'SECRET';
CREATE DATABASE ejabberd OWNER ejabberd;
\q
cat /opt/ejabberd-20.03/lib/ejabberd-20.03/priv/sql/pg.sql | sudo -u ejabberd psql ejabberd

nethserver-mariadb102:

echo "CREATE DATABASE ejabberd;" | mysql102 
echo "GRANT ALL ON ejabberd.* TO 'ejabberd'@'localhost' IDENTIFIED BY 'SECRET';" | mysql102
mysql102 -D ejabberd < /opt/ejabberd-20.03/lib/ejabberd-20.03/priv/sql/mysql.sql

Copy template fragment to edit as template-custom:

mkdir -p /etc/e-smith/templates-custom/etc/ejabberd/ejabberd.yml/
cp /etc/e-smith/templates/etc/ejabberd/ejabberd.yml/85Modules /etc/e-smith/templates-custom/etc/ejabberd/ejabberd.yml/

Edit begin of /etc/e-smith/templates-custom/etc/ejabberd/ejabberd.yml/85Modules to fit to your DB engine:

sql_type: pgsql
sql_port: 5432
#sql_type: mysql
#sql_port: 3312
sql_server: "localhost"
sql_database: "ejabberd"
sql_username: "ejabberd"
sql_password: "SECRET"

and edit the db_type in mod_mam part:

  mod_mam:
    db_type: sql

Apply and there should be no warning anymore.

signal-event nethserver-ejabberd-update

Source:

https://docs.ejabberd.im/admin/configuration/database-ldap/

4 Likes

It is a design choice, the upgrade of ejabberd with mariadb it is just a pain, each version brings a lot of sql updates to the db.

If you have a lot of users, go to mysql or use Mnesia

2 Likes

Thank you for your test, it’s really appreciated!

3 Likes

still brave are needed

1 Like

Little question: My changes will be in 7.8?

A post was split to a new topic: Upgrade ejabberd to version 22.05