在ejabberd中安装mod_xmlrpc后出错

时间:2015-03-15 15:30:26

标签: java erlang xml-rpc ejabberd

我正在开发一个java项目,我必须与ejabberd(创建/删除jabber用户等)xmpp服务器进行通信。根据互联网上提供的不同建议,我理解xml rpc是实现这一目标的一种方法。

我尝试按照此主题中的建议安装mod_xmlrpc。 Error while starting ejabberd with xml_rpc

但是在配置mod_xmlrpc后我没能启动ejabberd。 ejabberd日志说,

=ERROR REPORT==== 2015-03-15 20:23:27 ===
C(<0.42.0>:gen_mod:75) : Problem starting the module mod_adhoc for host "example.com" 
 options: []
 exit: {noproc,
       {gen_server,call,
           [ejabberd_iq_sup,
        {start_child,["example.com",mod_adhoc,process_local_iq]},
        infinity]}}

=ERROR REPORT==== 2015-03-15 20:23:27 ===
C(<0.42.0>:gen_mod:80) : ejabberd initialization was aborted because a module start failed.

和erlang日志说,

=CRASH REPORT==== 15-Mar-2015::20:23:27 ===
  crasher:
    initial call: supervisor:ejabberd_listener/1
    pid: <0.270.0>
    registered_name: []
    exception exit: {undef,
            [{ejabberd_xmlrpc,socket_type,[],[]},
             {ejabberd_listener,'-bind_tcp_ports/0-fun-0-',1,
                 [{file,"ejabberd_listener.erl"},{line,63}]},
             {lists,foreach,2,[{file,"lists.erl"},{line,1323}]},
             {ejabberd_listener,init,1,
                 [{file,"ejabberd_listener.erl"},{line,52}]},
             {supervisor,init,1,
                 [{file,"supervisor.erl"},{line,239}]},
             {gen_server,init_it,6,
                 [{file,"gen_server.erl"},{line,304}]},
             {proc_lib,init_p_do_apply,3,
                 [{file,"proc_lib.erl"},{line,239}]}]}
      in function  gen_server:init_it/6 (gen_server.erl, line 328)
    ancestors: [ejabberd_sup,<0.42.0>]
    messages: []
    links: [#Port<0.3747>,<0.234.0>,#Port<0.3744>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 987
    stack_size: 27
    reductions: 1215
  neighbours:

=SUPERVISOR REPORT==== 15-Mar-2015::20:23:27 ===
     Supervisor: {local,ejabberd_sup}
     Context:    start_error
     Reason:     {undef,
             [{ejabberd_xmlrpc,socket_type,[],[]},
              {ejabberd_listener,'-bind_tcp_ports/0-fun-0-',1,
              [{file,"ejabberd_listener.erl"},{line,63}]},
              {lists,foreach,2,[{file,"lists.erl"},{line,1323}]},
              {ejabberd_listener,init,1,
              [{file,"ejabberd_listener.erl"},{line,52}]},
              {supervisor,init,1,[{file,"supervisor.erl"},{line,239}]},
              {gen_server,init_it,6,
              [{file,"gen_server.erl"},{line,304}]},
              {proc_lib,init_p_do_apply,3,
              [{file,"proc_lib.erl"},{line,239}]}]}
     Offender:   [{pid,undefined},
          {name,ejabberd_listener},
          {mfargs,{ejabberd_listener,start_link,[]}},
          {restart_type,permanent},
          {shutdown,infinity},
          {child_type,supervisor}]

因为我是ejabberd&amp; amp;的新手。 erlang世界我发现很难找到根本原因。请帮我确定这次崩溃的根本原因。

BTW还有其他方法可以与java服务中的ejabberd(创建/删除jabber用户等)进行通信吗?

1 个答案:

答案 0 :(得分:2)

erlang日志说它在模块ejabberd_xmlrpc中找不到没有参数的函数socket_type。由于它是一个有效的调用,并且模块和函数都存在于应用程序ejabberd中,这意味着在安装过程中出现了错误(编译失败,错误的路径???)