Hello, When every I try to download something it starts and after it reaches like 2% it fails with the error below. Now I know this has something to do with Redis and file locking but I don’t know what.
Uncaught Error: Class ‘OCP\Lock\ILockingProvider’ not found in /srv/users/serverpilot/apps/nextcloud/public/lib/private/files/view.php:1129 Stack trace: #0 [internal function]: OC\Files\View->OC\Files{closure}() #1 /srv/users/serverpilot/apps/nextcloud/public/3rdparty/icewind/streams/src/CallbackWrapper.php(109): call_user_func(Object(Closure)) #2 [internal function]: Icewind\Streams\CallbackWrapper->stream_close() #3 {main} thrown at /srv/users/serverpilot/apps/nextcloud/public/lib/private/files/view.php#1129
A little about my server… I am on ubuntu 16.04 and user serverpilot for management. Serverpilot installs mysql 5.7 with apache and nginx along with php7. Now I followed serverpilots directions to install Redis see below for the links for redis server and redis extention
[07-Nov-2016 07:14:17] WARNING: [pool hidden.org] child 20876 said into stderr: “NOTICE: PHP message: PHP Warning: spl_autoload(): open_basedir restriction in effect. File(ocp/lock/ilockingprovider.inc) is not within the allowed path(s): (/var/www/vhosts/hidden.org/:/tmp/:/dev/urandom:/var/run/redis:/home/timbackup) in /var/www/vhosts/hidden.org/owncloud.hidden.org/lib/private/Files/View.php on line 1152”
[07-Nov-2016 07:14:17] WARNING: [pool hidden.org] child 20876 said into stderr: “NOTICE: PHP message: PHP Warning: spl_autoload(): open_basedir restriction in effect. File(ocp/lock/ilockingprovider.php) is not within the allowed path(s): (/var/www/vhosts/hidden.org/:/tmp/:/dev/urandom:/var/run/redis:/home/timbackup) in /var/www/vhosts/hidden.org/owncloud.hidden.org/lib/private/Files/View.php on line 1152”
[07-Nov-2016 07:14:17] WARNING: [pool hidden.org] child 20876 said into stderr: “NOTICE: PHP message: PHP Fatal error: Uncaught Error: Class ‘OCP\Lock\ILockingProvider’ not found in /var/www/vhosts/hidden.org/owncloud.hidden.org/lib/private/Files/View.php:1152”
[07-Nov-2016 07:14:17] WARNING: [pool hidden.org] child 20876 said into stderr: “Stack trace:”
[07-Nov-2016 07:14:17] WARNING: [pool hidden.org] child 20876 said into stderr: “#0 [internal function]: OC\Files\View->OC\Files{closure}()”
[07-Nov-2016 07:14:17] WARNING: [pool hidden.org] child 20876 said into stderr: “#1 /var/www/vhosts/hidden.org/owncloud.hidden.org/3rdparty/icewind/streams/src/CallbackWrapper.php(109): call_user_func(Object(Closure))”
[07-Nov-2016 07:14:17] WARNING: [pool hidden.org] child 20876 said into stderr: “#2 [internal function]: Icewind\Streams\CallbackWrapper->stream_close()”
[07-Nov-2016 07:14:17] WARNING: [pool hidden.org] child 20876 said into stderr: “#3 {main}”
[07-Nov-2016 07:14:17] WARNING: [pool hidden.org] child 20876 said into stderr: " thrown in /var/www/vhosts/hidden.org/owncloud.hidden.org/lib/private/Files/View.php on line 1152"
I have a similar config to @shoutcast, except Ubuntu 14.04 (on a HostEurope VPS). And using Redis for the file locking.
What gets my goat is the message about open_basedir, that is completely bananas. The open_basedir as quoted in the message is correct, and the Nextcloud installation passes the integrity check. It’s a Plesk-managed host, and PHP-FPM is running (called directly by Nginx) with the owner ID of the NC files. So there REALLY should be no problem there. Of course the class will be missing if the files could not be loaded - the problem seems to me to be the open-basedir problem preceeding the “class not found”.
No takers? I’m STILL getting this error in the logs intermittently.
I think it may pay to look at the preceeding error before the fatal one:
[07-Nov-2016 07:14:17] WARNING: [pool hidden.org] child 20876 said into stderr: “NOTICE: PHP message: PHP Warning: spl_autoload(): open_basedir restriction in effect. File(ocp/lock/ilockingprovider.php) is not within the allowed path(s): (/var/www/vhosts/hidden.org/:/tmp/:/dev/urandom:/var/run/redis:/home/timbackup) in /var/www/vhosts/hidden.org/owncloud.hidden.org/lib/private/Files/View.php on line 1152”
Note that the complaint is about “ocp/lock/ilockingprovider.php” not being in open_basedir. So it looks like somewhere, the prefix to NC is getting lost.
Just disable your open_basedir() restrictions. If you have problems, disable such modules if the software itself is working and then you can slowly activate them and you have to adapt the settings to the used setup.
Edit: I dont understand why this is the problem… it happens randomly on some files… if i had configured something wrong, should it not always occur?
Edit2: It happens sometimes on shared files (/s/RANDOMSTRING/…) and sometimes if i check the serverinfo with nagios (/ocs/v2.php/apps/serverinfo/api/v1/info)
In your case, it’s probably better to open a bug report on github.com/nextcloud/server/issues providing all details specified in the template. Make sure to run a current version of NC 10, 11 or 12. For NC 12 it might be worth waiting a few days until 12.0.1 is released.