Closed mgorny closed 4 years ago
Thanks for reporting. The feed fetcher code is in https://github.com/feedreader/pluto/blob/master/pluto-feedfetcher/lib/pluto/feedfetcher/cond_get_with_cache.rb The code should catch SocketError
s for unknown domains. Maybe your case is somewhat different? I will double-check later this week. Cheers. Prost.
PS: Update: Just tried to access https://candrews.integralblue.com/tag/gentoo/feed/atom it works with a "vanilla" browser - I guess the problem is actually in HTTPS, that is, somehow the secure connection fails (in ruby).
Actually, I think I just happened to hit a short downtime ;-). However, it can be easily reproduced by changing the port number:
title = Planet Gentoo (test)
[candrews]
title = Craig Andrews
link = https://candrews.integralblue.com/
feed = https://candrews.integralblue.com:81/tag/gentoo/feed/atom
FWICS the exception class is Errno::ECONNREFUSED
. I'm sorry but my Ruby knowledge is too poor to know if there's a superclass that catches it all.
Thanks for the detailed ruby exception Errno::ECONNREFUSED
. I currently have no direct access with ruby to the internet (the wonders of a secure enterprise setup) but I will try it later today in my coffee break. No worries. Should be an easy fix.
Actually, I'll probably have a pull request by then ;-).
Thanks for the fix! I will keep the issue / ticket open until a new pluto-feedfetcher gem is published / pushed out. Thanks.
Update: I tried the original https port and in debug mode I get this error:
[debug] GET /tag/gentoo/feed/atom uri=https://candrews.integralblue.com/tag/gentoo/feed/atom, redirect_limit=5
[info] found cache entry for >https://candrews.integralblue.com/tag/gentoo/feed/atom<
*** error: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol
net/http.rb:933:in `connect_nonblock': SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (OpenSSL::SSL::SSLError)
Thus, it might actually be a HTTPS error (and not a cannot connect).
Well, in my case it was error: Failed to open TCP connection to candrews.integralblue.com:443 (Connection refused - connect(2) for "candrews.integralblue.com" port 443)
but in general yes, I suppose there might be more problematic cases.
Thanks for the update - I will push out new gems with your connect rescue fix and the new empty feed case tomorrow (Thursday) and than close this issue here. If you still run into the SSL error (1) with the update, please open a new issue. Cheers. (1) - maybe I'm using an too old ruby version e.g. 2.3.3 with too old openssl lib
I pushed / published the new pluto gems. In the latest pluto version this reports / logs now an error something like:
[error] *** error: fetching feed 'candrews' - [Errno::ECONNREFUSED]
Failed to open TCP connection to candrews.integralblue.com:81
(No connection could be made because the target machine actively refused it. -
connect(2) for "candrews.integralblue.com" port 81)
It seems that connection errors are treated more fatally than 404 errors:
(it stops processing larger file here, while 404s are ignored)
The .ini file: