processone / ejabberd-contrib

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

mod_rest - ejabberd fails to start #256

Closed CreativeWolf closed 5 years ago

CreativeWolf commented 5 years ago

Heya,

I'm using ejabberd-18.01

Here's the config I've got on mod_rest.yml

modules:
  mod_rest:
    allowed_ips:
      - "127.0.0.1"
listen:
  -
    port: 5285
    module: ejabberd_http
    request_handlers:
       "/rest": mod_rest

When I start ejabberd here's what I get in the error log

2018-09-04 15:52:31.320 [error] <0.298.0> Supervisor ejabberd_sup had child
 ejabberd_gen_mod_sup started with gen_mod:start_link() at undefined exit with reason
 {'EXIT',{function_clause,[{mod_rest,mod_opt_type,[''],[{file,"src/mod_rest.erl"},{line,178}]},
 {gen_mod,get_validators,3,[{file,"src/gen_mod.erl"},{line,461}]},
 {gen_mod,validate_opts,3,[{file,"src/gen_mod.erl"},{line,502}]},
 {gen_mod,start_module,4,[{file,"src/gen_mod.erl"},{line,195}]},
 {lists,foreach,2,[{file,"lists.erl"},{line,1337}]},
 {gen_mod,start_link,0,[{file,"src/gen_mod.erl"},{line,79}]},
 {supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,358}]},
 {supervisor,start_children,3,[{...},...]}]}} in context start_error

Appreciate any help please.

Thanks

badlop commented 5 years ago

I can reproduce the problem with your same ejabberd version, 18.01. Later I tried with recent ejabberd 18.06 and the problem does not appear.

CreativeWolf commented 5 years ago

That did the trick. Thanks so much! Appreciate your immediate help!