-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
BadMethodCallException in scanner from cron #25506
Comments
ownCloud 9.1.0 RC2 |
I'll debug this later on my server. I have encryption enabled, in case it matters. |
|
A first glimpse seem to imply that it is impossible that we're not in "batch" mode: https://github.com/owncloud/core/blob/stable9.1/lib/private/Files/Utils/Scanner.php#L143 The So it is likely that maybe the 'backgroundScan` method itself already committed the batch before. |
I don't have any external storages, so I don't know why the cron background scanner is scanning anything at all This is oc_storages:
Apart from some suspicious "shared::" entries, it looks fine. (#24106). I don't have any federated shares (fed sharing is disabled completely). Let's add a few log statements... |
Ok, I added some logging and every time I run cron it tries to scan one of the bogus "shared::" entries. These storages are completely empty and have no matching filecache entries, but it doesn't explain why it throws that exception. |
Ok, the bogus storages bug is fixed in 9.1.0RC2, however I still have entries from older versions. This
When calling |
Okay, found it: if you look closely at https://github.com/owncloud/core/blob/stable9.1/lib/private/Files/Utils/Scanner.php#L143 You can see that for both calls it calls The Shared storage's Two solutions:
|
Steps to reproduce:
|
PR here #25509 |
This was observed also by giacomo1989 on IRC when running a file:scan. Same steps as #24106 but run "occ files:scan --all" instead of cron.
Raising severity as occ files:scan is used as workaround for many problems. |
Similar story here on 9.1.0.15 when running php console.php files:scan --all:
I also get some "Home storage for user TestUser not writable" errors which make no sense - I made sure all files in OwnCloud data dir get www-data:www-data set as owner recursively. |
After applying the pull request, the "Exception while scanning: Not in batch" exception disappears. But at the end of scanning with
I get
The message is incorrect. "occ" runs as user www-data and data/username123 and the sub directories are writable by www-data. |
same issue :( |
same issue :-( php occ files:scan terezka.smekalova +---------+-------+--------------+ |
I am also affected. |
Same issue on three owncloud instances: Debian 7.11 php7.0
Shared Hoster Ubuntu 14.04.4 LTS php7.0 CGI
|
Also had this issue, went back to 9.0.2 restoring a backup, now it seems to work |
Same here Ubuntu 16.04.1 LTS, Apache/2.4.18, PHP 7.0.8-0ubuntu0.16.04.2
sudo -u www-data php /var/www/owncloud/occ files:scan user1 Starting scan for user 1 out of 1 (user1) #0 /var/www/owncloud/lib/private/Files/Utils/Scanner.php(199): OC\Files\Cache\Propagator->commitBatch() Also for some other user i get sudo -u www-data php /var/www/owncloud/occ files:scan user2 Permissions are the same, is there any lock in the database possibly doing this? |
What about database, when downgrading. On 3 Aug 2016, anduz notifications@github.com wrote:
|
The same error using CentOS 7 with the default php installation. |
This looks similar to #25611 |
Kontaxis: |
For all of you having "BadMethodCallException", can you try with #25509 ? Regarding the "home storage not writable" it is likely a separate issue, but it would be good to see if anyone else is getting it too after applying the patch. Thanks! |
@PVince81 What is the min requirement for this pr? If i add the two files i get only an internal server error. root@uplink:/var/www/owncloud# sudo -u www-data php occ -V |
@schnello You should only make the changes mentioned. If you swap the whole files than you're mixing versions (9.1.0 vs. master). That's likely causing the internal server error For me, the fix has the desired effect. Thx |
Thanks for this hint. I try to add only the changes. Edit:
Can confirm. I have now the same "error" message |
Thanks for the feedback. @schnello please raise a separate ticket about "home storage not writable" if you're sure that the permissions are already correct. |
How i can repair my owncloud: $OC_Version = array(9,1,0,15); |
Hello @again002 Two ways:
2). You can try my patched files (9.1.0.15). Please dont forget to make a copy of your original files: |
Or you can download the PR directly as patch by appending ".patch": https://github.com/owncloud/core/pull/25751.patch |
patch is working for me, |
Yes, patch is working. |
Yes, working for me as well. sudo -u apache php occ files:scan --all No permissions where changed. and all files are owner by apache and are 755. |
works.Thanks. |
Have the same issue and the Patch is working, thanks. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Steps
Running cron on my system, reproducible always.
Logs
Versions
ownCloud 9.1.0 RC2
@owncloud/filesystem
The text was updated successfully, but these errors were encountered: