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

Admin Page says Cron jobs not run for some time even though one started a few mintes ago and is still running., #11873

Open
4nanook opened this issue Aug 28, 2022 · 5 comments
Labels

Comments

@4nanook
Copy link

4nanook commented Aug 28, 2022

  • [ x] I have searched open and closed issues for duplicates

Bug Description

Admin says Cron jobs not run for some time even though one started a few mintes ago and is still running.,

The last worker process started at 2022-08-27 23:07:57 UTC. This is more than one hour ago. Please adjust your crontab settings.

systemctl status cron
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2022-08-26 23:14:10 PDT; 1 day 14h ago
Docs: man:cron(8)
Main PID: 2716 (cron)
Tasks: 4 (limit: 77055)
Memory: 203.1M
CPU: 2h 33min 49.490s
CGroup: /system.slice/cron.service
├─ 2716 /usr/sbin/cron -f -P
├─1193321 /usr/sbin/CRON -f -P
├─1193326 /bin/sh -c "php -f /misc/www/nextcloud/cron.php > /dev/null 2>&1"
└─1193327 php -f /misc/www/nextcloud/cron.php

Aug 28 13:49:01 ftp.eskimo.com CRON[1192958]: (friendica) CMD (cd /misc/www/friendica;/usr/bin/php bin/worker.php >/var/log/friendica/worker.log 2>/var/log/friendica/worker.err)
Aug 28 13:49:01 ftp.eskimo.com CRON[1192957]: pam_unix(cron:session): session closed for user friendica
Aug 28 13:50:01 ftp.eskimo.com CRON[1193320]: pam_unix(cron:session): session opened for user hubzilla(uid=406) by (uid=0)
Aug 28 13:50:01 ftp.eskimo.com CRON[1193322]: (hubzilla) CMD (cd /misc/www/hubzilla; /usr/bin/php Zotlabs/Daemon/Master.php Cron > /dev/null 2>&1)
Aug 28 13:50:01 ftp.eskimo.com CRON[1193319]: pam_unix(cron:session): session opened for user friendica(uid=405) by (uid=0)
Aug 28 13:50:01 ftp.eskimo.com CRON[1193324]: (friendica) CMD (cd /misc/www/friendica;/usr/bin/php bin/worker.php >/var/log/friendica/worker.log 2>/var/log/friendica/worker.err)
Aug 28 13:50:01 ftp.eskimo.com CRON[1193321]: pam_unix(cron:session): session opened for user nextcloud(uid=501) by (uid=0)
Aug 28 13:50:01 ftp.eskimo.com CRON[1193326]: (nextcloud) CMD (php -f /misc/www/nextcloud/cron.php > /dev/null 2>&1)
Aug 28 13:50:01 ftp.eskimo.com CRON[1193319]: pam_unix(cron:session): session closed for user friendica
Aug 28 13:50:04 ftp.eskimo.com CRON[1193320]: pam_unix(cron:session): session closed for user hubzilla

Steps to Reproduce

Normal operation with workers scheduled out of crontab.

  1. step one
    Set up friendica per website.
  2. step two
    Place a crontab entry for friendica workers.
  3. step three
            • cd /misc/www/friendica;/usr/bin/php bin/worker.php >/var/log/friendica/worker.log 2>/var/log/friendica/worker.err

Actual Result:

   The last worker process started at 2022-08-27 23:07:57 UTC. This is more than one hour ago. Please adjust your crontab settings.

Expected Result:

    No worker not running bitch messages.  Work gets done.

Screenshots

  I cut and pasted the relevant error message instead of the whole screen.

Platform Info

Friendica Version:

Version
Friendica 'Giant Rhubarb' 2022.09-dev -

Friendica Source:
Github

PHP version:PHP 7.4.30 (cli) (built: Aug 1 2022 15:06:35) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.30, Copyright (c), by Zend Technologies

SQL version:
mysql Ver 15.1 Distrib 10.6.7-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper

@4nanook 4nanook added the Bug label Aug 28, 2022
@MrPetovan
Copy link
Collaborator

The warning will vanish once the cron task will end.

@4nanook
Copy link
Author

4nanook commented Aug 28, 2022

Perhaps but it says the last worker started more than an hour ago when in fact it was less than one minute ago.

@4nanook
Copy link
Author

4nanook commented Sep 18, 2022

No, friendica has something fuxored with it's code regarding cron jobs, look here:

Friendica Admin page says:

The last worker process started at 2022-09-18 12:37:03 UTC. This is more than one hour ago. Please adjust your crontab settings.

But systemd cron status shows:

● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2022-09-17 00:36:04 PDT; 1 day 16h ago
Docs: man:cron(8)
Main PID: 1829 (cron)
Tasks: 1 (limit: 77055)
Memory: 58.6M
CPU: 7h 41min 13.378s
CGroup: /system.slice/cron.service
└─1829 /usr/sbin/cron -f -P

Sep 18 16:46:01 ftp.eskimo.com CRON[3137903]: pam_unix(cron:session): session closed for user friendica
Sep 18 16:47:01 ftp.eskimo.com CRON[3138317]: pam_unix(cron:session): session opened for user friendica(uid=405) by (uid=0)
Sep 18 16:47:01 ftp.eskimo.com CRON[3138318]: (friendica) CMD (cd /misc/www/friendica;/usr/bin/php bin/worker.php >/var/log/friendica/worker.log 2>/var/log/friendica/worker.err)
Sep 18 16:47:01 ftp.eskimo.com CRON[3138317]: pam_unix(cron:session): session closed for user friendica
Sep 18 16:48:01 ftp.eskimo.com CRON[3138660]: pam_unix(cron:session): session opened for user friendica(uid=405) by (uid=0)
Sep 18 16:48:01 ftp.eskimo.com CRON[3138661]: (friendica) CMD (cd /misc/www/friendica;/usr/bin/php bin/worker.php >/var/log/friendica/worker.log 2>/var/log/friendica/worker.err)
Sep 18 16:48:01 ftp.eskimo.com CRON[3138660]: pam_unix(cron:session): session closed for user friendica
Sep 18 16:49:01 ftp.eskimo.com CRON[3138962]: pam_unix(cron:session): session opened for user friendica(uid=405) by (uid=0)
Sep 18 16:49:01 ftp.eskimo.com CRON[3138965]: (friendica) CMD (cd /misc/www/friendica;/usr/bin/php bin/worker.php >/var/log/friendica/worker.log 2>/var/log/friendica/worker.err)
Sep 18 16:49:02 ftp.eskimo.com CRON[3138962]: pam_unix(cron:session): session closed for user friendica

@TheNomad11
Copy link

So we can ignore this message? Same issue here with the most recent stable Friendica 2022.12 - 1502

@4nanook
Copy link
Author

4nanook commented Jan 30, 2023

Still doing it with Friendica 'Giant Rhubarb' 2023.03-dev - 1513

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

No branches or pull requests

3 participants