Cannot files:scan a user

Steps to reproduce

  1. occ files:scan
  2. See below

Expected behaviour

Scan should complete (other users do)

Actual behaviour

Exception during scan: OCP\Lock\LockedException: “files/d3b3c70bb8e60ec358fb71d0995e8ca5” is locked
#0 /srv/www/htdocs/owncloud/lib/private/Files/Storage/Common.php(657): OC\Lock\DBLockingProvider->acquireLock(‘files/d3b3c70bb…’, 2)
#1 /srv/www/htdocs/owncloud/lib/private/Files/Storage/Wrapper/Wrapper.php(588): OC\Files\Storage\Common->acquireLock(‘scanner::’, 2, Object(OC\Lock\DBLockingProvider))
#2 /srv/www/htdocs/owncloud/lib/private/Files/Storage/Wrapper/Wrapper.php(588): OC\Files\Storage\Wrapper\Wrapper->acquir
eLock(‘scanner::’, 2, Object(OC\Lock\DBLockingProvider))

Server configuration

Operating system:

OpenSuSE 15, recently upgrade with reinstall

Web server:

Apache 2.4.33-lp150.2.3.1

Database:

MariaDB 10.2.15-lp150.2.3.2

PHP version:

PHP 7.2.5

ownCloud version: (see ownCloud admin page)

ownCloud 10.0.10 (stable)

Updated from an older ownCloud or fresh install:

Updated from old version; had to enable files_sharing manually; successful files:scan on other users, but not this one.

Where did you install ownCloud from:

OpenSuSE Repos

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.


Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- core
	- EXTRA_FILE
		- 0

Raw output
==========
Array
(
    [core] => Array
        (
            [EXTRA_FILE] => Array
                (
                    [0] => Array
                        (
                            [expected] => 
                            [current] => 39bbf1630e0dc9384cecec1fafc029b4ca7bf65848054eb8fdacaa5b04d2259a5ecb400f4d4166d630a320966523e60e5a6042b24656891425b4f731038d6986
                        )

                )

        )

)

**The content of config/config.php:**

The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
{
    "system": {
        "instanceid": "ocv9r6b3bpn5",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "oc.domain.nez"
        ],
        "datadirectory": "\/u\/owncloud\/data",
        "overwrite.cli.url": "https:\/\/oc.domain.netz",
        "dbtype": "mysql",
        "version": "10.0.10.4",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "forcessl": true,
        "forceSSLforSubdomains": true,
        "theme": "",
        "maintenance": false,
        "loglevel": 0,
        "updatechecker": false,
        "trashbin_retention_obligation": "auto",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "sendmail"
    }
}

**List of activated apps:**

Just the basics

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.

Enabled:
  - dav: 0.4.0
  - federatedfilesharing: 0.3.1
  - files: 1.5.1
  - files_clipboard: 0.7.1
  - files_external: 0.7.1
  - files_pdfviewer: 0.9.0
  - files_sharing: 0.11.0
  - files_videoplayer: 0.9.8
  - market: 0.2.5
Disabled:
  - comments
  - configreport
  - encryption
  - external
  - federation
  - files_trashbin
  - files_versions
  - firstrunwizard
  - notifications
  - provisioning_api
  - systemtags
  - updatenotification
  - user_external

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

No.

### Client configuration
**Browser:**

Firefox current.

**Operating system:**

OpenSuSE 15

### Logs
#### Web server error log

n/a

#### ownCloud log (data/owncloud.log)

Nothing pertinent.

#### Browser log

Nothing pertinent - command line error.

Hi,

do you have redis installed?

if not you should look at:

https://doc.owncloud.com/server/10.0/admin_manual/configuration/server/caching_configuration.html?highlight=file%20locking#redis

also this

1 Like

Bingo, … there were lots of files “locked”, … that appears to have been the problem.

Don’t really need Redis, … this is not a heavily loaded server; more concerned with upgradeability - prefer to track core repos.

Any thought on the weird file check result?

Thanks!
1 Like

Hey,

i think it could make sense to create a new thread about this question unrelated to the initial question about file scanning. But maybe the mentioned documentation in the message is already giving you some information on this?