[ejabberd] Stanzas from external components can't be delivered

Ricardo Otero dos Santos oterosantos at gmail.com
Fri Apr 16 22:00:03 MSD 2010


Hello again.

So, i finally got the problem! My components were sending an extra
<stream> stanza after the handshake! And I guess that Openfire is cool
with that, but ejabberd not! :)

Thanks for your help!

On Fri, Apr 16, 2010 at 12:17 PM, Ricardo Otero dos Santos
<oterosantos at gmail.com> wrote:
> Ok thanks for your help,
>
> I'll have a look on what I can do.
>
> On Fri, Apr 16, 2010 at 9:34 AM, kael <ka-el at laposte.net> wrote:
>> On 04/15/2010 06:40 PM, Ricardo Otero dos Santos wrote:
>>>
>>> I tried to do that but i get no response!
>>
>> I've made some tests with ejabberd 2.1.3 (source) using the Webstatus demo
>> component
>> <https://support.process-one.net/doc/download/attachments/20906268/web_status_v2.tar.gz>
>>   and I get the following result :
>>
>>
>> 1. Launching the component :
>>
>> %% ejabberd
>>
>> =INFO REPORT==== 16-Apr-2010::10:06:38 ===
>> D(<0.359.0>:ejabberd_receiver:320) : Received XML on stream =
>> "<stream:stream xmlns:stream=\"http://etherx.jabber.org/streams\"
>> xmlns=\"jabber:component:accept\" to=\"webstatus.localhost\">"
>>
>> =INFO REPORT==== 16-Apr-2010::10:06:38 ===
>> D(<0.359.0>:shaper:61) : State: {maxrate,500000,0,1271405198091976},
>> Size=119
>> M=0.119, I=1.343
>>
>>
>> =INFO REPORT==== 16-Apr-2010::10:06:38 ===
>> D(<0.359.0>:ejabberd_receiver:320) : Received XML on stream =
>> "<handshake>71e99044d4506d36073dc254e66a35271633cc90</handshake>"
>>
>> =INFO REPORT==== 16-Apr-2010::10:06:38 ===
>> D(<0.359.0>:shaper:61) : State: {maxrate,500000,44172.23459539718,
>>                                    1271405198093323}, Size=63
>> M=0.06591145631067961, I=3.494
>>
>>
>> =INFO REPORT==== 16-Apr-2010::10:06:38 ===
>> I(<0.360.0>:ejabberd_service:217) : Route registered for service
>> "webstatus.localhost"
>>
>>
>>
>> 2. disco#info :
>>
>> %% Psi :
>>
>> <iq type="get" to="webstatus.localhost" id="aac3a" >
>> <query xmlns="http://jabber.org/protocol/disco#info"/>
>> </iq>
>>
>>
>> %% ejabberd receives the <iq/> disco#info request :
>>
>> =INFO REPORT==== 16-Apr-2010::10:09:18 ===
>> D(<0.361.0>:ejabberd_receiver:320) : Received XML on stream = "<iq
>> type=\"get\" to=\"webstatus.localhost\" id=\"aac3a\" >\n<query
>> xmlns=\"http://jabber.org/protocol/disco#info\"/>\n</iq>\n"
>>
>> =INFO REPORT==== 16-Apr-2010::10:09:18 ===
>> D(<0.362.0>:ejabberd_router:301) : route
>>        from {jid,"kael","localhost","Psi","kael","localhost","Psi"}
>>        to {jid,[],"webstatus.localhost",[],[],"webstatus.localhost",[]}
>>        packet {xmlelement,"iq",
>>                   [{"xml:lang","en"},
>>                    {"type","get"},
>>                    {"to","webstatus.localhost"},
>>                    {"id","aac3a"}],
>>                   [{xmlcdata,<<"\n">>},
>>                    {xmlelement,"query",
>> [{"xmlns","http://jabber.org/protocol/disco#info"}],
>>                        []},
>>                    {xmlcdata,<<"\n">>}]}
>>
>>
>>
>> %% the component receives the stanza :
>>
>> {xmlel,'jabber:component:accept',[],iq,
>>       [{xmlattr,undefined,from,<<"kael at localhost/Psi">>},
>>        {xmlattr,undefined,to,<<"webstatus.localhost">>},
>>       {xmlattr,'http://www.w3.org/XML/1998/namespace',"lang",<<"en">>},
>>        {xmlattr,undefined,type,<<"get">>},
>>        {xmlattr,undefined,id,<<"aac3a">>}],
>>       [{xmlcdata,<<"\n">>},
>>        {xmlel,'http://jabber.org/protocol/disco#info',
>>               [{'http://jabber.org/protocol/disco#info',none}],
>>               'query',[],[]},
>>        {xmlcdata,<<"\n">>}]}
>>
>>
>> %% the component replies :
>>
>> {xmlel,'jabber:component:accept',[],iq,
>>  [{xmlattr,undefined,from,<<"webstatus.localhost">>},
>>   {xmlattr,undefined,to,<<"kael at localhost/Psi">>},
>>   {xmlattr,'http://www.w3.org/XML/1998/namespace',"lang",<<"en">>},
>>   {xmlattr,undefined,type,<<"result">>},
>>   {xmlattr,undefined,id,<<"aac3a">>}],
>>  [{xmlel,'http://jabber.org/protocol/disco#info',[],'query',[],
>>    [{xmlel,'http://jabber.org/protocol/disco#info',[],identity,
>>       [{xmlattr,undefined,"category",<<"component">>},
>>        {xmlattr,undefined,"type",<<"presence">>},
>>        {xmlattr,undefined,"name",<<"Web Presence Bot">>}],
>>                       []},
>>     {xmlel,'http://jabber.org/protocol/disco#info',[],feature,
>>       [{xmlattr,undefined,var,<<"jabber:iq:register">>}],
>>                       []}]}]}
>>
>>
>> %% ejabberd receives the component reply :
>>
>> =INFO REPORT==== 16-Apr-2010::10:09:18 ===
>> D(<0.364.0>:ejabberd_receiver:320) : Received XML on stream = "<iq
>> xmlns=\"jabber:component:accept\" from=\"webstatus.localhost\"
>> to=\"kael at localhost/Psi\" xml:lang=\"en\" type=\"result\"
>> id=\"aac3a\"><query
>> xmlns=\"http://jabber.org/protocol/disco#info\"><identity
>> category=\"component\" type=\"presence\" name=\"Web Presence Bot\"/><feature
>> var=\"jabber:iq:register\"/></query></iq>"
>>
>> =INFO REPORT==== 16-Apr-2010::10:09:18 ===
>> D(<0.364.0>:shaper:61) : State: {maxrate,500000,6566.49347047649,
>>                                    1271405339933934}, Size=302
>> M=0.30399618899005293, I=18232.833
>>
>>
>> =INFO REPORT==== 16-Apr-2010::10:09:18 ===
>> D(<0.365.0>:ejabberd_router:301) : route
>>        from {jid,[],"webstatus.localhost",[],[],"webstatus.localhost",[]}
>>        to {jid,"kael","localhost","Psi","kael","localhost","Psi"}
>>        packet {xmlelement,"iq",
>>                   [{"from","webstatus.localhost"},
>>                    {"to","kael at localhost/Psi"},
>>                    {"xml:lang","en"},
>>                    {"type","result"},
>>                    {"id","aac3a"}],
>>                   [{xmlelement,"query",
>>
>> [{"xmlns","http://jabber.org/protocol/disco#info"}],
>>                        [{xmlelement,"identity",
>>                             [{"category","component"},
>>                              {"type","presence"},
>>                              {"name","Web Presence Bot"}],
>>                             []},
>>                         {xmlelement,"feature",
>>                             [{"var","jabber:iq:register"}],
>>                             []}]}]}
>>
>>
>> =INFO REPORT==== 16-Apr-2010::10:09:18 ===
>> D(<0.365.0>:ejabberd_local:286) : local route
>>        from {jid,[],"webstatus.localhost",[],[],"webstatus.localhost",[]}
>>        to {jid,"kael","localhost","Psi","kael","localhost","Psi"}
>>        packet {xmlelement,"iq",
>>                           [{"from","webstatus.localhost"},
>>                            {"to",[...]},
>>                            {[...],...},
>>                            {...}|...],
>>                           [{xmlelement,[...],...}]}
>>
>>
>> =INFO REPORT==== 16-Apr-2010::10:09:18 ===
>> D(<0.365.0>:ejabberd_sm:409) : session manager
>>        from {jid,[],"webstatus.localhost",[],[],"webstatus.localhost",[]}
>>        to {jid,"kael","localhost","Psi","kael","localhost","Psi"}
>>        packet {xmlelement,"iq",
>>                           [{"from","webstatus.localhost"},
>>                            {"to",[...]},
>>                            {[...],...},
>>                            {...}|...],
>>                           [{xmlelement,[...],...}]}
>>
>>
>> =INFO REPORT==== 16-Apr-2010::10:09:18 ===
>> D(<0.365.0>:ejabberd_sm:508) : sending to process <0.362.0>
>>
>>
>> =INFO REPORT==== 16-Apr-2010::10:09:18 ===
>> D(<0.362.0>:ejabberd_c2s:1412) : Send XML on stream = "<iq
>> from='webstatus.localhost' to='kael at localhost/Psi' xml:lang='en'
>> type='result' id='aac3a'><query
>> xmlns='http://jabber.org/protocol/disco#info'><identity category='component'
>> type='presence' name='Web Presence Bot'/><feature
>> var='jabber:iq:register'/></query></iq>"
>>
>>
>> %% Psi receives the component reply :
>>
>> <iq from="webstatus.localhost" type="result" xml:lang="en"
>> to="kael at localhost/Psi" id="aac3a" >
>> <query xmlns="http://jabber.org/protocol/disco#info">
>> <identity category="component" type="presence" name="Web Presence Bot" />
>> <feature var="jabber:iq:register" />
>> </query>
>> </iq>
>>
>>
>>
>> I'd suggest you test with a simple component.
>>
>>
>> --
>> kael
>>
>> _______________________________________________
>> ejabberd mailing list
>> ejabberd at jabber.ru
>> http://lists.jabber.ru/mailman/listinfo/ejabberd
>>
>


More information about the ejabberd mailing list