forum

Home / DeveloperSection / Forums / mod_rest on ejabberd 15.0.4 on MAC OS X yosemite is not starting

mod_rest on ejabberd 15.0.4 on MAC OS X yosemite is not starting

Anonymous User325824-Jun-2015

I have been trying to configure mod_rest in my ejabberd(ver 15.0.4) server to connect it with http server(XAMPP) but after compiling and setting everything it won't get started and generates a crash reports.

mod_rest.erl is downloaded from: https://github.com/processone/ejabberd-contrib/tree/master/mod_rest

crash report:

2015-06-23 19:41:44 =CRASH REPORT====
  crasher:
    initial call: ejabberd_http:init/2
    pid: <0.455.0>
    registered_name: []
    exception throw: {{module_must_be_started_in_vhost,mod_rest,<<"localhost">>},[{mod_rest,try_get_option,3,[{file,"mod_rest.erl"},{line,107}]},{mod_rest,check_member_option,3,[{file,"mod_rest.erl"},{line,122}]},{mod_rest,process,2,[{file,"mod_rest.erl"},{line,51}]},{ejabberd_http,process,5,[{file,"src/ejabberd_http.erl"},{line,365}]},{ejabberd_http,process_request,1,[{file,"src/ejabberd_http.erl"},{line,449}]},{ejabberd_http,process_header,2,[{file,"src/ejabberd_http.erl"},{line,287}]},{ejabberd_http,parse_headers,1,[{file,"src/ejabberd_http.erl"},{line,203}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
    ancestors: [ejabberd_http_sup,ejabberd_sup,<0.37.0>]
    messages: []
    links: [<0.329.0>,#Port<0.3837>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 1598
    stack_size: 27
    reductions: 839
  neighbours:
2015-06-23 19:41:44 =SUPERVISOR REPORT====
     Supervisor: {local,ejabberd_http_sup}
     Context:    child_terminated
     Reason:     {module_must_be_started_in_vhost,mod_rest,<<"localhost">>}
     Offender:   [{pid,<0.455.0>},{name,undefined},{mfargs,{ejabberd_http,start_link,undefined}},{restart_type,temporary},{shutdown,1000},{child_type,worker}]

error.log

2015-06-23 19:41:44.554 [error] <0.455.0> CRASH REPORT Process <0.455.0> with 0 neighbours crashed with reason: {module_must_be_started_in_vhost,mod_rest,<<"localhost">>} in mod_rest:try_get_option/3 line 107
2015-06-23 19:41:44.554 [error] <0.329.0> Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.455.0> exit with reason {module_must_be_started_in_vhost,mod_rest,<<"localhost">>} in context child_terminated

ejabberd.log


2015-06-23 19:40:41.941 [info] <0.7.0> Application lager started on node ejabberd@localhost
2015-06-23 19:40:41.958 [info] <0.7.0> Application crypto started on node ejabberd@localhost
2015-06-23 19:40:41.987 [info] <0.7.0> Application sasl started on node ejabberd@localhost
2015-06-23 19:40:41.996 [info] <0.7.0> Application asn1 started on node ejabberd@localhost
2015-06-23 19:40:41.996 [info] <0.7.0> Application public_key started on node ejabberd@localhost
2015-06-23 19:40:42.051 [info] <0.7.0> Application ssl started on node ejabberd@localhost
2015-06-23 19:40:42.071 [info] <0.7.0> Application p1_yaml started on node ejabberd@localhost
2015-06-23 19:40:42.084 [info] <0.7.0> Application p1_tls started on node ejabberd@localhost
2015-06-23 19:40:42.097 [info] <0.7.0> Application p1_xml started on node ejabberd@localhost
2015-06-23 19:40:42.124 [info] <0.7.0> Application p1_stringprep started on node ejabberd@localhost
2015-06-23 19:40:42.150 [info] <0.7.0> Application p1_zlib started on node ejabberd@localhost
2015-06-23 19:40:42.161 [info] <0.7.0> Application p1_cache_tab started on node ejabberd@localhost
2015-06-23 19:40:42.843 [info] <0.7.0> Application mnesia started on node ejabberd@localhost
2015-06-23 19:40:44.575 [info] <0.37.0>@cyrsasl_digest:start:57 FQDN used to check DIGEST-MD5 SASL authentication: my.msserver.com
2015-06-23 19:40:44.729 [info] <0.7.0> Application inets started on node ejabberd@localhost
2015-06-23 19:40:44.811 [info] <0.447.0>@ejabberd_listener:listen_tcp:194 Reusing listening port for 5285
2015-06-23 19:40:44.811 [info] <0.448.0>@ejabberd_listener:listen_tcp:194 Reusing listening port for 5222
2015-06-23 19:40:44.811 [info] <0.449.0>@ejabberd_listener:listen_tcp:194 Reusing listening port for 5269
2015-06-23 19:40:44.812 [info] <0.450.0>@ejabberd_listener:listen_tcp:194 Reusing listening port for 5280
2015-06-23 19:40:44.812 [info] <0.37.0>@ejabberd_app:start:71 ejabberd 15.04 is started in the node ejabberd@localhost
2015-06-23 19:40:44.812 [info] <0.7.0> Application ejabberd started on node ejabberd@localhost
2015-06-23 19:40:48.306 [info] <0.450.0>@ejabberd_listener:accept:304 (#Port<0.3810>) Accepted connection 127.0.0.1:54407 -> 127.0.0.1:5280
2015-06-23 19:40:48.322 [info] <0.454.0>@ejabberd_http:init:155 started: {gen_tcp,#Port<0.3810>}
2015-06-23 19:41:44.553 [info] <0.447.0>@ejabberd_listener:accept:304 (#Port<0.3837>) Accepted connection 127.0.0.1:54436 -> 127.0.0.1:5285
2015-06-23 19:41:44.553 [info] <0.455.0>@ejabberd_http:init:155 started: {gen_tcp,#Port<0.3837>}
2015-06-23 19:41:44.554 [error] <0.455.0> CRASH REPORT Process <0.455.0> with 0 neighbours crashed with reason: {module_must_be_started_in_vhost,mod_rest,<<"localhost">>} in mod_rest:try_get_option/3 line 107
2015-06-23 19:41:44.554 [error] <0.329.0> Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.455.0> exit with reason {module_must_be_started_in_vhost,mod_rest,<<"localhost">>} in context child_terminated

Configration settings used in yml :

 mod_rest: []
 - 
    port: 5285
    module: ejabberd_http
    request_handlers:
       "/rest": mod_rest



I am a content writter !

Can you answer this question?


Answer

0 Answers

Liked By