Failed: Permission denied in /var/www/nextcloud/lib/private/RedisFactory.php on line 84" while reading response header from upstream, client:

Nextcloud version (15.0.2):
Operating system and version (eg, Debian 9):
Apache or nginx version (nginx/1.10.3)+)
PHP version (7.0.33-0+deb9u1):

The issue you are facing:

Is this the first time you’ve seen this error? (Y):

Steps to replicate it:

  1. Upgrade to nextcloud 15
  2. apt upgrade on debian to stay update
  3. These packages were upgraded :
The following NEW packages will be installed:
  firmware-linux-free irqbalance libconfig-inifiles-perl libnuma1 linux-image-4.9.0-8-amd64 python-josepy
  python-requests-toolbelt
The following packages have been kept back:
  certbot
The following packages will be upgraded:
  base-files ca-certificates discover dpkg dpkg-dev file gnupg gnupg-agent gpgv grub-common grub-pc grub-pc-bin
  grub2-common hdparm letsencrypt libdiscover2 libdpkg-perl libfuse2 libgd3 libgnutls30 libldap-2.4-2
  libldap-common libmagic-mgc libmagic1 libseccomp2 libx11-6 libx11-data libxapian30 linux-image-amd64
  linux-libc-dev mariadb-client mariadb-client-10.1 mariadb-server mariadb-server-10.1 mariadb-server-core-10.1
  patch python-acme python3-reportbug redis-server redis-tools reportbug shared-mime-info tzdata
43 upgraded, 7 newly installed, 0 to remove and 1 not upgraded.

  1. Reboot
  2. Get his error trying to connect to my instance:
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.

The output of your Nextcloud log in Admin > Logging:

Not accessible

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'BLABLA',
  'passwordsalt' => 'BLABLA',
  'secret' => BLABLA',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'cloud.BLABLABLA.org',
  ),
  'datadirectory' => '/home/data/cloud',
  'overwrite.cli.url' => 'http://192.168.10.17',
  'dbtype' => 'mysql',
  'version' => '15.0.2.0',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'BLABLA',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'maintenance' => false,
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'dbindex' => 0,
    'password' => 'BLABLA',
    'timeout' => 1.5,
  ),
  'theme' => '',
  'loglevel' => 2,
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/nextcloud/apps2',
      'url' => '/apps2',
      'writable' => true,
    ),
  ),
  'updater.secret' => 'BLABLABLA',
  'updater.release.channel' => 'stable',
);

The output of your Apache/nginx/system log in /var/log/____:

2019/01/15 20:27:16 [error] 515#515: *36 FastCGI sent in stderr: "PHP message: PHP Warning:  Redis::connect(): connect() failed: Permission denied in /var/www/nextcloud/lib/private/RedisFactory.php on line 84" while reading response header from upstream, client: BLABLBLA, server: cloud.BLABLABLA.org, request: "GET /status.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/nextcloud.sock:", host: "cloud.BLABLABLA.org"

I have tried to follow the solutionproposed here without success

To whom it can happen in the future :slight_smile:

I have edited /etc/group, and found the line concerning redis which was for me :

redis:x:114:

and I happen www-data at the end

redis:x:114:www-data

I am not sure how an upgrade of this system can be responsible of this (before than apt upgrade, all was working like a charm…)

The folder/socks /var/run/redis/redis.sock was recreated with different user:group rights. Perhaps?