processone / ejabberd-contrib

Growing and curated ejabberd contributions repository - PR or ask to join !
http://ejabberd.im
250 stars 140 forks source link

ejabberd_auth_http error - ejabberd_17.01 #194

Closed cheebo closed 7 years ago

cheebo commented 7 years ago

I can not use ejabberd_auth_http because it give an error on startup. I'm new to ejabberd and erlang and I have not idea what is the cause of the error. Can someone help to understand / solve it?

I see in logs after ejabberd started

error.log

17:43:35.789 [error] <0.37.0> CRASH REPORT Process <0.37.0> with 0 neighbours exited with reason:
 no match of right hand value {error,{{'EXIT',
 {undef,[{cuesport,start_link,['ejabberd_auth_http_jabber.freecoffee',10,[fusco],
 {fusco,start_link,["http://todo.lab",[]]}],[]},
 {supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,358}]},
 {supervisor,handle_start_child,2,[{file,"supervisor.erl"},{line,717}]},
 {supervisor,handle_call,3,[{file,"supervisor.erl"},{line,415}]},
 {gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,629}]},
 {gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,661}]},...]}},...}}
 in ejabberd_auth_http:start/1 line 57 in application_master:init/4 line 134

ejabberd.log

[error] <0.37.0> CRASH REPORT Process <0.37.0> with 0 neighbours exited with reason:
 no match of right hand value {error,{{'EXIT',
 {undef,[{cuesport,start_link,['ejabberd_auth_http_jabber.freecoffee',10,[fusco],
 {fusco,start_link,["http://todo.lab",[]]}],[]},
 {supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,358}]},
 {supervisor,handle_start_child,2,[{file,"supervisor.erl"},{line,717}]},
 {supervisor,handle_call,3,[{file,"supervisor.erl"},{line,415}]},
 {gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,629}]},
 {gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,661}]},...]}},...}}
 in ejabberd_auth_http:start/1 line 57 in application_master:init/4 line 134

I use ejabberd 17.01 (download runnable to install), ubuntu 16.04 / debian 7 I can see module as installed (after installation) and my config is:

auth_method: http
auth_opts:
  host: "http://todo.lab"
  connection_pool_size: 10
  connection_opts: []
  basic_auth: ""
  path_prefix: "/"

I can get access to todo.lab from the server (have same error when use VPS domain names)

badlop commented 7 years ago

{undef,[{cuesport,

Usually that means you don't have cuesport installed, or erlang can't find the binaries (cuesport.beam and other ones).

That one and fusco are dependencies required by ejabberd_auth_http, you can see they are in deps/ subfolder. They should have been compiled and installed. Haven't they?

cheebo commented 7 years ago

Thank you! Solved it with cuesport.beam and fusco beams.