Redis install problem for local cache - Opensuse 42.3 Owncloud 10.0.3 PHP7.0.7

Steps to reproduce

1 install owncloud 10.0.3
2 install redis-server, redis-client and php7-redis
3 configure memcache in owncloud config (like I understood the documentation..)

Expected behaviour

I want all work, but isnt

First: transactional file locking should be configured to use memory-based locking, not the default slow database-based locking

After doing tips from manual to setup redis... ->

memcache \OC\Memcache\Redis not available for local cache. Is the matching php module installed and enabled
Server configuration

Operating system:

Operating system: OpenSuse Leap 42.3

Web server: Apache2

Database: Mysql mysqlnd 5.0.12-dev

PHP version: 7.0.7

ownCloud version: 10.0.3 (newest)

The content of config/config.php:

'filelocking.enabled' => true,
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => [
'host' => 'localhost',
'port' => 6379,
'timeout' => 0.0,

Are you using external storage, if yes which one: local/smb/sftp/...no

Are you using encryption: yes/no

**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/...

**Are you using encryption:** no

ownCloud log (data/owncloud.log)

{"reqId":"htUEv24HhzcibcnDQiQM","level":3,"time":"2017-09-29T00:02:16+00:00","remoteAddr":"127.0.0.1","user":"--","app":"PHP","method":"GET","url":"\/owncloud\/index.php","message":"You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at \/srv\/www\/htdocs\/owncloud\/lib\/composer\/patchwork\/utf8\/src\/Patchwork\/Utf8\/Bootup\/intl.php#18"}
{"reqId":"CKxVyghNTCoZxQNbf4bF","level":3,"time":"2017-09-29T00:07:55+00:00","remoteAddr":"127.0.0.1","user":"--","app":"PHP","method":"GET","url":"\/owncloud\/index.php","message":"You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at \/srv\/www\/htdocs\/owncloud\/lib\/composer\/patchwork\/utf8\/src\/Patchwork\/Utf8\/Bootup\/intl.php#18"}
{"reqId":"431oaPnbuqhL5i5KK69A","level":3,"time":"2017-09-29T00:17:39+00:00","remoteAddr":"127.0.0.1","user":"--","app":"PHP","method":"POST","url":"\/owncloud\/index.php","message":"You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at \/srv\/www\/htdocs\/owncloud\/lib\/composer\/patchwork\/utf8\/src\/Patchwork\/Utf8\/Bootup\/intl.php#18"}
{"reqId":"fv8rIByaEFWqnz66yQpV","level":3,"time":"2017-09-29T00:21:21+00:00","remoteAddr":"127.0.0.1","user":"--","app":"PHP","method":"POST","url":"\/owncloud\/index.php","message":"You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at \/srv\/www\/htdocs\/owncloud\/lib\/composer\/patchwork\/utf8\/src\/Patchwork\/Utf8\/Bootup\/intl.php#18"}

Browser log

`
The goal is to enable redis service. I also did that:

Installed Redis by:

wget http://download.redis.io/releases/redis-4.0.2.tar.gz
tar xzf redis-4.0.2.tar.gz
cd redis-4.0.2
make
make install

ealier add php7-redis

Copy config file of redis from tar package
sudo cp /tmp/redis-stable/redis.conf /etc/redis
and changed in file:

/etc/redis/redis.conf

They do not enable continuous liveness pings back to your supervisor.
supervised systemd
and
Note that you must specify a directory here, not a file name.
dir /var/lib/redis

Then I created a file:
/etc/systemd/system/redis.service

[Unit]
Description=Redis In-Memory Data Store
After=network.target

[Service]
User=redis
Group=redis
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf
ExecStop=/usr/local/bin/redis-cli shutdown
Restart=always

[Install]
WantedBy=multi-user.target

sudo mkdir /var/lib/redis
sudo chown redis:redis /var/lib/redis
sudo chmod 770 /var/lib/redis

then, after run
sudo systemctl start redis

I have an error:

sudo systemctl status redis
● redis.service
Loaded: loaded (/etc/systemd/system/redis.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since wto 2017-10-03 19:36:02 CEST; 3h 5min ago
Process: 25274 ExecStop=/usr/local/bin/redis-cli shutdown (code=exited, status=1/FAILURE)
Process: 25272 ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf (code=exited, status=1/FAILURE)
Main PID: 25272 (code=exited, status=1/FAILURE)

paź 03 19:36:02 linux-kye3 systemd[1]: Stopped redis.service.
paź 03 19:36:02 linux-kye3 systemd[1]: Started redis.service.
paź 03 19:36:02 linux-kye3 redis-server[25272]: 25272:C 03 Oct 19:36:02.311 # Fatal error, can't open con...onf'
paź 03 19:36:02 linux-kye3 systemd[1]: redis.service: Main process exited, code=exited, status=1/FAILURE
paź 03 19:36:02 linux-kye3 redis-cli[25274]: Could not connect to Redis at 127.0.0.1:6379: Connection refused
paź 03 19:36:02 linux-kye3 systemd[1]: redis.service: Control process exited, code=exited status=1
paź 03 19:36:02 linux-kye3 systemd[1]: redis.service: Unit entered failed state.
paź 03 19:36:02 linux-kye3 systemd[1]: redis.service: Failed with result 'exit-code'.
paź 03 19:36:14 linux-kye3 systemd[1]: Stopped redis.service.
Warning: redis.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Hint: Some lines were ellipsized, use -l to show in full.

And command: redis-cli doesnt works, 'connection refused'

Also I did an entry in php.ini
extension=redis.so

Still owncloud site is blank with error message:
memcache \OC\Memcache\Redis not available for local cache. Is the matching php module installed and enabled

Also no entry in phpinfo() about redis function.

Please help...

Hello!

Do you really need Redis?

Not sure if this is much help for you, but I resorted to the below after Redis gave me to much grief.
This works for my smallish home-cloud.

At least I got rid of the alerts on the settings page.

'memcache.local' => '\OC\Memcache\APCu',
'memcache.locking' => '\OC\Memcache\APCu',
/*  'filelocking.enabled' => true, */

Also, did you check the "Caching Exceptions" table on https://doc.owncloud.org/server/latest/admin_manual/configuration/server/caching_configuration.html for your particular situation?

Do I need Redis.. In Manual says that is the best way, so... I just do what they wrote..at least I try as You se.. :frowning:

I have an entry:
Redis Configuration

This example config.php configuration uses Redis for the local server cache:

'memcache.local' => '\OC\Memcache\Redis',
'redis' => [
'host' => 'localhost',
'port' => 6379,
],
'memcache.locking' => '\OC\Memcache\Redis', // Add this for best performance

The same error text like above.

Now I tried to change redis.service file, so i pasted:

Description=Redis In-Memory Data Store

After=network.target

[Service]
Type=forking
User=redis
Group=redis
Environment=statedir=/run/redis
PermissionsStartOnly=true
PIDFile=/run/redis/redis.pid
ExecStartPre=/bin/touch /var/log/redis.log
ExecStartPre=/bin/chown redis:redis /var/log/redis.log
ExecStartPre=/bin/mkdir -p ${statedir}
ExecStartPre=/bin/chown -R redis:redis ${statedir}
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf
ExecStop=/usr/local/bin/redis-cli shutdown
ExecReload=/bin/kill -USR2 $MAINPID
Restart=always
RestartSec=3

[Install]
WantedBy=multi-user.target

and error text from start redis serivice is:

linux-kye3:/srv/www/htdocs/owncloud # systemctl status redis.service
● redis.service
Loaded: loaded (/etc/systemd/system/redis.service; disabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since śro 2017-10-04 11:09:57 CEST; 1s ago
Process: 13568 ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf (code=exited, status=1/FAILURE)
Process: 13564 ExecStartPre=/bin/chown -R redis:redis ${statedir} (code=exited, status=0/SUCCESS)
Process: 13560 ExecStartPre=/bin/mkdir -p ${statedir} (code=exited, status=0/SUCCESS)
Process: 13556 ExecStartPre=/bin/chown redis:redis /var/log/redis.log (code=exited, status=0/SUCCESS)
Process: 13554 ExecStartPre=/bin/touch /var/log/redis.log (code=exited, status=0/SUCCESS)
Main PID: 13275 (code=exited, status=1/FAILURE)

paź 04 11:09:57 vesta systemd[1]: redis.service: Control process exited, code=exited status=1
paź 04 11:09:57 vesta systemd[1]: Failed to start redis.service.
paź 04 11:09:57 vesta systemd[1]: redis.service: Unit entered failed state.
paź 04 11:09:57 vesta systemd[1]: redis.service: Failed with result 'exit-code'.

I guess best would be to find a solution on how to properly install redis on opensuse by searching the web.
This is not really an ownCloud issue

It's an example, you don't need to use it. There are other alternatives, depending on how you plan to use your OC.

Otherwise, as DeepDiver1975 mentions, it's not an Owncloud issue per se.

In the interest of the OC-server admin however, I feel the admin-manual on memory caching and file-locking could maybe be cleaned up a bit for clarity. Last week I spent some time on that particular page trying to make sense of the information and decided to dump Redis in favour of a simpler solution.

OK, For me is whatever which module I will use. OC is in our small company and max 6-7 users will be use it..no one more.

So, can you tell me what is it, and how to run it properly on openSuse ? I understand that warnings in OC admin panel will disappear.. ? And what with changes I have made till now...

Ok, for my small home office APCu will be good..as says:

APCu: This is a local cache for systems running PHP 5.6 and up. APCu 4.0.6 and up is required. Alternatively you can use the Zend OPCache. However, it is not a data cache, only an opcode cache.
Redis: This is a distributed cache for multi-server ownCloud installations. Version 2.2.6 or higher of the PHP Redis extension is required.

I'm confused. I spent last 3 days and 3 nights and nothing go forward...Im standing in front big wall, no pasaran like we say.

"Use APCu for local caching, Redis for file locking"

Can you write me like to simple man.. what to do in my case.

OC running on VM, users 6-7 max. OpenSuse 42.3.

EDIT
Ok, now Im trying to install APCu, .

I did ->

zypper addrepo https://download.opensuse.org/repositories/home:munix9:php:php7/php71_openSUSE_Leap_42.3/home:munix9:php:php7.repo
zypper refresh
zypper install php7-apcu

In file added..../owncloud/config/config.php

'memcache.local' => '\OC\Memcache\APCu',
'memcache.locking' => '\OC\Memcache\APCu',
'redis' => array(
'host' => 'localhost',
'port' => 6379,
),

and also in php.ini added 'extension' = apcu.so

and no effect, still I have a blank page of OC with error message:

Memcache \OC\Memcache\APCu not available for local cache Is the matching PHP module installed and enabled?

Try removing the Redis settings from your config.php.

Can we assume you have restarted Apache daemon?

Can you see the welcome screen from Apache if you go to http://yoursite.com as opposed http://yoursite.com/owncloud?

Do you have any adblockers installed in your web browser?

ok, I deleted that, now I have in /owncloud/config.php:
'memcache.local' => '\OC\Memcache\APCu',
'memcache.locking' => '\OC\Memcache\APCu',

(tell me something, that the - \OC\Mamcache. - this is a path to a folder APCu ? - i'm asking because maybe this it should be in my case a different path....)

Yes, I restart Apache2 everytime I do some entry in files...
systemctl restart apache2
and I did command: a2enmod apcu

Yes, the welcome screen of my page shows phpinfo() file.

But mysite/owncloud shows still an error
Memcache \OC\Memcache\APCu not available for local cache Is the matching PHP module installed and enabled?

No, not the phpinfo page, but the plain vanilla apache welcome page. See link below for an example on RHEL.
http://www.techotopia.com/index.php/Configuring_an_RHEL_5_Based_Web_Server#Testing_the_Web_Server

Does your phpinfo info-file mention that apcu is enabled?

Ok, but when I click a localhost or 127.0.0.1 browser open up a index.php file, so, what I must write there to see vanilla papache welcome page.. ??

I dont have a welcome.conf file.

phpinfo file doesnt mention about apcu is enabled... only have a two entries in

"additonal .ini files parsed - /etc/php7/conf.d/apcu.ini"
and
"apache modules" - few last entries are: reqtimeout php7 auth_core php5 version apcu - all this without commas.

If you want, I can send you in private massage my ip adress.

I'm out of my depth here.
Does OpenSUSE do something particular to the default Apache install, as compared to CentOS 6/7?
All default Apache installs I've done to this day, should have created those standard files and folders AFAIK.

However, it might be that your Directory index line in httpd.conf shows

DirectoryIndex index.php index.html index.aspx

instead of

DirectoryIndex index.html index.php index.aspx

so basically displays the first php-file it finds, or some such.

I'm sorry, I can't help you further, until we confirm your Apache server is actually working as expected.

You might want to use Virtualbox or some such and do a practice/test-install of Apache and OC, just to make sure your intended setup works.

Hmm. I have checked the /etc/apache2/httpd.,conf file and there is:
......
# List of resources to look for when the client requests a directory
DirectoryIndex index.html index.html.var
...
But when I open 127.0.0.1:82 - because I have changed the default port of apache, browser opens a index.php file which is a phpinfo() script. (the path of that file is /srv/www/htdocs/index.php)

Just in case someone has again this problem:
(OpenSUSE 15.1)
The solution for me was to change the filepath in /etc/systemd/system/redis.service to
ExecStart=/usr/sbin/redis-server /etc/redis/redis.conf
ExecStop=/usr/bin/redis-cli shutdown