Alkarex / EasyRSS

Android client for RSS services compatible with Google Reader API
http://freshrss.org
GNU General Public License v3.0
122 stars 13 forks source link

Cannot connect to Freshrss #13

Closed prysme01 closed 9 years ago

prysme01 commented 9 years ago

Hello,

I've tried multiple URL to connect to my freshrss instance 1.0.0 but it always ends with connection failed. https://host/freshrss/p/api/greader.php https://host/freshrss/p/api/ https://host/freshrss/p/ https://host/freshrss/ What could be the issue ?

I know that my https certificat has expired could it be the issue ? I'm using easyrss from fdroid. Emmanuel.

Alkarex commented 9 years ago

Hello, The first URL should be good.

  1. Check the API test procedure https://github.com/FreshRSS/FreshRSS/issues/443#issuecomment-36666133 and remember that the user's API password is not the same as the user's normal password
  2. Can you try in HTTP?
  3. What do you have in your HTTP logs, and in /FreshRSS/data/users/_/log_api.txt ?
accad commented 9 years ago

I am having the same issue, but I know that my problem is because of the .htaccess/mod_rewrite rules. I am using Nginx and still trying to play with it an rewrite rules.

My Nginx error.log shows this:

2015/05/28 11:48:07 [error] 30947#30947: *182 open() "/var/www/html/rss/p/api/greader.php/check/compatibility" failed (20: Not a directory), client: xxx.xxx.xxx.xxx, server: xxxxxxxx.xxx, request: "GET /rss/p/api/greader.php/check%2Fcompatibility HTTP/1.1", host: "xxxxxxxx.xxx", referrer: "https://xxxxxxxx.xxx/rss/p/api/"

Do you have a reference for Nginx? And I think prysme01 issue will probably end up being the same issue, that or mod_rewrite issue in Apache.

Alkarex commented 9 years ago

@accad Is your PHP configured correctly in Nginx for REST-like requests? Not tested, but you should have something equivalent to:

location ~ [^/]\.php(/|$) {
    fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    if (!-f $document_root$fastcgi_script_name) {
        return 404;
    }
...

http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_split_path_info

P.S. No, sorry, I do not have a reference for nginx yet. Someone should open a documentation issue on FreshRSS since this is a server matter. Edit: For nginx, see https://github.com/FreshRSS/FreshRSS/issues/957#issuecomment-134388220

prysme01 commented 9 years ago

Both test are pass. I don't see any new entry in the freshrss log No entries in apache log (access or error) really weird.

prysme01 commented 9 years ago

If I copy/paste the url from easyrss to firefox on my mobile I can see the greader result and also I see the entry in the apache access.log, but I can't see any access.log entry if I validate the url in easyrss, the request is not sent at all or at least not received by my server.

Alkarex commented 9 years ago

@prysme01 If you do not receive the request at all, it may be a sign of wrong HTTPS. Can you try in HTTP (just for testing)?

Alwaysin commented 9 years ago

I had a problem like that (with a self-signed certificate), which I resolved installing my CA in Android. If your certificate has expired, it probably is the reason ; as Alkarex said, try with http, and then with a valid certificate.

prysme01 commented 9 years ago

the same exact URL (copy/paste) works just fine in firefox on the same mobile device. I don't want to use HTTP. If EasyRSS don't work with an expired certificat, I will still continue to use the web interface.

Alkarex commented 9 years ago

@prysme01

  1. Could you try to see if it works with News+ ? https://play.google.com/store/apps/details?id=com.noinnion.android.newsplus.extension.google_reader
  2. You could install a self-signed certificate on your telephone like @Alwaysin if you do not want a real certificate (Why not? See also http://www.cacert.org )
siick commented 9 years ago

I had the same problem i've tried like you : https://host/freshrss/p/api/greader.php https://host/freshrss/p/api/ https://host/freshrss/p/ https://host/freshrss/ but this one was ok finally > http://host/p/api/greader.php because my VHost on Apache was already pointing to the FreshRSS folder. I let the 's' away for now because right now, EasyRSS can't connect with https on my case (but it's working in my web browser, should i open an issue?)

Alkarex commented 9 years ago

@siick First test if your SSL certificate is valid with https://www.ssllabs.com/ssltest/ TLS 1.1 and TLS 1.2 are only available from Android 4.1+ (probably, depending on the telephones https://github.com/Alkarex/EasyRSS/commit/762d3f4472aedb2228203fa95731bbe85b341b65#commitcomment-11011379 ) and for sure from Android 5.0+.

Alkarex commented 9 years ago

See more information for using the API with nginx https://github.com/FreshRSS/FreshRSS/issues/957#issuecomment-134388220