Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server status shows file locking disabled even though it's enabled in config.php #16696

Closed
jnfrmarks opened this issue Jun 2, 2015 · 17 comments · Fixed by #16832
Closed

Server status shows file locking disabled even though it's enabled in config.php #16696

jnfrmarks opened this issue Jun 2, 2015 · 17 comments · Fixed by #16832
Assignees
Milestone

Comments

@jnfrmarks
Copy link

Steps to reproduce

  1. Install 8.1
  2. Enable and configure file locking in config.php

Expected behaviour

Server status on admin page shows that Experimental file lock is enabled

Actual behaviour

Server status on admin page shows that Experimental file lock is NOT enabled

Scrubbed config.php:

<?php
$CONFIG = array (
  'supportedDatabases' =>
  array (
    0 => 'mysql',
    1 => 'pgsql',
    2 => 'oci',
    3 => 'mssql',
  ),
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'x.x.x.x',
  ),
  'datadirectory' => '/var/www/html/owncloud/data',
  'overwrite.cli.url' => 'http://localhost',
  0 => 'x.x.x.x',
  'dbtype' => 'mysql',
  'version' => '8.1.0.6',
  'dbname' => 'owncloud',
  'dbhost' => 'x.x.x.x',
  'dbtableprefix' => '',
  'dbuser' => 'oc_at_admin',
  'dbpassword' => '',
  'logtimezone' => 'UTC',
  'installed' => true,
  'instanceid' => '',
  'license-key' => '',
  'filelocking.enabled' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '127.0.0.1',
    'port' => 6379,
    'timeout' => 0,
    'dbindex' => 0,
  ),
  'loglevel' => 0,
  'ldapIgnoreNamingRules' => false,
);


p353

Server 1 Host info:

Ubuntu 14.04
PHP 5.5.9

Server configuration:

ownCloud Enterprise Edition 8.1 beta 2 (daily) Build:2015-06-02T03:08:51+00:00 1acdef5

@jnfrmarks jnfrmarks added this to the 8.1-current milestone Jun 2, 2015
@jnfrmarks
Copy link
Author

Of course, this could be because I didn't configure things correctly :)

@LukasReschke
Copy link
Member

cc @icewind1991

@PVince81
Copy link
Contributor

PVince81 commented Jun 3, 2015

Ah cool, I didn't know this was already implemented

@PVince81
Copy link
Contributor

PVince81 commented Jun 3, 2015

Getting the same issue... it seems locking doesn't enable like it did when I tested.

Debugging now

@PVince81
Copy link
Contributor

PVince81 commented Jun 3, 2015

@jnfrmarks I think I forgot to tell you that you also need to enable the PHP redis module:
extension=redis.so

After enabling that module and restarting Apache, the status page now tells me that locking is enabled.

@PVince81
Copy link
Contributor

PVince81 commented Jun 3, 2015

Pinged @carlaschroder here about adding this detail owncloud-archive/documentation#1182 (comment)

@PVince81 PVince81 closed this as completed Jun 3, 2015
@PVince81
Copy link
Contributor

PVince81 commented Jun 3, 2015

Reopening: there is actually another issue: if the PHP module is enabled but "memcache.locking" is not set, it will still show "enabled" which is wrong.

@PVince81 PVince81 reopened this Jun 3, 2015
@PVince81 PVince81 self-assigned this Jun 3, 2015
@PVince81
Copy link
Contributor

PVince81 commented Jun 3, 2015

We should change this display to only show "enabled" when all of them apply:

  • "filelocking.enabled" is true
  • "memcache.locking" is set to redis
  • the redis server is running

@jnfrmarks
Copy link
Author

Can we also add some type of warning if some but not all are set?

Do we want to also check that the redis extension has been enabled in PHP?

@PVince81
Copy link
Contributor

PVince81 commented Jun 3, 2015

Yeah, makes sense.

  • add warnings about what's wrong with the config when locking is enabled

@PVince81
Copy link
Contributor

PVince81 commented Jun 3, 2015

  • add warning about missing redis PHP module

@jnfrmarks
Copy link
Author

I need some more help.

I added the extension to my php.ini file in /etc/php5/apache2/php.ini and restarted apache.

I'm getting this error in the server log file:


{"reqId":"NePUj4+KHfGHWfGKf36F","remoteAddr":"172.18.0.165","app":"PHP","message":"PHP Startup: Unable to load dynamic library '\/usr\/lib\/php5\/20121212\/redis.so' - \/usr\/lib\/php5\/20121212\/redis.so: cannot open shared object file: No such file or directory at Unknown#0","level":3,"time":"2015-06-04T16:54:30+00:00","method":"POST","url":"\/owncloud\/index.php\/heartbeat"}

My redis version is 2.8.4
Running locate *redis* does not return a redis.so file
I installed redis via apt-get

@jnfrmarks
Copy link
Author

A little more googling led me to the path that I need to install the php redis module.

@DeepDiver1975
Copy link
Member

I need some more help.

I added the extension to my php.ini file in /etc/php5/apache2/php.ini and restarted apache.

I'm getting this error in the server log file:

{"reqId":"NePUj4+KHfGHWfGKf36F","remoteAddr":"172.18.0.165","app":"PHP","message":"PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/redis.so' - /usr/lib/php5/20121212/redis.so: cannot open shared object file: No such file or directory at Unknown#0","level":3,"time":"2015-06-04T16:54:30+00:00","method":"POST","url":"/owncloud/index.php/heartbeat"}

My redis version is 2.8.4
Running locate redis does not return a redis.so file
I installed redis via apt-get

@jnfrmarks on a decent debain based system there should be no need to manually enable the redis extension in the php.ini

@DeepDiver1975
Copy link
Member

We should change this display to only show "enabled" when all of them apply:

I have a slightly different view on this:

We shall display that file locking is enabled only if it really is enabled.
We shall only enable file locking if all necessary criteria apply.
Criteria are as described above

@PVince81
Copy link
Contributor

PVince81 commented Jun 9, 2015

If as discussed in #16809 we agree on failing hard if filelocking cannot be enabled due to missing settings, then we can also get rid of the "server status" section in the admin page.

@PVince81
Copy link
Contributor

PVince81 commented Jun 9, 2015

PR here for failing hard: #16832
In the case redis went away the app is still usable, but any file operation will fail with "redis went away".

@lock lock bot locked as resolved and limited conversation to collaborators Aug 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants