Owncloud 10.1 fails when Redis uses socket instead of port 6379

Steps to reproduce

  1. Try to login as admin

Expected behaviour

Tell us what should happen
Normal operation

Actual behaviour

Tell us what happens instead
Internal Server Error
The server encountered an internal error and was unable to complete your request.

Owncloud log:
{“reqId”:“8qhsjIv7DqAi50T4xtgv”,“level”:3,“time”:“2019-03-12T12:35:01+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"–",“url”:"–",“message”:“Redis::connect(): connect() failed: php_network_getaddresses: getaddrinfo failed: Name or service not known at /var/www/html/owncloud/lib/private/RedisFactory.php#81”}

Server configuration

CentOS 7 minimal install
Checked:
SELinux audit log
Redis log
Apache log
Found no issues (Owncloud is ok without Redis config)

Web server:
Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.16 configured
Database:
MySQL
PHP version:
7.2
ownCloud version: (see ownCloud admin page)
10.1.0.4
Updated from an older ownCloud or fresh install:
fresh install
Where did you install ownCloud from:
packages ( http://download.owncloud.org/download/repositories/production/CentOS_7/ce:stable.repo)
Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

Unable to access

The content of config/config.php:

<?php $CONFIG = array ( 'updatechecker' => false, 'instanceid' => 'oc5k0jvh6bst', 'passwordsalt' => 'sensitiveValue', 'secret' => 'sensitiveValue', 'trusted_domains' => array ( 0 => 'sensitiveValue', ), 'memcache.local' => '\\OC\\Memcache\\Redis', //tried \OC\Memcache\Redis 'filelocking.enabled' => 'true', 'memcache.distributed' => '\\OC\\Memcache\\Redis', 'memcache.locking' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => '\/tmp\/redis.sock', //tried /tmp/redis.sock 'port' => 0, 'timeout' => 0, 'dbindex' => 0, ), 'datadirectory' => '/var/www/html/owncloud/data', 'overwrite.cli.url' => 'http://sensitiveValue/owncloud', 'dbtype' => 'mysql', 'version' => '10.1.0.4', 'dbname' => 'sensitiveValue', 'dbhost' => 'localhost', 'dbtableprefix' => 'sensitiveValue', 'dbuser' => 'sensitiveValue', 'dbpassword' => 'sensitiveValue', 'logtimezone' => 'UTC', 'installed' => true, ); ``` Log in to the web-UI with an administrator account and click on 'admin' -> 'Generate Config Report' -> 'Download ownCloud config report' This report includes the config.php settings, the list of activated apps and other details in a well sanitized form. or If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your ownCloud installation folder *ATTENTION:* Do not post your config.php file in public as is. Please use one of the above methods whenever possible. Both, the generated reports from the web-ui and from occ config:list consistently remove sensitive data. You still may want to review the report before sending. If done manually then it is critical for your own privacy to dilligently remove *all* host names, passwords, usernames, salts and other credentials before posting. You should assume that attackers find such information and will use them against your systems. ``` **List of activated apps:** ``` If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your ownCloud installation folder. ``` **Are you using external storage, if yes which one:** local/smb/sftp/... No **Are you using encryption:** yes/no no **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/... no #### LDAP configuration (delete this part if not used) ``` With access to your command line run e.g.: sudo -u www-data php occ ldap:show-config from within your ownCloud installation folder Without access to your command line download the data/owncloud.db to your local computer or access your SQL server remotely and run the select query: SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap'; Eventually replace sensitive data as the name/IP-address of your LDAP server or groups. ``` ### Client configuration **Browser:** Chrome **Operating system:** Windows 10 ### Logs #### Web server error log ``` Insert your webserver log here ``` [Tue Mar 12 13:24:32.418359 2019] [mpm_prefork:notice] [pid 26098] AH00170: caught SIGWINCH, shutting down gracefully [Tue Mar 12 13:24:33.532040 2019] [core:notice] [pid 26207] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0 [Tue Mar 12 13:24:33.533076 2019] [suexec:notice] [pid 26207] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Tue Mar 12 13:24:33.573588 2019] [auth_digest:notice] [pid 26207] AH01757: generating secret for digest authentication ... [Tue Mar 12 13:24:33.574472 2019] [lbmethod_heartbeat:notice] [pid 26207] AH02282: No slotmem from mod_heartmonitor [Tue Mar 12 13:24:33.622167 2019] [mpm_prefork:notice] [pid 26207] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.16 configured -- resuming normal operations [Tue Mar 12 13:24:33.622248 2019] [core:notice] [pid 26207] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND' [Tue Mar 12 13:24:47.397276 2019] [autoindex:error] [pid 26208] [client sensitiveValue:55627] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:25:17.393663 2019] [autoindex:error] [pid 26212] [client sensitiveValue:55728] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:25:47.392327 2019] [autoindex:error] [pid 26210] [client sensitiveValue:55830] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:26:17.392659 2019] [autoindex:error] [pid 26209] [client sensitiveValue:55931] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:26:47.391586 2019] [autoindex:error] [pid 26211] [client sensitiveValue:56037] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:27:17.392521 2019] [autoindex:error] [pid 26208] [client sensitiveValue:56138] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:27:47.392062 2019] [autoindex:error] [pid 26212] [client sensitiveValue:56242] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:28:17.393236 2019] [autoindex:error] [pid 26210] [client sensitiveValue:56348] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:28:47.389543 2019] [autoindex:error] [pid 26209] [client sensitiveValue:56454] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:29:17.391580 2019] [autoindex:error] [pid 26211] [client sensitiveValue:56557] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:29:47.392733 2019] [autoindex:error] [pid 26208] [client sensitiveValue:56659] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:30:17.392548 2019] [autoindex:error] [pid 26212] [client sensitiveValue:56761] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:30:47.392462 2019] [autoindex:error] [pid 26210] [client sensitiveValue:56864] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:31:17.391820 2019] [autoindex:error] [pid 26209] [client sensitiveValue:56965] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:31:47.391403 2019] [autoindex:error] [pid 26211] [client sensitiveValue:57068] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:32:17.388764 2019] [autoindex:error] [pid 26208] [client sensitiveValue:57173] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:32:47.388415 2019] [autoindex:error] [pid 26212] [client sensitiveValue:57346] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:33:17.388177 2019] [autoindex:error] [pid 26210] [client sensitiveValue:57448] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:33:47.389350 2019] [autoindex:error] [pid 26209] [client sensitiveValue:57550] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:34:17.387041 2019] [autoindex:error] [pid 26211] [client sensitiveValue:57653] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:34:47.394580 2019] [autoindex:error] [pid 26208] [client sensitiveValue:57754] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:35:17.389421 2019] [autoindex:error] [pid 26212] [client sensitiveValue:57856] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:35:47.388939 2019] [autoindex:error] [pid 26210] [client sensitiveValue:57958] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:36:17.385792 2019] [autoindex:error] [pid 26209] [client sensitiveValue:58059] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:36:47.389151 2019] [autoindex:error] [pid 26211] [client sensitiveValue:58162] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:37:20.526918 2019] [autoindex:error] [pid 26208] [client sensitiveValue:58263] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:37:47.387631 2019] [autoindex:error] [pid 26212] [client sensitiveValue:58366] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:38:17.386375 2019] [autoindex:error] [pid 26210] [client sensitiveValue:58474] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:38:47.386194 2019] [autoindex:error] [pid 26209] [client sensitiveValue:58576] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:39:17.384100 2019] [autoindex:error] [pid 26211] [client sensitiveValue:58679] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:39:47.418984 2019] [autoindex:error] [pid 26208] [client sensitiveValue:58784] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:40:17.419364 2019] [autoindex:error] [pid 26212] [client sensitiveValue:58885] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:40:47.384112 2019] [autoindex:error] [pid 26210] [client sensitiveValue:58986] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:41:17.384359 2019] [autoindex:error] [pid 26209] [client sensitiveValue:59090] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:41:47.384694 2019] [autoindex:error] [pid 26211] [client sensitiveValue:59192] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:42:17.382026 2019] [autoindex:error] [pid 26208] [client sensitiveValue:59294] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:42:47.381945 2019] [autoindex:error] [pid 26212] [client sensitiveValue:59396] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:43:17.384700 2019] [autoindex:error] [pid 26210] [client sensitiveValue:59497] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:43:47.382715 2019] [autoindex:error] [pid 26209] [client sensitiveValue:59600] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:44:17.383723 2019] [autoindex:error] [pid 26211] [client sensitiveValue:59701] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:44:47.381245 2019] [autoindex:error] [pid 26208] [client sensitiveValue:59807] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:45:17.381278 2019] [autoindex:error] [pid 26212] [client sensitiveValue:59914] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive [Tue Mar 12 13:45:47.382185 2019] [autoindex:error] [pid 26210] [client sensitiveValue:60016] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive #### ownCloud log (data/owncloud.log) ``` Insert your ownCloud log here ``` \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Mount\\\/MountPoint.php(257): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->getCache()\\n#10 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Config\\\/UserMountCache.php(89): OC\\\\Files\\\\Mount\\\\MountPoint->getStorageRootId()\\n#11 [internal function]: OC\\\\Files\\\\Config\\\\UserMountCache->OC\\\\Files\\\\Config\\\\{closure}(Object(OC\\\\Files\\\\Mount\\\\MountPoint))\\n#12 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Config\\\/UserMountCache.php(94): array_map(Object(Closure), Array)\\n#13 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Config\\\/MountProviderCollection.php(134): OC\\\\Files\\\\Config\\\\UserMountCache->registerMounts(Object(OC\\\\User\\\\User), Array)\\n#14 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Filesystem.php(448): OC\\\\Files\\\\Config\\\\MountProviderCollection->registerMounts(Object(OC\\\\User\\\\User), Array)\\n#15 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Filesystem.php(374): OC\\\\Files\\\\Filesystem::initMountPoints('admin')\\n#16 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/util.php(294): OC\\\\Files\\\\Filesystem::init('admin', '\\\/admin\\\/files')\\n#17 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Utils\\\/Scanner.php(101): OC_Util::setupFS('admin')\\n#18 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Utils\\\/Scanner.php(137): OC\\\\Files\\\\Utils\\\\Scanner->getMounts('')\\n#19 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files\\\/lib\\\/BackgroundJob\\\/ScanFiles.php(87): OC\\\\Files\\\\Utils\\\\Scanner->backgroundScan('')\\n#20 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files\\\/lib\\\/BackgroundJob\\\/ScanFiles.php(111): OCA\\\\Files\\\\BackgroundJob\\\\ScanFiles->runScanner(Object(OC\\\\User\\\\User))\\n#21 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/BackgroundJob\\\/Job.php(57): OCA\\\\Files\\\\BackgroundJob\\\\ScanFiles->run(NULL)\\n#22 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/BackgroundJob\\\/TimedJob.php(53): OC\\\\BackgroundJob\\\\Job->execute(Object(OC\\\\BackgroundJob\\\\JobList), Object(OC\\\\Log))\\n#23 \\\/var\\\/www\\\/html\\\/owncloud\\\/cron.php(120): OC\\\\BackgroundJob\\\\TimedJob->execute(Object(OC\\\\BackgroundJob\\\\JobList), Object(OC\\\\Log))\\n#24 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Memcache\\\/Redis.php\",\"Line\":49}"} {"reqId":"KHwrUNxkDpWyWCOcRzE8","level":3,"time":"2019-03-12T12:29:01+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Redis::connect(): connect() failed: php_network_getaddresses: getaddrinfo failed: Name or service not known at \/var\/www\/html\/owncloud\/lib\/private\/RedisFactory.php#81"} {"reqId":"2Jb7NXScVYBj2iUWdD6P","level":3,"time":"2019-03-12T12:30:01+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Redis::connect(): connect() failed: php_network_getaddresses: getaddrinfo failed: Name or service not known at \/var\/www\/html\/owncloud\/lib\/private\/RedisFactory.php#81"} {"reqId":"OOGfGWOgDNzEOhwvmWKV","level":3,"time":"2019-03-12T12:31:02+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Redis::connect(): connect() failed: php_network_getaddresses: getaddrinfo failed: Name or service not known at \/var\/www\/html\/owncloud\/lib\/private\/RedisFactory.php#81"} {"reqId":"AockyLToiwUqlNGFPTY4","level":3,"time":"2019-03-12T12:32:01+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Redis::connect(): connect() failed: php_network_getaddresses: getaddrinfo failed: Name or service not known at \/var\/www\/html\/owncloud\/lib\/private\/RedisFactory.php#81"} {"reqId":"228r95juytl8MDz3mzxN","level":3,"time":"2019-03-12T12:33:01+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Redis::connect(): connect() failed: php_network_getaddresses: getaddrinfo failed: Name or service not known at \/var\/www\/html\/owncloud\/lib\/private\/RedisFactory.php#81"} {"reqId":"0OQ6cyL2ITceMvA5XSxW","level":3,"time":"2019-03-12T12:34:02+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Redis::connect(): connect() failed: php_network_getaddresses: getaddrinfo failed: Name or service not known at \/var\/www\/html\/owncloud\/lib\/private\/RedisFactory.php#81"} {"reqId":"8qhsjIv7DqAi50T4xtgv","level":3,"time":"2019-03-12T12:35:01+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Redis::connect(): connect() failed: php_network_getaddresses: getaddrinfo failed: Name or service not known at \/var\/www\/html\/owncloud\/lib\/private\/RedisFactory.php#81"} #### Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```

Not sure if it will work, but you can try to set the port as -1.
If that doesn’t work, you might need to connect to redis via localhost or some internal network (if you don’t want to expose redis to the outside).

Resolved by seting socket to:
unixsocket /var/run/redis/redis.sock
in redis.conf

1 Like