Git Product home page Git Product logo

Comments (5)

badlop avatar badlop commented on August 15, 2024

Problem confirmed.

I've just built ecs from docker-ejabberd git:

docker build -t personal/ejaecs105 .

 ---> 8dfff01275ac
Step 23/35 : RUN apk upgrade --update-cache --no-progress     && apk add     expat     freetds     gd     jpeg     libgd     libpng     libstdc++     libwebp     ncurses-libs     openssl     sqlite     sqlite-libs     tini     unixodbc     yaml     zlib     && ln -fs /usr/lib/libtdsodbc.so.0 /usr/lib/libtdsodbc.so     && rm -rf /var/cache/apk/*
---> Running in 469305b66f67
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/community/x86_64/APKINDEX.tar.gz
(1/5) Upgrading musl (1.2.3-r4 -> 1.2.3-r5)
(2/5) Upgrading ca-certificates-bundle (20220614-r4 -> 20230506-r0)
(3/5) Upgrading libcrypto3 (3.0.7-r2 -> 3.0.10-r0)
(4/5) Upgrading libssl3 (3.0.7-r2 -> 3.0.10-r0)

...
(39/43) Installing openssl (3.0.10-r0)
...

Then start it, and ejabberd crashes as you mentioned:

docker run -it -p 5222:5222 personal/ejaecs105:latest live

$ docker run -it -p 5222:5222 personal/ejaecs105:latest live
Erlang/OTP 24 [erts-12.3.2.6] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:no-native-stack]

=ERROR REPORT==== 5-Sep-2023::11:00:12.138816 ===
Unable to load crypto library. Failed with error:
 "load_failed, Failed to load NIF library:
   'Error loading shared library libcrypto.so.1.1:
     No such file or directory
       (needed by /home/ejabberd/lib/crypto-5.0.6.3/priv/lib/crypto.so)'"
OpenSSL might not be installed on this system.

While inspecting the container:

~ $ cd /home/ejabberd/lib/crypto-5.0.6.3/

~/lib/crypto-5.0.6.3/priv/lib $ ls
crypto.so           crypto_callback.so  otp_test_engine.so

~/lib/crypto-5.0.6.3/priv/lib $ ldd crypto.so 
        /lib/ld-musl-x86_64.so.1 (0x7f92807d6000)
Error loading shared library libcrypto.so.1.1: No such file or directory (needed by crypto.so)
        libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f92807d6000)
Error relocating crypto.so: BN_GENCB_new: symbol not found
Error relocating crypto.so: enif_inspect_iolist_as_binary: symbol not found
Error relocating crypto.so: EVP_MD_type: symbol not found
Error relocating crypto.so: ENGINE_get_id: symbol not found
Error relocating crypto.so: PKCS5_PBKDF2_HMAC: symbol not found
...

from docker-ejabberd.

prefiks avatar prefiks commented on August 15, 2024

Is there any other version of libcrypto? This should come from openssl

from docker-ejabberd.

badlop avatar badlop commented on August 15, 2024

There is libcrypto.so.3:

$ ls -la /usr/lib/ | grep crypto
lrwxrwxrwx    1 root     root            24 Sep  5 10:24 libcrypto.so.3 -> ../../lib/libcrypto.so.3

BTW, a container image built using ejabberd/.github/container/Dockerfile works correctly with that openssl 3:

$ ldd /opt/ejabberd-master/lib/crypto-5.1.4/priv/lib/crypto.so
        /lib/ld-musl-x86_64.so.1 (0x7f33fb612000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x7f33fb238000)
        libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f33fb612000)

Maybe the problem is that the mix container image, used by this ecs image, was built with openssl 1... let me see.

from docker-ejabberd.

badlop avatar badlop commented on August 15, 2024

Aha, it seems the mix container image published four months ago, based in Alpine 3.17, included OpenSSL 1, and since past month, Alpine 3.17 includes OpenSSL 3. When the next ejabberd version is released, both mix and ecs images will be updated.

Until the next ejabberd release is published, you can try this:

  1. First build a recent mix image:
cd docker-ejabberd/mix/
docker build -t personal/mix105 .
  1. Use that recent mix image in the ecs Dockerfile:
cd docker-ejabberd/ecs/
sed -i 's|ejabberd/mix|personal/mix105|g' Dockerfile
  1. Now build the ecs image:
docker build -t personal/ejabberd105 .
  1. ejabberd now will start correctly:
docker run -it -p 5222:5222 personal/ejabberd105 live
Erlang/OTP 25 [erts-13.1.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit]

2023-09-05 14:17:46.325054+00:00 [info] Loading configuration from /home/ejabberd/conf/ejabberd.yml
2023-09-05 14:17:46.360877+00:00 [warning] Option 'log_rotate_date' is deprecated and has no effect anymore. Please remove it from the configuration.
2023-09-05 14:17:46.361015+00:00 [warning] Option 'log_rate_limit' is deprecated and has no effect anymore. Please remove it from the configuration.
2023-09-05 14:17:46.836616+00:00 [info] Configuration loaded successfully
2023-09-05 14:17:47.039276+00:00 [info] Got no NOTIFY_SOCKET, notifications disabled
2023-09-05 14:17:47.055606+00:00 [info] Building language translation cache
2023-09-05 14:17:47.213716+00:00 [info] Creating Mnesia ram table 'ejabberd_commands'
2023-09-05 14:17:47.314708+00:00 [info] Creating Mnesia ram table 'route'
2023-09-05 14:17:47.354691+00:00 [info] Creating Mnesia ram table 'route_multicast'

from docker-ejabberd.

badlop avatar badlop commented on August 15, 2024

I've tried with the ecs 23.10 image, and this problem seems solved.

I'll close the issue; if sombody still sees that same problem, please reopen the issue and explain how to replicate it.

from docker-ejabberd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.