Bug 259067 - net-im/ejabberd does not start since erlang-24.X
Summary: net-im/ejabberd does not start since erlang-24.X
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ashish SHUKLA
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-11 11:14 UTC by Marko Cupać
Modified: 2021-10-12 12:27 UTC (History)
0 users

See Also:
ashish: maintainer-feedback+


Attachments
Fix (2.48 KB, patch)
2021-10-11 16:41 UTC, Ashish SHUKLA
no flags Details | Diff
Fix v2 (3.93 KB, patch)
2021-10-12 02:55 UTC, Ashish SHUKLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marko Cupać 2021-10-11 11:14:55 UTC
Hi,

After upgrading packages on one of my 13_0:x86:64 IM servers to latest main, ejabberd won't start.

Below are interesting lines from error.log

I found similar issue on debian's mailing list where it is said that newer version of erlang-jose is needed. I see this port exists, but so far it hasn't been installed on my server. Also, supposedly needed version (1.11.2) is not in ports - 1.11.1 is.

Thank you in advance,

2021-10-11 12:54:20.241 [error] <0.172.0>@pg2:create CRASH REPORT Process <0.172.0> with 0 neighbours exited with reason: call to undefined function pg2:create(cache_tab) in application_master:init/4 line 142
2021-10-11 12:54:20.335 [error] <0.266.0>@jose_server:check_ec_key_mode:178 CRASH REPORT Process <0.266.0> with 0 neighbours crashed with reason: no case clause matching {'ECPrivateKey',1,<<104,152,88,12,19,82,251,156,171,31,222,207,0,76,115,88,210,229,36,106,137,192,81,153,154,254,226,38,247,70,226,157>>,{namedCurve,{1,2,840,10045,3,1,7}},<<4,46,75,29,46,150,77,222,40,220,159,244,193,125,18,190,254,216,38,191,11,52,115,159,213,230,77,27,131,94,17,46,21,186,71,62,36,225,0,90,21,186,235,132,152,229,13,189,196,121,64,84,64,229,173,12,24,23,127,175,67,247,29,139,91>>,asn1_NOVALUE} in jose_server:check_ec_key_mode/2 line 178
2021-10-11 12:54:20.336 [error] <0.265.0>@jose_server:check_ec_key_mode:178 Supervisor jose_sup had child jose_server started with jose_server:start_link() at undefined exit with reason no case clause matching {'ECPrivateKey',1,<<104,152,88,12,19,82,251,156,171,31,222,207,0,76,115,88,210,229,36,106,137,192,81,153,154,254,226,38,247,70,226,157>>,{namedCurve,{1,2,840,10045,3,1,7}},<<4,46,75,29,46,150,77,222,40,220,159,244,193,125,18,190,254,216,38,191,11,52,115,159,213,230,77,27,131,94,17,46,21,186,71,62,36,225,0,90,21,186,235,132,152,229,13,189,196,121,64,84,64,229,173,12,24,23,127,175,67,247,29,139,91>>,asn1_NOVALUE} in jose_server:check_ec_key_mode/2 line 178 in context start_error
2021-10-11 12:54:20.336 [error] <0.263.0> CRASH REPORT Process <0.263.0> with 0 neighbours exited with reason: {{shutdown,{failed_to_start_child,jose_server,{{case_clause,{'ECPrivateKey',1,<<104,152,88,12,19,82,251,156,171,31,222,207,0,76,115,88,210,229,36,106,137,192,81,153,154,254,226,38,247,70,226,157>>,{namedCurve,{1,2,840,10045,3,1,7}},<<4,46,75,29,46,150,77,222,40,220,159,244,193,125,18,190,254,216,38,191,11,52,115,159,213,230,77,27,131,94,17,46,21,186,71,62,36,225,0,90,21,186,235,132,152,229,13,189,196,121,64,84,64,229,173,12,24,23,127,175,67,247,29,139,91>>,asn1_NOVALUE}},[{jose_server,check_ec_key_mode,...},...]}}},...} in application_master:init/4 line 142
2021-10-11 12:54:20.875 [error] <0.353.0> Supervisor ejabberd_sup had child ejabberd_access_permissions started with ejabberd_access_permissions:start_link() at undefined exit with reason {'EXIT',{noproc,{gen_server,call,[cache_tab_sup,{start_child,{access_permissions_cache,{ets_cache,start_link,[access_permissions_cache,[{max_size,2}]]},transient,5000,worker,[ets_cache]}},infinity]}}} in context start_error
2021-10-11 12:54:20.881 [critical] <0.119.0>@ejabberd_app:start:68 Failed to start ejabberd application: {error,{shutdown,{failed_to_start_child,ejabberd_access_permissions,{'EXIT',{noproc,{gen_server,call,[cache_tab_sup,{start_child,{access_permissions_cache,{ets_cache,start_link,[access_permissions_cache,[{max_size,2}]]},transient,5000,worker,[ets_cache]}},infinity]}}}}}}
2021-10-11 13:05:04.981 [error] <0.654.0>@ejabberd_hooks:safe_apply:240 Hook vcard_iq_set crashed when running mod_vcard:vcard_iq_set/1:
Comment 1 Ashish SHUKLA freebsd_committer freebsd_triage 2021-10-11 14:38:14 UTC
Could you share the output of:

