2
votes

First of all I do realize there are already questions like this here, my reason for making a new post about it is I have tried all the solutions I found on stackoverflow and none of them worked for me.

My issues started when I installed eyewitness package via composer. I installed it successfully without any errors by running php artisan eyewitness:install.

However I have noticed that whenever my queue runs I get this error streamed to my slack channel:

file_put_contents(/var/app/current/storage/framework/cache/data/0b/fd/0bfda67f938654155945b033c84634aaabaa08f3): failed to open stream: No such file or directory Level ERROR Exception ```{ "class": "ErrorException", "message": "file_put_contents(/var/app/current/storage/framework/cache/data/0b/fd/0bfda67f938654155945b033c84634aaabaa08f3): failed to open stream: No such file or directory", "code": 0,
"file": "/var/app/current/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122", "trace": [ "{\"function\":\"handleError\",\"class\":\"Illuminate\\Foundation\\Bootstrap\\HandleExceptions\",\"type\":\"->\",\"args\":[2,\"file_put_contents(/var/app/current/storage/framework/cache/data/0b/fd/0bfda67f938654155945b033c84634aaabaa08f3): failed to open stream: No such file or directory\",\"/var/app/current/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php\",122,{\"path\":\"/var/app/current/storage/framework/cache/data/0b/fd/0bfda67f938654155945b033c84634aaabaa08f3\",\"contents\":\"1546808222i:1;\",\"lock\":true}]}", "/var/app/current/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122", "/var/app/current/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php:65", "/var/app/current/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:195", "/var/app/current/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:262", "/var/app/current/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:304", "/var/app/current/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:223", "/var/app/current/vendor/eyewitness/eye/app/Notifications/Notifier.php:31", "/var/app/current/vendor/eyewitness/eye/app/Scheduling/BaseEvent.php:236", "/var/app/current/vendor/eyewitness/eye/app/Scheduling/BaseEvent.php:283", "/var/app/current/vendor/eyewitness/eye/app/Scheduling/Event.php:55", "/var/app/current/vendor/eyewitness/e…

Now following various solutions online I did the following:

  1. Navigated to my bootstrap/cache folder and deleted all the contents.
  2. run php artisan cache:clear
  3. run php artisan config:clear
  4. run php artisan view:clear
  5. run php artisan config:cache
  6. run php artisan queue:restart
  7. run php artisan queue:work &

After running all the above commands in exactly that order nothing has changed, the error is still being logged every minute and I do not know what to do at this point.

I have the following settings in my .env file:

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=database
1
Have you checked if the cache directory exists at all under storage/framework?nakov
Yes and it exists.user3718908
Then make sure that you have the right permissions on that folder, in order to have access to write to it. 755 are sufficient I believe.nakov
Would have gotten a "permission denied" if that were the case.user3718908
Have you got with any solution? I'm with the same problem here :'(. Permissions and directories checked.Perropolesia

1 Answers

1
votes

Looks like permission or folders missing. Please check if exists the following folders in laravel root project

/storage/framework/cache
/storage/framework/views
/storage/framework/sessions
/boostrap/cache 

And in all there you need write access .