DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 27th February 2018
toprank toprank is offline
Fdisk Soldier
 
Join Date: Feb 2018
Posts: 54
Default Nextcloud Redis Config

Whenever I configure Nextcloud to use Redis caching, the server loads a white screen to http requests.

Pertinent /etc/redis/redis.conf:

Code:
# grep -E 'unixsocket|port 0' /etc/redis/redis.conf
# If port 0 is specified Redis will not listen on a TCP socket.
port 0
# unixsocket /var/run/redis/redis.sock
# unixsocketperm 770
unixsocket /var/run/redis/redis.sock
unixsocketperm 755
And /var/www/nexctloud/config/config.php:

Code:
# cat /var/www/nextcloud/config/config.php  
<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxxxxx',
  'secret' => 'xxxxxxxx',
  'trusted_domains' => 
  array (
    0 => 'LAN',
    1 => 'domain.tld',
    2 => 'cloud.domain.tld',
  ),
  'datadirectory' => '/nextcloud/data',
  'overwrite.cli.url' => 'https://lan',
  'dbtype' => 'mysql',
  'version' => '12.0.2.0',
  'dbname' => '$DBNAME',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '$DBUSER',
  'dbpassword' => 'xxx',
  'installed' => true,
'memcache.local' => '\OC\Memcache\Redis',
'redis' => array(
     'host' => '/var/run/redis/redis.sock',
     'port' => 0,
     'timeout' => 1.5,
      ),
);
Redis is running and her log file contains no errors:

Code:
# ps -aux |grep redis
_redis   68489  0.0  0.2 13776  2200 ??  Ss    12:43AM    0:00.73 redis-server: /usr/local/sbin/redis-server 127.0.0.1:0 (redis-server)
root     18213  0.0  0.0    96   208 p0  R+/1   1:16AM    0:00.00 grep redis

Code:
# tail /var/redis/redis.log                                                                                                                                                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

68489:M 28 Feb 00:43:00.384 # Server initialized
68489:M 28 Feb 00:43:00.384 * DB loaded from disk: 0.000 seconds
68489:M 28 Feb 00:43:00.385 * The server is now ready to accept connections at /var/run/redis/redis.sock
httpd error log is lively:

Code:
# tail -f /var/www/logs/error.log  
#2 [internal function]: OC\Autoloader->load('OC_User')
#3 /nextcloud/lib/private/Log/File.php(101): spl_autoload_call('OC_User')
#4 [internal function]: OC\Log\File::write('PHP', 'Uncaught except...', 3)
#5 /nextcloud/lib/private/Log.php(301): call_user_func(Array, 'PHP', 'Uncaught except...', 3)
#6 /nextcloud/lib/private/Log.php(159): OC\Log->log(3, 'Uncaught except...', Array)
#7 /nextcloud/lib/private/Log/ErrorHandler.php(68): OC\Log->critical('Uncaught except...', Array)
#8 [internal function]: OC\Log\ErrorHandler->onShutdown()
#9 {main}
  thrown in /nextcloud/lib/private/Memcache/Redis.php on line 52

PHP message: PHP Warning:  Redis::connect(): connect() failed: No such file or directory in /nextcloud/lib/private/RedisFactory.php on line 82
PHP message: PHP Fatal error:  Uncaught exception 'RedisException' with message 'Redis server went away' in /nextcloud/lib/private/Memcache/Redis.php:52
Stack trace:
#0 /nextcloud/lib/private/Memcache/Redis.php(52): Redis->get('3ca47c2a60a81be...')
#1 /nextcloud/lib/autoloader.php(146): OC\Memcache\Redis->get('OC_User')
#2 [internal function]: OC\Autoloader->load('OC_User')
#3 /nextcloud/lib/private/Log/File.php(101): spl_autoload_call('OC_User')
#4 [internal function]: OC\Log\File::write('PHP', 'RedisException:...', 3)
#5 /nextcloud/lib/private/Log.php(301): call_user_func(Array, 'PHP', 'RedisException:...', 3)
#6 /nextcloud/lib/private/Log.php(159): OC\Log->log(3, 'RedisException:...', Array)
#7 /nextcloud/lib/private/Log/ErrorHandler.php(81): OC\Log->critical('RedisException:...', Array)
#8 [internal function]: OC\Log\ErrorHandler->onException(Object(RedisException))
#9 {main}
  thrown in /nextcloud/lib/private/Memcache/Redis.php on line 52
