[ejabberd] Help me diagnose this error when registering over xmlrpc

Eric Chamberlain eric at ringfree.com
Sat May 21 03:42:09 MSD 2011


On May 20, 2011, at 1:25 AM, Badlop wrote:

> 2011/5/20 Eric Chamberlain <eric at ringfree.com>:
>> 
>> If the xmlrpc register request user values match, could the problem be with the CentOS erlang-xmlrpc package?
>> 
>> Installed Packages
>> Name       : erlang-xmlrpc
>> Arch       : i386
>> Version    : 1.13
>> Release    : 2.el5
>> Size       : 110 k
>> Repo       : installed
>> Summary    : HTTP 1.1 compliant XML-RPC library for Erlang
>> URL        : http://github.com/rwbr/exmlrpc
> 
> 
> As mentioned in
> http://www.ejabberd.im/ejabberd_xmlrpc
> I use this version of the library:
> http://ejabberd.jabber.ru/files/contributions/xmlrpc-1.13-ipr2.tgz
> which works great.
> 
> I've now tried with the version you mention, dowloaded from git.
> It has a bug that breaks ejabberd start. I've fixed that [1],
> and the same script that worked before, now produces:
> =ERROR REPORT==== 20-May-2011::10:19:01 ===
> {xmlrpc_http,162,
>    {ejabberd_xmlrpc,handler,
>        {'EXIT',
>            {badarg,
>                [{erlang,port_control,
>                     [stringprep_port,2,
>                      [1575,1604,1582,1576,1585,1575,1606,1610]]},
> 
> 
> Summary: download and install the library that I mention.
> 

I downloaded and replaced the old beam files with the files from http://www.ejabberd.im/files/contributions/xmlrpc-1.13-compiled.zip

Then I restarted ejabberd and I still get the same error:

=ERROR REPORT==== 2011-05-20 17:15:37 ===
{xmlrpc_http,153,
    {ejabberd_xmlrpc,handler,
        {'EXIT',
            {badarg,
                [{erlang,port_control,
                     [stringprep_port,2,
                      [1575,1604,1582,1576,1585,1575,1606,1610]]},
                 {stringprep,control,2},
                 {jlib,nodeprep,1},
                 {ejabberd_auth_internal,is_user_exists,2},
                 {ejabberd_auth,'-is_user_exists/2-fun-0-',3},
                 {lists,any,2},
                 {ejabberd_auth,try_register,3},
                 {ejabberd_admin,register,3}]}}}}



I think the problem has to do with xmerl.  I'm using the CentOS epel repository to install erlang and it includes xmerl-1.1.10.


If I remove the xmerl-1.1.10 beam files, I get:

=CRASH REPORT==== 20-May-2011::18:57:18 ===
  crasher:
    pid: <0.561.0>
    registered_name: []
    exception error: undefined function xmerl_scan:string/1
      in function  xmlrpc_decode:payload/1
      in call from xmlrpc_http:handle_payload/5
      in call from tcp_serv:start_session/3
    initial call: tcp_serv:start_session/3
    ancestors: [<0.560.0>,ejabberd_listeners,ejabberd_sup,<0.36.0>]
    messages: []
    links: [<0.560.0>,#Port<0.3799>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 2584
    stack_size: 23
    reductions: 760
  neighbours:

When download http://sourceforge.net/projects/sowap/ and build xmerl-0.20, I get the following warnings:

make[1]: Entering directory `/usr/src/xmerl/src'
erlc -W  -I ../inc -o ../ebin xmerl_scan.erl
./xmerl_scan.erl:594: Warning: variable 'S' is unused
./xmerl_scan.erl:601: Warning: variable 'S' is unused
./xmerl_scan.erl:738: Warning: call to httpd_util:to_lower/1 will fail, since it was removed in R12B; use string:to_lower/1
./xmerl_scan.erl:816: Warning: call to httpd_util:to_lower/1 will fail, since it was removed in R12B; use string:to_lower/1
./xmerl_scan.erl:1462: Warning: variable 'S2' is unused
./xmerl_scan.erl:1462: Warning: variable 'T2' is unused
./xmerl_scan.erl:1466: Warning: variable 'S2' is unused
./xmerl_scan.erl:1466: Warning: variable 'T2' is unused
./xmerl_scan.erl:1507: Warning: variable 'S3' is unused
./xmerl_scan.erl:1507: Warning: variable 'T3' is unused
./xmerl_scan.erl:1513: Warning: variable 'S3' is unused
./xmerl_scan.erl:1513: Warning: variable 'T3' is unused
./xmerl_scan.erl:1540: Warning: variable 'S6' is unused
./xmerl_scan.erl:1540: Warning: variable 'T6' is unused
./xmerl_scan.erl:1582: Warning: variable 'S' is unused
./xmerl_scan.erl:1597: Warning: variable 'S' is unused
./xmerl_scan.erl:1665: Warning: variable 'S' is unused
erlc -W  -I ../inc -o ../ebin xmerl.erl
erlc -W  -I ../inc -o ../ebin xmerl_xs.erl
erlc -W  -I ../inc -o ../ebin xmerl_eventp.erl
erlc -W  -I ../inc -o ../ebin xmerl_xpath.erl
./xmerl_xpath.erl:104: Warning: record node is unused
./xmerl_xpath.erl:667: Warning: erlang:fault/1 is deprecated and will be removed in R13B; use erlang:error/1
erlc -W  -I ../inc -o ../ebin xmerl_lib.erl
erlc -W  -I ../inc -o ../ebin xmerl_xlate.erl
erlc -W  -I ../inc -o ../ebin xmerl_xml.erl
erlc -W  -I ../inc -o ../ebin xmerl_sgml.erl
erlc -W  -I ../inc -o ../ebin xmerl_html.erl
erlc -W  -I ../inc -o ../ebin xmerl_text.erl
erlc -W  -I ../inc -o ../ebin xmerl_otpsgml.erl
erlc -W  -I ../inc -o ../ebin xmerl_simple.erl
erlc -W  -I ../inc -o ../ebin xmerl_validate.erl
erlc -W -o  ./ xmerl_xpath_parse.yrl
xmerl_xpath_parse.yrl:34: Warning: non-terminal symbol AxisSpecifier not used
xmerl_xpath_parse.yrl:41: Warning: non-terminal symbol AbbreviatedAxisSpecifier not used
xmerl_xpath_parse.yrl:56: Warning: non-terminal symbol Operator not used
xmerl_xpath_parse.yrl:57: Warning: non-terminal symbol OperatorName not used
xmerl_xpath_parse.yrl: Warning: conflicts: 2 shift/reduce, 0 reduce/reduce
erlc -W  -I ../inc -o ../ebin xmerl_xpath_parse.erl
erlc -W  -I ../inc -o ../ebin xmerl_xpath_pred.erl
./xmerl_xpath_pred.erl:73: Warning: record obj is unused
erlc -W  -I ../inc -o ../ebin xmerl_xpath_scan.erl
sed -e 's;%VSN%;0.20;' xmerl.app.src > ../ebin/xmerl.app
make[1]: Leaving directory `/usr/src/xmerl/src'


And when I add the beam files from xmerl-0.20, then I get:

=CRASH REPORT==== 20-May-2011::18:53:27 ===
  crasher:
    pid: <0.559.0>
    registered_name: []
    exception error: undefined function ucs:to_unicode/2
      in function  xmerl_scan:scan_prolog/3
      in call from xmerl_scan:scan_document/2
      in call from xmerl_scan:string/2
      in call from xmlrpc_decode:payload/1
      in call from xmlrpc_http:handle_payload/5
      in call from tcp_serv:start_session/3
    initial call: tcp_serv:start_session/3
    ancestors: [<0.558.0>,ejabberd_listeners,ejabberd_sup,<0.36.0>]
    messages: []
    links: [<0.558.0>,#Port<0.3879>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 2584
    stack_size: 23
    reductions: 858
  neighbours:

I don't know erlang.  How do I get xmerl working with ejabberd_xmlrpc?


I also tried using the ejabberd binary installer, but I ran into:

=CRASH REPORT==== 20-May-2011::18:38:28 ===
  crasher:
    pid: <0.559.0>
    registered_name: []
    exception error: no case clause matching {error,{open_error,-10}}
      in function  tls:tcp_to_tls/2
      in call from ejabberd_http:init/2
    initial call: ejabberd_http:init({gen_tcp,#Port<0.424>},
                                     [inet,web_admin,http_bind,tls,
                                      {certfile,
                                       "/opt/ejabberd-2.1.6/conf/_.rf.com.pem"},
                                      {ip,{0,0,0,0}}])
    ancestors: [ejabberd_http_sup,ejabberd_sup,<0.37.0>]
    messages: []
    links: [<0.275.0>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 610
    stack_size: 23
    reductions: 148
  neighbours:

before I could try troubleshooting xmlrpc.  Also, I could find no instructions explaining how to install xmerl with the binary installer version of ejabberd.



More information about the ejabberd mailing list