0

I am using ejabberd-18.06 on ec2 instance. When I send a custom iq stanza as

D/SMACK: SENT (0): <iq to=‘example.com' id='Eu0j3-13' type='get'><query xmlns='ns:custom'><xyz someparam =‘4’></xyz>><abc>50</abc>><property someprop =‘4’ ctn='India'></property></query></iq>

I get a response as follows:

D/SMACK: RECV (0): <iq xml:lang='en' to='cwsxTrBQ2Z0@example.com/Smack' from=‘example.com' type='error' id='Eu0j3-13'><query xmlns='ns:custom'><xyz someparam=‘4’/>&gt;<abc>50</abc>&gt;<property someprop=‘4’ ctn='India'/></query><error code='500' type='wait'><internal-server-error xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Module failed to handle the query</text></error></iq><r xmlns='urn:xmpp:sm:3'/>

On the server I get these logs:

[error] failed to process iq:
#iq{id = <<"Eu0j3-13">>,type = get,lang = <<"en">>,
    from = 
        #jid{
            user = <<"cwsxTrBQ2Z0">>,server = <<“example.com">>,
            resource = <<"Smack">>,luser = <<"cwsxtrbq2z0">>,
            lserver = <<"example.com">>,lresource = <<"Smack">>},
    to = 
        #jid{
            user = <<>>,server = <<"example.com">>,resource = <<>>,luser = <<>>,
            lserver = <<"example.com">>,lresource = <<>>},
    sub_els = 
        [#xmlel{]}],
    meta = #{ip => {}}}
Reason = {error,{undef,[{io_lib_pretty,cind_rec,6,[{file,"io_lib_pretty.erl"},{line,690}]},{io_lib_pretty,cind_record,8,[{file,"io_lib_pretty.erl"},{line,642}]},{io_lib_pretty,cind_element,7,[{file,"io_lib_pretty.erl"},{line,726}]},{io_lib_pretty,cind_list,7,[{file,"io_lib_pretty.erl"},{line,696}]},{io_lib_pretty,cind_field,7,[{file,"io_lib_pretty.erl"},{line,672}]},{io_lib_pretty,cind_fields_tail,8,[{file,"io_lib_pretty.erl"},{line,656}]},{io_lib_pretty,cind_element,7,[{file,"io_lib_pretty.erl"},{line,726}]},{io_lib_pretty,cind_list,7,[{file,"io_lib_pretty.erl"},{line,696}]}]}}

The same stanza works fine on ejabberd-17.03.

Kindly help me out here.

Flow
  • 23,572
  • 15
  • 99
  • 156
abhishek ranjan
  • 612
  • 7
  • 23
  • Could you try with ejabberd 18.09? That might get you a better error message pointing out where the error actually comes from. – legoscia Nov 20 '18 at 17:07
  • @legoscia I tried using ejabberd 18.09, the error log was clearer than that of 18.06 but I am having trouble understanding it. see [here](https://stackoverflow.com/questions/53424985/module-to-handle-custom-iq-stanzas-does-not-work-with-ejabberd-18-09) – abhishek ranjan Nov 22 '18 at 08:03

0 Answers0