[ejabberd] Pubsub troubles

Xavier Maillard xavier at maillard.mobi
Mon Dec 22 00:24:59 MSK 2008


Xavier Maillard a écrit :
>> about PEP, the user must not create it's own nodes. it just publish to a
>> node and creation is implicit.
>
> So why does it "crash" for PEP ?
Here is a transcript of a test to publish a PEP:

<iq from='xavier at maillard.mobi/balcony'

id='publish1'

type='set'>

<pubsub xmlns='http://jabber.org/protocol/pubsub'>

<publish node='http://jabber.org/protocol/mood'>

<item>

<mood xmlns='http://jabber.org/protocol/mood'>

<annoyed/>

<text>curse my nurse!</text>

</mood>

</item>

</publish>

</pubsub>

</iq>


Result:

<iq from="xavier at maillard.mobi" type="error" 
to="xavier at maillard.mobi/PC-de-xma" id="publish1" >

<error type="cancel" code="404" >

<item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>

</error>

<pubsub xmlns="http://jabber.org/protocol/pubsub">

<publish node="http://jabber.org/protocol/mood" >

<item>

<mood xmlns="http://jabber.org/protocol/mood">

<annoyed/>

<text>curse my nurse!</text>

</mood>

</item>

</publish>

</pubsub>

</iq>


Ejabberd output:

=INFO REPORT==== 2008-12-21 22:18:58 ===
D(<0.282.0>:ejabberd_receiver:297) : Received XML on stream = "<iq 
from='xavier at maillard.mobi/balcony'\n\nid='publish1'\n\ntype='set'>\n\n<pubsub 
xmlns='http://jabber.org/protocol/pubsub'>\n\n<publish 
node='http://jabber.org/protocol/mood'>\n\n<item>\n\n<mood 
xmlns='http://jabber.org/protocol/mood'>\n\n<annoyed/>\n\n<text>curse my 
nurse!</text>\n\n</mood>\n\n</item>\n\n</publish>\n\n</pubsub>\n\n</iq>\n"

=INFO REPORT==== 2008-12-21 22:18:58 ===
D(<0.283.0>:ejabberd_router:301) : route
       from {jid,"xavier","maillard.mobi","PC-de-xma","xavier",
                 "maillard.mobi","PC-de-xma"}
       to {jid,"xavier","maillard.mobi",[],"xavier","maillard.mobi",
               []}
       packet {xmlelement,"iq",
               [{"xml:lang","fr-FR"},
                {"from","xavier at maillard.mobi/balcony"},
                {"id","publish1"},
                {"type","set"}],
               [{xmlcdata,<<"\n\n">>},
                {xmlelement,"pubsub",
                 [{"xmlns","http://jabber.org/protocol/pubsub"}],
                 [{xmlcdata,<<"\n\n">>},
                  {xmlelement,"publish",
                   [{"node","http://jabber.org/protocol/mood"}],
                   [{xmlcdata,<<"\n\n">>},
                    {xmlelement,"item",[],
                     [{xmlcdata,<<"\n\n">>},
                      {xmlelement,"mood",
                       [{"xmlns","http://jabber.org/protocol/mood"}],
                       [{xmlcdata,<<"\n\n">>},
                        {xmlelement,"annoyed",[],[]},
                        {xmlcdata,<<"\n\n">>},
                        {xmlelement,"text",[],
                         [{xmlcdata,<<"curse my nurse!">>}]},
                        {xmlcdata,<<"\n\n">>}]},
                      {xmlcdata,<<"\n\n">>}]},
                    {xmlcdata,<<"\n\n">>}]},
                  {xmlcdata,<<"\n\n">>}]},
                {xmlcdata,<<"\n\n">>}]}


=INFO REPORT==== 2008-12-21 22:18:58 ===
D(<0.283.0>:ejabberd_local:272) : local route
       from {jid,"xavier","maillard.mobi","PC-de-xma","xavier",
                 "maillard.mobi","PC-de-xma"}
       to {jid,"xavier","maillard.mobi",[],"xavier","maillard.mobi",
               []}
       packet {xmlelement,"iq",
                          [{"xml:lang","fr-FR"},
                           {"from",[...]},
                           {[...],...},
                           {...}],
                          [{xmlcdata,<<...>>},{xmlelement,...},{...}]}


=INFO REPORT==== 2008-12-21 22:18:58 ===
D(<0.283.0>:ejabberd_sm:372) : session manager
       from {jid,"xavier","maillard.mobi","PC-de-xma","xavier",
                 "maillard.mobi","PC-de-xma"}
       to {jid,"xavier","maillard.mobi",[],"xavier","maillard.mobi",
               []}
       packet {xmlelement,"iq",
                          [{"xml:lang","fr-FR"},
                           {"from",[...]},
                           {[...],...},
                           {...}],
                          [{xmlcdata,<<...>>},{xmlelement,...},{...}]}


=ERROR REPORT==== 2008-12-21 22:18:58 ===
E(<0.290.0>:mod_pubsub:2720) : transaction return internal error: {atomic,
                                                                  {'EXIT',
                                                                   
{aborted,
                                                                    
{bad_type,
                                                                     
{pubsub_node,
                                                                      
{{"xavier",
                                                                        
"maillard.mobi",
                                                                        
[]},
                                                                       
"http://jabber.org/protocol/mood"},
                                                                      
{{"xavier",
                                                                        
"maillard.mobi",
                                                                        
[]},
                                                                       []},
                                                                      
"pep",
                                                                      
[{"xavier",
                                                                        
"maillard.mobi",
                                                                        
[]}],
                                                                      
[{node_type,
                                                                        
pep},
                                                                       
{deliver_payloads,
                                                                        
true},
                                                                       
{notify_config,
                                                                        
false},
                                                                       
{notify_delete,
                                                                        
false},
                                                                       
{notify_retract,
                                                                        
false},
                                                                       
{persist_items,
                                                                        
false},
                                                                       
{max_items,
                                                                        
10},
                                                                       
{subscribe,
                                                                        
true},
                                                                       
{access_model,
                                                                        
presence},
                                                                       
{roster_groups_allowed,
                                                                        
[]},
                                                                       
{publish_model,
                                                                        
publishers},
                                                                       
{max_payload_size,
                                                                        
60000},
                                                                       
{send_last_published_item,
                                                                        
on_sub_and_presence},
                                                                       
{deliver_notifications,
                                                                        
true},
                                                                       
{presence_based_delivery,
                                                                        
true}]}}}}}


=INFO REPORT==== 2008-12-21 22:18:58 ===
D(<0.290.0>:ejabberd_router:301) : route
       from {jid,"xavier","maillard.mobi",[],"xavier","maillard.mobi",
                 []}
       to {jid,"xavier","maillard.mobi","PC-de-xma","xavier",
               "maillard.mobi","PC-de-xma"}
       packet {xmlelement,"iq",
               [{"id","publish1"},{"type","error"}],
               [{xmlelement,"error",
                 [{"code","404"},{"type","cancel"}],
                 [{xmlelement,"item-not-found",
                   [{"xmlns","urn:ietf:params:xml:ns:xmpp-stanzas"}],
                   []}]},
                {xmlelement,"pubsub",
                 [{"xmlns","http://jabber.org/protocol/pubsub"}],
                 [{xmlcdata,<<"\n\n">>},
                  {xmlelement,"publish",
                   [{"node","http://jabber.org/protocol/mood"}],
                   [{xmlcdata,<<"\n\n">>},
                    {xmlelement,"item",[],
                     [{xmlcdata,<<"\n\n">>},
                      {xmlelement,"mood",
                       [{"xmlns","http://jabber.org/protocol/mood"}],
                       [{xmlcdata,<<"\n\n">>},
                        {xmlelement,"annoyed",[],[]},
                        {xmlcdata,<<"\n\n">>},
                        {xmlelement,"text",[],
                         [{xmlcdata,<<"curse my nurse!">>}]},
                        {xmlcdata,<<"\n\n">>}]},
                      {xmlcdata,<<"\n\n">>}]},
                    {xmlcdata,<<"\n\n">>}]},
                  {xmlcdata,<<"\n\n">>}]}]}


=INFO REPORT==== 2008-12-21 22:18:58 ===
D(<0.290.0>:ejabberd_local:272) : local route
       from {jid,"xavier","maillard.mobi",[],"xavier","maillard.mobi",
                 []}
       to {jid,"xavier","maillard.mobi","PC-de-xma","xavier",
               "maillard.mobi","PC-de-xma"}
       packet {xmlelement,"iq",
                          [{"id","publish1"},{"type",[...]}],
                          [{xmlelement,[...],...},{xmlelement,...}]}


=INFO REPORT==== 2008-12-21 22:18:58 ===
D(<0.290.0>:ejabberd_sm:372) : session manager
       from {jid,"xavier","maillard.mobi",[],"xavier","maillard.mobi",
                 []}
       to {jid,"xavier","maillard.mobi","PC-de-xma","xavier",
               "maillard.mobi","PC-de-xma"}
       packet {xmlelement,"iq",
                          [{"id","publish1"},{"type",[...]}],
                          [{xmlelement,[...],...},{xmlelement,...}]}


=INFO REPORT==== 2008-12-21 22:18:58 ===
D(<0.290.0>:ejabberd_sm:467) : sending to process <0.283.0>


=INFO REPORT==== 2008-12-21 22:18:58 ===
D(<0.283.0>:ejabberd_c2s:1336) : Send XML on stream = "<iq 
from='xavier at maillard.mobi' to='xavier at maillard.mobi/PC-de-xma' 
id='publish1' type='error'><error code='404' 
type='cancel'><item-not-found 
xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error><pubsub 
xmlns='http://jabber.org/protocol/pubsub'>\n\n<publish 
node='http://jabber.org/protocol/mood'>\n\n<item>\n\n<mood 
xmlns='http://jabber.org/protocol/mood'>\n\n<annoyed/>\n\n<text>curse my 
nurse!</text>\n\n</mood>\n\n</item>\n\n</publish>\n\n</pubsub></iq>"

Any help would be greatly appreciated.

Xavier



More information about the ejabberd mailing list