[ejabberd] mod_pubsub doesn't accept external components stanzas

kael ka-el at laposte.net
Sat Apr 17 00:12:31 MSD 2010


On 04/16/2010 08:07 PM, Ricardo Otero dos Santos wrote:
> Hi!

Hello,

> I'm trying to interact with pubsub from an external component, that is
> connected and working fine but apparently ejabberd can't route replies
> to my component.

Check in ejabberd.cfg that the component parameters are correct, 
specially the host and the port :

{8888, ejabberd_service, [{access, all},
                           {shaper_rule, fast},
                           {ip, {127, 0, 0, 1}},
                           {hosts, ["profile.localhost"],
                            [{password, "secret"}]}
                          ]},


Also, check that stanzas sent by the component have a 'from' attribute.

It works on my side with ejabberd 2.1.3 :


=INFO REPORT==== 16-Apr-2010::22:05:03 ===
D(<0.363.0>:ejabberd_receiver:320) : Received XML on stream = "<iq 
xmlns=\"jabber:component:accept\" type=\"get\" to=\"pubsub.localhost\" 
id=\"10\" from=\"profile.localhost\"><query 
xmlns=\"http://jabber.org/protocol/disco#info\"/></iq>"

=INFO REPORT==== 16-Apr-2010::22:05:03 ===
D(<0.363.0>:shaper:61) : State: {maxrate,500000,6443.372627198341,
                                     1271448297953929}, Size=156
M=0.15701168479193867, I=5260.399


=INFO REPORT==== 16-Apr-2010::22:05:03 ===
D(<0.364.0>:ejabberd_router:301) : route
         from {jid,[],"profile.localhost",[],[],"profile.localhost",[]}
         to {jid,[],"pubsub.localhost",[],[],"pubsub.localhost",[]}
         packet {xmlelement,"iq",
                    [{"type","get"},
                     {"to","pubsub.localhost"},
                     {"id","10"},
                     {"from","profile.localhost"}],
                    [{xmlelement,"query",
 
[{"xmlns","http://jabber.org/protocol/disco#info"}],
                         []}]}


=INFO REPORT==== 16-Apr-2010::22:05:03 ===
D(<0.304.0>:ejabberd_router:301) : route
         from {jid,[],"pubsub.localhost",[],[],"pubsub.localhost",[]}
         to {jid,[],"profile.localhost",[],[],"profile.localhost",[]}
         packet {xmlelement,"iq",
                 [{"id","10"},{"type","result"}],
                 [{xmlelement,"query",
                   [{"xmlns","http://jabber.org/protocol/disco#info"}],
                   [{xmlelement,"identity",
                     [{"category","pubsub"},
                      {"type","service"},
                      {"name","Publish-Subscribe"}],
                     []},
                    {xmlelement,"feature",
                     [{"var","http://jabber.org/protocol/disco#info"}],
                     []},
                    {xmlelement,"feature",
                     [{"var","http://jabber.org/protocol/disco#items"}],
                     []},
                    {xmlelement,"feature",
                     [{"var","http://jabber.org/protocol/pubsub"}],
                     []},
                    {xmlelement,"feature",
                     [{"var","http://jabber.org/protocol/commands"}],
                     []},
                    {xmlelement,"feature",[{"var","vcard-temp"}],[]},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#access-authorize"}],
                     []},
                    {xmlelement,"feature",
 
[{"var","http://jabber.org/protocol/pubsub#access-open"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#access-presence"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#access-whitelist"}],
                     []},
                    {xmlelement,"feature",
 
[{"var","http://jabber.org/protocol/pubsub#auto-create"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
                       "http://jabber.org/protocol/pubsub#auto-subscribe"}],
                     []},
                    {xmlelement,"feature",
 
[{"var","http://jabber.org/protocol/pubsub#collections"}],
                     []},
                    {xmlelement,"feature",
 
[{"var","http://jabber.org/protocol/pubsub#config-node"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#create-and-configure"}],
                     []},
                    {xmlelement,"feature",
 
[{"var","http://jabber.org/protocol/pubsub#create-nodes"}],
                     []},
                    {xmlelement,"feature",
 
[{"var","http://jabber.org/protocol/pubsub#delete-items"}],
                     []},
                    {xmlelement,"feature",
 
[{"var","http://jabber.org/protocol/pubsub#delete-nodes"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#filtered-notifications"}],
                     []},
                    {xmlelement,"feature",
 
[{"var","http://jabber.org/protocol/pubsub#get-pending"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
                       "http://jabber.org/protocol/pubsub#instant-nodes"}],
                     []},
                    {xmlelement,"feature",
                     [{"var","http://jabber.org/protocol/pubsub#item-ids"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
                       "http://jabber.org/protocol/pubsub#last-published"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#manage-subscriptions"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#member-affiliation"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#modify-affiliations"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#multi-subscribe"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#outcast-affiliation"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#persistent-items"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#presence-notifications"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#presence-subscribe"}],
                     []},
                    {xmlelement,"feature",
                     [{"var","http://jabber.org/protocol/pubsub#publish"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#publisher-affiliation"}],
                     []},
                    {xmlelement,"feature",
 
[{"var","http://jabber.org/protocol/pubsub#purge-nodes"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
                       "http://jabber.org/protocol/pubsub#retract-items"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#retrieve-affiliations"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#retrieve-default"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
                       "http://jabber.org/protocol/pubsub#retrieve-items"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#retrieve-subscriptions"}],
                     []},
                    {xmlelement,"feature",
 
[{"var","http://jabber.org/protocol/pubsub#subscribe"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#subscription-notifications"}],
                     []},
                    {xmlelement,"feature",
                     [{"var",
 
"http://jabber.org/protocol/pubsub#subscription-options"}],
                     []},
                    {xmlelement,"x",
                     [{"xmlns","jabber:x:data"},{"type","result"}],
                     [{xmlelement,"field",
                       [{"var","FORM_TYPE"},{"type","hidden"}],
                       [{xmlelement,"value",[],
                         [{xmlcdata,
                           "http://jabber.org/network/serverinfo"}]}]}]}]}]}



-- 
kael



More information about the ejabberd mailing list