ownCloud Appliance: Using Redis as Memory Cache/Transactional Filelocking doesn't work

appliance
memcache

#1

Steps to reproduce

  1. Install the ownCloud Appliance
  2. Set up Redis as memcache.locking (Transactional File Locking)
    3.Try to log in with a newly created user

Expected behaviour

Login should work as normal

Actual behaviour

Instead the page shows a message “Internal Server Error” and gives an ID to check in the log-file. No enter to the ownCloud-webfront

The log-entry says: “{“reqId”:“K5utC2An2DBceBLrsJlq”,“level”:2,“time”:“2019-01-22T08:06:19+00:00”,“remoteAddr”:”",“user”:"",“app”:“core”,“method”:“POST”,“url”:"/owncloud/login",“message”:“Exception when running cache gc: Redis server went away”}

and

{“reqId”:“K5utC2An2DBceBLrsJlq”,“level”:3,“time”:“2019-01-22T08:06:19+00:00”,“remoteAddr”:“172.17.42.1”,“user”:“fellinj”,“app”:“index”,“method”:“POST”,“url”:"/owncloud/login",“message”:“Exception: {“Exception”:“RedisException”,“Message”:“Redis server went away”,“Code”:0,“Trace”:”#0 \/var\/www\/owncloud\/lib\/private\/Memcache\/Redis.php(111): Redis->incrBy(‘f1b56e1c47b93bc…’, 1)\n#1 \/var\/www\/owncloud\/lib\/private\/Lock\/MemcacheLockingProvider.php(79): OC\\Memcache\\Redis->inc(‘files\/b80cfa63e…’)\n#2 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Common.php(657): OC\\Lock\\MemcacheLockingProvider->acquireLock(‘files\/b80cfa63e…’, 1)\n#3 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php(588): OC\\Files\\Storage\\Common->acquireLock(’’, 1, Object(OC\\Lock\\MemcacheLockingProvider))\n#4 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php(588): OC\\Files\\Storage\\Wrapper\\Wrapper->acquireLock(’’, 1, Object(OC\\Lock\\MemcacheLockingProvider))\n#5 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php(588): OC\\Files\\Storage\\Wrapper\\Wrapper->acquireLock(’’, 1, Object(OC\\Lock\\MemcacheLockingProvider))\n#6 \/var\/www\/owncloud\/lib\/private\/File\/View.php(1975): OC\\Files\\Storage\\Wrapper\\Wrapper->acquireLock(’’, 1, Object(OC\\Lock\\MemcacheLockingProvider))\n#7 \/var\/www\/owncloud\/lib\/private\/Files\/View.php(2078): OC\\Files\\View->lockPath(’\/fellinj’, 1, false)\n#8 \/var\/www\/owncloud\/lib\/private\/Files\/View.php(1361): OC\\Files\\View->lockFile(’\/fellinj’, 1)\n#9 \/var\/www\/owncloud\/lib\/private\/Files\/View.php(1408): OC\\Files\\View->getCacheEntry(Object(OCA\\Files_Trashbin\\Storage), ‘’, ‘\/fellinj’)\n#10 \/var\/www\/owncloud\/lib\/private\/Files\/Node\/Root.php(188): OC\\Files\\View->getFileInfo(’\/fellinj’)\n#11 \/var\/www\/owncloud\/lib\/private\/Files\/Node\/Root.php(361): OC\\Files\\Node\\Root->get(’\/fellinj’)\n#12 \/var\/www\/owncloud\/lib\/private\/Server.php(1029): OC\\Files\\Node\\Root->getUserFolder(‘fellinj’)\n#13 \/var\/www\/owncloud\/lib\/private\/User\/Session.php(445): OC\\Server->getUserFolder(‘fellinj’)\n#14 \/var\/www\/owncloud\/lib\/private\/User\/Session.php(533): OC\\User\\Session->prepareUserLogin(true)\n#15 \/var\/www\/owncloud\/lib\/private\/User\/Session.php(333): OC\\User\\Session->loginWithPassword(*** sensitive parameters replaced )\n#16 \/var\/www\/owncloud\/core\/Controller\/LoginController.php(203): OC\\User\\Session->login( sensitive parameters replaced )\n#17 \/var\/www\/owncloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(153): OC\\Core\\Controller\\LoginController->tryLogin( sensitive parameters replaced ***)\n#18 \/var\/www\/owncloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(85): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OC\\Core\\Controller\\LoginController), ‘tryLogin’)\n#19 \/var\/www\/owncloud\/lib\/private\/AppFramework\/App.php(100): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OC\\Core\\Controller\\LoginController), ‘tryLogin’)\n#20 \/var\/www\/owncloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php(46): OC\\AppFramework\\App::main(‘LoginController’, ‘tryLogin’, Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\n#21 \/var\/www\/owncloud\/lib\/private\/Route\/Router.php(342): OC\\AppFramework\\Routing\\RouteActionHandler->__invoke(Array)\n#22 \/var\/www\/owncloud\/lib\/base.php(909): OC\\Route\\Router->match(’\/login’)\n#23 \/var\/www\/owncloud\/index.php(54): OC::handleRequest()\n#24 {main}",“File”:"\/var\/www\/owncloud\/lib\/private\/Memcache\/Redis.php",“Line”:111}"}

Login with a user created before the use of redis still works.

Server configuration

Operating system:
Univention DC Master 4.3-3 (Debian)

Web server:
Apache/2.4.25 (Univention)

Database:
10.1.37-MariaDB-0+deb9u1

PHP version:
PHP 7.0.33-0+deb9u1

ownCloud version: (see ownCloud admin page)
10.0.10.4

Updated from an older ownCloud or fresh install:
fresh install

Where did you install ownCloud from:
Univention Appliance VMware ESX Image

Signing status (ownCloud 9.0 and above):

No errors have been found.

The content of config/config.php:

{
“system”: {
“apps_paths”: [
{
“path”: “/var/www/owncloud/apps”,
“url”: “/apps”,
“writable”: false
},
{
“path”: “/var/www/owncloud/custom”,
“url”: “/custom”,
“writable”: true
}
],
“trusted_domains”: [
“localhost”
],
“datadirectory”: “/var/lib/univention-appcenter/apps/owncloud/data /files”,
“dbtype”: “mysql”,
“dbhost”: “172.17.42.1”,
“dbname”: “owncloud”,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“dbtableprefix”: “oc_”,
“log_type”: “owncloud”,
“supportedDatabases”: [
“sqlite”,
“mysql”,
“pgsql”
],
“upgrade.disable-web”: true,
“default_language”: “de”,
“overwrite.cli.url”: “REMOVED SENSITIVE VALUE”,
“htaccess.RewriteBase”: “/owncloud”,
“logfile”: “/var/lib/univention-appcenter/apps/owncloud/data/file s/owncloud.log”,
“loglevel”: 2,
“memcache.local”: “\OC\Memcache\APCu”,
“filelocking.enabled”: true,
“memcache.locking”: “\OC\Memcache\Redis”,
“redis”: {
“host”: “localhost”,
“port”: 6379,
“timeout”: 0,
“password”: “REMOVED SENSITIVE VALUE
},
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“version”: “10.0.10.4”,
“logtimezone”: “Europe/Berlin”,
“installed”: true,
“instanceid”: “ocdr3494t3mn”,
“ldapIgnoreNamingRules”: false,
“log_rotate_size”: 104857600,
“onlyoffice”: {
“verify_peer_off”: true
},
“singleuser”: false
}
}

List of activated apps:
Enabled:

  • comments: 0.3.0
  • configreport: 0.1.1
  • dav: 0.4.0
  • encryption: 1.3.1
  • federatedfilesharing: 0.3.1
  • federation: 0.1.0
  • files: 1.5.1
  • files_external: 0.7.1
  • files_sharing: 0.11.0
  • files_trashbin: 0.9.1
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • market: 0.2.5
  • notifications: 0.3.5
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • updatenotification: 0.2.1
  • user_ldap: 0.11.0
    Disabled:
  • external
  • onlyoffice
  • richdocuments
  • user_external

Are you using external storage, if yes which one:
No, but a second partition ( /dev/sdb ) is mounted on /var/lib/univention-appcenter/apps/owncloud/data/files . This works fine.

Are you using encryption: yes/no
yes

Are you using an external user-backend, if yes which one: .
LDAP (The univention user-managament, not our real LDAP/AD)

But even with users created at the owncloud-frontend the same error occures.

LDAP configuration (delete this part if not used)

±------------------------------±---------------------------------------------- -----------------------------------+
| Configuration | s01 |
±------------------------------±---------------------------------------------- -----------------------------------+
| hasMemberOfFilterSupport | 1 |
| hasPagedResultSupport | |
| homeFolderNamingRule | |
| lastJpegPhotoLookup | 0 |
| ldapAgentName | |
| ldapAgentPassword | *** |
| ldapAttributesForGroupSearch | |
| ldapAttributesForUserSearch | |
| ldapBackupHost | |
| ldapBackupPort | |
| ldapBase | |
| ldapBaseGroups | |
| ldapBaseUsers | |
| ldapCacheTTL | 600 |
| ldapConfigurationActive | 1 |
| ldapDynamicGroupMemberURL | |
| ldapEmailAttribute | mailPrimaryAddress |
| ldapExperiencedAdmin | 0 |
| ldapExpertUUIDGroupAttr | gidNumber |
| ldapExpertUUIDUserAttr | uid |
| ldapExpertUsernameAttr | uid |
| ldapGroupDisplayName | cn |
| ldapGroupFilter | (&(objectclass=posixGroup)(ownCloudEnabled=1)) |
| ldapGroupFilterGroups | |
| ldapGroupFilterMode | 0 |
| ldapGroupFilterObjectclass | |
| ldapGroupMemberAssocAttr | memberUid |
| ldapHost | |
| ldapIgnoreNamingRules | |
| ldapLoginFilter | (&(objectclass=person)(ownCloudEnabled=1)(|(ui d=%uid)(mailPrimaryAddress=%uid))) |
| ldapLoginFilterAttributes | |
| ldapLoginFilterEmail | 0 |
| ldapLoginFilterMode | 0 |
| ldapLoginFilterUsername | 1 |
| ldapNestedGroups | 0 |
| ldapOverrideMainServer | |
| ldapPagingSize | 500 |
| ldapPort | 7389 |
| ldapQuotaAttribute | ownCloudQuota |
| ldapQuotaDefault | |
| ldapTLS | 0 |
| ldapUserDisplayName | displayName |
| ldapUserDisplayName2 | |
| ldapUserFilter | (&(objectclass=person)(ownCloudEnabled=1)) |
| ldapUserFilterGroups | |
| ldapUserFilterMode | 0 |
| ldapUserFilterObjectclass | |
| ldapUuidGroupAttribute | auto |
| ldapUuidUserAttribute | auto |
| turnOffCertCheck | 0 |
| useMemberOfToDetectMembership | 0 |
±------------------------------±---------------------------------------------- -----------------------------------+

Client configuration

Browser:
Firefox 64.0.2 (64-Bit)
Operating system:

Logs

Web server error log

No errors logged.

ownCloud log (data/owncloud.log)

See “Actual Behaviour” above


I tried the unix-socket configuration in config.php but even that doesn’t work and leads to the same issue. I also added the www-data user to the redis-group but that had no impact.

Using Redis for both, Memory Cache and Transactional File-Locking doesn’t work either.

I’m really looking forward to hearing any suggestions or help.

Thank you very much!


#2

Please be patient as ownCloud is working on a out of the box redis solution that will be included in the next release.