Closed damirci closed 5 years ago
exception error: {{badmatch,{error,econnrefused}},[{ejabberd_auth_http,make_req,5,
This line says that, when making a HTTP request, ejabberd got the connection refused.
In case you need help debugging the problem: If you set loglevel to 5 in ejabberd.yml, you should get a log line indicating the Path that is to be requested, just before the crash.
just logs in ejabberd.log
changed like this:
2018-12-05 15:58:19.623 [info] <0.378.0>@ejabberd_listener:accept:221 (<0.525.0>) Accepted connection ::1:51480 -> ::1:5280 2018-12-05 15:58:19.623 [debug] <0.525.0>@ejabberd_http:init:149 S: [{[<<"ws">>],ejabberd_http_ws},{[<<"bosh">>],mod_bosh},{[<<"oauth">>],ejabberd_oauth},{[<<"api">>],mod_http_api},{[<<"admin">>],ejabberd_web_admin}] 2018-12-05 15:58:19.623 [debug] <0.525.0>@ejabberd_http:process_header:304 (#Port<0.30>) http query: 'GET' <<"/admin/">> 2018-12-05 15:58:19.623 [debug] <0.525.0>@ejabberd_http:process:391 [<<"admin">>] matches [<<"admin">>] 2018-12-05 15:58:19.623 [debug] <0.525.0>@ejabberd_auth_http:make_req:224 Making request 'check_password' for user admin@test.com... 2018-12-05 15:58:20.654 [error] <0.525.0>@ejabberd_auth_http:make_req:225 CRASH REPORT Process <0.525.0> with 0 neighbours crashed with reason: no match of right hand value {error,econnrefused} in ejabberd_auth_http:make_req/5 line 225 2018-12-05 15:58:20.654 [error] <0.511.0>@ejabberd_auth_http:make_req:225 Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.525.0> exit with reason no match of right hand value {error,econnrefused} in ejabberd_auth_http:make_req/5 line 225 in context child_terminated 2018-12-05 15:58:20.654 [debug] <0.526.0>@ejabberd_http:init:149 S: [{[<<"ws">>],ejabberd_http_ws},{[<<"bosh">>],mod_bosh},{[<<"oauth">>],ejabberd_oauth},{[<<"api">>],mod_http_api},{[<<"admin">>],ejabberd_web_admin}]
I get that same error message when I attempt to connect to an IP address and port where nothing is listening. However, if I set the IP and port of an accessible web server, then the connection is established, even if that server has nothing to do with me.
For example, configure the module to use www.google.com (which obviously will fail the auth, but at least accepts the connection):
auth_opts:
host: "http://216.58.211.228:80"
16:16:18.708 [info] (<0.505.0>) Accepted connection ::ffff:127.0.0.1:44605 -> ::ffff:127.0.0.1:5222
16:16:18.848 [warning] (tcp|<0.505.0>) Failed c2s PLAIN authentication for
user2@localhost from ::ffff:127.0.0.1: Invalid username or password
It maybe late but FYI, in the latest version, there is ~/.ejabberd_modules/ejabberd_auth_http/conf/ejabberd_auth_http.yml
file which will somehow override the configuration for _ejabberd_authhttp in your ejabberd.yml, you can modify ejabberd_auth_http.yml
and don't need to copy _ejabberd_authhttp.beam into your ejabberd ebin installation dir.
I have installed ejabberd_auth_http with this configs:
and I coppied beam files from
C:\ProgramData\ejabberd\.ejabberd-modules\ejabberd_auth_http\ebin
toC:\Program Files\ejabberd\lib\ejabberd-18.09\ebin
.when I want to authenticate to admin panel this logs generates is log files:
error.log
ejabberd.log