linuxserver / docker-nextcloud

GNU General Public License v3.0
677 stars 128 forks source link

[BUG] Warning Memcache after upgrading to 27.0.0 #319

Closed Intenos closed 1 year ago

Intenos commented 1 year ago

Is there an existing issue for this?

Current Behavior

After upgrading to 27.0.0, I get the warning that no Memcache is installed:

image

I checked that the line 'memcache.local' => '\OC\Memcache\APCu', is available in the config.php

Expected Behavior

No warning.

Steps To Reproduce

Update to 27.0.0 via the updater in Nextcloud and recreate the container by pulling the latest version.

Environment

Open Media Vault

Version
6.4.3-1 (Shaitan)

Prozessor
Intel(R) Pentium(R) CPU J4205 @ 1.50GHz

Kernel
Linux 5.10.0-22-amd64

CPU architecture

x86-64

Docker creation

Via Portainer. Not able to insert a screenshot here.

Container logs

[mod-init] Attempting to run Docker Modification Logic
[mod-init] Adding linuxserver/mods:universal-package-install to container
[mod-init] Downloading linuxserver/mods:universal-package-install from lscr.io
[mod-init] Installing linuxserver/mods:universal-package-install
[mod-init] linuxserver/mods:universal-package-install applied to container
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    911
User GID:    911
───────────────────────────────────────

using keys found in /config/keys
**** The following site-confs have extensions other than .conf ****
**** This may be due to user customization. ****
**** You should review the files and rename them to use the .conf extension or remove them. ****
**** nginx.conf will only include site-confs with the .conf extension. ****
/config/nginx/site-confs/default.conf.20230616
**** Adding nodejs to OS package install list ****
**** Adding npm to OS package install list ****
[mod-init] **** Installing all mod packages ****
fetch http://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz
(1/3) Installing c-ares (1.19.1-r0)
(2/3) Installing nodejs (18.16.0-r1)
(3/3) Installing npm (9.6.6-r0)
Executing busybox-1.36.1-r0.trigger
OK: 360 MiB in 259 packages
[custom-init] No custom files found, skipping...
[ls.io-init] done.
[16-Jun-2023 11:37:24] NOTICE: PHP message: PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

j0nnymoe commented 1 year ago

Need your docker creation from portainer, you can copy/paste screenshots.

Intenos commented 1 year ago

Do the below screenshots include the information you need?

image

image

j0nnymoe commented 1 year ago

That's all we need for now, considering v27 is brand new, we'll need to test.

Intenos commented 1 year ago

No problem at all. Take your time, it´s not urgent for me. Thanks indeed for the great support!

For me it is already good to know, that for now, I don´t need to try to fix it by myself.

ngc7331 commented 1 year ago

I have just encountered the same issue, but I think this warning was introduced by https://github.com/nextcloud/server/pull/37766 and it's not a bug?

According to this documentation, you also need to configure memcache.locking instead of just memcache.local

I'm not sure if APCu should be used for filelocking, adding 'memcache.locking' => '\OC\Memcache\APCu', does solve the warning. And here is a related post.

It might be worth installing Redis inside the container or just suggesting that users configure it on their own?

Nitrousoxide commented 1 year ago

This looks to be an expectation that the server will have redis as a cache server as part of the infra for the new version of nextcloud. Implementing that in makes that notice go away. I would recommend updating the suggested docker compose file to include it, though the config.php needs some additional lines as well. Here are mine if it's helpful:

  'htaccess.RewriteBase' => '/',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'redis' => 
  array (
    'host' => 'redis-nextcloud',
    'port' => 6379,
    'password' => '{redispassword}',
  ),

and my compose file

---
version: "2.1"
services:
  nextcloud:
    image: lscr.io/linuxserver/nextcloud
    container_name: nextcloud
    environment:
      - PUID=1000
      - PGID=100
      - TZ=America/New_York
    volumes:
      - /path/to/config:/config
      - /path/to/data:/data
    depends_on:
      - mariadb
      - redis
    ports:
      - 8080:443
    restart: unless-stopped
  mariadb:
    image: lscr.io/linuxserver/mariadb
    container_name: mariadb
    environment:
      - PUID=1000
      - PGID=100
      - MYSQL_ROOT_PASSWORD={sqlrootpass}
      - TZ=America/New_York
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER={sqluser}
      - MYSQL_PASSWORD={sqlpassword}
    volumes:
      - /path/to/mariadb:/config
    restart: unless-stopped
  redis:
    image: redis
    container_name: redis-nextcloud
    restart: always
    command: redis-server --requirepass {redispassword} 
    ports:
      - 6379:6379
akitakedits commented 1 year ago

Same issue here using separate nextcloud and mariadb linuxserver.io containers through Portainer.

I'm not sure how to include redis inside the nextcloud container so it can be pointed to inside config.php. Therefore I'll leave my instance as it is for now, as it only impacts performance.

I've created a separate redis container, and pointed to it much like in #319 (comment). Except I had to point to the redis internal ip address instead of container name as it wouldn't find it with its name even though they're on the same bridge network.

nemchik commented 1 year ago

Redis would not be included in the nextcloud container, you would run a separate redis container. depending on how you run containers, they can often see each other by name, so your nextcloud config would use redis as the hostname if your redis container is named redis. this is a good example: https://github.com/linuxserver/docker-nextcloud/issues/319#issuecomment-1594902588

We have not yet decided taking any action on this, but it will likely be documentation and possibly defaulting to APCu (easily editable by the user if they prefer Redis).

Archonw commented 1 year ago

Hello,

i used this in my config.php

CONFIG = array ( 'memcache.local' => '\OC\Memcache\APCu', 'filelocking.enabled' => true, 'memcache.locking' => '\OC\Memcache\APCu',

No extra redis necessary.

Intenos commented 1 year ago

Hello,

i used this in my config.php

CONFIG = array ( 'memcache.local' => '\OC\Memcache\APCu', 'filelocking.enabled' => true, 'memcache.locking' => '\OC\Memcache\APCu',

No extra redis necessary.

Fantastic. Worked for me as well! At least the warning disappears.

nemchik commented 1 year ago

I'll be making a chance to include setting APCu up for file locking if file locking is not already set up some other way. The change will be a part of https://github.com/linuxserver/docker-nextcloud/pull/317

afzl-wtu commented 12 months ago

Hello,

i used this in my config.php

CONFIG = array ( 'memcache.local' => '\OC\Memcache\APCu', 'filelocking.enabled' => true, 'memcache.locking' => '\OC\Memcache\APCu',

No extra redis necessary.

Worked for me too.