Possible problem with RSS Cloud support in River4

16 views
Skip to first unread message

Andy Sylvester

unread,
Dec 22, 2015, 11:03:56 AM12/22/15
to river4
I am doing some testing of Andrew Shell's RSS Cloud server (http://rpc.rsscloud.io:5337). As part of my testing, I also set up a server myself (http://node.andysylvester.com:80). When I ran the test app by Dave Winer (https://gist.github.com/scripting/dbb07695736de85b3882), I was able to use both servers successfully for the following feeds:

http://hn.geekity.com/newstories.xml (Andrew Shell test feed using his RSS Cloud server in cloud element in feed)
http://www.andysylvester.com/dick/feed/ (a Wordpress test site feed using my RSS Cloud server in cloud element in feed)

When I tried setting up a clean River4 install using these feeds, I saw the following error in the console:

pleaseNotify: urlServer == http://rpc.rsscloud.io:5337/pleaseNotify, err.message == Cannot read property 'statusCode" of undefined.
pleaseNotify: urlServer == http://node.andysylvester.com:80/pleaseNotify, err.message == Cannot read property 'statusCode" of undefined.

The message appears three times, which leads me to think that River4 tries three times to subscribe, then gives up.

Has anyone else seen this type of behavior? I am going to go back to the version of River4 that introduced RSS Cloud support (v0.111) to see if that works, will report back on what I find.

Andy Sylvester

Andrew Shell

unread,
Dec 22, 2015, 11:08:05 AM12/22/15
to riv...@googlegroups.com
I'll try to take a look and see if there is anything funky happening with my server sometime today.
 
Cheers,
Andrew
--
---
You received this message because you are subscribed to the Google Groups "river4" group.
To unsubscribe from this group and stop receiving emails from it, send an email to river4+un...@googlegroups.com.
To post to this group, send email to riv...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
 

Dave Winer

unread,
Dec 22, 2015, 1:53:18 PM12/22/15
to riv...@googlegroups.com
I looked at the code, and there must have been some kind of error on the request call in pleaseNotify, but given the way the code is written there's no way to know what the error was.

Andy, are you sure your server is publicly accessible? I just tried to access the home page of your server and got an error.

In order for rssCloud to work, Andrew's server has to be able to make a request sent to your server..

Dave


Andy Sylvester

unread,
Dec 22, 2015, 1:59:34 PM12/22/15
to riv...@googlegroups.com
I went back to River4 version 0.112 (one revision later than the one introducing RSS Cloud support. I repeated my tests and saw the same result as my initial email. For my tests, i am running River4 locally on a Windows laptop.

I looked at the calls to pleaseNotify in the test app and in River4, and I did notice one difference. The test app is running on a server, and specifies a domain in the second calling argument. In River4, this is set to "undefined". I then decided to review the rsscloud-server documentation for the pleaseNotify function. Here is the relevant section:

====

When you POST the server first checks if the urls you specifed are returning an HTTP 2xx status code then it attempts to notify the subscriber of an update to make sure it works. This is done in one of two ways.

  1. If you did not specify a domain parameter and we're using the requesting IP address we perform a POST request to the URL represented by http://<ip>:<port><path> with a single parameter url. To accept the subscription that resource just needs to return an HTTP 2xx status code.
  2. If you did specify a domain parameter then we perform a GET request to the URL represented by http://<domain>:<port><path> with two query string parameters, url and challenge. To accept the subscription that resource needs to return an HTTP 2xx status code and have the challenge value as the response body.
====
Based on my review of the River4 source code, I believe that item 1 above is the method that the RSS Cloud server is trying to notify the subscriber (River4 in this case), since the domain parameter is not specified. Looking at Andrew Shell's server logs, there are two River4 subscribers showing up in the logs repeatedly (http://104.131.120.7:1337/ and http://45.33.11.20:1337/). I wonder if these are River4 installations running on a computer with a static IP or on another server.

I looked at the current River4 source code for the handleRequest function, specifically the "POST" case within the switch (httpRequest.method) logic (lines 2169-2223). I did not see any particular case for handling just a URL being received in within the POST action.

Dave, I just saw your reply in this thread. If you went to node.andysylvester.com, you should have seen "Cannot GET". Since I am running rsscloud-server on port 80, I think this would be the expected response. If you go to http://node.andysylvester.com/viewlog, you should be able to see my server log.

I am wondering if River4 has to be running on a server (as opposed to a local PC/Mac) for RSS Cloud stuff to work. Looking forward to hearing back from Dave and Andrew....


Andy Sylvester


Dave Winer

unread,
Dec 22, 2015, 2:10:10 PM12/22/15
to riv...@googlegroups.com
Please read my response to you again.

Dave Winer

unread,
Dec 22, 2015, 2:45:38 PM12/22/15
to riv...@googlegroups.com
BTW, I'm always prepared to consider there's a mistake in my code, but first, be sure you're not making a mistake in using it.


And when you get a definitive answer, take it to heart. In this case, yes you must be running your RIver4 installation on a public server. It's not fair to ask that question after I said exactly that, in writing, in the previous email.

And I'm pretty sure it's stated in the rssCloud docs. If not, it should be. 

Anyway I just reviewed the code. Knowing how I do things, if it says literally "undefined" in the call to pleaseNotify, that's not an oversight, it's a very deliberate thing. I don't have all the data here now, but I'd guess that somewhere deeper in the stack it's substituting the IP address of the current machine for the undefined parameter. That's how these things work.

In other words I'm 99 percent sure that's not a bug. 

And I'm 99 percent sure the problem is you're running RIver4 on a machine that is not accessible over the Internet. 

But I would appreciate a confirmation from you, so I can close this issue off. 

Thanks...

Dave


Andy Sylvester

unread,
Dec 22, 2015, 5:21:23 PM12/22/15
to riv...@googlegroups.com
Dave,

Thanks for your replies, the computer I was using for my testing was my local Windows laptop. Based on this thread, I will continue my testing with a River4 installation running on a server

In your first message, I was not sure what the "server" you were talking about was, since I had referred to several in my first email. I was also about to click send on my second message when I saw your first post, so I tried to acknowledge that in my post. 

I have been trying to follow the guidance in http://scripting.com/2014/03/19/howToAskForHelpWithSoftware.html, and did not mean to give the implication that there was something wrong with River4 instead of how I was trying to use it. I think I should have titled this thread "Having problems understanding how to use RSSCloud with River4". I did think that providing more information was more helpful than less information.

Thanks for your help, I will post again if I have more questions.

Andy Sylvester


Reply all
Reply to author
Forward
0 new messages