Hi,

Probably these will help explain my misery. As I wrote before sending 
http://jabber.org/protocol/muc qualified namespace presence stanza makes no 
difference to the output.

Below are the logs from my XMPP client library:
[10339] 2010-08-23 03:18:42 - [[XMPPSend]] 153
<presence from="[email protected]/jaxl.1282558721" 
to="[email protected]/imjaxlim">
    
</presence>

[10339] 2010-08-23 03:18:43 - [[XMPPSend]] 171
<presence from="[email protected]/jaxl.1282558719" 
to="[email protected]/jaxl">
    
</presence>

[10339] 2010-08-23 03:18:44 - [[XMPPGet]]
<presence from='[email protected]/imjaxlim' 
to='[email protected]/jaxl.1282558721' type='error'>
    http://jabber.org/protocol/muc'/>
    <error code='503' type='cancel'>
        <service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    </error>
</presence>
<presence from='[email protected]/jaxl' 
to='[email protected]/jaxl.1282558719'>
    http://jabber.org/protocol/muc#user'>
    <item affiliation='none' role='participant'/>
        <status code='201'/>
    </x>
</presence>

Below is the corresponding ejabberd log:
=INFO REPORT==== 2010-08-23 03:18:42 ===
D(<0.5744.0>:ejabberd_receiver:320) : Received XML on stream = 
"http://jabber.org/protocol/muc\";>"

=INFO REPORT==== 2010-08-23 03:18:42 ===
D(<0.5745.0>:ejabberd_router:313) : route
        from {jid,"imjaxlim","im.jaxl.im","jaxl.1282558721","imjaxlim",
                  "im.jaxl.im","jaxl.1282558721"}
        to {jid,"jaxl.im-b-global","muc.jaxl.im","imjaxlim",
                "jaxl.im-b-global","muc.jaxl.im","imjaxlim"}
        packet {xmlelement,"presence",
                   [{"from","[email protected]/jaxl.1282558721"},
                    {"to","[email protected]/imjaxlim"}],
                   [{xmlelement,"x",
                        [{"xmlns","http://jabber.org/protocol/muc"}],
                        []}]}

=INFO REPORT==== 2010-08-23 03:18:42 ===
D(<0.3771.0>:mod_muc:557) : MUC: open new room 'jaxl.im-b-global'

=INFO REPORT==== 2010-08-23 03:18:42 ===
I(<0.5758.0>:mod_muc_room:126) : Created MUC room [email protected] 
by [email protected]/jaxl.1282558721

=INFO REPORT==== 2010-08-23 03:18:42 ===
D(<0.5758.0>:ejabberd_router:313) : route
        from {jid,"jaxl.im-b-global","muc.jaxl.im","imjaxlim",
                  "jaxl.im-b-global","muc.jaxl.im","imjaxlim"}
        to {jid,"imjaxlim","im.jaxl.im","jaxl.1282558721","imjaxlim",
                "im.jaxl.im","jaxl.1282558721"}
        packet {xmlelement,"presence",
                   [{"type","error"},
                    {"to","[email protected]/jaxl.1282558721"},
                    {"from","[email protected]/imjaxlim"}],
                   [{xmlelement,"x",
                        [{"xmlns","http://jabber.org/protocol/muc"}],
                        []},
                    {xmlelement,"error",
                        [{"code","503"},{"type","cancel"}],
                        [{xmlelement,"service-unavailable",
                             [{"xmlns","urn:ietf:params:xml:ns:xmpp-stanzas"}],
                             []}]}]}

=INFO REPORT==== 2010-08-23 03:18:43 ===
D(<0.5744.0>:ejabberd_receiver:320) : Received XML on stream = 
"http://jabber.org/protocol/muc\";>"

=INFO REPORT==== 2010-08-23 03:18:43 ===
D(<0.5745.0>:ejabberd_router:313) : route
        from {jid,"jaxl","im.jaxl.im","jaxl.1282558719","jaxl","im.jaxl.im",
                  "jaxl.1282558719"}
        to {jid,"jaxl.im-b-global","muc.jaxl.im","jaxl","jaxl.im-b-global",
                "muc.jaxl.im","jaxl"}
        packet {xmlelement,"presence",
                   [{"from","[email protected]/jaxl.1282558719"},
                    {"to","[email protected]/jaxl"}],
                   [{xmlelement,"x",
                        [{"xmlns","http://jabber.org/protocol/muc"}],
                        [{xmlelement,"history",[{"maxstanzas","10"}],[]}]}]}

=INFO REPORT==== 2010-08-23 03:18:43 ===
D(<0.3710.0>:mod_muc:507) : MUC: send to process <0.5758.0> 

=INFO REPORT==== 2010-08-23 03:18:43 ===
D(<0.5758.0>:ejabberd_router:313) : route
        from {jid,"jaxl.im-b-global","muc.jaxl.im","jaxl","jaxl.im-b-global",
                  "muc.jaxl.im","jaxl"}
        to {jid,"jaxl","im.jaxl.im","jaxl.1282558719","jaxl","im.jaxl.im",
                "jaxl.1282558719"}
        packet {xmlelement,"presence",
                   [{"from","[email protected]/jaxl.1282558719"},
                    {"to","[email protected]/jaxl"}],
                   [{xmlelement,"x",
                        [{"xmlns","http://jabber.org/protocol/muc#user"}],
                        [{xmlelement,"item",
                             [{"affiliation","none"},{"role","participant"}],
                             []},
                         {xmlelement,"status",[{"code","201"}],[]}]}]}


>From the logs above we know that MUC room was created by the 1st sent presence 
stanza which receives a 503 error code.
However, 2nd presence stanza receives success with 201 status code.

--
Abhinav Singh,
Founder, Jaxl Inc.
Bangalore, India
http://abhinavsingh.com/blog




________________________________
From: Kevin Smith <[email protected]>
To: Jabber/XMPP software development list <[email protected]>
Sent: Mon, August 23, 2010 6:14:43 PM
Subject: Re: [jdev] Fw: Unexpected 503 error code returned by MUC (ejabberd), 
help required

> From: Abhinav Singh <[email protected]>
> Sent: Mon, August 23, 2010 4:46:19 PM
> Subject: Re: [jdev] Unexpected 503 error code returned by MUC (ejabberd),
> help required
>
> Hi Kevin,
>
> Sorry but I am not clear on your message. Can you expand "sending an empty
> presence before sending the room join presence"?
>
> To be specific, here is what my code does:
> - Identify [email protected]/jaxl.1282549857 wants
> to enter room [email protected]
> - Code identifies room doesn't already exists and hence try to create one by
> sending a room join presence from [email protected]/jaxl.1282549915 to
> [email protected]/imjaxlim
> - Code also sends a room join presence from guest user to the room
> immediately.
>
> However, jabber server returns a 503 for 1st room join while a success for
> 2nd room join presence.
> But ejabberd log shows 1st room join presence actually created the room, but
> still receives a 503 presence.
>
> PS: I don't see sending any empty presence before room join presence....
> <presence from="[email protected]/jaxl.1282549915"
> to="[email protected]/imjaxlim">
> </presence>

That is an empty presence stanza to a room you haven't joined yet. In
the paste from your previous mail, this got a 503 response.

> or
> <presence from="[email protected]/jaxl.1282549915"
> to="[email protected]/imjaxlim">
> 
> </presence>

This is a join stanza. In the paste, this joined the room.

/K
_______________________________________________
JDev mailing list
Forum: http://www.jabberforum.org/forumdisplay.php?f=20
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: [email protected]
_______________________________________________



      
_______________________________________________
JDev mailing list
Forum: http://www.jabberforum.org/forumdisplay.php?f=20
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: [email protected]
_______________________________________________

Reply via email to