Support intro
Sorry to hear you’re facing problems
help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.
In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:
example
Or for longer, use three backticks above and below the code snippet:
longer
example
here
Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can
Nextcloud version (eg, 20.0.5): 27.0.2
Operating system and version (eg, Ubuntu 20.04): Debian Trixie
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.57-2
PHP version (eg, 7.4): 8.2
MariaDB-server version : 1:10.11.4-1
The issue you are facing:
This is a small personal server with about 5 people using it.
I was previously only using APCu for memory cache (php8.2-apcu and php-apcu).
I am now trying to enable redis (redis-server 5:7.0.12-1) for memcache.locking and memcache.distributed on unixsocket /var/run/redis/redis-server.sock on port 0 following the nextcloud documentation. However when I set all this up I am still getting a warning on the admin overview page for “The database is used for transactional file locking. To enhance performance, please configure memcache”. Im not sure if redis is actually working for nextcloud. It does seem to be running on my system just fine.
I can ping the redis socket as the www-data user:
user# sudo -u www-data redis-cli -s /var/run/redis/redis-server.sock ping
PONG
or (not really sure if /var/run or just /run matters)
user# sudo -u www-data redis-cli -s /run/redis/redis-server.sock ping
PONG
so it seems like everything is set up properly. The problem looks similar to this post here:
but I am not using SELinux or Centos
but when i try to monitor redis I do get an interesting error
root# redis-cli monitor
Could not connect to Redis at 127.0.0.1:6379: Connection refused
Redis.conf and redis-server.log both indicate they are using port 0 not 6379 like redis-cli is.
Is this the first time you’ve seen this error? Y:
Steps to replicate it:
- Install nextcloud mariadb-server redis-server php-apcu
- configure for operation over unixsocket per nextcloud documentation
- view admin overview page
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => 'id',
'passwordsalt' => 'salt',
'secret' => 'secret',
'trusted_domains' =>
array (
0 => 'localip',
1 => 'fqdn',
),
'datadirectory' => '/home/user/nextcloud-data/',
'dbtype' => 'mysql',
'version' => '27.0.2.1',
'overwrite.cli.url' => 'https://ipaddy/nextcloud',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => 'password',
'installed' => true,
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.distributed' => '\OC\Memcache\Redis',
'filelocking.enabled' => 'true',
'memcahce.locking' => '\OC\Memcache\Redis',
'redis' =>
array(
'host' => '/run/redis/redis-server.sock',
'port' => 0,
'timeout' => 0.0,
),
'default_phone_region' => 'region',
'app_install_overwrite' =>
array (
0 => 'end_to_end_encryption',
),
'mail_smtptimeout' => 30,
'mail_from_address' => 'address',
'mail_smtpmode' => 'mode',
'mail_sendmailmode' => 'mode',
'mail_domain' => 'domain',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'mail_smtphost' => 'host',
'mail_smtpport' => 'port',
'mail_smtpname' => 'name',
'mail_smtppassword' => 'password',
'mail_smtpsecure' => 'ssl',
'twofactor_enforced' => 'true',
'twofactor_enforced_groups' =>
array (
),
'twofactor_enforced_excluded_groups' =>
array (
),
'maintenance' => false,
'theme' => '',
'loglevel' => 2,
);
grep -v ‘^ *#’ /etc/redis/redis.conf | grep -v “^$” | less
bind 127.0.0.1 -::1
protected-mode yes
port 0
tcp-backlog 511
unixsocket /run/redis/redis-server.sock
unixsocketperm 770
timeout 0
tcp-keepalive 300
daemonize yes
pidfile /run/redis/redis-server.pid
loglevel notice
logfile /var/log/redis/redis-server.log
databases 16
always-show-logo no
set-proc-title yes
proc-title-template "{title} {listen-addr} {server-mode}"
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
rdb-del-sync-files no
dir /var/lib/redis
replica-serve-stale-data yes
replica-read-only yes
repl-diskless-sync yes
repl-diskless-sync-delay 5
repl-diskless-sync-max-replicas 0
repl-diskless-load disabled
repl-disable-tcp-nodelay no
replica-priority 100
acllog-max-len 128
maxclients 512
lazyfree-lazy-eviction no
lazyfree-lazy-expire no
lazyfree-lazy-server-del no
replica-lazy-flush no
lazyfree-lazy-user-del no
lazyfree-lazy-user-flush no
oom-score-adj no
oom-score-adj-values 0 200 800
disable-thp yes
appendonly no
appendfilename "appendonly.aof"
appenddirname "appendonlydir"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
aof-use-rdb-preamble yes
aof-timestamp-enabled no
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-listpack-entries 512
hash-max-listpack-value 64
list-max-listpack-size -2
list-compress-depth 0
set-max-intset-entries 512
zset-max-listpack-entries 128
zset-max-listpack-value 64
hll-sparse-max-bytes 3000
stream-node-max-bytes 4096
stream-node-max-entries 100
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit replica 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
dynamic-hz yes
aof-rewrite-incremental-fsync yes
rdb-save-incremental-fsync yes
jemalloc-bg-thread yes
Redis logs(exerpt) show it seems to be working (its mostly a bunch of repeated lines as I restarted it)
16109:signal-handler (1692463747) Received SIGTERM scheduling shutdown...
16109:M 19 Aug 2023 09:49:07.623 # User requested shutdown...
16109:M 19 Aug 2023 09:49:07.623 * Saving the final RDB snapshot before exiting.
16109:M 19 Aug 2023 09:49:07.630 * DB saved on disk
16109:M 19 Aug 2023 09:49:07.630 * Removing the pid file.
16109:M 19 Aug 2023 09:49:07.630 * Removing the unix socket file.
16109:M 19 Aug 2023 09:49:07.630 # Redis is now ready to exit, bye bye...
21790:C 19 Aug 2023 09:49:07.746 * Supervised by systemd. Please make sure you set appropriate values for TimeoutStartSec and TimeoutStopSec in your servi>
21790:C 19 Aug 2023 09:49:07.746 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
21790:C 19 Aug 2023 09:49:07.746 # Redis version=7.0.12, bits=64, commit=00000000, modified=0, pid=21790, just started
21790:C 19 Aug 2023 09:49:07.746 # Configuration loaded
21790:M 19 Aug 2023 09:49:07.746 * monotonic clock: POSIX clock_gettime
21790:M 19 Aug 2023 09:49:07.747 * Running mode=standalone, port=0.
21790:M 19 Aug 2023 09:49:07.747 # Server initialized
21790:M 19 Aug 2023 09:49:07.748 * Loading RDB produced by version 7.0.12
21790:M 19 Aug 2023 09:49:07.748 * RDB age 0 seconds
21790:M 19 Aug 2023 09:49:07.748 * RDB memory usage when created 0.50 Mb
21790:M 19 Aug 2023 09:49:07.748 * Done loading RDB, keys loaded: 94, keys expired: 0.
21790:M 19 Aug 2023 09:49:07.748 * DB loaded from disk: 0.000 seconds
21790:M 19 Aug 2023 09:49:07.748 * The server is now ready to accept connections at /run/redis/redis-server.sock
The output of your Apache/nginx/system log in /var/log/____
:
this is just logs of me restarting apache2