1. pkg info -oa

2. pkg info ejabberd

3. pkg info erlang

Thanks!
Comment 2 Marko Cupać 2021-10-11 14:53:39 UTC
(In reply to Ashish SHUKLA from comment #1)

me@mybox:~ % pkg info -oa
cyrus-sasl-2.1.27_2            security/cyrus-sasl2
ejabberd-21.07                 net-im/ejabberd
erlang-24.1.2,4                lang/erlang
erlang-man-24.1                lang/erlang-man
expat-2.4.1                    textproc/expat2
fontconfig-2.13.94_1,1         x11-fonts/fontconfig
freetype2-2.11.0               print/freetype2
gettext-runtime-0.21           devel/gettext-runtime
giflib-5.2.1                   graphics/giflib
indexinfo-0.3.1                print/indexinfo
jbigkit-2.1_1                  graphics/jbigkit
jpeg-turbo-2.1.1               graphics/jpeg-turbo
libgd-2.3.1,1                  graphics/gd
libyaml-0.2.5                  textproc/libyaml
openldap-client-2.4.59_1       net/openldap24-client
pkg-1.17.2                     ports-mgmt/pkg
png-1.6.37_1                   graphics/png
ssmtp-2.64_7                   mail/ssmtp
sudo-1.9.8p2                   security/sudo
tiff-4.3.0                     graphics/tiff
webp-1.2.1                     graphics/webp


me@mybox:~ % pkg info ejabberd
ejabberd-21.07
Name           : ejabberd
Version        : 21.07
Installed on   : Mon Oct 11 16:50:52 2021 CEST
Origin         : net-im/ejabberd
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : net-im
Licenses       : GPLv2
Maintainer     : ashish@FreeBSD.org
WWW            : https://www.ejabberd.im/
Comment        : Free and Open Source distributed fault-tolerant Jabber server
Options        :
	DOCS           : off
	FULLXML        : off
	LUA            : off
	MYSQL          : on
	ODBC           : off
	PAM            : off
	PGSQL          : off
	REDIS          : off
	SIP            : off
	SQLITE         : off
	STUN           : on
	TOOLS          : off
Shared Libs required:
	libexpat.so.1
	libyaml-0.so.2
Annotations    :
	FreeBSD_version: 1300139
	cpe            : cpe:2.3:a:process-one:ejabberd:21.07:::::freebsd13:x64
	repo_type      : binary
	repository     : [myrepo]
Flat size      : 16.4MiB
Description    :
ejabberd is a high performance Free and Open Source distributed
fault-tolerant instant messaging Jabber server.

Key features include:
    - A web administration console and command line administration
      tools that ensure easy set up
    - Support for encrypted connections to ensure secure communications
    - Many built-in services, including Jabber User Directory and Multi-User
      Chat
    - Standard Jabber transport compliance to enable communication with other
      instant messaging networks
    - Automatic collection of statistics for reporting and system analysis
    - Virtual hosting, enabling ejabberd to run several virtual domains
      from a single ejabberd instance
    - Shared rosters, so that users can have predefined entries in their
      contacts lists
    - External storage support
    - Large numbers of supported protocols (see the supported protocols list
      for details)
    - Multi-lingual web administration interface
    - Full IPv6 support

WWW: https://www.ejabberd.im/


me@mybox:~ % pkg info erlang
erlang-24.1.2,4
Name           : erlang
Version        : 24.1.2,4
Installed on   : Mon Oct 11 16:43:53 2021 CEST
Origin         : lang/erlang
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : java lang parallel
Licenses       : APACHE20
Maintainer     : erlang@FreeBSD.org
WWW            : https://www.erlang.org/
Comment        : Functional programming language from Ericsson
Options        :
	CHUNKS         : on
	CORBA          : on
	DIRTY          : on
	DTRACE         : on
	FOP            : off
	JAVA           : off
	KQUEUE         : on
	MANPAGES       : on
	ODBC           : off
	OPENSSL        : on
	PDF            : off
	SCTP           : on
	SHARING        : off
	WX             : off
Annotations    :
	FreeBSD_version: 1300139
	cpe            : cpe:2.3:a:erlang:erlang/otp:24.1.2:::::freebsd13:x64
	repo_type      : binary
	repository     : [myrepo]
Flat size      : 90.1MiB
Description    :
Erlang is a programming language used to build massively scalable soft
real-time systems with requirements on high availability. Some of its
uses are in telecoms, banking, e-commerce, computer telephony and
instant messaging. Erlang's runtime system has built-in support for
concurrency, distribution and fault tolerance.

WWW: https://www.erlang.org/
Comment 3 Ashish SHUKLA freebsd_committer freebsd_triage 2021-10-11 15:10:24 UTC
Thanks for sending the outputs, I'll try to reproduce it on my end.
Comment 4 Ashish SHUKLA freebsd_committer freebsd_triage 2021-10-11 16:41:46 UTC
Created attachment 228595 [details]
Fix

I'm able to reproduce it, and attached patch seems to fix it for me.

Could you please give it a try, and let me know if it works for you as well ?

Thanks!
Comment 5 Ashish SHUKLA freebsd_committer freebsd_triage 2021-10-12 02:55:17 UTC
Created attachment 228607 [details]
Fix v2

This patch also installs the non-SQLite SQL files. Thanks for mentioning it.
Comment 6 Marko Cupać 2021-10-12 10:55:23 UTC
(In reply to Ashish SHUKLA from comment #5)

Builds, installs and runs on 13_0:x86:64-p4.

Thanks!
Comment 7 commit-hook freebsd_committer freebsd_triage 2021-10-12 12:24:45 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=94973bbbe379378b11aa53d9a43e4cb807c4b466

commit 94973bbbe379378b11aa53d9a43e4cb807c4b466
Author:     Ashish SHUKLA <ashish@FreeBSD.org>
AuthorDate: 2021-10-12 12:18:08 +0000
Commit:     Ashish SHUKLA <ashish@FreeBSD.org>
CommitDate: 2021-10-12 12:23:34 +0000

    net-im/ejabberd: Fix for lang/erlang update to 24.x

    While here, also add the SQL files for other RDBMS supported
    by ejabberd

    PR:             259067
    Reported by:    Marko Cupać <marko dot cupac at mimar dot rs>
    MFH:            2021Q4

 net-im/ejabberd/Makefile                           |  2 +
 .../patch-deps_jose_src_jose__server.erl (new)     | 46 ++++++++++++++++++++++
 net-im/ejabberd/pkg-plist                          |  6 +++
 3 files changed, 54 insertions(+)
Comment 8 commit-hook freebsd_committer freebsd_triage 2021-10-12 12:26:46 UTC
A commit in branch 2021Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=14eb5bacd14c8cb9a0b820802a881876e857f584

commit 14eb5bacd14c8cb9a0b820802a881876e857f584
Author:     Ashish SHUKLA <ashish@FreeBSD.org>
AuthorDate: 2021-10-12 12:18:08 +0000
Commit:     Ashish SHUKLA <ashish@FreeBSD.org>
CommitDate: 2021-10-12 12:24:56 +0000

    net-im/ejabberd: Fix for lang/erlang update to 24.x

    While here, also add the SQL files for other RDBMS supported
    by ejabberd

    PR:             259067
    Reported by:    Marko Cupać <marko dot cupac at mimar dot rs>
    MFH:            2021Q4

    (cherry picked from commit 94973bbbe379378b11aa53d9a43e4cb807c4b466)

 net-im/ejabberd/Makefile                           |  2 +
 .../patch-deps_jose_src_jose__server.erl (new)     | 46 ++++++++++++++++++++++
 net-im/ejabberd/pkg-plist                          |  6 +++
 3 files changed, 54 insertions(+)
Comment 9 Ashish SHUKLA freebsd_committer freebsd_triage 2021-10-12 12:27:43 UTC
Committed, thanks!