Fix Nextcloud Cron Job not Running on NC 21.0.3 - Nextcloud Redis Setup
HTML-код
- Опубликовано: 16 июл 2024
- This video shows you how to fix the Nexcloud cron job not running after updating to version 21.0.3. This version breaks compatibility with APCu (unless explicitly using the command line interface version) and therefore I would advice to install Redis as a caching server.
UPDATE: The latest version of Nextcloud now breaks compatibility with redis.. ugh - check the tutorial on my blog for the latest WORKING caching method: techguides.yt/guides/how-to-i...
00:00 - Fix Nextcloud Cron Job not Running 21.0.3
00:42 - Fix 1: Run APC in CLI mode
01:52 - Fix 2: Setup Redis as Nextcloud Cache
🎵 Music courtesy of Epidemic Sound: www.epidemicsound.com/referra...
💻 Gaming Setup: amzn.to/2E67AUG
📷 Production Gear: amzn.to/2VhbShO
📝 Blog: techguides.yt
👕 Merchandise: teespring.com/stores/tech-guides
🐦 Twitter: / techguidesyt
📺 Twitch: / speedbre4ker
🎧 Discord: / discord
#Nexcloud #Redis #TechGuides - Наука
UPDATE: The latest version of Nextcloud now breaks compatibility with Resi... Check the tutorial on my blog for the latest WORKING caching method: techguides.yt/guides/how-to-install-and-configure-nextcloud-hub-21/
So did what ur blog said and now get this message:
*sudo -u www-data php occ maintenance:update:htaccess
An unhandled exception has been thrown:
ParseError: syntax error, unexpected ';', expecting ')' in /var/www/nextcloud/config/config.php:32
Stack trace:
#0 /var/www/nextcloud/lib/private/Config.php(69): OC\Config->readData()
#1 /var/www/nextcloud/lib/base.php(150): OC\Config->__construct()
#2 /var/www/nextcloud/lib/base.php(575): OC::initPaths()
#3 /var/www/nextcloud/lib/base.php(1087): OC::init()
#4 /var/www/nextcloud/console.php(48): require_once('/var/www/nextcl...')
#5 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
Ok my cloud also showed the internal server error but got that sorted out myself... So I'm back at the start with this message:
sudo -u www-data php occ maintenance:update:htaccess
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)
Your content has been so helpful! You're very well spoken and easy to follow. Please keep that up.
Thank you so much!!
Been looking for a fix to this EXACT problem for a couple days now. Cron seems to work properly again. Thanks a lot, Roman!
Brilliant, you're most welcome :)
Thanks man, great solution and explanation, you gave me the solution I was looking for in Nextcloud 27.
Thanks.. I been meaning to fix that for such a long time.
Youre voice is so relaxing good video!
Thanks
Nice, it worked like a charm!
Great to hear!
Thanks even more for explanation of why its better use Redis.
And also because its working.
Cheers!
Great channel
Thank you!
Hello,
Thank you for your video.
When trying to enable caching with redis on nextcloud 22.2.1 as is in your video, after restart of appache, the installation of nextcloud brokes and gives the following massagess:
Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.
Did a fresh Php 8.0 install with Nextcloud 22.1.1 it went very well. In the fact is it is nextcloud is noticeably faster but sadly it screws up the Cronjobs (I only have two) but being a novice fixing it even following your updated directions 100% but it doesn't seem to remedy my situation.
Thank you!!
Hope it helped
@@TechGuides it did!
For anyone having this issue running Unraid with a Nextcloud docker container, someone on Reddit found the actual fix. Run your command line in unraid as root, use the crontab -u www-data -e command and paste in */5 * * * * docker exec -u www-data nextcloud-app php cron.php where "nextcloud-app" is the name of your container, it is case sensitive. This solved my problem immediately, cron is now running properly. If it doesn't work, try running crontab -u root -e and pasting it in there as well. I did both, mine is 100% working again.
Thanks for sharing!
After days of struggling, countless videos, cursing and frustration, you my friend, has done what the entire internet has failed to do. Thank you!!!!
hi,
do you have solution to this problem
"There are some errors regarding your setup.
It was not possible to execute the cron job via CLI. The following technical errors have appeared:
Your data directory is invalid Ensure there is a file called ".ocdata" in the root of the data directory."
I change data directory and i confirm that .ocdata file is there and permissions are right and problem is still the same?
I also try to enable APCu in mod file but nothing happened.
this issue crashed my nextcloud instance - which i have now completely scrapped. Thanks for the solution though
оч помог спасибо!
❤️
oh but sadly installing redis isn't as easy as shown. not working that why! any other good guidelines on redis for nc?
Confirmed working on Fedora 35 with Nextcloud 23 just that install command is different for fedora and default apache user is apache on fedora apache so here are the two commands that you have to use in place, for the rest is exactly the same process :)
Install Redis: dnf install redis
Give rights to apache user: usermod -a -G redis apache
Thanks for the feedback!
Hey Roman, I'm a bit unclear where I put the:
file locking
memcahe.local
memcahe.locking
...
where to put in the file
Just add it anywhere in your config.php
🔔
Hi Roman, getting below error while scanning, can you please help..
sudo -u www-data php occ files:scan --all
Could not open input file: occ
make sure to be in the /var/www/nextcloud dir
Do you have any videos about making phone's battery longer and making phone's faster at gaming?
No sorry
I have no problem with the cronjob at all (also Version 21.0.3). What install method did you use?
If you didn't use APCu as memcache than thats not surprising
@Tech Guides Ah ok thanks for letting me know. Yes I just use the normal snap version as this VM only hosts the side and some samba directories as a "nas".
Yeah snap does not have this issue I think ;)
Could not open input file: occ
Also, maybe worth mentioning that I'm using Nextcloud 22.1.1 so perhaps an updated tutorial video is a good idea.
I have the same problem
Do a video on setting up an FTP file server and being able to access it outside the network. I cannot find anything on accessing NextCloud through FTP outside network.
You should be able to access nextcloud from the public internet if you've set up dyndns (I have videos on that but should probably make a new one). No need to set up an FTP server as well
@@TechGuides I have static IP blocks so a dynDNS is not necessary. Trying to figure out vsftpd and can't get it to work for anything except localhost.
I mean sure you can set up an FTP server but why not just connect to your nextcloud instance over the web interface?
@@TechGuides I have websites that I manage and some have file upload options. This means uploading to an FTP server. Also, I have clients that I MSP for that require offsite backup currently to Backblaze B2, but many prefer local backup which is where an FTP comes in handy.
hello John Here ... i have been running next-cloud on a vm under UN-raid and now trying 23. to set it up to run on bare metal. server was running good a little slow. i tried to use APCu and the server would run. removed the command and on i went full working. how i see this message/vid and looked and my cron was red... ?;-
Hopefully this will help. I've been fighting with the Internal Server Error for several days now. I'm running a new server and install of Nextcloud 23.
Any attempts to add Redis to the Nextcloud config file would crash Nextcloud and throw the error.
Solution:
You have to install the PHP 8.0 version of the php-redis.
Since the latest version of PHP is 8.1, the installer automatically grabs the 8.1 version and THAT is what's causing the problem!
(Nextcloud currently does not support PHP 8.1, so upgrading is not an option.)
Run these commands:
sudo apt remove php-redis
sudo apt autoremove
sudo apt install php8.0-redis
sudo systemctl restart apache2 redis
Add the Redis parameters to the Nextcloud config file and you should be golden.
Also, if Nextcloud is complaining about imagick, it's the same problem.
sudo apt remove php-imagick
sudo apt autoremove
sudo apt install php8.0-imagick
Hope this helps somebody. I was losing my mind over this...
Hi sorry to be a pain as I had issues with doing this as I thought it may of been because of the way I did the work around as per comment in your first install video. I just reset my Ubuntu from a backup prior to the install and followed everything again from the first video then once finished moved on to this video but now I get:
An unhandled exception has been thrown:
ParseError: syntax error, unexpected ';', expecting ')' in /var/www/nextcloud/config/config.php:31
Stack trace:
#0 /var/www/nextcloud/lib/private/Config.php(67): OC\Config->readData()
#1 /var/www/nextcloud/lib/base.php(150): OC\Config->__construct()
#2 /var/www/nextcloud/lib/base.php(575): OC::initPaths()
#3 /var/www/nextcloud/lib/base.php(1083): OC::init()
#4 /var/www/nextcloud/console.php(48): require_once('/var/www/nextcl...')
#5 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
I have tried changing the end line 31 from ); which is from the last video to ')' or ) or )'
I get the same message
Can you paste the changes you made to your config.php? It sounds like there is simply some wrong syntax
@@TechGuides I moved around the text in the php file and manged to get it to work. Thank you for your help. Good videos and content to follow
Happy to hear! Thanks man
Bro please make an updated control pannel vid for warzone, so many people need it on the Nividia control pannel
I didn't find any benefit from changing Nvidia control panel settings. Also, I already did a video on Nvidia settings
hi i did just like you but it show a message
/var/www/nextcloud/config$ sudo -u www-data php occ files:scan --all
Could not open input file: occ
can you help me how to fix this please ?