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

occ files:scan => Exception while scanning #3763

Closed
michel-thomas opened this issue Mar 8, 2017 · 3 comments
Closed

occ files:scan => Exception while scanning #3763

michel-thomas opened this issue Mar 8, 2017 · 3 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap feature: filesystem

Comments

@michel-thomas
Copy link

Hello,
I had some problem with owncloud about "ghost directories" (#26837 and #23151) so I finally decide to migrate to nextcloud 11.0.2.
To be sure no problem remains, I ran occ files:scan and get this error : Exception while scanning: "files/f94353eb825ed5026c669b7b18aa36a8" is locked

Steps to reproduce

I don't have steps to reproduce.

Actual behaviour

Command sudo -u www-data ./occ files:scan --path="/myuser" produce an error.

Server configuration

Operating system: Debian Wheezy up to date
Web server: Apache 2.2.22-13+deb7u7
Database: MySQL 5.5.46-0+deb7u1
PHP version: PHP 5.6.29-1~dotdeb+7.1
Nextcloud version: 11.0.2
Updated from an older Nextcloud/ownCloud or fresh install: oc9.1.1 -> oc9.1.4 -> nc10.0.4 -> nc11.0.2
Where did you install Nextcloud from: tar.gz
Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
# sudo -u www-data ./occ app:list
Enabled:
  - activity: 2.4.1
  - calendar: 1.5.1
  - comments: 1.1.0
  - contacts: 1.5.3
  - dav: 1.1.1
  - direct_menu: 0.10.0
  - external: 1.2
  - federatedfilesharing: 1.1.1
  - federation: 1.1.1
  - files: 1.6.1
  - files_pdfviewer: 1.0.1
  - files_sharing: 1.1.1
  - files_texteditor: 2.2
  - files_trashbin: 1.1.0
  - files_versions: 1.4.0
  - firstrunwizard: 2.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.0.0
  - notifications: 1.0.1
  - password_policy: 1.1.0
  - provisioning_api: 1.1.0
  - serverinfo: 1.1.1
  - sharebymail: 1.0.1
  - survey_client: 0.1.5
  - systemtags: 1.1.3
  - tasks: 0.9.5
  - templateeditor: 0.2
  - theming: 1.1.1
  - twofactor_backupcodes: 1.0.0
  - updatenotification: 1.1.1
  - workflowengine: 1.1.1
Disabled:
  - admin_audit
  - encryption
  - files_accesscontrol
  - files_automatedtagging
  - files_external
  - files_retention
  - files_videoplayer
  - gallery
  - nextcloud_announcements
  - user_external
  - user_ldap
  - user_saml

The content of config/config.php:

Config report
# sudo -u www-data ./occ config:list system
{
    "system": {
        "instanceid": "occs60snv57y",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "my.domain.com"
        ],
        "datadirectory": "\/workdir\/my.domain.com\/data",
        "overwrite.cli.url": "https:\/\/my.domain.com",
        "dbtype": "mysql",
        "dbhost": "localhost",
        "dbname": "dbname",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "version": "11.0.2.7",
        "installed": true,
        "theme": "",
        "loglevel": 2,
        "maintenance": false,
        "trashbin_retention_obligation": "auto",
        "default_language": "fr",
        "logfile": "\/workdir\/logs\/owncloud\/my.domain.com.log",
        "logtimezone": "Europe\/Berlin",
        "log_rotate_size": "20971520",
        "minimum.supported.desktop.version": "1.7.0",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "updatechecker": true,
        "appstoreenabled": true,
        "appstore.experimental.enabled": true
    }
}

Are you using external storage, if yes which one: Federated
Are you using encryption: no

Logs

Web server error log

Web server error log
# sudo -u www-data ./occ files:scan --path="/myuser"
Starting scan for user 1 out of 1 (myuser)
Exception while scanning: "files/f94353eb825ed5026c669b7b18aa36a8" is locked
#0 /workdir/my.domain.com/www/lib/private/Files/Storage/Common.php(680): OC\Lock\DBLockingProvider->acquireLock('files/f94353eb8...', 1)
#1 /workdir/my.domain.com/www/lib/private/Files/Storage/Wrapper/Wrapper.php(588): OC\Files\Storage\Common->acquireLock('files/Equipe/Co...', 1, Object(OC\Lock\DBLockingProvider))
#2 /workdir/my.domain.com/www/lib/private/Files/Storage/Wrapper/Wrapper.php(588): OC\Files\Storage\Wrapper\Wrapper->acquireLock('files/Equipe/Co...', 1, Object(OC\Lock\DBLockingProvider))
#3 /workdir/my.domain.com/www/lib/private/Files/Storage/Wrapper/Wrapper.php(588): OC\Files\Storage\Wrapper\Wrapper->acquireLock('files/Equipe/Co...', 1, Object(OC\Lock\DBLockingProvider))
#4 /workdir/my.domain.com/www/apps/files_sharing/lib/SharedStorage.php(395): OC\Files\Storage\Wrapper\Wrapper->acquireLock('files/Equipe/Co...', 1, Object(OC\Lock\DBLockingProvider))
#5 /workdir/my.domain.com/www/lib/private/Files/Storage/Wrapper/Wrapper.php(588): OCA\Files_Sharing\SharedStorage->acquireLock('Cooperer pour E...', 1, Object(OC\Lock\DBLockingProvider))
#6 /workdir/my.domain.com/www/lib/private/Files/Cache/Scanner.php(148): OC\Files\Storage\Wrapper\Wrapper->acquireLock('Cooperer pour E...', 1, Object(OC\Lock\DBLockingProvider))
#7 /workdir/my.domain.com/www/apps/files_sharing/lib/Scanner.php(78): OC\Files\Cache\Scanner->scanFile('Cooperer pour E...', 3, '48341', NULL, true)
#8 /workdir/my.domain.com/www/lib/private/Files/Cache/Scanner.php(420): OCA\Files_Sharing\Scanner->scanFile('Cooperer pour E...', 3, '48341', NULL, true)
#9 /workdir/my.domain.com/www/lib/private/Files/Cache/Scanner.php(388): OC\Files\Cache\Scanner->handleChildren('', true, 3, '48341', true, 0)
#10 /workdir/my.domain.com/www/lib/private/Files/Cache/Scanner.php(322): OC\Files\Cache\Scanner->scanChildren('', true, 3, 48341, true)
#11 /workdir/my.domain.com/www/lib/private/Files/Utils/Scanner.php(196): OC\Files\Cache\Scanner->scan('', true, 3)
#12 /workdir/my.domain.com/www/apps/files/lib/Command/Scan.php(159): OC\Files\Utils\Scanner->scan('/myuser')
#13 /workdir/my.domain.com/www/apps/files/lib/Command/Scan.php(227): OCA\Files\Command\Scan->scanFiles('myuser', '/myuser', false, Object(Symfony\Component\Console\Output\ConsoleOutput), false)
#14 /workdir/my.domain.com/www/3rdparty/symfony/console/Command/Command.php(256): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /workdir/my.domain.com/www/core/Command/Base.php(161): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /workdir/my.domain.com/www/3rdparty/symfony/console/Application.php(818): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /workdir/my.domain.com/www/3rdparty/symfony/console/Application.php(186): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /workdir/my.domain.com/www/3rdparty/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /workdir/my.domain.com/www/lib/private/Console/Application.php(169): Symfony\Component\Console\Application->run(NULL, NULL)
#20 /workdir/my.domain.com/www/console.php(90): OC\Console\Application->run()
#21 /workdir/my.domain.com/www/occ(11): require_once('/workdir/my.domain....')
#22 {main}

+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 3       | 7     | 00:01:06     |
+---------+-------+--------------+

Nextcloud log (data/nextcloud.log)

Not sure this log is related, but I have this about Federated share that does not work anymore.

Nextcloud log
{"reqId":"iGUdzyADp5I8rF1DUxw9","remoteAddr":"109.190.199.43","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Storage is temporarily not available\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(939): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->getNodeForPath('DOSSIER PARTAGE...')\\n#1 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(336): Sabre\\\\DAV\\\\Server->getPropertiesForPath('DOSSIER PARTAGE...', Array, 1)\\n#2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPropFind(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:PROPFIND', Array)\\n#5 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/workdir\\\/my.domain.com\\\/www\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(60): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/workdir\\\/my.domain.com\\\/www\\\/remote.php(165): require_once('\\\/workdir\\\/my.domain.....')\\n#8 {main}\",\"File\":\"\\\/workdir\\\/my.domain.com\\\/www\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/ObjectTree.php\",\"Line\":162,\"User\":\"myuser\"}","level":4,"time":"2017-03-08T08:41:37+01:00","method":"PROPFIND","url":"\/remote.php\/webdav\/DOSSIER%20PARTAGE%20CPE","user":"myuser","version":"11.0.2.7"}
@MorrisJobke
Copy link
Member

cc @icewind1991

@MorrisJobke MorrisJobke added 0. Needs triage Pending check for reproducibility or if it fits our roadmap feature: filesystem labels Mar 8, 2017
@michel-thomas
Copy link
Author

Hello,
do you need more info to analyse? anything I can do to help resolving the issue?
BR

@michel-thomas
Copy link
Author

Hello,
I finally abandon waiting for #3766 fixing, and now occ files:scan is working.
Maybe this is linked... or not. Whatever, I close this issue.
Thanks for looking at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap feature: filesystem
Projects
None yet
Development

No branches or pull requests

2 participants