Subscribe fails: "Error trying to confirm subscription"

37 views
Skip to first unread message

c.cobb

unread,
Sep 30, 2009, 10:33:21 AM9/30/09
to Pubsubhubbub
First attempt to use PuSH, and am unable to subscribe to my topic. For
the callback, I am just using a simple CGI script that, afaict, is
doing the right thing (see below). When I try to subscribe, I get
"Error trying to confirm subscription", but I also see a 200 response
code. Looking at main.py, I would have expected a 409. What the heck?

Before attempting to subscribe, I published two feed URLs. However,
when publishing the topics at http://pubsubhubbub.appspot.com/publish,
I get a 200 response code. Given the note on the page (and again from
looking at main.py), I would have expected a 204 response. Does that
still indicate "accepted"? Apparently I can't query the topic until
I've successfully added subscribers.

As test feeds, I'm using a WordPress blog with Josh Fraser's
PubSubHubbub plugin installed. I have confirmed that the plugin adds
the rel="hub" links. However, neither of the the feeds, excerpted
below, contain an <atom:feed> tag. Is this causing the failure?
From reading the Core 0.2 Working Draft spec, maybe so?

I'll add the gory details as a response to this post. I really look
forward to seeing this work. Any and all help will be appreciated.

c.cobb

unread,
Sep 30, 2009, 10:36:03 AM9/30/09
to Pubsubhubbub
Details, details...

Subscribing via http://pubsubhubbub.appspot.com/subscribe

Callback: http://ccobb.net/cgi-bin/test/test.pl
Feed URL: http://ccobb.net/blahblahblog/?feed=rss2
Verify: Synchronous
Mode: Subscribe

When the Callback URL receives the verification request, it returns
the hub.challenge parameter in the response body along with a success
response code.

For example, receiving this request:

hub.challenge=Awoz721VyuJlc8OdiEGH48u-00KeLdbZDU90UPWRQNoKzUVBIOIBvoFodZ7xqLRl-
cSGiqVGKl1jUZebV5Ajt_8k5dX3SLtPAAPIHJokW8pgzdDb1f6Fzz4fW4y5dhJj&hub.topic=http
%3A%2F%2Fccobb.net%2Fblahblahblog%2F%3Ffeed
%3Drss2&hub.mode=subscribe&hub.lease_seconds=2592000
HubTopic: http://ccobb.net/blahblahblog/?feed=rss2
Response:
Awoz721VyuJlc8OdiEGH48u-00KeLdbZDU90UPWRQNoKzUVBIOIBvoFodZ7xqLRl-
cSGiqVGKl1jUZebV5Ajt_8k5dX3SLtPAAPIHJokW8pgzdDb1f6Fzz4fW4y5dhJj

Returns this document with a status of 200:

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-
US">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
</head>
<body>
Awoz721VyuJlc8OdiEGH48u-00KeLdbZDU90UPWRQNoKzUVBIOIBvoFodZ7xqLRl-
cSGiqVGKl1jUZebV5Ajt_8k5dX3SLtPAAPIHJokW8pgzdDb1f6Fzz4fW4y5dhJj
</body>
</html>



Publishing via http://pubsubhubbub.appspot.com/publish

Testing PuSH with two different WordPress feeds, excerpted here. One
has a <channel> and one has a <feed> but neither of these contains an
<atom:feed> tag...is this a showstopper?

1) http://ccobb.net/blahblahblog/?feed=rss2

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns="http://www.w3.org/2005/Atom" .... >
<channel>
<title>The Blah Blah Blog</title>
<atom:link href="http://ccobb.net/blahblahblog/?feed=rss2"
rel="self" type="application/rss+xml" />
<link>http://ccobb.net/blahblahblog</link>
<description>Welcome to our little paradise</description>
<lastBuildDate>Thu, 17 Sep 2009 21:19:49 +0000</lastBuildDate>
<generator>http://wordpress.org/?v=2.8.4</generator>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/
><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>
.....
</channel>
</rss>

2) http://ccobb.net/blahblahblog/?feed=atom

<?xml version="1.0" encoding="UTF-8"?>
<feed .... >
....
<link rel="alternate" type="text/html" href="http://ccobb.net/
blahblahblog" />
<id>http://ccobb.net/blahblahblog/?feed=atom</id>
<link rel="self" type="application/atom+xml" href="http://ccobb.net/
blahblahblog/?feed=atom" />
<link rel="hub" href="http://pubsubhubbub.appspot.com" /><link
rel="hub" href="http://superfeedr.com/hubbub" />
....
</feed>

Brett Slatkin

unread,
Sep 30, 2009, 11:02:36 AM9/30/09
to pubsub...@googlegroups.com

Hey Cobb,

Your subscriber is returning the hub.challenge string wrapped in an HTML body. It should be *just* the challenge string and nothing more. I'm on the bus now but will look further if that isn't it!

-Brett

c.cobb

unread,
Sep 30, 2009, 1:20:49 PM9/30/09
to Pubsubhubbub
That did it. Thank you for the quick reply. I tried that earlier, but
obviously had something else wrong at the time. Then, when actually
*reading* the 0.2 spec, saw it wanted a "response body," and
ass*u*me'd that meant an HTML body.

Next question: I'm still seeing this same error message when I try to
subscribe an XMPP client to the feed:
http://pubsubhubbub-xmpp.appspot.com/subscribe/tipo....@gmail.com
...this URI was generated by the http://pubsubhubbub-xmpp.appspot.com/
form. The xmpp user is a friend of <pubsubhu...@appspot.com>
and, at the time I try to subscribe, the user is online. Not sure how
to start debugging this one.

This is the part I'm really interested in. I've been wanting to have a
Jabber-enabled server since first playing around with Jabber libs
maybe 8 or 9 years ago, and I'm hoping that PuSH w/XMPP can make this
simple. This is great stuff. Thanks.

Brett Slatkin

unread,
Sep 30, 2009, 1:30:12 PM9/30/09
to pubsub...@googlegroups.com, mat...@mastracci.com
+matthew

Matt, Any ideas on this one?

Matthew Mastracci

unread,
Sep 30, 2009, 2:26:29 PM9/30/09
to Brett Slatkin, chris....@gmail.com, pubsub...@googlegroups.com
Chris,

I checked the logs on the app and I only see a single request to that
subscribe URL (it appears to be a GET sent from
Firefox/Gentoo/x86_64).

I just used that subscription URL to successfully add (and remove :))
a subscription to the TechCrunch FeedBurner feed
(http://feeds.feedburner.com/TechCrunch) with that XMPP account. I
used the top form on this page:
http://pubsubhubbub.appspot.com/subscribe . Could it have been a
temporary failure for outgoing requests in AppEngine?

Here are the values that tested successfully:

Callback: (the subscriber URL)
http://pubsubhubbub-xmpp.appspot.com/subscribe/tipo....@gmail.com
Topic: (the feed URL) http://feeds.feedburner.com/TechCrunch
Verify type: Sync
Mode: Subscribe
Verify token: (can be anything)

Matt.

c.cobb

unread,
Sep 30, 2009, 2:48:21 PM9/30/09
to Pubsubhubbub
Hi Matt,
This is very strange... In my xmpp chat window I see two subscribes
and one unsubscribe to the TechCrunch feed. However, when I try my
feed, it still fails. Also, when I try the TechCrunch feed you used,
it *still* fails. I've checked the params in the form several times.
I'll try this again after lunch, when I can see straight again.
Thanks,

c.cobb

unread,
Sep 30, 2009, 3:26:49 PM9/30/09
to Pubsubhubbub
Switched to Internet Explorer 7 and, first try, got a "Server too
busy" error. But, on the second try, the subscription was successful.
Unsubscription and re-subscription works fine in IE. Nada in Firefox
3.0.14. Can live with that, I guess :) Better than thinking I'm going
crazy.
Reply all
Reply to author
Forward
0 new messages