Search code examples
httpauthenticationejabberd

Unknown option 'auth_opts' issue in ejabberd_http_auth plugin


I currently using ejabberd_http_auth mod to authenticate a user by external http api. However after I set up the following configuration in ejabberd.yml. I got Unknown option 'auth_opts' error. I have already installed that plugin in ejabberd using command prompt and I have disable register mod.

Configuration:

auth_method: http
auth_opts:
  host: "http://localhost:8080"
  connection_pool_size: 10
  connection_opts: []
  basic_auth: ""
  path_prefix: "/test/auth/"

Error Message:

2015-12-15 00:16:16.268 [error] <0.37.0>@ejabberd_config:validate_opts:794 unknown option 'auth_opts' will be likely ignored
2015-12-15 00:16:16.366 [info] <0.37.0>@cyrsasl_digest:start:60 FQDN used to check DIGEST-MD5 SASL authentication: MY_SERVER
2015-12-15 00:16:16.367 [info] <0.37.0>@ejabberd_app:add_windows_nameservers:195 Adding machine's DNS IPs to Erlang system:
[]
2015-12-15 00:16:16.373 [error] <0.36.0> CRASH REPORT Process <0.36.0> with 0 neighbours exited with reason: call to undefined function ejabberd_auth_http:start(<<"localhost">>) in application_master:init/4 line 133
2015-12-15 00:16:16.373 [info] <0.7.0> Application ejabberd exited with reason: call to undefined function ejabberd_auth_http:start(<<"localhost">>)

Thanks a lot.


Solution

  • The unknown option is not the problem here.

    The problem is on that line:

    2015-12-15 00:16:16.373 [info] <0.7.0> Application ejabberd exited with reason: call to undefined function ejabberd_auth_http:start(<<"localhost">>)
    

    It means ejabberd_auth_http.beam is not in your Erlang path. It means it is either not installed or placed outside Erlang VM path.