Transactional file Locking on owncloud running in Docker on a Mac

I’m getting the “Transactional file locking should be configured to use memory-based locking, not the default slow database-based locking” error in my Admin/General area of settings. I’m pretty sure the problem is Redis didn’t get installed with this installation. I also get file locked errors and I wonder if it’s all related to this. There doesn’t seem to be any tutorials for this setup on getting redis to be a part of this installation. Can anyone help?

UPDATE:
So I managed to get the error messages to go away. I guess that means it’s fixed. But what I did was this:
I opened the config.sample.php file and searched for “transactional file locking” and “memcaching”. I copied and pasted this text from that file into my config.php file located in ~/.owncloud_docker/config

‘filelocking.enabled’ => true,
‘filelocking.ttl’ => 3600,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘upgrade.disable-web’ => false,
‘memcache.local’ => ‘\OC\Memcache\APCu’,

UPDATE2
I had to comment out this line because my external storage wasn’t working. So Redis still not configured right and the “Transactional File Lock” error is back as a result.
‘memcache.locking’ => ‘\OC\Memcache\Redis’,

Steps to reproduce

  1. Install Docker on a Mac
  2. Install Owncloud and Mariadb with this docker-compose setup…
  3. https://drive.google.com/open?id=1mlkuNkBP0PMdr6NK91Z9yE49HVIV4Q0z
  4. Go to admin/general in settings

Expected behaviour

I want Transactional File Locking to be configured

Actual behaviour

I get the error in Admin/General:
Security & setup warnings

  • Transactional file locking should be configured to use memory-based locking, not the default slow database-based locking

Server configuration

Operating system:
Mac Os High Sierra
Web server:
Apache/2.4.25 (Debian)
Database:
Mariadb mySQL
PHP version:
7.2.13
ownCloud version: (see ownCloud admin page)
10.0.10
Updated from an older ownCloud or fresh install:
fresh
Where did you install ownCloud from:
this tutorial:
http://quark.astrosen.unam.mx/Site/Mac_OS_X_tips/Entries/2018/4/23_Running_OwnCloud_on_macOS_(using_docker).html
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.

no errors have been found

The content of config/config.php:
My config Report



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


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:

Operating system:

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

Insert your ownCloud log here

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...

Hi there,
I would recommend to read the official documentation about running owncloud in docker:
https://doc.owncloud.com/server/10.2/admin_manual/installation/docker/
This should work exaclty the same on a Mac.

1 Like

Yes… I would use the docker-compose.yml on the website that @eneubauer suggested instead. The problem with yours is that it doesn’t contain a redis service container like the “official” owncloud one does. So, redis isn’t running under your configuration and thus the error. I’d say you could just add a redis service to your .yml, but then you’d have to modify your config file and that becomes a whole thing. It’s probably easier just using the other docker-compose.yml file.

Best of luck,
Pat

1 Like

Thanks guys, please see the update in my original post.

Basically I noticed that Redis was listed in my config report so it must be built into the owncloud image? So then I opened the config.sample.php file and did a search for redis, transactional file locking, and memcaching. I just tried a few of the results in my config.php file until the error messages went away. Ha ha ha!

Hey,

if i’m understanding the “OWNCLOUD_REDIS_ENABLED” and “OWNCLOUD_REDIS_HOST” on https://doc.owncloud.com/server/10.2/admin_manual/installation/docker/ correctly it seems you can enable docker directly from outside without the need of change the config.php