PHP message: PHP Fatal error:  Uncaught exception 'RedisException' with message 'Redis server went away' in /nextcloud/lib/private/Memcache/Redis.php:52
Stack trace:
#0 /nextcloud/lib/private/Memcache/Redis.php(52): Redis->get('3ca47c2a60a81be...')
#1 /nextcloud/lib/autoloader.php(146): OC\Memcache\Redis->get('OC_User')
#2 [internal function]: OC\Autoloader->load('OC_User')
#3 /nextcloud/lib/private/Log/File.php(101): spl_autoload_call('OC_User')
#4 [internal function]: OC\Log\File::write('PHP', 'Uncaught except...', 3)
#5 /nextcloud/lib/private/Log.php(301): call_user_func(Array, 'PHP', 'Uncaught except...', 3)
#6 /nextcloud/lib/private/Log.php(159): OC\Log->log(3, 'Uncaught except...', Array)
#7 /nextcloud/lib/private/Log/ErrorHandler.php(68): OC\Log->critical('Uncaught except...', Array)
#8 [internal function]: OC\Log\ErrorHandler->onShutdown()
#9 {main}
  thrown in /nextcloud/lib/private/Memcache/Redis.php on line 52

PHP message: PHP Warning:  Redis::connect(): connect() failed: No such file or directory in /nextcloud/lib/private/RedisFactory.php on line 82
PHP message: PHP Fatal error:  Uncaught exception 'RedisException' with message 'Redis server went away' in /nextcloud/lib/private/Memcache/Redis.php:52
Stack trace:
#0 /nextcloud/lib/private/Memcache/Redis.php(52): Redis->get('3ca47c2a60a81be...')
#1 /nextcloud/lib/autoloader.php(146): OC\Memcache\Redis->get('OC_User')
#2 [internal function]: OC\Autoloader->load('OC_User')
#3 /nextcloud/lib/private/Log/File.php(101): spl_autoload_call('OC_User')
#4 [internal function]: OC\Log\File::write('PHP', 'RedisException:...', 3)
#5 /nextcloud/lib/private/Log.php(301): call_user_func(Array, 'PHP', 'RedisException:...', 3)
#6 /nextcloud/lib/private/Log.php(159): OC\Log->log(3, 'RedisException:...', Array)
#7 /nextcloud/lib/private/Log/ErrorHandler.php(81): OC\Log->critical('RedisException:...', Array)
#8 [internal function]: OC\Log\ErrorHandler->onException(Object(RedisException))
#9 {main}
  thrown in /nextcloud/lib/private/Memcache/Redis.php on line 52
PHP message: PHP Fatal error:  Uncaught exception 'RedisException' with message 'Redis server went away' in /nextcloud/lib/private/Memcache/Redis.php:52
Stack trace:
#0 /nextcloud/lib/private/Memcache/Redis.php(52): Redis->get('3ca47c2a60a81be...')
#1 /nextcloud/lib/autoloader.php(146): OC\Memcache\Redis->get('OC_User')
#2 [internal function]: OC\Autoloader->load('OC_User')
#3 /nextcloud/lib/private/Log/File.php(101): spl_autoload_call('OC_User')
#4 [internal function]: OC\Log\File::write('PHP', 'Uncaught except...', 3)
#5 /nextcloud/lib/private/Log.php(301): call_user_func(Array, 'PHP', 'Uncaught except...', 3)
#6 /nextcloud/lib/private/Log.php(159): OC\Log->log(3, 'Uncaught except...', Array)
#7 /nextcloud/lib/private/Log/ErrorHandler.php(68): OC\Log->critical('Uncaught except...', Array)
#8 [internal function]: OC\Log\ErrorHandler->onShutdown()
#9 {main}
  thrown in /nextcloud/lib/private/Memcache/Redis.php on line 52

PHP message: PHP Warning:  Redis::connect(): connect() failed: No such file or directory in /nextcloud/lib/private/RedisFactory.php on line 82
PHP message: PHP Fatal error:  Uncaught exception 'RedisException' with message 'Redis server went away' in /nextcloud/lib/private/Memcache/Redis.php:52
Stack trace:
#0 /nextcloud/lib/private/Memcache/Redis.php(52): Redis->get('3ca47c2a60a81be...')
#1 /nextcloud/lib/autoloader.php(146): OC\Memcache\Redis->get('OC_User')
#2 [internal function]: OC\Autoloader->load('OC_User')
#3 /nextcloud/lib/private/Log/File.php(101): spl_autoload_call('OC_User')
#4 [internal function]: OC\Log\File::write('PHP', 'RedisException:...', 3)
#5 /nextcloud/lib/private/Log.php(301): call_user_func(Array, 'PHP', 'RedisException:...', 3)
#6 /nextcloud/lib/private/Log.php(159): OC\Log->log(3, 'RedisException:...', Array)
#7 /nextcloud/lib/private/Log/ErrorHandler.php(81): OC\Log->critical('RedisException:...', Array)
#8 [internal function]: OC\Log\ErrorHandler->onException(Object(RedisException))
#9 {main}
  thrown in /nextcloud/lib/private/Memcache/Redis.php on line 52
PHP message: PHP Fatal error:  Uncaught exception 'RedisException' with message 'Redis server went away' in /nextcloud/lib/private/Memcache/Redis.php:52
Stack trace:
#0 /nextcloud/lib/private/Memcache/Redis.php(52): Redis->get('3ca47c2a60a81be...')
#1 /nextcloud/lib/autoloader.php(146): OC\Memcache\Redis->get('OC_User')
#2 [internal function]: OC\Autoloader->load('OC_User')
#3 /nextcloud/lib/private/Log/File.php(101): spl_autoload_call('OC_User')
#4 [internal function]: OC\Log\File::write('PHP', 'Uncaught except...', 3)
#5 /nextcloud/lib/private/Log.php(301): call_user_func(Array, 'PHP', 'Uncaught except...', 3)
#6 /nextcloud/lib/private/Log.php(159): OC\Log->log(3, 'Uncaught except...', Array)
#7 /nextcloud/lib/private/Log/ErrorHandler.php(68): OC\Log->critical('Uncaught except...', Array)
#8 [internal function]: OC\Log\ErrorHandler->onShutdown()
#9 {main}
  thrown in /nextcloud/lib/private/Memcache/Redis.php on line 52

PHP message: PHP Warning:  Redis::connect(): connect() failed: No such file or directory in /nextcloud/lib/private/RedisFactory.php on line 82
PHP message: PHP Fatal error:  Uncaught exception 'RedisException' with message 'Redis server went away' in /nextcloud/lib/private/Memcache/Redis.php:52
Stack trace:
#0 /nextcloud/lib/private/Memcache/Redis.php(52): Redis->get('3ca47c2a60a81be...')
#1 /nextcloud/lib/autoloader.php(146): OC\Memcache\Redis->get('OC_User')
#2 [internal function]: OC\Autoloader->load('OC_User')
#3 /nextcloud/lib/private/Log/File.php(101): spl_autoload_call('OC_User')
#4 [internal function]: OC\Log\File::write('PHP', 'RedisException:...', 3)
#5 /nextcloud/lib/private/Log.php(301): call_user_func(Array, 'PHP', 'RedisException:...', 3)
#6 /nextcloud/lib/private/Log.php(159): OC\Log->log(3, 'RedisException:...', Array)
#7 /nextcloud/lib/private/Log/ErrorHandler.php(81): OC\Log->critical('RedisException:...', Array)
#8 [internal function]: OC\Log\ErrorHandler->onException(Object(RedisException))
#9 {main}
  thrown in /nextcloud/lib/private/Memcache/Redis.php on line 52
PHP message: PHP Fatal error:  Uncaught exception 'RedisException' with message 'Redis server went away' in /nextcloud/lib/private/Memcache/Redis.php:52
Stack trace:
#0 /nextcloud/lib/private/Memcache/Redis.php(52): Redis->get('3ca47c2a60a81be...')
#1 /nextcloud/lib/autoloader.php(146): OC\Memcache\Redis->get('OC_User')
#2 [internal function]: OC\Autoloader->load('OC_User')
#3 /nextcloud/lib/private/Log/File.php(101): spl_autoload_call('OC_User')
#4 [internal function]: OC\Log\File::write('PHP', 'Uncaught except...', 3)
#5 /nextcloud/lib/private/Log.php(301): call_user_func(Array, 'PHP', 'Uncaught except...', 3)
#6 /nextcloud/lib/private/Log.php(159): OC\Log->log(3, 'Uncaught except...', Array)
#7 /nextcloud/lib/private/Log/ErrorHandler.php(68): OC\Log->critical('Uncaught except...', Array)
#8 [internal function]: OC\Log\ErrorHandler->onShutdown()
#9 {main}
  thrown in /nextcloud/lib/private/Memcache/Redis.php on line 52

PHP message: PHP Warning:  Redis::connect(): connect() failed: No such file or directory in /nextcloud/lib/private/RedisFactory.php on line 82
PHP message: PHP Fatal error:  Uncaught exception 'RedisException' with message 'Redis server went away' in /nextcloud/lib/private/Memcache/Redis.php:52
Stack trace:
#0 /nextcloud/lib/private/Memcache/Redis.php(52): Redis->get('3ca47c2a60a81be...')
#1 /nextcloud/lib/autoloader.php(146): OC\Memcache\Redis->get('OC_User')
#2 [internal function]: OC\Autoloader->load('OC_User')
#3 /nextcloud/lib/private/Log/File.php(101): spl_autoload_call('OC_User')
#4 [internal function]: OC\Log\File::write('PHP', 'RedisException:...', 3)
#5 /nextcloud/lib/private/Log.php(301): call_user_func(Array, 'PHP', 'RedisException:...', 3)
#6 /nextcloud/lib/private/Log.php(159): OC\Log->log(3, 'RedisException:...', Array)
#7 /nextcloud/lib/private/Log/ErrorHandler.php(81): OC\Log->critical('RedisException:...', Array)
#8 [internal function]: OC\Log\ErrorHandler->onException(Object(RedisException))
#9 {main}
  thrown in /nextcloud/lib/private/Memcache/Redis.php on line 52
PHP message: PHP Fatal error:  Uncaught exception 'RedisException' with message 'Redis server went away' in /nextcloud/lib/private/Memcache/Redis.php:52
Stack trace:
#0 /nextcloud/lib/private/Memcache/Redis.php(52): Redis->get('3ca47c2a60a81be...')
#1 /nextcloud/lib/autoloader.php(146): OC\Memcache\Redis->get('OC_User')
#2 [internal function]: OC\Autoloader->load('OC_User')
#3 /nextcloud/lib/private/Log/File.php(101): spl_autoload_call('OC_User')
#4 [internal function]: OC\Log\File::write('PHP', 'Uncaught except...', 3)
#5 /nextcloud/lib/private/Log.php(301): call_user_func(Array, 'PHP', 'Uncaught except...', 3)
#6 /nextcloud/lib/private/Log.php(159): OC\Log->log(3, 'Uncaught except...', Array)
#7 /nextcloud/lib/private/Log/ErrorHandler.php(68): OC\Log->critical('Uncaught except...', Array)
#8 [internal function]: OC\Log\ErrorHandler->onShutdown()
#9 {main}
  thrown in /nextcloud/lib/private/Memcache/Redis.php on line 52

PHP message: PHP Warning:  Redis::connect(): connect() failed: No such file or directory in /nextcloud/lib/private/RedisFactory.php on line 82
PHP message: PHP Fatal error:  Uncaught exception 'RedisException' with message 'Redis server went away' in /nextcloud/lib/private/Memcache/Redis.php:52
Stack trace:
#0 /nextcloud/lib/private/Memcache/Redis.php(52): Redis->get('3ca47c2a60a81be...')
#1 /nextcloud/lib/autoloader.php(146): OC\Memcache\Redis->get('OC_User')
#2 [internal function]: OC\Autoloader->load('OC_User')
#3 /nextcloud/lib/private/Log/File.php(101): spl_autoload_call('OC_User')
#4 [internal function]: OC\Log\File::write('PHP', 'RedisException:...', 3)
#5 /nextcloud/lib/private/Log.php(301): call_user_func(Array, 'PHP', 'RedisException:...', 3)
#6 /nextcloud/lib/private/Log.php(159): OC\Log->log(3, 'RedisException:...', Array)
#7 /nextcloud/lib/private/Log/ErrorHandler.php(81): OC\Log->critical('RedisException:...', Array)
#8 [internal function]: OC\Log\ErrorHandler->onException(Object(RedisException))
#9 {main}
  thrown in /nextcloud/lib/private/Memcache/Redis.php on line 52
PHP message: PHP Fatal error:  Uncaught exception 'RedisException' with message 'Redis server went away' in /nextcloud/lib/private/Memcache/Redis.php:52
Stack trace:
#0 /nextcloud/lib/private/Memcache/Redis.php(52): Redis->get('3ca47c2a60a81be...')
#1 /nextcloud/lib/autoloader.php(146): OC\Memcache\Redis->get('OC_User')
#2 [internal function]: OC\Autoloader->load('OC_User')
#3 /nextcloud/lib/private/Log/File.php(101): spl_autoload_call('OC_User')
#4 [internal function]: OC\Log\File::write('PHP', 'Uncaught except...', 3)
#5 /nextcloud/lib/private/Log.php(301): call_user_func(Array, 'PHP', 'Uncaught except...', 3)
#6 /nextcloud/lib/private/Log.php(159): OC\Log->log(3, 'Uncaught except...', Array)
#7 /nextcloud/lib/private/Log/ErrorHandler.php(68): OC\Log->critical('Uncaught except...', Array)
#8 [internal function]: OC\Log\ErrorHandler->onShutdown()
#9 {main}
  thrown in /nextcloud/lib/private/Memcache/Redis.php on line 52

PHP message: PHP Warning:  Redis::connect(): connect() failed: No such file or directory in /nextcloud/lib/private/RedisFactory.php on line 82
PHP message: PHP Fatal error:  Uncaught exception 'RedisException' with message 'Redis server went away' in /nextcloud/lib/private/Memcache/Redis.php:52
Stack trace:
#0 /nextcloud/lib/private/Memcache/Redis.php(52): Redis->get('3ca47c2a60a81be...')
#1 /nextcloud/lib/autoloader.php(146): OC\Memcache\Redis->get('OC_User')
#2 [internal function]: OC\Autoloader->load('OC_User')
#3 /nextcloud/lib/private/Log/File.php(101): spl_autoload_call('OC_User')
#4 [internal function]: OC\Log\File::write('PHP', 'RedisException:...', 3)
#5 /nextcloud/lib/private/Log.php(301): call_user_func(Array, 'PHP', 'RedisException:...', 3)
#6 /nextcloud/lib/private/Log.php(159): OC\Log->log(3, 'RedisException:...', Array)
#7 /nextcloud/lib/private/Log/ErrorHandler.php(81): OC\Log->critical('RedisException:...', Array)
#8 [internal function]: OC\Log\ErrorHandler->onException(Object(RedisException))
#9 {main}
  thrown in /nextcloud/lib/private/Memcache/Redis.php on line 52
PHP message: PHP Fatal error:  Uncaught exception 'RedisException' with message 'Redis server went away' in /nextcloud/lib/private/Memcache/Redis.php:52
Stack trace:
#0 /nextcloud/lib/private/Memcache/Redis.php(52): Redis->get('3ca47c2a60a81be...')
#1 /nextcloud/lib/autoloader.php(146): OC\Memcache\Redis->get('OC_User')
#2 [internal function]: OC\Autoloader->load('OC_User')
#3 /nextcloud/lib/private/Log/File.php(101): spl_autoload_call('OC_User')
#4 [internal function]: OC\Log\File::write('PHP', 'Uncaught except...', 3)
#5 /nextcloud/lib/private/Log.php(301): call_user_func(Array, 'PHP', 'Uncaught except...', 3)
#6 /nextcloud/lib/private/Log.php(159): OC\Log->log(3, 'Uncaught except...', Array)
#7 /nextcloud/lib/private/Log/ErrorHandler.php(68): OC\Log->critical('Uncaught except...', Array)
#8 [internal function]: OC\Log\ErrorHandler->onShutdown()
#9 {main}
  thrown in /nextcloud/lib/private/Memcache/Redis.php on line 52
But I'm not sure what to make of these errors.

Interestingly, Redis and Nextcloud work fine if configured to use a TCP and not a Unix socket with:

Code:
'memcache.local' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
     'host' => 'localhost',
     'port' => 6379,
      ),
In place of the configuration in Nextcloud's config.php file as shown above. This leads me to believe that it's something to do with httpd's chroot that is preventing Nextcloud from communicating with Redis through /var/run/redis/redis.sock but I'm not sure of the precise configuration required to enable a Redis and Nextcloud unix socket connection.

I tried, in /etc/redis/redis.conf:

Code:
unixsocket /var/www/var/run/redis/redis.sock
With concomitant reference to the unix socket at its relative[0] and absolute[1] paths in Nextcloud's config.php. But this, too, did not work.

[0]
Code:
'memcache.local' => '\OC\Memcache\Redis',
'redis' => array(
     'host' => '/var/run/redis/redis.sock',
     'port' => 0,
     'timeout' => 1.5,
      ),
[1]
Code:
'memcache.local' => '\OC\Memcache\Redis',
'redis' => array(
     'host' => '/var/www/var/run/redis/redis.sock',
     'port' => 0,
     'timeout' => 1.5,
      ),
I'm not sure where to go from here. Any ideas?

Redis and Nextcloud[2] configuration was taken from official documentation.

[2] https://docs.nextcloud.com/server/12...iguration.html

Last edited by toprank; 27th February 2018 at 04:27 PM.
Reply With Quote
 

Tags
httpd, nextcloud, php, redis

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
www/nextcloud and httpd.conf subdomain config toprank OpenBSD Packages and Ports 31 2nd March 2018 10:50 AM
Redis 2.6 "is near" and now feature frozen J65nko News 0 29th February 2012 04:09 AM
Redis 2.4.0 (and 2.4.1) finally released J65nko News 0 17th October 2011 01:28 PM
Final version of optimised Redis released J65nko News 0 23rd February 2011 12:08 PM
VMware hires key Redis developer J65nko News 0 16th March 2010 11:19 PM


All times are GMT. The time now is 03:43 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick