Git Product home page Git Product logo

docker-ejabberd's Introduction

Build Status

docker-ejabberd

This repository contains a set of container images to run or develop ejabberd:

The ejabberd source code repository also provides:

docker-ejabberd's People

Contributors

badlop avatar chaoskid42 avatar cromain avatar girishramnani avatar jsautret avatar karimhm avatar leszekblazewski avatar madmath03 avatar mremond avatar paulmenzel avatar prefiks avatar tviaud avatar zinid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-ejabberd's Issues

In the README in ecs directory the ejabberdapi command does not work as written

Summary:

Very very new to ejabberd. However, I can get this image to build (or when I pull from dockerhub directly) the command mentioned in the README:
docker exec -it ejabberd bin/ejabberdapi register --endpoint=http://127.0.0.1:5280/ --jid=admin@localhost --password=passw0rd
fails with:
ejabberdapi: error: user registration error for admin@localhost: Error 99: invalid character '<' looking for beginning of value

Similar to this issue on Stackoverflow.

Steps to reproduce

  1. pull docker image from dockerhub or build ecs from this repo with no errors
  2. Attempt to run the command listed above as in the README

This error happens with the docker container running on linux or windows docker hosts. Will be happy to provide any other details you may deem permanent. Sorry "new issue form" mentioned in the contributor guidelines doesn't seem to have anything so I did the best I could here with the knowledge I have

Keeping a CHANGELOG would be nice! #193

I'm upgrading my 7-month old installation and I have trouble finding out if any of the important environment stuff changed. Like file locations, env variables etc that I need to set. I am just going through raw Git commits now, so it's not obvious.

ecs/Dockerfile build error images

Build Dockerfile in local drive. I don't change anything.
There have error message when run the image.

$ git clone https://github.com/processone/docker-ejabberd.git
$ cd docker-ejabberd/ecs
$ docker build  -t kt71020/ecs .
Successfully built da1e6024a485
Successfully tagged kt71020/ecs:latest

** error message**

docker run --name ejabberd -d -p 5222:5222 kt71020/ecs
c823504409e5e21e62798e234b1071557f61a400a71e61415e39a9df2d9b96b8
docker: Error response from daemon: OCI runtime create failed: container_linux.go:296: starting container process caused "exec: \"/home/ejabberd/bin/ejabberdctl\": permission denied": unknown.

Docker version

Client:
 Version:	18.01.0-ce
 API version:	1.35
 Go version:	go1.9.2
 Git commit:	03596f5
 Built:	Wed Jan 10 20:11:05 2018
 OS/Arch:	linux/amd64
 Experimental:	false
 Orchestrator:	swarm

Server:
 Engine:
  Version:	18.01.0-ce
  API version:	1.35 (minimum version 1.12)
  Go version:	go1.9.2
  Git commit:	03596f5
  Built:	Wed Jan 10 20:09:37 2018
  OS/Arch:	linux/amd64
  Experimental:	false

planform

digitalocean
1 GB Memory / 25 GB Disk / SGP1 - Ubuntu 16.04.3 x64

Running `build.sh` without arguments fails in October

The tag heuristic does not work as there is no release every months.

$ sudo ./build.sh
[…]
Step 9/30 : RUN git checkout ${VERSION/latest/HEAD}  && mix deps.get  && (cd deps/eimp; ./con
figure)
 ---> Running in 16bb55709772
error: pathspec '19.10' did not match any file(s) known to git
The command '/bin/sh -c git checkout ${VERSION/latest/HEAD}  && mix deps.get  && (cd deps/eimp; ./configure)' returned a non-zero code: 1
Error response from daemon: No such image: ejabberd/ecs:19.10

ACME challenge settings?

Instead of my previous attempt with using my host system to create the Lets Encrypt certificates, I thought it might be actually nicer to automatically create through the new ACME system in Ejabberd.

With the self signed certs it seems to work fine, but I guess I need to un-comment the following line:
- "/etc/letsencrypt/live/xmpp.mydomain.com/*.pem"

for it to look at the right place? Does that work with the Docker image?
If I switch to that and remove the self-signed cert line from the ejabberd.yml my XMPP client does not connect any longer because of an SSL negotiation error.

Any ideas?

The ejabberd.log gives me this:

2018-03-10 18:55:57.473 [warning] <0.512.0>@ejabberd_c2s:process_terminated:290 (tls|<0.512.0>) Failed to secure c2s connection: TLS failed: Failed to find a certi
ficate matching the domain in SNI extension: error:1412E0E2:SSL routines:ssl_parse_clienthello_tlsext:clienthello tlsext

17.07 missing openSSL

running the 17.07 image yields this error for me:

2017-08-19T14:27:58.670011871Z 2017-08-19 14:27:58 Unable to load crypto library. Failed with error:~n"~p, ~s"~nOpenSSL might not be installed on this system.~n
2017-08-19T14:27:58.670073212Z load_failed
2017-08-19T14:27:58.670081545Z "Failed to load NIF library: 'Error loading shared library libcrypto.so.38: No such file or directory (needed by /home/p1/ejabberd/lib/crypto-3.7.1/priv/lib/crypto.so)'"
2017-08-19T14:27:58.670145581Z 		2017-08-19 14:27:58 crash_report        

also, the latest image is the 16.12 tag, should probably be updated

cannot use odbc

I try to connect this image to a database (mssql) by using odbc. However this is what I get:

[critical] Failed to start Erlang application 'odbc': no such file or directory: odbc.app. This usually means that ejabberd or Erlang was compiled/installed incorrectly.

How to add --enable-new-sql-schema in ecs Dockerfile?

from SQL insert error when install ejabberd register user #2183 , this issue maybe as same as it.

How does add --enable-new-sql-schema in ecs Dockerfile ??
ejabberd 18.01

Add new user to ejabberd :

docker exec -ti example_ejabberd_1 bin/ejabberdctl register kt mac.example.com passw0rd

error.log :

ejabberd_1  | 13:43:54.923 [debug] Command 'register' execution allowed by rule 'console commands' (CallerInfo=#{caller_module => ejabberd_ctl})
ejabberd_1  | 13:43:54.923 [debug] Executing command ejabberd_admin:register with Args=[<<"kt">>,<<"mac.example.com">>,<<"passw0rd">>]

ejabberd_1  | 13:43:54.946 [error] SQL query 'Q20191286' at {ejabberd_auth_sql,162} failed: [{severity,'ERROR'},{code,<<"23502">>},{message,<<"null value in column \"server_host\" violates not-null constraint">>},{detail,<<"Failing row contains (kt, null, xqSezK+hk2SuLWM/WJEraj6wZq0=, AgzPUpIVDNJ5tX0KxBq9UjRtBTQ=, n0t2/hsb2JQ6bibR00eKFA==, 4096, 2018-01-21 21:43:50.824858).">>},{115,<<"public">>},{116,<<"users">>},{99,<<"server_host">>},{file,<<"execMain.c">>},{line,1636},{routine,<<"ExecConstraints">>}]

Cannot get ejabberd_http_auth to work in container

I currently have an ejabberd server up and running on an ec2 AWS instance but I'm trying to migrate it to a kubernetes cluster by containerizing it. The ejabberd version is 18.01.29 and I've tried pulling and running a docker image tagged 18.01 with my ejabberd server configuration but I could not install the ejabberd_auth_http module from the docker image. I got the following error:

/home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/ejabberd_auth_http.erl:33: can't find include file "scram.hrl" /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/ejabberd_auth_http.erl:100: record scram undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/ejabberd_auth_http.erl:261: record scram undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:31: can't find include file "scram.hrl" /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:116: undefined macro 'SCRAM_DEFAULT_ITERATION_COUNT' /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:130: undefined macro 'SCRAM_DEFAULT_ITERATION_COUNT' /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:45: function iterations/0 undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:45: function password_to_scram/1 undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:121: function iterations/0 undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:124: function iterations/0 undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:132: record scram undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:139: record scram undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:145: record scram undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:146: record scram undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:149: record scram undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:151: record scram undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:153: variable 'IterationCount' is unbound /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:155: variable 'ServerKey' is unbound /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:155: variable 'StoredKey' is unbound /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:156: variable 'Salt' is unbound /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:161: record scram undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:175: record scram undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:176: record scram undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:177: record scram undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:178: record scram undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:180: type scram() undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:181: record scram undefined /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:182: variable 'StoredKey' is unbound /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:135: Warning: call to crypto:rand_bytes/1 will fail, since it was removed in 20.0; use crypto:strong_rand_bytes/1 /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:137: Warning: variable 'StoredKey' is unused /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:138: Warning: variable 'ServerKey' is unused /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:160: Warning: variable 'IterationCount' is unused /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:160: Warning: variable 'Salt' is unused /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:160: Warning: variable 'ServerKey' is unused /home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/scram2.erl:160: Warning: variable 'StoredKey' is unused Error: {compilation_failed,"/home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/ejabberd_auth_http.erl"}

I had done some research and I came to the conclusion that the module had been updated and therefore, no longer works with older versions of ejabberd. I've tried installing the module for the image tags 18.03, 18.04 and 18.06 and none of them worked either.

So I then attempted to install the module on the latest tag/version (18.09) which confirmed my suspicions as it finally worked. Only problem was that when I restarted the container with the module installed I got the following error:

04:01:01.009 [error] Unknown option 'auth_opts'
04:01:01.009 [error] Failed to load configuration file /home/ejabberd/conf/ejabberd.yml
04:01:01.009 [critical] Failed to start ejabberd application: unknown_option

I've tried rebuilding a docker container using the configuration of my original ejabberd server by replacing the one in the ecs/conf directory but since version 18.09 no longer ignores parameters it can't read, the docker container failed to run as it was unable to read the "auth_opts" and "auth_method: http" parameters in my configuration file.

I've also tried installing the module on the docker container with the "auth_opts" commented out and "auth_method" set to internal and then updating the configuration file at /home/ejabberd/conf/ejabberd.yml but still no luck :(

If I could just get the module installed and have the docker container running with my current ejabberd server configuration for the module, I will be able to deploy ejabberd to my kubernetes cluster. Please help!

create (admin) user from env vars

I would like to be able to create a default admin user from env vars. In the readme it is stated that I need to docker exec, but I would like to have something like this in my docker-compose.yml instead:

  xmpp:
    image: ejabberd/ecs
    restart: unless-stopped
    volumes:
      - ./ejabberd.yml:/home/ejabberd/conf/ejabberd.yml
      - ./database:/home/ejabberd/database
    environment:
      - EJABBERD_ADMIN=admin
      - EJABBERD_PASS=someweirdpassword

This would run docker exec -it ejabberd bin/ejabberdapi register --endpoint=http://127.0.0.1:5280/ --jid=admin@localhost --password=someweirdpassword for me.

There's precedence for doing things like this, It is for example used in mariadb's docker images: https://github.com/docker-library/docs/tree/master/mariadb#environment-variables

New captcha.sh does not work in docker container

Dockerfile

FROM ejabberd/ecs:21.01

USER root

RUN apk add --no-cache \
    ghostscript-fonts \
    bash \
    imagemagick

docker-compose

version: '3.8'
services:
    ejabberd:
      build: 
        context: .
        dockerfile: Dockerfile
      container_name: ${CONTAINER_NAME:-ejabberd}
      restart: unless-stopped
      network_mode: "host"
      image: ejabberd:ecs
      volumes:
        - /var/docker/ejabberd/conf:/home/ejabberd/conf:ro
        - /var/docker/ejabberd/upload:/home/ejabberd/upload
        - /var/docker/ejabberd/logs:/home/ejabberd/logs
        - /etc/localtime:/etc/localtime:ro`

Registering new accounts on host via new captcha.sh processone/ejabberd#3533 gives error:

2021-04-03 00:10:54.793125+02:00 [error] <0.711.0>@ejabberd_captcha:do_create_image/1:407 Failed to process output from "/home/ejabberd/conf/captcha.sh 139043". Maybe ImageMagick's Convert program is not installed.

The "old" example captcha.sh script worked but resulted in a LOT of bot accounts, so i gave the new one a shot.

Thumbnails option doesnt work for mod_http_upload

When turning the mod_http_upload thumbnail option to true i get the following errror and ejabberd/ecs stops:

10:07:14.058 [warning] ejabberd is built without image converter support, option 'thumbnail' is ignored
10:07:14.058 [error] Invalid value for option 'thumbnail' of module mod_http_upload: true
10:07:14.058 [critical] ejabberd initialization was aborted because a module start failed.

Within the docker container i checked to see if eimp has all its since i found that some people had dependency issues with eimp, but thats not the case:

~/lib/eimp-1.0.9/priv/bin $ ldd eimp
        /lib/ld-musl-x86_64.so.1 (0x7f6cda109000)
        libwebp.so.7 => /usr/lib/libwebp.so.7 (0x7f6cd9ca8000)
        libpng16.so.16 => /usr/lib/libpng16.so.16 (0x7f6cd9a7a000)
        libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x7f6cd981b000)
        libgd.so.3 => /usr/lib/libgd.so.3 (0x7f6cd95c3000)
        libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f6cda109000)
        libz.so.1 => /lib/libz.so.1 (0x7f6cd93ac000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x7f6cd90fc000)
        libbz2.so.1 => /usr/lib/libbz2.so.1 (0x7f6cd8eef000)

captcha.sh

Hi its possible to add captcha.sh? :) I can not bind it (no permissions) :(

Ejabberd admin API long response times during load testing

I am currently load testing my application that subscribes users to a muc room after processing their payments. I have deployed the image ejabberd/ecs:18.09 as a pod in a kubernetes cluster with my backend set up to call the three following APIs in sequential order:
api/set_room_affiliation
api/subscribe_room
api/srg_user_add
The ejabberd pod is scheduled in a node with 16 cpu cores and 32GB of RAM (c5.4xlarge EC2 instance on Amazon AWS) where I also have grafana and prometheus setup to monitor the pods resource consumption. During a test run of 10 RPS, the response times stayed under a minute, however when increasing the load to 100 RPS, majority of the response times exceeded 5 minutes which resulted in 504 Gateway timeout errors. I monitored the pods resource consumption during the test run and found that it was using between 12 and 15 cpu cores and up to 5Gb which didn't seem to be overloading the node. The ejabberd pod is also connected to an MySQL RDS r5.xlarge instance (4CPU and 32GB RAM) with a 100GB SSD at 1000 IOPS (provisioned IOPS). I suspected it could have been a bottleneck with the database but I've checked the write IOPS and it was at most 500 counts/sec – the RDS cpu was at 20% and the free-able memory was at ~28GB. The backend also occasionally received 400 Bad Request errors from the ejabberd pod but I didn't get any errors or warnings in the ejabberd error.log file for these. I did however get a few of the following errors:

2019-05-03 11:01:39.608 [error] <0.1836.1>@ejabberd_sm:route:146 failed to route packet:
#message{
 id = <<>>,type = normal,lang = <<>>,
 from =
  #jid{
   user = <<"5ccab488e1abbf0001b2dd47_2_l">>,
   server = <<"muc.xmpp.example.com">>,resource = <<>>,
   luser = <<"5ccab488e1abbf0001b2dd47_2_l">>,
   lserver = <<"muc.xmpp.example.com">>,lresource = <<>>},
 to =
  #jid{
   user = <<"jbvksnzus2kp6u41mekayi2h55pjga">>,
   server = <<"xmpp.example.com">>,resource = <<>>,
   luser = <<"jbvksnzus2kp6u41mekayi2h55pjga">>,
   lserver = <<"xmpp.example.com">>,lresource = <<>>},
 subject = [],body = [],thread = undefined,
 sub_els =
  [#ps_event{
    items =
     #ps_items{
      xmlns = <<>>,node = <<"urn:xmpp:mucsub:nodes:messages">>,
      items =
       [#ps_item{
         xmlns = <<>>,id = <<"6420966739914419237">>,
         sub_els =
          [#message{
            id = <<"9782689453704005349">>,type = groupchat,lang = <<>>,
            from =
             #jid{
              user = <<"5ccab488e1abbf0001b2dd47_2_l">>,
              server = <<"muc.xmpp.example.com">>,
              resource = <<"uttersystem">>,
              luser = <<"5ccab488e1abbf0001b2dd47_2_l">>,
              lserver = <<"muc.xmpp.example.com">>,
              lresource = <<"uttersystem">>},
            to =
             #jid{
              user = <<"jbvksnzus2kp6u41mekayi2h55pjga">>,
              server = <<"xmpp.example.com">>,resource = <<>>,
              luser = <<"jbvksnzus2kp6u41mekayi2h55pjga">>,
              lserver = <<"xmpp.example.com">>,lresource = <<>>},
            subject = [#text{lang = <<"en">>,data = <<"user:joined">>}],
            body =
             [#text{
               lang = <<"en">>,
               data =
                <<"{\"displayName\":\"dEdibawitIbQPkyQmoZhsEoqNTLRwObIxpghFTaBFxbslOrzAaaqIVbtTrHCN\",\"username\":\"hn288kt338srg1240xiti7d19racvl\"}">>}],
            thread = undefined,
            sub_els =
             [#mam_archived{
               by =
                #jid{
                 user = <<"5ccab488e1abbf0001b2dd47_2_l">>,
              ...
Reason = {error,{{badmatch,{error,timeout}},[{ejabberd_auth_http,make_req,5,[{file,"/home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/ejabberd_auth_http.erl"},{line,225}]},{ejabberd_auth_http,user_exists,2,[{file,"/home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/ejabberd_auth_http.erl"},{line,163}]},{ejabberd_auth,'-user_exists/2-fun-0-',3,[{file,"src/ejabberd_auth.erl"},{line,386}]},{lists,any,2,[{file,"lists.erl"},{line,1225}]},{ejabberd_sm,route_message,1,[{file,"src/ejabberd_sm.erl"},{line,731}]},{ejabberd_sm,route,1,[{file,"src/ejabberd_sm.erl"},{line,143}]},{ejabberd_local,route,1,[{file,"src/ejabberd_local.erl"},{line,72}]},{ejabberd_router,do_route,1,[{file,"src/ejabberd_router.erl"},{line,368}]}]}}

I also got a few deadlock errors SQL query INSERT INTO muc_room(name, host, opts) ... #40001Deadlock found when trying to get lock; try restarting transaction.

Are there any optimisations I can do to improve the response times? I was also thinking of installing ejabberd on an server instead of containerizing it but I am not sure if this would make a difference.

Alpine 3.11 Version Upgrade in Dockerfile causes elixir startup issue with `stun_not_compiled`

I tried to startup ejabberd with elixir and faced this issue:

ejabberd_gitsrc_server | 2020-05-16 07:18:42.133117+00:00 [info] Loading configuration from config/ejabberd.yml
ejabberd_gitsrc_server | 2020-05-16 07:18:42.191853+00:00 [critical] Listening module ejabberd_stun is not available: ejabberd is not compiled with STUN/TURN support
ejabberd_gitsrc_server | 2020-05-16 07:18:42.199395+00:00 [critical] Failed to start ejabberd application: Exception occurred during configuration processing. This is mo
st likely due to faulty/incompatible validator in third-party code. If you are not running any third-party code, please report the bug with ejabberd configuration file a
ttached and the following stacktrace included:
ejabberd_gitsrc_server | ** exception error: stun_not_compiled
ejabberd_gitsrc_server |    in function  ejabberd_stun:fail/0 (src/ejabberd_stun.erl, line 38)
ejabberd_gitsrc_server |    in call from ejabberd_listener:validator/2 (src/ejabberd_listener.erl, line 527)
ejabberd_gitsrc_server |    in call from ejabberd_listener:'-validator/0-fun-1-'/1 (src/ejabberd_listener.erl, line 521)
ejabberd_gitsrc_server |    in call from yconf:'-list/2-fun-0-'/3 (/app/ejabberd/deps/yconf/src/yconf.erl, line 541)
ejabberd_gitsrc_server |    in call from lists:mapfoldl/3 (lists.erl, line 1354)
ejabberd_gitsrc_server |    in call from lists:mapfoldl/3 (lists.erl, line 1355)
ejabberd_gitsrc_server |    in call from yconf:'-list/2-fun-1-'/3 (/app/ejabberd/deps/yconf/src/yconf.erl, line 537)
ejabberd_gitsrc_server |    in call from yconf:'-and_then/2-fun-0-'/3 (/app/ejabberd/deps/yconf/src/yconf.erl, line 616)
Host OS and Version: Ubuntu 20.04

Docker Image Details

Erlang Version: Erlang/OTP 22 [erts-10.5] [source] [64-bit]
Elixir Version: 1.9.2 installed by Dockerfile automatically
Steps Followed:
  • cloned ejabberd from Git
  • docker run with volumes as specified in the README of this repo.

I searched here and many other places, trying to find a solution and finally found that downgrading the alpine version to 3.9 and rebuilding the docker image, installed Erlang/OTP 21 and elixir 1.7.4.

Then, the docker image started without stun compilation issues. I'm not sure, if this is the right way to handle it, so just curious to see if there are other alternative solutions to this issue.

With Alpine 3.11, the available elixir version is only 1.9.2, I can also source compile elixir 1.7.4 directly, haven't tried that yet.

ecs: logging is somewhat broken; also, outdated options

Minimal example (stock config etc):

# docker run --name ejabberd ejabberd/ecs:20.01
2020-02-14 13:48:22.695432+00:00 [critical] Failed to set logging: {error,
                           {handler_not_added,
                               {invalid_config,logger_std_h,
                                   #{file =>
                                         "/home/ejabberd/logs/ejabberd.log"}}}}
2020-02-14 13:48:23.005695+00:00 [warning] Option 'log_rotate_date' is deprecated and has no effect anymore. Please remove it from the configuration.
2020-02-14 13:48:23.005974+00:00 [warning] Option 'log_rate_limit' is deprecated and has no effect anymore. Please remove it from the configuration.
…

It still logs to stdout/stderr, however snippet from image's README does not work:

# docker exec -it ejabberd tail -f logs/ejabberd.log
tail: can't open 'logs/ejabberd.log': No such file or directory
tail: no files

So there's two ways to resolve this:

  • fix the file logging,
  • embrace std streams for logging and update README accordingly.

before it worked well but now i can not build - returned a non-zero code: 1

Hi
i had this docker file and it worked well but i do not why now it is not working

this is my docker file

FROM ejabberd/mix as builder
ARG VERSION
ENV VERSION=${VERSION:-latest} \
    MIX_ENV=prod
LABEL maintainer="ProcessOne <[email protected]>" \
      product="Ejabberd Community Server builder"

# Get ejabberd sources, dependencies, configuration
RUN git clone https://github.com/processone/ejabberd.git
WORKDIR /ejabberd
COPY vars.config .
COPY rel/*exs rel/
RUN git checkout ${VERSION/latest/HEAD} \
 && mix deps.get \
 && (cd deps/eimp; ./configure)

# Compile
RUN mix do compile, distillery.init, distillery.release --env=prod

# Prepare runtime environment
RUN mkdir runtime \
 && tar -C runtime -zxf _build/prod/rel/ejabberd/releases/*/ejabberd.tar.gz \
 && cd runtime \
 && cp releases/*/start.boot bin \
 && echo 'beam_lib:strip_files(filelib:wildcard("lib/*/ebin/*beam")), init:stop().' | erts*/bin/erl -boot start_clean >/dev/null \
 && mv erts*/bin/* bin \
 && rm -rf releases erts* bin/*src bin/dialyzer bin/typer \
 && rm bin/ejabberd bin/ejabberd.bat \
 && cp -r /ejabberd/sql lib/ejabberd-*/priv

# Runtime container
FROM alpine:3.9
ARG VERSION
ARG VCS_REF
ARG BUILD_DATE
ENV TERM=xterm \
    LC_ALL=C.UTF-8 \
    LANG=en_US.UTF-8 \
    LANGUAGE=en_US.UTF-8 \
    REPLACE_OS_VARS=true \
    HOME=/home/ejabberd \
    VERSION=${VERSION:-latest}
LABEL maintainer="ProcessOne <[email protected]>" \
      product="Ejabberd Community Server Official Docker Image" \
      version=$VERSION \
      org.label-schema.vcs-ref=$VCS_REF \
      org.label-schema.vcs-url="https://github.com/processone/docker-ejabberd" \
      org.label-schema.build-date=$BUILD_DATE \
      org.label-schema.name="Ejabberd Community Server Official Docker Image" \
      org.label-schema.description="Robust, Scalable and Extensible Realtime Server using XMPP, MQTT and SIP" \
      org.label-schema.url="https://www.ejabberd.im/" \
      org.label-schema.vendor="ProcessOne" \
      org.label-schema.version=$VERSION \
      org.label-schema.schema-version="1.0"

# Create directory structure and user for ejabberd
RUN addgroup ejabberd -g 9000 \
 && adduser -s /bin/sh -D -G ejabberd ejabberd -u 9000 \
 && mkdir -p /home/ejabberd/conf /home/ejabberd/database /home/ejabberd/logs /home/ejabberd/upload \
 && chown -R ejabberd:ejabberd /home/ejabberd

# Install required dependencies
RUN apk upgrade --update musl \
 && apk add \
    expat \
    gd \
    jpeg \
    libgd \
    libpng \
    libstdc++ \
    libwebp \
    ncurses-libs \
    openssl \
    sqlite \
    sqlite-libs \
    unixodbc \
    yaml \
    zlib \
 && rm -rf /var/cache/apk/*
# Install ejabberd
WORKDIR $HOME
COPY --from=builder /ejabberd/runtime .
COPY bin/* bin/
RUN chmod 755 bin/ejabberdctl bin/ejabberdapi bin/erl
COPY --chown=ejabberd:ejabberd conf conf/
ADD --chown=ejabberd:ejabberd https://download.process-one.net/cacert.pem conf/cacert.pem
ADD --chown=ejabberd:ejabberd bootstrap.sh /
# Setup runtime environment
USER ejabberd
VOLUME ["$HOME/database","$HOME/conf","$HOME/logs","$HOME/upload"]
EXPOSE 1883 4369-4399 5222 5224 5269 5280 5443


ENTRYPOINT ["/bootstrap.sh"]

and this is the ouput from Console terminal

sudo docker build  --no-cache  -t ejabberd/ecs .
Sending build context to Docker daemon  5.104MB
Step 1/33 : FROM ejabberd/mix as builder
 ---> a73c9846d59f
Step 2/33 : ARG VERSION
 ---> Running in 2a22baf0ee57
Removing intermediate container 2a22baf0ee57
 ---> a6dc03e856fc
Step 3/33 : ENV VERSION=${VERSION:-latest}     MIX_ENV=prod
 ---> Running in ed3414a585ce
Removing intermediate container ed3414a585ce
 ---> 07a849ba8403
Step 4/33 : LABEL maintainer="ProcessOne <[email protected]>"     product="Ejabberd Community Server builder"
 ---> Running in 3c83e3b24818
Removing intermediate container 3c83e3b24818
 ---> 45ce8dab95be
Step 5/33 : RUN git clone https://github.com/processone/ejabberd.git
 ---> Running in ea74bf6e822d
Cloning into 'ejabberd'...
Removing intermediate container ea74bf6e822d
 ---> fb8133cc06bf
Step 6/33 : WORKDIR /ejabberd
 ---> Running in ac63010209c7
Removing intermediate container ac63010209c7
 ---> 7e90be275801
Step 7/33 : COPY vars.config .
 ---> 7f6f4747cc15
Step 8/33 : COPY rel/*exs rel/
 ---> 9c5309c5127f
Step 9/33 : RUN git checkout ${VERSION/latest/HEAD}     && mix deps.get     && (cd deps/eimp; ./configure)
 ---> Running in cb8273c8458e
Your branch is up to date with 'origin/master'.
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
  artificery 0.4.3
  base64url 0.0.1
  cache_tab 1.0.25
  distillery 2.1.1
  earmark_parser 1.4.10
  eimp 1.0.17
  eredis 1.2.0
  esip 1.0.37
  ex_doc 0.22.2
  ezlib 1.0.8
  fast_tls 1.1.8
  fast_xml 1.1.43
  fast_yaml 1.0.27
  goldrush 0.1.9
  idna 6.0.0
  jiffy 1.0.4
  jose 1.9.0
  lager 3.6.10
  makeup 1.0.3
  makeup_elixir 0.14.1
  mqtree 1.0.10
  nimble_parsec 0.6.0
  p1_acme 1.0.6
  p1_mysql 1.0.16
  p1_oauth2 0.6.7
  p1_pgsql 1.1.10
  p1_utils 1.0.20
  pkix 1.0.6
  sqlite3 1.1.6
  stringprep 1.0.22
  stun 1.0.37
  unicode_util_compat 0.4.1
  xmpp 1.4.9
  yconf 1.0.7
* Getting lager (Hex package)
* Getting p1_utils (Hex package)
* Getting fast_xml (Hex package)
* Getting xmpp (Hex package)
* Getting cache_tab (Hex package)
* Getting stringprep (Hex package)
* Getting fast_yaml (Hex package)
* Getting fast_tls (Hex package)
* Getting stun (Hex package)
* Getting esip (Hex package)
* Getting p1_mysql (Hex package)
* Getting mqtree (Hex package)
* Getting p1_pgsql (Hex package)
* Getting jiffy (Hex package)
* Getting p1_oauth2 (Hex package)
* Getting distillery (Hex package)
* Getting pkix (Hex package)
* Getting ex_doc (Hex package)
* Getting eimp (Hex package)
* Getting base64url (Hex package)
* Getting yconf (Hex package)
* Getting jose (Hex package)
* Getting idna (Hex package)
* Getting p1_acme (Hex package)
* Getting sqlite3 (Hex package)
* Getting eredis (Hex package)
* Getting ezlib (Hex package)
* Getting unicode_util_compat (Hex package)
* Getting earmark_parser (Hex package)
* Getting makeup_elixir (Hex package)
* Getting makeup (Hex package)
* Getting nimble_parsec (Hex package)
* Getting artificery (Hex package)
* Getting goldrush (Hex package)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ANSI C header files... (cached) yes
checking for erl... /usr/bin/erl
checking for erlc... /usr/bin/erlc
checking gd.h usability... yes
checking gd.h presence... yes
checking for gd.h... yes
checking for library containing gdImageScale... -lgd
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for library containing gdImageCreateFromJpegPtr, gdImageJpegPtr... none required
checking for library containing jpeg_read_header... -ljpeg
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for library containing gdImageCreateFromPngPtr, gdImagePngPtr... none required
checking for library containing png_sig_cmp... -lpng
checking webp/decode.h usability... yes
checking webp/decode.h presence... yes
checking for webp/decode.h... yes
checking for library containing gdImageCreateFromWebpPtr, gdImageWebpPtr... none required
checking for library containing WebPGetInfo... -lwebp
configure: creating ./config.status
config.status: creating vars.config
Removing intermediate container cb8273c8458e
 ---> ec0a84da9fe9
Step 10/33 : RUN mix do compile, distillery.init, distillery.release
 ---> Running in 8d04aabfb7e5
===> Fetching rebar3_hex v6.10.1
===> Downloaded package, caching at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar
===> Fetching hex_core v0.7.0
===> Downloaded package, caching at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar
===> Fetching verl v1.0.2
===> Downloaded package, caching at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling p1_oauth2
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling p1_utils
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Fetching pc v1.11.0
===> Downloaded package, caching at /root/.cache/rebar3/hex/hexpm/packages/pc-1.11.0.tar
===> Compiling pc
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling cache_tab
===> Compiling c_src/ets_cache.c
===> Linking /ejabberd/deps/cache_tab/priv/lib/ets_cache.so
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Fetching pc v1.11.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/pc-1.11.0.tar is up to date, reusing it
===> Compiling pc
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling eimp
===> Compiling c_src/eimp.c
===> Linking /ejabberd/deps/eimp/priv/bin/eimp
===> Compiling eredis
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling pkix
==> base64url (compile)
Compiled src/base64url.erl
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Fetching pc v1.11.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/pc-1.11.0.tar is up to date, reusing it
===> Compiling pc
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling p1_mysql
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Fetching pc v1.11.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/pc-1.11.0.tar is up to date, reusing it
===> Compiling pc
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling p1_pgsql
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Fetching pc v1.11.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/pc-1.11.0.tar is up to date, reusing it
===> Compiling pc
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling stringprep
===> Compiling c_src/stringprep.cpp
===> Linking /ejabberd/deps/stringprep/priv/lib/stringprep.so
===> Compiling unicode_util_compat
===> Compiling idna
==> jose
Compiling 90 files (.erl)
Compiling 8 files (.ex)
warning: function Poison.EncodeError.exception/1 is undefined (module Poison.EncodeError is not available)
  lib/jose/poison/lexical_encoder.ex:8

Generated jose app
===> Compiling jiffy
Compiling c_src/decoder.c
Compiling c_src/encoder.c
Compiling c_src/jiffy.c
Compiling c_src/termstack.c
Compiling c_src/utf8.c
Compiling c_src/util.c
Compiling c_src/doubles.cc
Compiling c_src/objects.cc
Compiling c_src/double-conversion/bignum-dtoa.cc
Compiling c_src/double-conversion/bignum.cc
Compiling c_src/double-conversion/cached-powers.cc
Compiling c_src/double-conversion/diy-fp.cc
Compiling c_src/double-conversion/double-conversion.cc
Compiling c_src/double-conversion/fast-dtoa.cc
Compiling c_src/double-conversion/fixed-dtoa.cc
Compiling c_src/double-conversion/strtod.cc
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Fetching pc v1.11.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/pc-1.11.0.tar is up to date, reusing it
===> Compiling pc
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling ezlib
===> Compiling c_src/ezlib_drv.c
===> Linking /ejabberd/deps/ezlib/priv/lib/ezlib_drv.so
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Fetching pc v1.11.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/pc-1.11.0.tar is up to date, reusing it
===> Compiling pc
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling fast_tls
===> Compiling c_src/fast_tls.c
===> Compiling c_src/ioqueue.c
===> Compiling c_src/p1_sha.c
===> Linking /ejabberd/deps/fast_tls/priv/lib/fast_tls.so
===> Linking /ejabberd/deps/fast_tls/priv/lib/p1_sha.so
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Fetching pc v1.11.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/pc-1.11.0.tar is up to date, reusing it
===> Compiling pc
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling sqlite3
===> Compiling c_src/sqlite3_drv.c
===> Linking /ejabberd/deps/sqlite3/priv/sqlite3_drv.so
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Fetching pc v1.11.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/pc-1.11.0.tar is up to date, reusing it
===> Compiling pc
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling mqtree
===> Compiling c_src/mqtree.c
===> Linking /ejabberd/deps/mqtree/priv/lib/mqtree.so
===> Compiling goldrush
===> Compiling lager
==> artificery
Compiling 10 files (.ex)
Generated artificery app
==> distillery
Compiling 33 files (.ex)
Generated distillery app
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Fetching pc v1.11.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/pc-1.11.0.tar is up to date, reusing it
===> Compiling pc
===> Fetching coveralls v2.2.0
===> Downloaded package, caching at /root/.cache/rebar3/hex/hexpm/packages/coveralls-2.2.0.tar
===> Fetching jsx v2.10.0
===> Downloaded package, caching at /root/.cache/rebar3/hex/hexpm/packages/jsx-2.10.0.tar
===> Compiling jsx
===> Compiling coveralls
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling fast_yaml
===> Compiling c_src/fast_yaml.c
===> Linking /ejabberd/deps/fast_yaml/priv/lib/fast_yaml.so
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling yconf
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling p1_acme
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Fetching pc v1.11.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/pc-1.11.0.tar is up to date, reusing it
===> Compiling pc
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling fast_xml
===> Compiling c_src/fxml.c
===> Compiling c_src/fxml_stream.c
===> Linking /ejabberd/deps/fast_xml/priv/lib/fxml.so
===> Linking /ejabberd/deps/fast_xml/priv/lib/fxml_stream.so
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Fetching pc v1.11.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/pc-1.11.0.tar is up to date, reusing it
===> Compiling pc
===> Fetching provider_asn1 v0.2.3
===> Downloaded package, caching at /root/.cache/rebar3/hex/hexpm/packages/provider_asn1-0.2.3.tar
===> Compiling provider_asn1
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling xmpp
===> Compiling c_src/jid.c
===> Compiling c_src/xmpp_uri.c
===> Compiling c_src/xmpp_lang.c
===> Linking /ejabberd/deps/xmpp/priv/lib/jid.so
===> Linking /ejabberd/deps/xmpp/priv/lib/xmpp_uri.so
===> Linking /ejabberd/deps/xmpp/priv/lib/xmpp_lang.so
===> Generating ASN.1 files.
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling stun
===> Fetching rebar3_hex v6.10.1
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.1.tar is up to date, reusing it
===> Fetching hex_core v0.7.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.0.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Fetching pc v1.11.0
===> Version cached at /root/.cache/rebar3/hex/hexpm/packages/pc-1.11.0.tar is up to date, reusing it
===> Compiling pc
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling esip
===> Compiling c_src/esip_codec.c
===> Linking /ejabberd/deps/esip/priv/lib/esip_drv.so
==> ejabberd
Compiling 1 file (.yrl)
Compiling 267 files (.erl)
src/mod_sip.erl:46: Warning: behaviour gen_mod undefined
src/mod_mam.erl:690: field flippage undefined in record mam_query
src/mod_mam.erl:693: variable 'RSM' is unbound
src/mod_mam.erl:694: variable 'FlipPage' is unbound
src/mod_mam_mnesia.erl:27: Warning: behaviour mod_mam undefined
src/mod_mam_sql.erl:28: Warning: behaviour mod_mam undefined
The command '/bin/sh -c mix do compile, distillery.init, distillery.release --env=prod' returned a non-zero code: 1

It does not work with my own certificate

Hello guys,

I've reviewed the other certificate-related issues but no one seems to be exactly the same what's happening to me, so I decided to open this one. Sorry if not.

I have my own certificate (for *.mydomain.com) currently working in a production server.

Now, we want to migrate our infrastructure (at least the one for development purposes) to containers, so I'm doing some tests with the last ecs version.

Currently I'm mounting the entire conf directory.
The problem is that I got this error when a client tries to connect with TLS:

Failed to find a certificate matching the domain in SNI extension

After investigating the source code of the TLS module, it seems that the certificate is not being loaded properly. However, I've checked that the container's user ejabberd (9000) has permission enough to load it.

So, do you guys have any idea about what's happening? Or do you know how I can debug for further information in order to discover what's failing?

Thanks a lot!
Joan :)

Where does "ejabberdapi" comes from?

I built an image for arm. The image works but I want to also compile ejabberdapi.

I thought it would be https://github.com/processone/ejabberd-api so I compiled it and injected it in the image in another stage of the multi-stage build... It works fine.

But the command line switches does not match the examples in the docker README:

$ ~/bin ./ejabberdapi register --endpoint=http://127.0.0.1:5280/ --jid=admin@localhost --password=passw0rd
ejabberdapi: error: unknown long flag '--endpoint', try --help
$ ~/bin ./ejabberdapi register --jid=admin@localhost --password=passw0rd
ejabberdapi: error: could not load token file ".ejabberd-oauth.json": open .ejabberd-oauth.json: no such file or directory

Certificates are not automatically reloaded

Certificates are not automatically reloaded when they are renewed, the admin has to manually trigger a config reload to have them reloaded. It seems the inotify support is missing from the docker image.

Issues with mounting database host directory

The recipe prescribed on this page https://hub.docker.com/r/ejabberd/ecs/
docker run -d --name ejabberd -v $(pwd)/ejabberd.yml:/home/ejabberd/conf/ejabberd.yml -v $(pwd)/database:/home/ejabberd/database -p 5222:5222 ejabberd/ecs
results in the container exiting immediately with status code 6.

Here is the log from the exited container

mkdir: can't create directory '/home/ejabberd/database/ejabberd@81c18d859392': Permission denied
/home/ejabberd/bin/ejabberdctl: cd: line 274: can't cd to /home/ejabberd/database/ejabberd@81c18d859392: No such file or directory
ERROR: can not access directory /home/ejabberd/database/ejabberd@81c18d859392

Changing the permissions of the directory to 777 seems to work. Is this the idiomatic way of mounting a host directory?

  • docker image ejabberd/ecs Image ID 19475941e4c2
  • docker host archlinux box
  • Docker version 18.09.0-ce, build 4d60db472b

Several binaries not readable and executable for ejabberd user

Running the Docker image entry point fails with bin/ejabberdctl: Permission denied. The reason is, that several binaries are missing the permissions to be read and executed by others.

ls -lh bin
total 7820
-rwxr-xr-x    1 root     root        2.4M Nov 12 15:34 beam.smp
-rwxr-xr-x    1 root     root       21.9K Nov 12 15:34 ct_run
-rwxr-xr-x    1 root     root        9.7K Nov 12 15:34 dyn_erl
-rwxrwx---    1 root     root        4.8M Nov 12 14:34 ejabberdapi
-rwxrwx---    1 root     root       10.9K Nov 12 14:34 ejabberdctl
-rwxr-xr-x    1 root     root       45.9K Nov 12 15:34 epmd
-rwxrwx---    1 root     root         196 Nov 12 14:34 erl
-rwxr-xr-x    1 root     root       13.7K Nov 12 15:34 erl_child_setup
-rwxr-xr-x    1 root     root       21.9K Nov 12 15:34 erlc
-rwxr-xr-x    1 root     root       38.5K Nov 12 15:34 erlexec
-rwxr-xr-x    1 root     root       21.9K Nov 12 15:34 escript
-rwxr-xr-x    1 root     root        9.7K Nov 12 15:34 heart
-rwxr-xr-x    1 root     root       33.9K Nov 12 15:34 inet_gethost
-rw-r--r--    1 root     root       19.5K Nov 12 15:34 no_dot_erlang.boot
-rwxr-xr-x    1 root     root        6.7K Nov 12 15:34 nodetool
-rw-r--r--    1 root     root       10.6K Nov 12 15:34 release_utils.escript
-rwxr-xr-x    1 root     root       21.7K Nov 12 15:34 run_erl
-rwxr-xr-x    1 root     root        1.1K Nov 12 15:34 start
-rw-r--r--    1 root     root       61.6K Nov 12 15:34 start.boot
-rw-r--r--    1 root     root       19.5K Nov 12 15:34 start_clean.boot
-rwxr-xr-x    1 root     root       13.7K Nov 12 15:34 to_erl

Is that a problem in the build image?

Adding the line below to the Dockerfile fixes the issue for me, that means bin/ejabberdctl can be executed without errors.

RUN chmod o+rx bin/ejabberdctl bin/ejabberdapi bin/erl

Permission settings for bind to host system?

I am new to Docker, so maybe I am making a mistake but it seems to me there is an issue with the user permissions if you try to bind mount the config/log directory to a directory on the host system.

i.e. I am not using a docker volume (other than for the mnesia db), but would like to have direct access to the config directory from the host system. Doing so make the docker container fail to start and the logs make me assume that the issue is that the user inside the container doesn't have permission to write to these directories then.

For some other docker containers such a setup worked, but maybe they are using the root user for running the software inside?

I guess I would need to change the permissions of these folders, but since I have no idea what kind of user (UID:GID) is running inside the container, I am a bit stuck.

The reason I would like these config files accessible through the host system is mainly because I want to be able to copy SSL certs from Lets Encrypt certbot into it. Otherwise: how would I use the certbot that seems to have been added to ejabberd recently from within docker?

Cannot run ejabberd with ejabberd/mix image

I have been using ejabberd cloned from git.

I then would build it properly with the commands described in README

git clone https://github.com/processone/ejabberd.git
cd ejabberd
docker run --rm -v $(pwd):$(pwd) -w $(pwd) ejabberd/mix do deps.get, deps.compile, compile

However, the command to make it run fails:

docker run --rm -it -p 5222:5222 -p 5280:5280 -v $(pwd):$(pwd) -w $(pwd) --entrypoint="/usr/bin/iex" ejabberd/mix -S mix

It fails due to missing configuration file:

15:24:09.020 [error] Cannot load /Users/mremond/devel/ejabberd/ejabberd/config/ejabberd.yml: no such file or directory

=INFO REPORT==== 26-Dec-2018::15:24:09 ===
    application: lager
    exited: stopped
    type: temporary
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
[os_mon] memory supervisor port (memsup): Erlang has closed

I had to do:

cp ejabberd.yml.example config/ejabberd.yml

17.03 unable to get local issuer certificate

for just about every host a connection is being established to i get this error:

2017-08-19T15:02:52.652191525Z 15:02:52.651 [info] (tls|<0.1721.0>) Failed inbound s2s EXTERNAL authentication otherhost -> myhost (myhostip): unable to get local issuer certificate

any ideas to why this happens?

CA file gets lost when using volume

In the Dockerfile, the CA certificate file is put inside the $HOME/conf directory. However, when mounting the conf directory as a volume (as is suggested by the Dockerfile), the content of the conf/ directory gets lost. I think it is commonly known that a Dockerfile should not read to volume directories since it will make the content be lost when the volume is mounted.

The result is this message:

09:40:28.588 [warning] CA directory /etc/ssl/certs doesn't contain hashed certificate files;
configuring 'ca_path' or 'ca_file' options might help

Dockerized ejabberd does not support mod_avatar

I tried to run the latest version of ejabberd/ecs but it always failed to running due to an error below,

[critical] failed to start application 'eimp': {error, {"no such file or directory","eimp.app"}}

Is it happen in my machine only ? or Anyone has some clues to fix this issue ? I've tried ejabberd/ecs version 17.12 it works perfectly.

Provide out of the box clustering

The official ejabberd community server Docker image does not offer any way to form a cluster. It is hard to find resources online regarding clustering ejabberd.

Are PR accepted?

Broken Persistency of database (ecs)

If migrating from older versions to 18.01, the database can't be found. This is because 18.01 has relocated it's Database from <database-volume>/ to <database-volume>/ejabberd@<container-hostname>. As the container-hostname is not persistent - this seems to me like a bug that ejabberd searches in a effectively non-constant path.

Maybe a configuration option inside ejabberd.yml is also enough - it's just not documented in that case.

Thanks in advance.

[critical] failed to start application 'riakc':

When trying to run a docker container using this image https://hub.docker.com/r/ejabberd/ecs/ I am getting error message

"[critical] failed to start application 'riakc': {error,
                                      {"no such file or directory",
                                       "riakc.app"}}"

My ejabberd.yml includes:

riak_server: "riak"
riak_port: 8087
riak_pool_size: 10
riak_start_interval: 30
modules:
  mod_last:
    db_type: riak
  mod_offline:
    access_max_user_messages: max_user_offline_messages
    db_type: riak
  mod_roster:
    db_type: riak

tried to build from your repo using command ./build.sh 18.03 (also added {riak,true} in vars.config) but got the same problem.
How can I make riak enabled in ejabberd/ecs docker image?

Failed to start external authentication program 'python /home/ejabberd/conf/extauth.py'

I placed the extauth file in the external folder /opt/ejabberd/conf which I bindded to the conf dir. Starting the program fails. Is my approach wrong?
By the way, the python library is installed by an app on docker from python-alpine

docker compose:

version: '3'
services:

  api:
    build: .
    links:
      - "ejabberd:ejabberd"
    ports:
      - "5010:5010"
    volumes:
      - .:/api
    networks:
      - frontend
      - backend

  ejabberd:
    image: ejabberd/ecs:20.07
    restart: unless-stopped
    ports:
      - "5990:5222"
      - "5991:5280"
    volumes:
      - ./docker-ejabberd/logs/:/home/ejabberd/logs/
      - ./docker-ejabberd/db/:/home/ejabberd/database/
      - ./docker-ejabberd/conf/:/home/ejabberd/conf/
    networks:
      - frontend
      - backend

Build version 16.12 fails

Building version 16.12 with "./build.sh 16.12" fails at step 10/27 with following error:

**** (Mix) Could not compile dependency :stringprep, "/root/.mix/rebar3 bare compile --paths "/ejabberd/_build/prod/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile stringprep", update it with "mix deps.update stringprep" or clean it with "mix deps.clean stringprep"**

To reproduce the issue:

git clone https://github.com/processone/docker-ejabberd
cd docker-ejabberd/ecs
./build.sh 16.12

Database always recreated at each run

Deleting and creating/running a container with the same database directory mounted using a volume, a new database is created, and the users have to be recreated.

$ ls -ltr database/
total 52
drwxr-xr-x    2 ejabberd ejabberd         6 Nov 19 16:14 ejabberd@dfe20b018def
drwxr-xr-x    4 ejabberd ejabberd      4096 Nov 19 16:20 ejabberd@70335251a5ce
drwxr-xr-x    4 ejabberd ejabberd      4096 Nov 19 17:34 ejabberd@908f0eb7cb1c
drwxr-xr-x    4 ejabberd ejabberd      4096 Nov 19 17:42 ejabberd@974dcd37bb77
drwxr-xr-x    4 ejabberd ejabberd      4096 Nov 20 10:13 ejabberd@470e55404b5d
drwxr-xr-x    4 ejabberd ejabberd      4096 Nov 20 20:36 ejabberd@6f5f2fb7bc10
drwxr-xr-x    4 ejabberd ejabberd      4096 Nov 21 15:08 ejabberd@29e7e40483d5
drwxr-xr-x    4 ejabberd ejabberd      4096 Nov 21 16:31 ejabberd@3f03aeae441e
drwxr-xr-x    2 ejabberd ejabberd         6 Nov 21 16:34 ejabberd@5e6298af847a
drwxr-xr-x    2 ejabberd ejabberd         6 Nov 22 09:47 ejabberd@d66632fab08d
drwxr-xr-x    4 ejabberd ejabberd      4096 Nov 22 09:51 ejabberd@19aa03c635de

Image build fails in rebar3 bare compile

Trying to build version 18.12 fails with the error below.

$ cd ecs
$ sudo ./build.sh 18.12
[…]
===> Compiling /ejabberd/deps/xmpp/c_src/xmpp_uri.c
===> Linking /ejabberd/deps/xmpp/priv/lib/jid.so
===> Linking /ejabberd/deps/xmpp/priv/lib/xmpp_lang.so
===> Linking /ejabberd/deps/xmpp/priv/lib/xmpp_uri.so
===> Compiling src/XmppAddr.erl failed
src/XmppAddr.erl:44: illegal pattern
src/XmppAddr.erl:45: variable 'Exception' is unbound
src/XmppAddr.erl:47: variable 'Stk' is unbound
src/XmppAddr.erl:49: variable 'Stk' is unbound
src/XmppAddr.erl:58: illegal pattern
src/XmppAddr.erl:59: variable 'Exception' is unbound
src/XmppAddr.erl:61: variable 'Stk' is unbound
src/XmppAddr.erl:63: variable 'Stk' is unbound

==> ejabberd
** (Mix) Could not compile dependency :xmpp, "/root/.mix/rebar3 bare compile --paths "/ejabberd/_build/prod/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile xmpp", update it with "mix deps.update xmpp" or clean it with "mix deps.clean xmpp"
The command '/bin/sh -c mix do compile, release.init, release --env=prod' returned a non-zero code: 1
Error response from daemon: No such image: ejabberd/ecs:18.12

Build 18.04

Hey,

  1. Could you please build and publish 18.04?

  2. Is is possible to automate image creation when new releases are available?

  3. Also, what do you think about creating images using binary distributions instead of source code? I think it would be more consistent. When building from source code, we download dependencies using mix and rebar. Most dependencies are locked using mix.lock and rebar.config, but rebar plugins are not. Because plugins are not locked, we could end up with different results every time we rebuild images. One example of malfunction after a plugin update is blt/port_compiler#48. While pc was broken, it was impossible to build ejabberd from source.

Thanks!

`cacert.pem` download from the Web

Looking at ecs/Dockerfile (and building the image), cacert.pem is downloaded from the Web.

ADD --chown=ejabberd:ejabberd https://download.process-one.net/cacert.pem conf/cacert.pem

Is that a good practice? Doesn’t the Alpine repository contain such a list of certificates?

Account creation fails with permission error

Following the instructions in ecs/README.md to create an account, it fails with the error below.

$ sudo docker exec -it ejabberd bin/ejabberdapi register --endpoint=http://127.0.0.1:5280/ --jid=admin@localhost --password=passw0rd
ejabberdapi: error: user registration error for admin@localhost: Error 32: AccessRules: Account does not have the right to perform the operation.

** (Mix) Unknown package ex_doc in lockfile

I build and get thr error:

** (Mix) Unknown package ex_doc in lockfile
The command '/bin/sh -c git checkout ${VERSION/latest/HEAD} && mix deps.get && (cd deps/eimp; ./configure)' returned a non-zero code: 1

Please help me check and resolve

SQLite shared library missing

I tested SQLite support with the following simple config:

sql_type: sqlite
sql_database: "/home/ejabberd/database/ejabberd.sqlite"

When I run ejabberd, I get an error message about missing libraries:

12:16:07.894 [error] CRASH REPORT Process <0.915.0> with 0 neighbours exited with reason: "Error loading sqlite3_drv: Error loading shared library libsqlite3.so.0: No such file or directory (needed by /home/ejabberd/lib/sqlite3-1.1.6/priv/sqlite3_drv.so)" in gen_server:init_it/6 line 358
12:16:07.896 [warning] sqlite connection failed:
** Reason: "Error loading sqlite3_drv: Error loading shared library libsqlite3.so.0: No such file or directory (needed by /home/ejabberd/lib/sqlite3-1.1.6/priv/sqlite3_drv.so)"
** Retry after: 30 seconds
12:16:07.896 [warning] unexpected info in connecting: {'EXIT',<0.916.0>,"Error loading sqlite3_drv: Error loading shared library libsqlite3.so.0: No such file or directory (needed by /home/ejabberd/lib/sqlite3-1.1.6/priv/sqlite3_drv.so)"

If I'm not wrong, need to add sqlite-libs to Dockerfile.

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.