Hi James, Mark,

It looks like there is a bug in the FedOne server because it tries to
resolve the domains, in order. I know you've disabled it, but I was
able to recreate the behavior over here.

So, using your disco#items as an example:

<iq type="result" id="5556-0" from="achee.com"
to="wave.wave.collaborynth.com.au">
 <query xmlns="http://jabber.org/protocol/disco#items";>
   <item jid="pubsub.achee.com" name="Publish-Subscribe service"/>
   <item jid="wave.achee.com" name="Google Prototype Wave Server -
FedOne"/>
   <item jid="conference.achee.com" name="Public Chatrooms"/>
 </query>
</iq>

pubsub.achee.com has to return disco#info, or FedOne won't even look
at wave.achee.com. Look for this in the output:

Aug 22, 2009 4:51:23 PM
org.waveprotocol.wave.examples.fedone.federation.xmpp.WaveXmppComponent
sendPacket
INFO: sent XMPP packet:
<iq type="get" id="6081-4" to="pubsub.achee.com"
from="wave.wave.collaborynth.com.au">
  <query xmlns="http://jabber.org/protocol/disco#info"/>
</iq>
Aug 22, 2009 4:51:23 PM
org.waveprotocol.wave.examples.fedone.federation.xmpp.WaveXmppComponent
processPacket
INFO: received XMPP packet:

<iq from="pubsub.achee.com" to="wave.wave.collaborynth.com.au"
id="6081-4" type="error">
  <error code="404" type="cancel">
    <remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-
stanzas"/>
  </error>
  <query xmlns="http://jabber.org/protocol/disco#info"/>
</iq>

If pubsub.achee.com resolves OK, it will do the disco#info and know to
skip it (in XmppDisco.java:)

  void processDiscoInfoResult(IQ iq) {
    String id = iq.getID();

    if (inProgressDiscoMap.containsKey(id)) {
      RpcCallback<IQ> next = inProgressDiscoMap.remove(id);
      next.run(iq);
    } else {
      logger.fine("got unexpected iq info response " + iq);
    }
  }

It is this <iq type="error"> that breaks the way
XmppDisco.inProgressDiscoMap works. So here is a patch that should fix
this:

diff -r 9fb7aab3e2a9 src/org/waveprotocol/wave/examples/fedone/
federation/xmpp/WaveXmppComponent.java
--- a/src/org/waveprotocol/wave/examples/fedone/federation/xmpp/
WaveXmppComponent.java  Thu Aug 20 14:18:49 2009 +1000
+++ b/src/org/waveprotocol/wave/examples/fedone/federation/xmpp/
WaveXmppComponent.java  Sat Aug 22 17:07:44 2009 -0600
@@ -406,6 +406,9 @@
         // TODO: fix the error code
         sendErrorResponse("unknown iq packet", iq);
       }
+    } else if (iq.getType().equals(IQ.Type.error) &&
+               iqNamespace.equals(NAMESPACE_DISCO_INFO)) {
+      disco.processDiscoInfoError(iq);
     }
   }

diff -r 9fb7aab3e2a9 src/org/waveprotocol/wave/examples/fedone/
federation/xmpp/XmppDisco.java
--- a/src/org/waveprotocol/wave/examples/fedone/federation/xmpp/
XmppDisco.java  Thu Aug 20 14:18:49 2009 +1000
+++ b/src/org/waveprotocol/wave/examples/fedone/federation/xmpp/
XmppDisco.java  Sat Aug 22 17:07:44 2009 -0600
@@ -182,6 +182,17 @@
     }
   }

+  void processDiscoInfoError(IQ iq) {
+    String id = iq.getID();
+
+    if (inProgressDiscoMap.containsKey(id)) {
+      RpcCallback<IQ> next = inProgressDiscoMap.remove(id);
+      next.run(null); // because iq is an error, don't check it for
the right feature var
+    } else {
+      logger.warning("got unexpected iq info error " + iq);
+    }
+  }
+

   /**
    * This class takes a IQ disco#items result, and calls disco#info
on each JID


It would be a good idea to add a timeout, since a disco#info query
might result in something even stranger (say, a broken server
implementation), which would cause more problems.

Thanks,
David

P.S. I grant Google Inc. the copyright license, patent license, etc.
to this patch, as spelled out in the community principles Contributor
License Agreement:
http://www.waveprotocol.org/wave-community-principles


On Jul 28, 8:44 pm, James Purser <[email protected]> wrote:
> Mark Achée wrote:
> > Have been trying to test with James.
>
> > We're having a little trouble with the pubsub andconferenceservices
> > interfering.  Seems that maybe acmewave doesn't have problems because
> > for some reason it lists wave first
>
> > <iq type="result" id="86-2" from="acmewave.com <http://acmewave.com/>"
> > to="wave.achee.com <http://wave.achee.com/>">
> >   <query xmlns="http://jabber.org/protocol/disco#items";>
> >     <item jid="wave.acmewave.com <http://wave.acmewave.com/>"
> > name="Google Prototype Wave Server - FedOne"/>
> >     <item jid="pubsub.acmewave.com <http://pubsub.acmewave.com/>"
> > name="Publish-Subscribe service"/>
> >     <item jid="conference.acmewave.com
> > <http://conference.acmewave.com/>" name="Public Chatrooms"/>
> >   </query>
> > </iq>
>
> > where as ours don't.
>
> > <iq type="result" id="5556-0" from="achee.com
> > <http://achee.com/>" to="wave.wave.collaborynth.com.au
> > <http://wave.wave.collaborynth.com.au/>">
> >  <query xmlns="http://jabber.org/protocol/disco#items";>
> >    <item jid="pubsub.achee.com <http://pubsub.achee.com/>"
> > name="Publish-Subscribe service"/>
> >    <item jid="wave.achee.com <http://wave.achee.com/>" name="Google
> > Prototype Wave Server - FedOne"/>
> >    <item jid="conference.achee.com <http://conference.achee.com/>"
> > name="Public Chatrooms"/>
> >  </query>
> > </iq>
>
> > Fedone seems to just grab the first entry and go with it.
>
> > <iq type="get" id="1647-4" to="pubsub.achee.com
> > <http://pubsub.achee.com>" from="wave.wave.collaborynth.com.au
> > <http://wave.wave.collaborynth.com.au>">
> >  <query xmlns="http://jabber.org/protocol/disco#info"/>
> > </iq>
>
> > I assume adding pubsub to my dns will fix this (noticed
> > pubsub.acmewave.com <http://pubsub.acmewave.com> resolves) but I
> > expect it's not the ideal solution.
>
> Okay just to follow up I have done the following on my openfire server:
>
> Disabled Group Chat by doing the following:
>
> - Logged Into OpenFire Admin Panel
> - Clicked on Group Chat
> - Clicked on Group Chat Settings
> - Delete the conferences domain
>
> Disabled Pubsub by doing the following:
>
> - Clicked on Server
> - Clicked on System Properties
> - Added the following Property: xmpp.pubsub.enabled and set it to false.
>
> I then restarted everything and Mark ran a ping test which returned the
> expected
>
> <message type="normal" to="wave.wave.collaborynth.com.au"
> from="wave.achee.com" id="1184-2">
>   <ping xmlns="http://waveprotocol.org/protocol/0.2/waveserver"/>
>   <request xmlns="urn:xmpp:receipts"/>
> </message>
>
> So it appears to be confirmed that Fedone is just skimming off the top
> of the list.
>
> --
> James Purser
> Collaborynthhttp://collaborynth.com.au
> Mob: +61 406 576 553
> Skype: purserj1977
> twitter:www.twitter.com/purserj
> GTalk: [email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Wave 
Protocol" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/wave-protocol?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to