0

I have a Rpi 3b+ on raspbian setup on sqlite and nextcloud.

I run the below command:

sudo -u www-data php /var/www/html/nextcloud/occ files:scan --all

get the below output:

Starting scan for user 1 out of 1 (pi)
Exception during scan: "files/188f1ba3ad89878fcf6e89bb6dfa8f6e" is locked
#0 /var/www/html/nextcloud/lib/private/Files/Storage/Common.php(709): OC\Lock\DBLockingProvider->acquireLock('files/188f1ba3a...', 2)
#1 /var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(592): OC\Files\Storage\Common->acquireLock('scanner::', 2, Object(OC\Lock\DBLockingProvider))
#2 /var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php(331): OC\Files\Storage\Wrapper\Wrapper->acquireLock('scanner::', 2, Object(OC\Lock\DBLockingProvider))
#3 /var/www/html/nextcloud/lib/private/Files/Utils/Scanner.php(244): OC\Files\Cache\Scanner->scan('', true, 3)
#4 /var/www/html/nextcloud/apps/files/lib/Command/Scan.php(161): OC\Files\Utils\Scanner->scan('/pi')
#5 /var/www/html/nextcloud/apps/files/lib/Command/Scan.php(234): OCA\Files\Command\Scan->scanFiles('pi', '/pi', false, Object(Symfony\Component\Console\Output\ConsoleOutput), false)
#6 /var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php(264): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/html/nextcloud/core/Command/Base.php(161): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(874): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(228): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/html/nextcloud/lib/private/Console/Application.php(173): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/html/nextcloud/console.php(90): OC\Console\Application->run()
#13 /var/www/html/nextcloud/occ(11): require_once('/var/www/html/n...')
#14 {main}

+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 0       | 0     | 00:00:00     |
+---------+-------+--------------+

I tried to do the below link:

https://help.nextcloud.com/t/file-is-locked-how-to-unlock/1883

wasn't really of much help since I'm on sqlite. can somebody please help me & guide me here as to what's happening?

yes it started since an unexpected "freeze" of my pi and I had to pull the plug.

TIA

Additional Info:

  • The pi has Transmission running on background downloading "files" :P
  • three jobs run upon startup - one to startup ngrok
  • one loop with the below command running every 5 mins:
    sudo chmod 777 /location/to/data/data -R
  • one loop with the below command running every 5 mins:
    sudo -u www-data php /var/www/html/nextcloud/occ files:scan --all -v

the reason? I need to be able to "see" & "action" the files in nextcloud web interface that I paste from the server and not using the web interface. because the files will be download by torrent to be made available in the nextcloud web interface.

Torrent Client : Transmission

all users are added to all groups (if you think I missed something here, pls let me know)

the permissions are set so because I have OSMC also as an optional OS that I use to watch movies and all.

  • Ok, I think I fixed it somehow, I had created a user "test" with a password and gave it to my friends to test the new server. they added & deleted files. I am guessing it's because of that. now that I added the user back, I'm not having the error anymore. gotta investigate further. – TheTourer May 14 '18 at 19:24
0

Yes, I had deleted one user. adding the user back has solved the error. now I'll have to figure out a "safe" way to delete the user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.