SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
2.98k stars 1.22k forks source link

Selfoss error after update : Can not refresh sources: Internal Server Error #1764

Closed bamboomix closed 6 years ago

bamboomix commented 9 years ago

Hi ! I just updated Selfoss on my Synology DNS-212 and it no more refresh the feeds... When clicking on the refresh button I have this error : Can not refresh sources: Internal Server Error

Any one could help me please ? Thanks

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Dr-Bean commented 9 years ago

Hm. I haven't seen that error during testing. Does the package show it's running in Package Center? Are all the feeds still available (i.e. not broken)?

If you're able to, can you log in via SSH (You can use Putty or Terminal to do that), and execute php /var/services/web/selfoss/update.php. It shouldn't give any output, but if there are issues, it probably will.

bamboomix commented 9 years ago

Thanks for answering so fast ! Yes the package is running, and I have acces to Selfoss and the older posts are still here.

I tryied Putty, i have this error message : file_put_contents(/volume1/web/selfoss/data/cache/20b267c2899727f068ead42f7013235f): failed to open stream: Permission denied

Maybe I missed something... it's the first time I try a SSH connection ;)

Dr-Bean commented 9 years ago

Did you log in as root (same password as the admin account) to do that?

Btw, turns out that the update button in Selfoss is broken on due to the Apache configuration on Synology devices. I can fix that in one of two ways: either rename /var/services/web/selfoss/update.php to something else, or add an Apache configuration. I'll come back to that.

bamboomix commented 9 years ago

I was logged as admin, tryied again logged as root and it works ! I have the new feeds, thanks !! Is it going to work now or do I need to use putty to refresh it ?

Dr-Bean commented 9 years ago

Selfoss runs the same command as you just have run every 10 minutes (that's not changed: it always did that). It seems to be working as intended, so there's no problem with updating the feeds in itself. You might not have waited long enough to see it happen ;)

As for the error you're seeing when clicking the refresh button in the Selfoss interface, I'll update the package to fix that.

bamboomix commented 9 years ago

ok ! thank you :) It's a bit strange ... I launched selfoss this morning and updated it (8 hours ago), checked again 30mn ago and no new entries... but with the command line, I had 40 new entries, and some from hours ago, so I don't think it's because I didn't wait enough ;) However, it's not gonna take a long time to see if it's updating itself, I have 30 feeds in it ;)

bamboomix commented 9 years ago

well, waited 2 hours, checking selfoss, nothing new ! doing the manual refresh... tadam... 12 new entries ! So Selfoss does not run the command ??

Dr-Bean commented 9 years ago

When you did the manual update (running php .../update.php), it doesn't refresh/reload the screen though, right? You still have to do an F5 or something in your browser. It seems (at least in 2.13) that that's what the refresh button is used for. From what I can see, there's no option to set/adjust an auto-refresh, so that would make sense.

Did Selfoss refresh the screen in previous versions, or was an F5 needed? I can't recall :/

bamboomix commented 9 years ago

Yes it needs a refresh, but I don't use f5, I just clic on any item of the left menu to refresh and show the new entries. I'm gonna try to uninstall and reinstall the package, do you know an easy way to save the sources list ?

Dr-Bean commented 9 years ago

Yep, I actually just noticed that you can click on any link, so that seems to work. I'll test my fix on a clean device and I'll probably upload a new version if that works.

As for saving the sources, Selfoss saves that in the database (together with the other stuff). You can export the database on uninstall (that export includes everything, including the rss articles themselves). You can either import the whole db back, or extract the relevant stuff yourself.

bamboomix commented 9 years ago

well, I uninstalled and reinstalled the package and now it works perfectly, even the refresh button... so it was just a trouble with updating ! Thank you anyway :)

jayveesea commented 8 years ago

I just updated my selfoss (2.13) and now have a similar issue. I get "Can not refresh sources: Internal Server Error" when I try to manual update sources and the auto updating is not working anymore (several days now).

I tried ssh'ing in as root and then... php /var/services/web/selfoss/update.php

and that will get my updated sources.

jayveesea commented 8 years ago

also, i now get this error in the shell... libpng warning: iCCP: known incorrect sRGB profile ...but the feeds do update.

Dr-Bean commented 8 years ago

@coppolajj Check the permissions on /volume1/web/selfoss/data and subdirs, and provide the output here. You can do that via CLI using ls -al /volume1/web/selfoss/ and ls -al /volume1/web/selfoss/data.

jayveesea commented 8 years ago

ls -al /volume1/web/selfoss/

drwxr-xr-x   11 root     root          4096 Aug  8 13:19 .
d---------    7 root     root          4096 Jul 31 16:53 ..
-rw-r--r--    1 root     root          5129 May  7 11:32 .htaccess
-rw-r--r--    1 root     root          4014 May  7 11:32 README.md
-rw-r--r--    1 root     root          1345 May  7 11:32 common.php
-rw-r--r--    1 root     root           118 Jul 31 16:53 config.ini
drwxr-xr-x    2 root     root          4096 May  7 11:32 controllers
drwxr-xr-x    5 root     root          4096 May  7 11:32 daos
drwxr-xr-x    8 http     root          4096 May  7 11:32 data
-rw-r--r--    1 root     root           660 May  7 11:32 defaults.ini
drwxr-xr-x    2 root     root          4096 May  7 11:32 helpers
-rw-r--r--    1 root     root          4189 May  7 11:32 index.php
drwxrwxrwx    2 admin    users         4096 Aug  8 13:19 jvc
drwxr-xr-x    7 root     root          4096 May  7 11:32 libs
drwxr-xr-x    7 http     root          4096 May  7 11:32 public
-rw-r--r--    1 root     root          1034 May  7 11:32 run.php
drwxr-xr-x   10 root     root          4096 May  7 11:32 spouts
drwxr-xr-x    2 root     root          4096 May  7 11:32 templates
-rw-r--r--    1 root     root           188 May  7 11:32 update.php

ls -al /volume1/web/selfoss/data

drwxr-xr-x    8 http     root          4096 May  7 11:32 .
drwxr-xr-x   11 root     root          4096 Aug  8 13:19 ..
drwxr-xr-x    2 http     root          4096 Aug 29 08:00 cache
drwxr-xr-x    2 http     root          4096 Aug 29 00:01 favicons
drwxr-xr-x    4 http     root          4096 May  7 11:32 fulltextrss
drwxr-xr-x    2 http     root          4096 Jul 31 16:53 logs
drwxr-xr-x    2 http     root          4096 May  7 11:32 sqlite
drwxr-xr-x    2 http     root          4096 Jul 31 16:53 thumbnails
Dr-Bean commented 8 years ago

I haven't been able to pinpoint a cause yet, although it's been a while I've had time to look into it. A clean install seems to solve the issue, but of course that has obvious downsides.