Pubsub/PEP: getting 403 and 404 errors

Hi,

I am running ejabberd 2.0.1-5 from Debian. I configured it to use mod_pubsub (with default and pep plugins).
From my clients (Gajim 0.12, Psi and friends) if I set my mood or any other PEP event, I got a 404 error.

With pubsub, I keep getting 403 errors whereas the ACL permits all user to create nodes and I am respecting the "tree" vision of ejabberd (/home/maillard.mobi/xavier/test for example). I have already posted on the ejabberd mailing-list about these problems but nobody has answered yet.

How can I workaround these problems ?

Thank you.

Details:

Here is a transcript of a test to publish a PEP:

<code>
<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>"

Answered in the mailing list

xma01 wrote:

I have already posted on the ejabberd mailing-list about these problems but nobody has answered yet.

For reference: the email had subject "Pubsub troubles", date 21 December. It finally got some responses and the problem seems solved.

Syndicate content