Closed jdsumsion closed 4 years ago
How do I get the ejabberd_auth_http
special module loaded so that it can be used?
Your steps from 1 to 3 are quite good, it should work and not show the error of step 4.
This is how I try it, and works correctly:
$ sudo docker pull ejabberd/ecs:20.07
20.07: Pulling from ejabberd/ecs
c9b1b535fdd9: Pull complete
c50d7f2eede5: Pull complete
f00b4c6d5dbf: Pull complete
1275b3ae010e: Pull complete
4e4ef80aa2b8: Pull complete
fb64b13d7b5a: Pull complete
8a54b4956f0f: Pull complete
Digest: sha256:cd50fbec8f71e320412f4a4b44e0a57cb7cbb4b6c4b42ef4d31534f8abf5e4f6
Status: Downloaded newer image for ejabberd/ecs:20.07
$ sudo docker run --name elive -it -p 5222:5222 -p 5280:5280 ejabberd/ecs:20.07 live
Then in another console:
$ sudo docker exec -it elive sh
$ ./bin/ejabberdctl modules_update_specs
$ ./bin/ejabberdctl module_install ejabberd_auth_http
/home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/deps/fusco/src/fusco.erl:573: Warning: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace
/home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/ejabberd_auth_http.erl:139: Warning: variable 'Server' is unused
/home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/ejabberd_auth_http.erl:139: Warning: variable 'User' is unused
/home/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/ejabberd_auth_http/src/ejabberd_auth_http.erl:164: Warning: variable 'Error' is unused
$ vi conf/ejabberd.yml
Or instead of vi, use any other text editor, and add to the end of the file the same options that you mentioned in step 3. Finally, reload the configuration:
$ ./bin/ejabberdctl reload_config
Thank you for your response!
I will try putting the config at the end of the file and see if that makes a difference.
And I'll follow your instructions exactly, maybe I messed something up in how I launched the docker.
The position in ejabberd.yml was the problem, thank you so much! If you put it at the end of the file it works great.
Thanks for your earlier maintenance work on this module! It is key to making ejabberd work for our current use case.
According to #284, it sounded like
ejabberd_auth_http
should be working, but I'm having issues getting it to loadEnvironment
Ejabberd: 20.07 Erlang: Erlang/OTP 22 [erts-10.5] [source] [64-bit] [smp:6:6] [ds:6:6:10] [async-threads:1] Installed from: Official Docker image
Steps to reproduce
auth_method: ejabberd_auth_http
fails in the same way withunsupported database
Looking in src/ejabberd_options.erl I can see:
which is apparently just a type check.
Here is the contents of my modules directory:
I've tried building 20.03 and the untagged revision 73dbd34f95f3959b8ffb08cf2699e1bca941af58 from HEAD ejabberd with the same results.
Confirmed that
ejabberd_auth_http.erl
has the following line:Seems like the
ejabberd_auth_http
module isn't loading properly so that it can be checked against theejabberd_auth
type.As a last ditch effort, I tried adding
ejabberd_auth_http: {}
undermodules:
but that didn't work because it apparently isn't a standalone module, it complained about not having astart/2
function.