mardi 16 août 2016

Laravel cache permission issue

I have a back-end server which is written using Laravel. Recently I started getting the following error (I show the full traceback):

#0 /var/app/current/bootstrap/cache/compiled.php(7547): Illuminate\Routing\RouteCollection->match(Object(Illuminate\Http\Request))
#1 /var/app/current/bootstrap/cache/compiled.php(7512): Illuminate\Routing\Router->findRoute(Object(Illuminate\Http\Request))
#2 /var/app/current/bootstrap/cache/compiled.php(7504): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#3 /var/app/current/bootstrap/cache/compiled.php(2310): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#4 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#5 /var/app/current/bootstrap/cache/compiled.php(9642): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#6 /var/app/current/app/Http/Middleware/DecryptRequest.php(32): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#7 [internal function]: Garagesocial\Http\Middleware\DecryptRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#8 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#9 /var/app/current/app/Http/Middleware/ValidProxies.php(20): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#10 [internal function]: Garagesocial\Http\Middleware\ValidProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#11 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#12 /var/app/current/vendor/lucadegasperi/oauth2-server-laravel/src/Middleware/OAuthExceptionHandlerMiddleware.php(36): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#13 [internal function]: LucaDegasperi\OAuth2Server\Middleware\OAuthExceptionHandlerMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#14 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#15 /var/app/current/app/Http/Middleware/SplAutoLoader.php(20): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#16 [internal function]: Garagesocial\Http\Middleware\SplAutoLoader->handle(Object(Illuminate\Http\Request), Object(Closure))
#17 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#18 /var/app/current/bootstrap/cache/compiled.php(12993): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#19 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#20 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#21 /var/app/current/bootstrap/cache/compiled.php(11585): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#22 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#23 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#24 /var/app/current/bootstrap/cache/compiled.php(12730): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#25 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#26 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#27 /var/app/current/bootstrap/cache/compiled.php(12667): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#28 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#29 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#30 /var/app/current/bootstrap/cache/compiled.php(2982): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#31 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#32 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#33 /var/app/current/app/Http/Middleware/OAuth.php(46): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#34 [internal function]: Garagesocial\Http\Middleware\OAuth->handle(Object(Illuminate\Http\Request), Object(Closure))
#35 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#36 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#37 /var/app/current/bootstrap/cache/compiled.php(9624): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#38 /var/app/current/bootstrap/cache/compiled.php(2257): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#39 /var/app/current/bootstrap/cache/compiled.php(2240): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#40 /var/app/current/public/index.php(65): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#41 {main} 

At first I assumed it was a permission issue for the storage directory and thus I tried to apply this fix - PHP Beanstalk with laravel permission denied on storage/framework/cache When it did not help, I tried to move cache driver from file to database, but that did not help either.

Looking in the trace back of the error, the first useful error not from Laravel code is #7, in DecryptRequest. However, that is just because this is the last class in the list of my middleware and if I change it with ValidProxies, the error displays ValidProxies last.

The error does not affect user experience (except, I assume, in terms of speed since the issue seems to be cache). The application is still working properly.

Are there any thoughts about how I can fix that.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire