multi-tenant: Unable to create tenant after upgrade to 2.x branch

I did a composer update and I am getting the latest now on 2.x branch. Then I proceed to try adding a new tenant but it breaks all legacy codes, because some package name has been changed from multitenant to tenancy, for example.

Then I try to create a new tenant and the following error appear consistently…

ErrorException in Filesystem.php line 111:
file_put_contents(/Applications/XAMPP/xamppfiles/htdocs/staffmanagementapp/storage/webserver/fpm/129-ryau2.conf): failed to open stream: No such file or directory
in Filesystem.php line 111
at HandleExceptions->handleError('2', 'file_put_contents(/Applications/XAMPP/xamppfiles/htdocs/staffmanagementapp/storage/webserver/fpm/129-ryau2.conf): failed to open stream: No such file or directory', '/Applications/XAMPP/xamppfiles/htdocs/staffmanagementapp/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php', '111', array('path' => '/Applications/XAMPP/xamppfiles/htdocs/staffmanagementapp/storage/webserver/fpm/129-ryau2.conf', 'contents' => ';# ;# Auto generated Fpm configuration ;# @time: 15:29:04 08-08-2016 ;# @author: hyn.me ;# @website: 129 "ryau2" ;# ;# unique fpm group [129-ryau2] ;# listening for nginx proxying listen=/var/run/php5-fpm.hyn-9129.sock listen.allowed_clients=127.0.0.1 ;# user under which the application runs user=ryau2 ;# group under which the application runs group=www-data ;# fpm pool management variables pm=dynamic pm.max_children = 20 pm.start_servers = 5 pm.min_spare_servers = 5 pm.max_spare_servers = 10 pm.max_requests = 20 ;# force fpm workers into the following path chdir = /Applications/XAMPP/xamppfiles/htdocs/staffmanagementapp', 'lock' => true))
at file_put_contents('/Applications/XAMPP/xamppfiles/htdocs/staffmanagementapp/storage/webserver/fpm/129-ryau2.conf', ';# ;# Auto generated Fpm configuration ;# @time: 15:29:04 08-08-2016 ;# @author: hyn.me ;# @website: 129 "ryau2" ;# ;# unique fpm group [129-ryau2] ;# listening for nginx proxying listen=/var/run/php5-fpm.hyn-9129.sock listen.allowed_clients=127.0.0.1 ;# user under which the application runs user=ryau2 ;# group under which the application runs group=www-data ;# fpm pool management variables pm=dynamic pm.max_children = 20 pm.start_servers = 5 pm.min_spare_servers = 5 pm.max_spare_servers = 10 pm.max_requests = 20 ;# force fpm workers into the following path chdir = /Applications/XAMPP/xamppfiles/htdocs/staffmanagementapp', '2') in Filesystem.php line 111
at Filesystem->put('/Applications/XAMPP/xamppfiles/htdocs/staffmanagementapp/storage/webserver/fpm/129-ryau2.conf', ';# ;# Auto generated Fpm configuration ;# @time: 15:29:04 08-08-2016 ;# @author: hyn.me ;# @website: 129 "ryau2" ;# ;# unique fpm group [129-ryau2] ;# listening for nginx proxying listen=/var/run/php5-fpm.hyn-9129.sock listen.allowed_clients=127.0.0.1 ;# user under which the application runs user=ryau2 ;# group under which the application runs group=www-data ;# fpm pool management variables pm=dynamic pm.max_children = 20 pm.start_servers = 5 pm.min_spare_servers = 5 pm.max_spare_servers = 10 pm.max_requests = 20 ;# force fpm workers into the following path chdir = /Applications/XAMPP/xamppfiles/htdocs/staffmanagementapp', true) in Facade.php line 221
at Facade::__callStatic('put', array('/Applications/XAMPP/xamppfiles/htdocs/staffmanagementapp/storage/webserver/fpm/129-ryau2.conf', ';# ;# Auto generated Fpm configuration ;# @time: 15:29:04 08-08-2016 ;# @author: hyn.me ;# @website: 129 "ryau2" ;# ;# unique fpm group [129-ryau2] ;# listening for nginx proxying listen=/var/run/php5-fpm.hyn-9129.sock listen.allowed_clients=127.0.0.1 ;# user under which the application runs user=ryau2 ;# group under which the application runs group=www-data ;# fpm pool management variables pm=dynamic pm.max_children = 20 pm.start_servers = 5 pm.min_spare_servers = 5 pm.max_spare_servers = 10 pm.max_requests = 20 ;# force fpm workers into the following path chdir = /Applications/XAMPP/xamppfiles/htdocs/staffmanagementapp', true)) in AbstractFileGenerator.php line 139
at File::put('/Applications/XAMPP/xamppfiles/htdocs/staffmanagementapp/storage/webserver/fpm/129-ryau2.conf', ';# ;# Auto generated Fpm configuration ;# @time: 15:29:04 08-08-2016 ;# @author: hyn.me ;# @website: 129 "ryau2" ;# ;# unique fpm group [129-ryau2] ;# listening for nginx proxying listen=/var/run/php5-fpm.hyn-9129.sock listen.allowed_clients=127.0.0.1 ;# user under which the application runs user=ryau2 ;# group under which the application runs group=www-data ;# fpm pool management variables pm=dynamic pm.max_children = 20 pm.start_servers = 5 pm.min_spare_servers = 5 pm.max_spare_servers = 10 pm.max_requests = 20 ;# force fpm workers into the following path chdir = /Applications/XAMPP/xamppfiles/htdocs/staffmanagementapp', true) in AbstractFileGenerator.php line 139
at AbstractFileGenerator->onCreate() in AbstractFileGenerator.php line 42
at AbstractFileGenerator->onUpdate() in WebserverCommand.php line 60
at WebserverCommand->handle()
at call_user_func_array(array(object(WebserverCommand), 'handle'), array()) in Container.php line 507
at Container->call(array(object(WebserverCommand), 'handle')) in Dispatcher.php line 82
at Dispatcher->Illuminate\Bus\{closure}(object(WebserverCommand))
at call_user_func(object(Closure), object(WebserverCommand)) in Pipeline.php line 150
at Pipeline->Illuminate\Pipeline\{closure}(object(WebserverCommand))
at call_user_func(object(Closure), object(WebserverCommand)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Dispatcher.php line 83
at Dispatcher->dispatchNow(object(WebserverCommand)) in CallQueuedHandler.php line 41
at CallQueuedHandler->call(object(SyncJob), array('commandName' => 'Hyn\Webserver\Commands\WebserverCommand', 'command' => 'O:39:"Hyn\Webserver\Commands\WebserverCommand":28:{s:7:"*name";s:9:"webserver";s:10:"*website";O:26:"Hyn\Tenancy\Models\Website":27:{s:12:"*presenter";s:39:"Hyn\Tenancy\Presenters\WebsitePresenter";s:11:"*fillable";a:2:{i:0;s:9:"tenant_id";i:1;s:10:"identifier";}s:10:"*appends";a:1:{i:0;s:9:"directory";}s:13:"*connection";s:3:"hyn";s:8:"*table";N;s:13:"*primaryKey";s:2:"id";s:10:"*keyType";s:3:"int";s:10:"*perPage";i:15;s:12:"incrementing";b:1;s:10:"timestamps";b:1;s:13:"*attributes";a:6:{s:2:"id";i:129;s:11:"customer_id";i:129;s:10:"identifier";s:5:"ryau2";s:10:"created_at";s:19:"2016-08-08 15:29:03";s:10:"updated_at";s:19:"2016-08-08 15:29:04";s:10:"deleted_at";N;}s:11:"*original";a:6:{s:2:"id";i:129;s:11:"customer_id";i:129;s:10:"identifier";s:5:"ryau2";s:10:"created_at";s:19:"2016-08-08 15:29:03";s:10:"updated_at";s:19:"2016-08-08 15:29:04";s:10:"deleted_at";N;}s:12:"*relations";a:0:{}s:9:"*hidden";a:0:{}s:10:"*visible";a:0:{}s:10:"*guarded";a:1:{i:0;s:1:"*";}s:8:"*dates";a:0:{}s:13:"*dateFormat";N;s:8:"*casts";a:0:{}s:10:"*touches";a:0:{}s:14:"*observables";a:0:{}s:7:"*with";a:0:{}s:13:"*morphClass";N;s:6:"exists";b:1;s:18:"wasRecentlyCreated";b:0;s:20:"*presenterInstance";N;s:16:"*forceDeleting";b:0;}s:9:"*action";s:6:"update";s:10:"*laravel";N;s:8:"*input";N;s:9:"*output";N;s:12:"*signature";N;s:14:"*description";N;s:12:"*verbosity";i:32;s:15:"*verbosityMap";a:5:{s:1:"v";i:64;s:2:"vv";i:128;s:3:"vvv";i:256;s:5:"quiet";i:16;s:6:"normal";i:32;}s:54:"Symfony\Component\Console\Command\Commandapplication";N;s:55:"Symfony\Component\Console\Command\CommandprocessTitle";N;s:50:"Symfony\Component\Console\Command\Commandaliases";a:0:{}s:53:"Symfony\Component\Console\Command\Commanddefinition";O:47:"Symfony\Component\Console\Input\InputDefinition":6:{s:58:"Symfony\Component\Console\Input\InputDefinitionarguments";a:0:{}s:62:"Symfony\Component\Console\Input\InputDefinitionrequiredCount";i:0;s:67:"Symfony\Component\Console\Input\InputDefinitionhasAnArrayArgument";b:0;s:60:"Symfony\Component\Console\Input\InputDefinitionhasOptional";b:0;s:56:"Symfony\Component\Console\Input\InputDefinitionoptions";a:0:{}s:58:"Symfony\Component\Console\Input\InputDefinitionshortcuts";a:0:{}}s:47:"Symfony\Component\Console\Command\Commandhelp";N;s:65:"Symfony\Component\Console\Command\CommandignoreValidationErrors";b:0;s:70:"Symfony\Component\Console\Command\CommandapplicationDefinitionMerged";b:0;s:78:"Symfony\Component\Console\Command\CommandapplicationDefinitionMergedWithArgs";b:0;s:47:"Symfony\Component\Console\Command\Commandcode";N;s:51:"Symfony\Component\Console\Command\Commandsynopsis";a:0:{}s:49:"Symfony\Component\Console\Command\Commandusages";a:0:{}s:52:"Symfony\Component\Console\Command\CommandhelperSet";N;s:6:"*job";N;s:10:"connection";N;s:5:"queue";N;s:5:"delay";N;s:47:"Symfony\Component\Console\Command\Commandname";s:9:"webserver";s:54:"Symfony\Component\Console\Command\Commanddescription";N;}')) in Job.php line 130
at Job->resolveAndFire(array('job' => 'Illuminate\Queue\CallQueuedHandler@call', 'data' => array('commandName' => 'Hyn\Webserver\Commands\WebserverCommand', 'command' => 'O:39:"Hyn\Webserver\Commands\WebserverCommand":28:{s:7:"*name";s:9:"webserver";s:10:"*website";O:26:"Hyn\Tenancy\Models\Website":27:{s:12:"*presenter";s:39:"Hyn\Tenancy\Presenters\WebsitePresenter";s:11:"*fillable";a:2:{i:0;s:9:"tenant_id";i:1;s:10:"identifier";}s:10:"*appends";a:1:{i:0;s:9:"directory";}s:13:"*connection";s:3:"hyn";s:8:"*table";N;s:13:"*primaryKey";s:2:"id";s:10:"*keyType";s:3:"int";s:10:"*perPage";i:15;s:12:"incrementing";b:1;s:10:"timestamps";b:1;s:13:"*attributes";a:6:{s:2:"id";i:129;s:11:"customer_id";i:129;s:10:"identifier";s:5:"ryau2";s:10:"created_at";s:19:"2016-08-08 15:29:03";s:10:"updated_at";s:19:"2016-08-08 15:29:04";s:10:"deleted_at";N;}s:11:"*original";a:6:{s:2:"id";i:129;s:11:"customer_id";i:129;s:10:"identifier";s:5:"ryau2";s:10:"created_at";s:19:"2016-08-08 15:29:03";s:10:"updated_at";s:19:"2016-08-08 15:29:04";s:10:"deleted_at";N;}s:12:"*relations";a:0:{}s:9:"*hidden";a:0:{}s:10:"*visible";a:0:{}s:10:"*guarded";a:1:{i:0;s:1:"*";}s:8:"*dates";a:0:{}s:13:"*dateFormat";N;s:8:"*casts";a:0:{}s:10:"*touches";a:0:{}s:14:"*observables";a:0:{}s:7:"*with";a:0:{}s:13:"*morphClass";N;s:6:"exists";b:1;s:18:"wasRecentlyCreated";b:0;s:20:"*presenterInstance";N;s:16:"*forceDeleting";b:0;}s:9:"*action";s:6:"update";s:10:"*laravel";N;s:8:"*input";N;s:9:"*output";N;s:12:"*signature";N;s:14:"*description";N;s:12:"*verbosity";i:32;s:15:"*verbosityMap";a:5:{s:1:"v";i:64;s:2:"vv";i:128;s:3:"vvv";i:256;s:5:"quiet";i:16;s:6:"normal";i:32;}s:54:"Symfony\Component\Console\Command\Commandapplication";N;s:55:"Symfony\Component\Console\Command\CommandprocessTitle";N;s:50:"Symfony\Component\Console\Command\Commandaliases";a:0:{}s:53:"Symfony\Component\Console\Command\Commanddefinition";O:47:"Symfony\Component\Console\Input\InputDefinition":6:{s:58:"Symfony\Component\Console\Input\InputDefinitionarguments";a:0:{}s:62:"Symfony\Component\Console\Input\InputDefinitionrequiredCount";i:0;s:67:"Symfony\Component\Console\Input\InputDefinitionhasAnArrayArgument";b:0;s:60:"Symfony\Component\Console\Input\InputDefinitionhasOptional";b:0;s:56:"Symfony\Component\Console\Input\InputDefinitionoptions";a:0:{}s:58:"Symfony\Component\Console\Input\InputDefinitionshortcuts";a:0:{}}s:47:"Symfony\Component\Console\Command\Commandhelp";N;s:65:"Symfony\Component\Console\Command\CommandignoreValidationErrors";b:0;s:70:"Symfony\Component\Console\Command\CommandapplicationDefinitionMerged";b:0;s:78:"Symfony\Component\Console\Command\CommandapplicationDefinitionMergedWithArgs";b:0;s:47:"Symfony\Component\Console\Command\Commandcode";N;s:51:"Symfony\Component\Console\Command\Commandsynopsis";a:0:{}s:49:"Symfony\Component\Console\Command\Commandusages";a:0:{}s:52:"Symfony\Component\Console\Command\CommandhelperSet";N;s:6:"*job";N;s:10:"connection";N;s:5:"queue";N;s:5:"delay";N;s:47:"Symfony\Component\Console\Command\Commandname";s:9:"webserver";s:54:"Symfony\Component\Console\Command\Commanddescription";N;}'))) in SyncJob.php line 44
at SyncJob->fire() in SyncQueue.php line 30
at SyncQueue->push(object(WebserverCommand)) in Dispatcher.php line 143
at Dispatcher->pushCommandToQueue(object(SyncQueue), object(WebserverCommand)) in Dispatcher.php line 118
at Dispatcher->dispatchToQueue(object(WebserverCommand)) in Dispatcher.php line 67
at Dispatcher->dispatch(object(WebserverCommand)) in DispatchesJobs.php line 17
at WebsiteObserver->dispatch(object(WebserverCommand)) in WebsiteObserver.php line 23
at WebsiteObserver->updated(object(Website))
at call_user_func_array(array(object(WebsiteObserver), 'updated'), array(object(Website))) in Dispatcher.php line 348
at Dispatcher->Illuminate\Events\{closure}(object(Website))
at call_user_func_array(object(Closure), array(object(Website))) in Dispatcher.php line 221
at Dispatcher->fire('eloquent.updated: Hyn\Tenancy\Models\Website', object(Website)) in Model.php line 1686
at Model->fireModelEvent('updated', false) in Model.php line 1564
at Model->performUpdate(object(Builder), array()) in Model.php line 1481
at Model->save(array()) in AbstractModel.php line 96
at AbstractModel->save() in Model.php line 1729
at Model->touch() in HostnameObserver.php line 16
at HostnameObserver->saved(object(Hostname))
at call_user_func_array(array(object(HostnameObserver), 'saved'), array(object(Hostname))) in Dispatcher.php line 348
at Dispatcher->Illuminate\Events\{closure}(object(Hostname))
at call_user_func_array(object(Closure), array(object(Hostname))) in Dispatcher.php line 221
at Dispatcher->fire('eloquent.saved: Hyn\Tenancy\Models\Hostname', object(Hostname)) in Model.php line 1686
at Model->fireModelEvent('saved', false) in Model.php line 1521
at Model->finishSave(array()) in Model.php line 1492
at Model->save(array()) in AbstractModel.php line 96
at AbstractModel->save() in BaseRepository.php line 47
at BaseRepository->create(array('hostname' => 'ryau2.lvh.me', 'website_id' => '129', 'customer_id' => '129')) in SignupController.php line 93
at SignupController->store(object(Request))
at call_user_func_array(array(object(SignupController), 'store'), array(object(Request))) in Controller.php line 80
at Controller->callAction('store', array(object(Request))) in ControllerDispatcher.php line 146
at ControllerDispatcher->call(object(SignupController), object(Route), 'store') in ControllerDispatcher.php line 94
at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 96
at ControllerDispatcher->callWithinStack(object(SignupController), object(Route), object(Request), 'store') in ControllerDispatcher.php line 54
at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\Signup\SignupController', 'store') in Route.php line 174
at Route->runController(object(Request)) in Route.php line 140
at Route->run(object(Request)) in Router.php line 724
at Router->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Router.php line 726
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 699
at Router->dispatchToRoute(object(Request)) in Router.php line 675
at Router->dispatch(object(Request)) in Kernel.php line 246
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 64
at VerifyCsrfToken->handle(object(Request), object(Closure))
at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 64
at StartSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure))
at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in HostnameMiddleware.php line 17
at HostnameMiddleware->handle(object(Request), object(Closure))
at call_user_func_array(array(object(HostnameMiddleware), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Kernel.php line 132
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99
at Kernel->handle(object(Request)) in index.php line 54 

I notice from the above error - /Applications/XAMPP/xamppfiles/htdocs/staffmanagementapp/storage/webserver/fpm/ does not exists in my project. Am I missing something here?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

Sorry about this. I’ve actually had to hand in my company laptop and never committed the progress I made on this. Will need to re-implement this again. TLDR will take a bit longer.