Closed kacperjurak closed 5 months ago
Hello,
How did you install this extra module? It indeed require couple extra modules that aren't distributed with ejabberd.
Right, problem confirmed.
ejabberdctl module_install ejabberd_auth_http
fails in the ejabberd container image: to install the module dependencies, git and make are required, and they aren't available in the container image (neither in ejabberd/ecs
nor the ghcr.io/processone/ejabberd
container images).
The manual solution is to install the development requirements:
sudo docker exec --user root eja apk add git make
And now in the container:
$ rm -rf .ejabberd-modules
$ ejabberdctl modules_update_specs
$ ejabberdctl module_install ejabberd_auth_http
/opt/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/deps/fusco/src/fusco_lib.erl:273:22: Warning: http_uri:decode/1 is deprecated and will be removed in OTP 27; use uri_string:unquote function instead
% 273| {http_uri:decode(User), "", HostPortPath};
% | ^
/opt/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/deps/fusco/src/fusco_lib.erl:275:22: Warning: http_uri:decode/1 is deprecated and will be removed in OTP 27; use uri_string:unquote function instead
% 275| {http_uri:decode(User), http_uri:decode(Passwd),
% | ^
/opt/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/deps/fusco/src/fusco_lib.erl:275:45: Warning: http_uri:decode/1 is deprecated and will be removed in OTP 27; use uri_string:unquote function instead
% 275| {http_uri:decode(User), http_uri:decode(Passwd),
% | ^
Module ejabberd_auth_http has been installed.
Now you can configure it in your ejabberd.yml
A definitive solution could be to include those packages in the container image (increasing the image size from 45 to 54 MB):
diff --git a/.github/container/Dockerfile b/.github/container/Dockerfile
index 94a9422f2..fa65931d4 100644
--- a/.github/container/Dockerfile
+++ b/.github/container/Dockerfile
@@ -158,6 +158,8 @@ RUN apk -U upgrade --available --no-cache \
$(cat /tmp/runDeps) \
so:libcap.so.2 \
so:libtdsodbc.so.0 \
+ git \
+ make \
tini \
&& ln -fs /usr/lib/libtdsodbc.so.0 /usr/lib/libtdsodbc.so
After regenerating the image, running a new container and setting this in ejabberd.yml, it starts correctly:
install_contrib_modules:
- ejabberd_auth_http
auth_method: http
auth_opts:
host: "http://localhost:12000"
Hello, I am not intending to compete with the official image, however, for https://github.com/sando38/helm-ejabberd I use a custom image which includes the ejabberd_auth_http
module:
version: '3'
services:
ejabberd:
image: ghcr.io/sando38/ejabberd:23.10-k8s3
command: >
sh -c "ejabberdctl foreground"
environment:
- ERLANG_NODE_ARG=ejabberd@localhost
Note: command and environment are required to simulate the behavior of the official image.
Update: I just saw you use a M1 (ARM64). The referenced image above is only built for (x86-64).
Hi, I use ejabberd in
docker-compose.yml
(at M1 Mac but I think this doesn't matter):When I install
ejabberd_auth_http
module and changeejabberd.yml
config file to:ejabberd stops working. For example, when I try to refresh admin page at web GUI I'm getting an error (full error at the end):
It looks like the library
cuesport
, which is a dependency for anejabberd_auth_http
module is not present in the docker build. I thinkejabberdctl module_install
must be broken in this docker image because there's no way to compile a dependency library while running Alpine Linux (without any compile tools).Full error below: