Skip to content
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

[5.0] [Bug] queue:work --daemon fails to execute #6379

Closed
jataggart opened this issue Nov 10, 2014 · 11 comments
Closed

[5.0] [Bug] queue:work --daemon fails to execute #6379

jataggart opened this issue Nov 10, 2014 · 11 comments

Comments

@jataggart
Copy link

I am having some trouble getting the queue workers to operate in daemon mode. I've been able to reproduce on a fresh install of laravel from composer, please let me know if you need more information.

Input:

$ composer create-project laravel/laravel laravel-5-framework-queue-daemon-bug dev-develop
$ cd laravel-5-framework-queue-daemon-bug
$ composer require pda/pheanstalk
$ php artisan clear-compiled
$ vim config/queue.php # change default queue to 'beanstalkd'
$ php artisan queue:work --daemon

Output:

exception 'Illuminate\Container\BindingResolutionException' with message 'Unresolvable dependency resolving [Parameter #0 [ <optional> $message ]] in class Exception' in storage/framework/compiled.php:531
Stack trace:
#0 storage/framework/compiled.php(518): Illuminate\Container\Container->resolveNonClass(Object(ReflectionParameter))
#1 storage/framework/compiled.php(506): Illuminate\Container\Container->getDependencies(Array, Array)
#2 storage/framework/compiled.php(454): Illuminate\Container\Container->build('exception', Array)
#3 storage/framework/compiled.php(875): Illuminate\Container\Container->make('exception', Array)
#4 storage/framework/compiled.php(634): Illuminate\Foundation\Application->make('exception')
#5 vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(94): Illuminate\Container\Container->offsetGet('exception')
#6 vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(67): Illuminate\Queue\Console\WorkCommand->runWorker(NULL, NULL, 0, 128, true)
#7 vendor/laravel/framework/src/Illuminate/Console/Command.php(112): Illuminate\Queue\Console\WorkCommand->fire()
#8 vendor/symfony/console/Symfony/Component/Console/Command/Command.php(252): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 vendor/laravel/framework/src/Illuminate/Console/Command.php(100): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(72): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 app/Console/Kernel.php(28): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 artisan(46): App\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 {main}
@laurencei
Copy link
Contributor

Did you update composer.json and include pda/pheanstalk ~2.0 - then run composer update?

@jataggart
Copy link
Author

@theshiftexchange Including pda/pheanstalk ~2.0 didn't work, same issue. I updated to pda/pheanstalk ~3.0 and still the error persists.

@GrahamCampbell
Copy link
Member

Did you clear compiled?

@jataggart
Copy link
Author

@GrahamCampbell I updated my steps in the ticket to reflect both adding pda/pheanstalk ~3.0 and php artisan clear-compiled. Still having this issue.

@memtoko
Copy link

memtoko commented Nov 15, 2014

I think it's because no 'exception' bound to container yet in Laravel 5, and the WorkCommand console call it.

@GrahamCampbell
Copy link
Member

Yeh, I can confirm this is an issue @taylorotwell.

php artisan queue:work --daemon --sleep=3 --tries=3
exception 'Illuminate\Container\BindingResolutionException' with message 'Unresolvable dependency resolving [Parameter #0 [ <optional> $message ]] in class Exception' in /var/www/styleci/vendor/laravel/framework/src/Illuminate/Container/Container.php:841
Stack trace:
#0 /var/www/styleci/vendor/laravel/framework/src/Illuminate/Container/Container.php(813): Illuminate\Container\Container->resolveNonClass(Object(ReflectionParameter))
#1 /var/www/styleci/vendor/laravel/framework/src/Illuminate/Container/Container.php(782): Illuminate\Container\Container->getDependencies(Array, Array)
#2 /var/www/styleci/vendor/laravel/framework/src/Illuminate/Container/Container.php(650): Illuminate\Container\Container->build('exception', Array)
#3 /var/www/styleci/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(503): Illuminate\Container\Container->make('exception', Array)
#4 /var/www/styleci/vendor/laravel/framework/src/Illuminate/Container/Container.php(1100): Illuminate\Foundation\Application->make('exception')
#5 /var/www/styleci/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(94): Illuminate\Container\Container->offsetGet('exception')
#6 /var/www/styleci/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(67): Illuminate\Queue\Console\WorkCommand->runWorker(NULL, NULL, 0, 128, true)
#7 /var/www/styleci/vendor/laravel/framework/src/Illuminate/Console/Command.php(112): Illuminate\Queue\Console\WorkCommand->fire()
#8 /var/www/styleci/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(252): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/styleci/vendor/laravel/framework/src/Illuminate/Console/Command.php(100): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/styleci/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/styleci/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/styleci/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/styleci/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(72): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/styleci/app/Console/Kernel.php(28): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/styleci/artisan(46): App\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 {main}

@jataggart
Copy link
Author

Hey @taylorotwell, this was probably closed due to the merge, but I'm still able to reproduce.

@GrahamCampbell
Copy link
Member

I'll investigate this...

@taylorotwell
Copy link
Member

K Fixed that container resolution.

@GrahamCampbell
Copy link
Member

I'll test this out in 2 secs. Didn't have time to "investigate" yet. :)

@GrahamCampbell
Copy link
Member

Works. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants