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
  • НаукаНаука

Комментарии • 62

  • @TechGuides
    @TechGuides  2 года назад

    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/

    • @epicgaming5116
      @epicgaming5116 2 года назад

      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...')

    • @epicgaming5116
      @epicgaming5116 2 года назад

      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?)

  • @evankirschenmann4653
    @evankirschenmann4653 2 года назад

    Your content has been so helpful! You're very well spoken and easy to follow. Please keep that up.

  • @bluestarzero
    @bluestarzero 3 года назад

    Been looking for a fix to this EXACT problem for a couple days now. Cron seems to work properly again. Thanks a lot, Roman!

    • @TechGuides
      @TechGuides  3 года назад

      Brilliant, you're most welcome :)

  • @alexmedina2102
    @alexmedina2102 4 месяца назад

    Thanks man, great solution and explanation, you gave me the solution I was looking for in Nextcloud 27.

  • @manilaboy1vic
    @manilaboy1vic 2 года назад

    Thanks.. I been meaning to fix that for such a long time.

  • @mrbryam578
    @mrbryam578 2 года назад

    Youre voice is so relaxing good video!

  • @borisdp2
    @borisdp2 2 года назад

    Nice, it worked like a charm!

  • @goldino88
    @goldino88 2 года назад

    Thanks even more for explanation of why its better use Redis.
    And also because its working.

  • @jasonfanclub4267
    @jasonfanclub4267 2 года назад

    Great channel

  • @dtokmakov
    @dtokmakov 2 года назад +2

    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.

  • @DBrianAshby
    @DBrianAshby 2 года назад

    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.

  • @HenriqueCE
    @HenriqueCE 3 года назад

    Thank you!!

  • @kylequinn1963
    @kylequinn1963 2 года назад +1

    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.

    • @TechGuides
      @TechGuides  2 года назад

      Thanks for sharing!

    • @RealMangaAddict
      @RealMangaAddict Год назад

      After days of struggling, countless videos, cursing and frustration, you my friend, has done what the entire internet has failed to do. Thank you!!!!

  • @milosgajic23
    @milosgajic23 2 года назад

    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.

  • @starkfuture1057
    @starkfuture1057 2 года назад +1

    this issue crashed my nextcloud instance - which i have now completely scrapped. Thanks for the solution though

  • @qnolic
    @qnolic 8 месяцев назад

    оч помог спасибо!

  • @libyano-6325
    @libyano-6325 2 года назад

    ❤️

  • @domtheruggeda
    @domtheruggeda 2 года назад

    oh but sadly installing redis isn't as easy as shown. not working that why! any other good guidelines on redis for nc?

  • @jorgehrc
    @jorgehrc 2 года назад

    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

    • @TechGuides
      @TechGuides  2 года назад +1

      Thanks for the feedback!

  • @bakkersb5119
    @bakkersb5119 3 года назад

    Hey Roman, I'm a bit unclear where I put the:
    file locking
    memcahe.local
    memcahe.locking
    ...
    where to put in the file

    • @TechGuides
      @TechGuides  3 года назад +1

      Just add it anywhere in your config.php

  • @master.afzaal
    @master.afzaal 2 года назад

    🔔

  • @143kuril
    @143kuril 2 года назад

    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

    • @TechGuides
      @TechGuides  2 года назад +1

      make sure to be in the /var/www/nextcloud dir

  • @hitokiridm
    @hitokiridm 2 года назад

    Do you have any videos about making phone's battery longer and making phone's faster at gaming?

  • @interceptor001
    @interceptor001 2 года назад

    I have no problem with the cronjob at all (also Version 21.0.3). What install method did you use?

    • @TechGuides
      @TechGuides  2 года назад +1

      If you didn't use APCu as memcache than thats not surprising

    • @interceptor001
      @interceptor001 2 года назад

      ​ @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".

    • @TechGuides
      @TechGuides  2 года назад

      Yeah snap does not have this issue I think ;)

  • @yourpcmd
    @yourpcmd 2 года назад +1

    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.

  • @yourpcmd
    @yourpcmd 2 года назад

    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.

    • @TechGuides
      @TechGuides  2 года назад

      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

    • @yourpcmd
      @yourpcmd 2 года назад

      @@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.

    • @TechGuides
      @TechGuides  2 года назад

      I mean sure you can set up an FTP server but why not just connect to your nextcloud instance over the web interface?

    • @yourpcmd
      @yourpcmd 2 года назад

      @@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.

  • @JohnGraham_n3ovo
    @JohnGraham_n3ovo 2 года назад

    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... ?;-

    • @RoastedHVAC
      @RoastedHVAC 2 года назад

      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...

  • @rowey85
    @rowey85 3 года назад

    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...')

    • @rowey85
      @rowey85 3 года назад

      I have tried changing the end line 31 from ); which is from the last video to ')' or ) or )'
      I get the same message

    • @TechGuides
      @TechGuides  3 года назад

      Can you paste the changes you made to your config.php? It sounds like there is simply some wrong syntax

    • @rowey85
      @rowey85 3 года назад

      @@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

    • @TechGuides
      @TechGuides  3 года назад

      Happy to hear! Thanks man

  • @sn4pping
    @sn4pping 2 года назад

    Bro please make an updated control pannel vid for warzone, so many people need it on the Nividia control pannel

    • @TechGuides
      @TechGuides  2 года назад

      I didn't find any benefit from changing Nvidia control panel settings. Also, I already did a video on Nvidia settings

  • @eeFidan1ks
    @eeFidan1ks Год назад

    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 ?