Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSS feeds are not updating automatically #147

Open
TheGreatBeginner777 opened this issue Oct 15, 2022 · 9 comments
Open

RSS feeds are not updating automatically #147

TheGreatBeginner777 opened this issue Oct 15, 2022 · 9 comments

Comments

@TheGreatBeginner777
Copy link

Describe the bug

My feeds are not updating automatically.
Feeds are only updated by clicking on "Update feeds" from the main page in FressRSS (this means I have to login to YunoHost instance to update feeds for it to be propagated to the same user on desktop/mobiles etc.).
I searched for similar issue and found issue #77.

  1. I'm unable to locate log file in /tmp/freshrss.log.
  2. For cat /etc/cron.d/freshrss output is
    MAILTO="root"
    */10 * * * * freshrss /usr/bin/php7.3 /var/www/freshrss/app/actualize_script.php >/var/www/freshrss/freshrss.log 2>&1

freshrss cron job is pointing to php7.3. Based on #77 solution from some users should I edit cron and point to php7.0?

Context

  • Hardware: Raspberry Pi at home
  • YunoHost version: 11.0.9.15 (stable)
  • I have access to my server: Through SSH | through the webadmin
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
  • Using package version: 1.19.2~ynh1

Steps to reproduce

Login to YunoHost instance.
Go into FreshRSS app and click on "Update feeds" icon.

Expected behavior

Feeds to be updated automatically.

Logs

n/a.

@lapineige
Copy link
Member

Isn't FreshRSS using php7.4 now ? 🤔

@lapineige
Copy link
Member

#77 (comment) : @yalh76 do you have any clue ?

@yalh76
Copy link
Member

yalh76 commented Oct 16, 2022

Isn't FreshRSS using php7.4 now ? 🤔

Nope, it's not using PHP7.4 since you have not merged #146

@lapor-kris
Copy link

lapor-kris commented Nov 4, 2022

I have the same problem since upgrading it to 1.20

Esit: any workaround for this issue? Thanks

@mprimi
Copy link

mprimi commented Nov 6, 2022

Sharing some info that may be useful to other stumbling upon this.

@TheGreatBeginner777 :

For cat /etc/cron.d/freshrss output is
MAILTO="root" */10 * * * * freshrss /usr/bin/php ...

A cron file exists, but it's not installed. This is why refresh is not working.

Here's how set it up:

Login as root using sudo su when logged in as admin.
The rest of the commands here are executed as root.

  1. Check cron jobs for various users:
for u in <your username> admin freshrss root;  do sudo -u $u crontab -l; done
no crontab for USER1
no crontab for admin
no crontab for freshrss
no crontab for root

Confirms none of the users has a cron job installed.

  1. Run refresh manually
    The script /var/www/freshrss/app/actualize_script.php belongs to user freshrss. And that's the user FreshRSS runs as.
sudo -u freshrss /usr/bin/php7.3 /var/www/freshrss/app/actualize_script.php
FreshRSS starting feeds actualization at 2022-11-06T20:26:12+00:00
FreshRSS actualize USER1…
FreshRSS actualization done for 2 users, using 6.00 MiB of memory, in 0 day(s), 0 hour(s), 0 minute(s) and 1 seconds.
Results:
USER1 OK
End.

This worked fine.

  1. Install the cron job
    sudo -u freshrss crontab -e

This opens an editor, I add the line:

*/30 * * * * /usr/bin/php7.3 /var/www/freshrss/app/actualize_script.php >/var/log/freshrss/freshrss.log 2>&1

This refreshes every 30 minutes.
Save and quit.
It should say crontab: installing new crontab.

Double check: sudo -u freshrss crontab -l

*/30 * * * * /usr/bin/php7.3 /var/www/freshrss/app/actualize_script.php >/var/log/freshrss/freshrss.log 2>&1

After enough time has passed, I can see (as root) that the update ran:

cat /var/log/freshrss/freshrss.log
FreshRSS starting feeds actualization at 2022-11-06T20:51:40+00:00
FreshRSS actualize USER1…
FreshRSS actualization done for 1 users, using 4.00 MiB of memory, in 0 day(s), 0 hour(s), 0 minute(s) and 0 seconds.

Notice this is slightly brittle: the crontab is hardcoding /usr/bin/php7.3 which may not be the right executable after an update.

Anyway, this works.

Notice that this page has 2 different methods to do the same:

  • Install in the global crontab
  • Install as systemd timed service

@inrepublica
Copy link

Same problem for me with upgrade 1.20

@lapor-kris
Copy link

lapor-kris commented Nov 8, 2022

After the upgrade to 1.20 I also get cron mail every 10 minutes with this:
/bin/sh: 1: cannot create /var/log/freshrss/freshrss.log: Permission denied

Is there a way to add permission for this?

edit: if I try:
cat /var/log/freshrss/freshrss.log cat: /var/log/freshrss/freshrss.log: No such file or directory

@mprimi
Copy link

mprimi commented Nov 8, 2022

@lapor-kris
Either /var/log/freshrss/ doesn't exist, or it's not writeable by whichever user you installed the cronjob for.

Assuming is running under freshrss user:

Create the directory:
sudo mkdir -p /var/log/freshrss/
Change owner of directory:
sudo chown freshrss /var/log/freshrss/

@lapineige
Copy link
Member

#150 should have fixed it.

Maybe not for the people who upgraded in the mid-time ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants