![]() |
|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
![]() |
|
Thread Tools | Display Modes |
|
|||
![]()
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 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, ), ); 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 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 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, ), I tried, in /etc/redis/redis.conf: Code:
unixsocket /var/www/var/run/redis/redis.sock [0] Code:
'memcache.local' => '\OC\Memcache\Redis', 'redis' => array( 'host' => '/var/run/redis/redis.sock', 'port' => 0, 'timeout' => 1.5, ), Code:
'memcache.local' => '\OC\Memcache\Redis', 'redis' => array( 'host' => '/var/www/var/run/redis/redis.sock', 'port' => 0, 'timeout' => 1.5, ), 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. |
|
|||
![]()
I'm thinking that Redis can't access (or, perhaps more aptly, find) the chroot'ed unix socket so I should create a link between /var/www/var/run/redis/redis.sock and /var/run/redis/redis.sock, yeah?
If so, what paths should be used in which configuration files? I'm thinking the chroot'ed app uses the relative path in the chroot but Redis use the non-chroot'ed linked file at it's absolute path; that is, /etc/redis/redis.conf has: Code:
unixsocket /var/run/redis/redis.sock Code:
'host' => '/var/run/redis/redis.sock', |
|
||||
![]()
I fixed my group permission error. It was easier to change the group for _redis with chpass(1), leave /etc/group unedited, and change the ownership of the /var/www/redis directory to www:www, leaving it 775.
Code:
$ pwd ; ls -l /var/www total 52 drwxr-xr-x 2 root daemon 512 Oct 3 23:13 acme drwxr-xr-x 2 root daemon 512 Feb 27 17:24 bin drwx-----T 2 www daemon 512 Oct 3 23:13 cache drwxr-xr-x 2 root daemon 512 Oct 3 23:13 cgi-bin drwxr-xr-x 3 root daemon 512 Feb 27 17:24 conf drwxr-xr-x 2 root daemon 512 Feb 27 18:02 etc drwxr-xr-x 4 root daemon 512 Feb 27 17:40 htdocs drwxr-xr-x 2 root daemon 512 Feb 27 21:08 logs drwxr-xr-x 15 root daemon 1024 Feb 27 21:24 nextcloud drwxrwxr-x 2 www www 512 Feb 27 21:31 redis drwxr-xr-x 2 root daemon 512 Feb 27 21:26 run drwx-----T 2 www www 1024 Feb 27 21:31 tmp drwxr-xr-x 5 root daemon 512 Feb 27 17:26 usr Code:
$ ls -l redis/ total 0 srwxrwx--- 1 _redis www 0 Feb 27 21:31 redis.sock Code:
$ diff -u /usr/local/share/examples/redis/redis.conf /etc/redis/redis.conf --- /usr/local/share/examples/redis/redis.conf Mon Oct 2 15:15:46 2017 +++ /etc/redis/redis.conf Tue Feb 27 21:23:14 2018 @@ -106,8 +106,8 @@ # incoming connections. There is no default, so Redis will not listen # on a unix socket when not specified. # -# unixsocket /var/run/redis/redis.sock -# unixsocketperm 770 + unixsocket /var/www/redis/redis.sock + unixsocketperm 770 # Close the connection after a client is idle for N seconds (0 to disable) timeout 0 Last edited by jggimi; 28th February 2018 at 03:34 AM. Reason: typo |
|
|||
![]()
Thanks, jggimi.
So, to clarify, your final working setup: - change _redis GID to www with chpass - mkdir /var/www/redis and chown www:www with chmod 0775 - point Nextcloud to /redis/redis.sock (relative path in chroot) - point Redis to /var/www/redis/redis.sock (absolute path within chroot) - rcctl restart redis php56_fpm httpd - and let Redis create redis.sock with mode 0770 |
|
||||
![]()
Correct. But I used the example redis.conf as my base, as your smaller configuration in this thread didn't work on the test system (6.2-release, amd64, in a vmm(4) virtual machine). Redis would timeout when starting rather than start correctly.
I'll keep the virtual machine's disk drive for a day or two in the event additional questions arise. |
|
|||
![]()
Okay, cool. Thanks, jggimi.
Did you happen to set port 0 in redis.conf too? Code:
# If port 0 is specified Redis will not listen on a TCP socket. port 0 |
|
|||
![]()
And the configuration with port 0 set timed out? So the only successful config was with just unixsocket and unixsocketperm set?
Code:
unixsocket /var/www/redis/redis.sock unixsocketperm 770 |
|
||||
![]()
No. I used the included example, and changed two lines. If I remove all commented and blank lines from the file, THIS was my redis.conf:
Code:
bind 127.0.0.1 protected-mode yes port 6379 tcp-backlog 511 unixsocket /var/www/redis/redis.sock unixsocketperm 770 timeout 0 tcp-keepalive 300 daemonize yes supervised no pidfile /var/run/redis/redis_6379.pid loglevel notice syslog-enabled yes syslog-ident redis syslog-facility daemon databases 16 always-show-logo yes save 900 1 save 300 10 save 60 10000 stop-writes-on-bgsave-error yes rdbcompression yes rdbchecksum yes dbfilename dump.rdb dir /var/redis slave-serve-stale-data yes slave-read-only yes repl-diskless-sync no repl-diskless-sync-delay 5 repl-disable-tcp-nodelay no slave-priority 100 maxclients 96 lazyfree-lazy-eviction no lazyfree-lazy-expire no lazyfree-lazy-server-del no slave-lazy-flush no appendonly no appendfilename "appendonly.aof" 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 no lua-time-limit 5000 slowlog-log-slower-than 10000 slowlog-max-len 128 latency-monitor-threshold 0 notify-keyspace-events "" hash-max-ziplist-entries 512 hash-max-ziplist-value 64 list-max-ziplist-size -2 list-compress-depth 0 set-max-intset-entries 512 zset-max-ziplist-entries 128 zset-max-ziplist-value 64 hll-sparse-max-bytes 3000 activerehashing yes client-output-buffer-limit normal 0 0 0 client-output-buffer-limit slave 256mb 64mb 60 client-output-buffer-limit pubsub 32mb 8mb 60 hz 10 aof-rewrite-incremental-fsync yes |
|
|||
![]()
I only ask because I have a successful configuration with the only changes to the default redis.conf being:
Code:
unixsocket /var/www/redis/redis.sock unixsocketperm 770 Code:
<?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' => '/redis/redis.sock', 'port' => 0, 'timeout' => 1.5, ), ); But ps shows Redis listening on port 6379: Code:
# ps -aux |grep redis _redis 33261 0.0 0.3 14296 2720 ?? Ss 10:11PM 0:01.05 redis-server: /usr/local/sbin/redis-server 127.0.0.1:6379 (redis-server) root 15955 0.0 0.0 116 252 p0 R+/1 10:35PM 0:00.00 grep redis Code:
# ls -l /var/www/redis/ total 0 srwxrwx--- 1 _redis www 0 Feb 28 22:11 redis.sock Last edited by toprank; 9th March 2018 at 01:47 PM. |
|
|||
![]()
Sorry. That's what I meant: the only user changes from the default redis.conf being the unixsocket and unixsocket perm and all else remaining as default (including port setting).
|
|
||||
![]()
Under my successful test, it would be listening on that port for additional connections. I have not gone back to try to debug the configuration that was not working for me.
Keep in mind, my goal was to get a successful redis execution in order to test a functioning Unix socket connection in a test lab. Nextcloud was the system-under-test, with Redis being an adjunct connection. |
|
|||
![]()
Okay, well, I can confirm it works either way. I just set port 0 in redis.conf then restart Redis and we still have an accessible Nextcloud.
So thanks, jggimi, you've been a great help! |
![]() |
Tags |
httpd, nextcloud, php, redis |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
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 |