Occ files:scan --all not working

Basically, I’m trying to bring the data over piece meal through rsync, however, in a few test runs I can’t get the data to recognize after running the sudo -u apache php70 occ files:scan --all command. I verified that Apache owns the data, just like the rest of everything else under the root directory public_html. Nothing is showing up in Nextcloud, though and there are no errors at all. Any ideas?

What’s the error message?

No error message at all. It runs for about five minutes and it seems like it works just fine. That’s the vexing thing about it.

it should give you some sort of a summary. It does output something usually.

Thanks for that info. I’m definitely not getting any output after the command is run. It just runs for a while then back to the command prompt.

https://nextcloud.sesp.northwestern.edu/index.php/s/lLzAWgwXC72ivtP

The end of the error.log file:

[Wed Jan 25 13:55:32.679306 2017] [:error] [pid 65011] [client 10.105.114.222:63219] PHP Fatal error: Uncaught Error: Access to undeclared static property: OC\Files\Filesystem::$normalizedPathCache in /home/nextcloud/public_html/lib/private/Files/Filesystem.php:806\nStack trace:\n#0 /home/nextcloud/public_html/lib/private/Files/View.php(2018): OC\Files\Filesystem::normalizePath(’/svr267/files/T…’)\n#1 /home/nextcloud/public_html/lib/private/Files/View.php(1156): OC\Files\View->unlockFile(’/Tinkering Proj…’, 1)\n#2 [internal function]: OC\Files\View->OC\Files\{closure}()\n#3 /home/nextcloud/public_html/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php(109): call_user_func(Object(Closure))\n#4 [internal function]: Icewind\Streams\CallbackWrapper->stream_close()\n#5 {main}\n thrown in /home/nextcloud/public_html/lib/private/Files/Filesystem.php on line 806
[Thu Jan 26 19:27:23.091940 2017] [:error] [pid 51575] [client 133.130.54.151:56680] PHP Fatal error: Uncaught Error: Access to undeclared static property: OC\Files\Filesystem::$normalizedPathCache in /home/nextcloud/public_html/lib/private/Files/Filesystem.php:806\nStack trace:\n#0 /home/nextcloud/public_html/lib/private/Files/View.php(2018): OC\Files\Filesystem::normalizePath(’/rtn361/files/D…’)\n#1 /home/nextcloud/public_html/lib/private/Files/View.php(1156): OC\Files\View->unlockFile(’/Documents/Scre…’, 1)\n#2 [internal function]: OC\Files\View->OC\Files\{closure}()\n#3 /home/nextcloud/public_html/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php(109): call_user_func(Object(Closure))\n#4 [internal function]: Icewind\Streams\CallbackWrapper->stream_close()\n#5 {main}\n thrown in /home/nextcloud/public_html/lib/private/Files/Filesystem.php on line 806

There is a bug report for these errors:

There are already fixes out there (linked in the issue) and these fixes are currently backported for NC 11. They will be in the next 11.0.2 release (you can of course apply them manually before once they are done). How to apply patches: http://blog.jospoortvliet.com/2016/01/patching-owncloud-get-your-fix-now.html
Just in case you want to use patches, make sure you have a backup (better is to run in on a test setup before). Use the bugtracker for any form of feedback (in an early stage you can say that it works for you, later just complain if you are still seeing issues).

Thank you! So this error is related to files:scan not working?

The issues itself are a bit different, but the error seems to be at the same point in the code. So it’s not unlikely, perhaps there are more errors. It seems to be a bit complicated, you need at least two fixes:



or more precisely their backport to NC 11. Perhaps this as well: https://github.com/nextcloud/3rdparty/pull/33

If you want to test it, wait until there are the backports (they should be linked at the end of the above pull requests) and if you are not sure what to apply, please ask in the pull requests. Mention that you have a similar error and you want to test the patch.

It it is less urgent for you, you can wait for the NC 11.0.2 release (no date fixed yet, I wouldn’t expect it before end of February).

I’ll definitely give those fixes a whirl. Right now this is inhibiting us from fully moving off of ownCloud and onto Nextcloud. I need to get those files migrated over!

Thanks again for your help. You’re the best. :slight_smile:

Tried rerunning the command after the upgrade to Nextcloud 12 and received this error:

sudo -u apache php71 occ files:scan --all
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /home/nextcloud/public_html/lib/private/Cache/CappedMemoryCache.php on line 69
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0