nextcloud_ynh
nextcloud_ynh copied to clipboard
Issue with cron.php missing APCu module
The bug
I upgrade to the 22.1.1~ynh1 stable version, and I received emails with this error:
OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)
Context
- Hardware: VM in Proxmox VE, on dedicated machine.
- YunoHost version:
yunohost:
repo: stable
version: 4.2.8.3
yunohost-admin:
repo: stable
version: 4.2.5
moulinette:
repo: stable
version: 4.2.4
ssowat:
repo: stable
version: 4.2.4
- 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?: Mmmh
- If yes, please explain: I have this nextcloud instance for many years, maybe 5 or 6, updated with Yunohost, installed some extension needed more stuff (eg: imagemagick ), but not very strange mods...
- Using, or trying to install package version/branch: stable
Steps to reproduce
SSH, run as root :
sudo -u nextcloud /usr/bin/php7.3 -f /var/www/nextcloud/cron.php
OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)
For your information here is what I have in nextcloud's cron:
~$ sudo crontab -l -u nextcloud
# */15 * * * * nextcloud /usr/bin/php7.3 -f /var/www/nextcloud/cron.php
# */10 * * * * nextcloud /usr/bin/php7.3 /var/www/nextcloud/occ preview:pre-generate
*/15 * * * * /usr/bin/php7.3 -f /var/www/nextcloud/cron.php
# */10 * * * * /usr/bin/php7.3 /var/www/nextcloud/occ preview:pre-generate
Expected behavior
Cron running well :wink:
It works if I add --define apc.enable_cli=1
in the command. I found this in this commit : https://github.com/YunoHost-Apps/nextcloud_ynh/commit/51c5b71f2bec6c3a64b649301513712a87ce1794
It removed extra lines in cron.
Logs:
https://paste.yunohost.org/raw/qekoyequpu
Could you do :
cat /etc/cron.d/nextcloud
--define apc.enable_cli=1
seems added in this file since your upgrade (i read your upgrade log).
Yep :
~$ cat /etc/cron.d/nextcloud
*/15 * * * * nextcloud /usr/bin/php7.3 --define apc.enable_cli=1 -f /var/www/nextcloud/cron.php
Should I clean this with crontab -e -u nextcloud :arrow_down: ?
~$ sudo crontab -l -u nextcloud
*/15 * * * * /usr/bin/php7.3 --define apc.enable_cli=1 -f /var/www/nextcloud/cron.php
# */10 * * * * nextcloud /usr/bin/php7.3 /var/www/nextcloud/occ preview:pre-generate
For your information:
~$ sudo cat /var/spool/cron/crontabs/nextcloud
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.Crz5MY/crontab installed on Fri Sep 10 21:38:48 2021)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
*/15 * * * * /usr/bin/php7.3 --define apc.enable_cli=1 -f /var/www/nextcloud/cron.php
# */10 * * * * nextcloud /usr/bin/php7.3 /var/www/nextcloud/occ preview:pre-generate
On other instances i have:
$ crontab -l -u nextcloud
no crontab for nextcloud
Are you sure you didn't add this cron in crontab yourself ?
Mmh maybe a long time ago, I do not remember. Thanks I'll remove this crontab and rely on the file in etc/cron.d/nextcloud
11 sept. 2021 17:27:15 ljf (zamentur) @.***>:
On other instances i have:
$ crontab -l -u nextcloud no crontab for nextcloud
Are you sure you didn't add this cron in crontab yourself ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub[https://github.com/YunoHost-Apps/nextcloud_ynh/issues/439#issuecomment-917425109], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ABXWJVLVJMYRJUQGX6OWZA3UBNYMJANCNFSM5DZWWNQQ]. Triage notifications on the go with GitHub Mobile for iOS[https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675] or Android[https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub]. [data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABBCAYAAACO98lFAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAAnSURBVHic7cEBDQAAAMKg909tDjegAAAAAAAAAAAAAAAAAAAAALg3QkUAAR85m+QAAAAASUVORK5CYII=###24x24:true###][Image de pistage][https://github.com/notifications/beacon/ABXWJVLW34NAEEO2G3UMNVDUBNYMJA5CNFSM5DZWWNQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOG2XMXVI.gif]
For what it's worth: https://github.com/nextcloud/server/issues/27781
Duplicate of #434