Git Product home page Git Product logo

Comments (2)

blindwaves avatar blindwaves commented on May 25, 2024 4

Encountering the same issue, should be the same problem as the OP.

In summary, using beanstalkd will result in an error when checking "job->attempts()" in the LaravelJobStatusServiceProvider for QueueManager events: after, failing, exceptionOccurred.

I've temporary fix it by trapping the exception in the LaravelJobStatusServiceProvider. I'm strongly suspecting that when the job is done, beanstalkd deletes the job. So checking for attempts will result in the NOT_FOUND error.

Also, do note that drivers for sync and redis, it works fine. Only beanstalkd is having issue.

Laravel version: 5.5
PHP: 7
Queue Driver: beanstalkd

Error entry:

[2017-12-16 05:03:48] local.ERROR: Server reported NOT_FOUND {"exception":"[object] (Pheanstalk\\Exception\\ServerException(code: 0): Server reported NOT_FOUND at /home/vagrant/code/vendor/pda/pheanstalk/src/YamlResponseParser.php:36)
[stacktrace]
#0 /home/vagrant/code/vendor/pda/pheanstalk/src/Connection.php(142): Pheanstalk\\YamlResponseParser->parseResponse('NOT_FOUND', NULL)
#1 /home/vagrant/code/vendor/pda/pheanstalk/src/Pheanstalk.php(396): Pheanstalk\\Connection->dispatchCommand(Object(Pheanstalk\\Command\\StatsJobCommand))
#2 /home/vagrant/code/vendor/pda/pheanstalk/src/Pheanstalk.php(312): Pheanstalk\\Pheanstalk->_dispatch(Object(Pheanstalk\\Command\\StatsJobCommand))
#3 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Queue/Jobs/BeanstalkdJob.php(91): Pheanstalk\\Pheanstalk->statsJob(Object(Pheanstalk\\Job))
#4 /home/vagrant/code/vendor/imtigger/laravel-job-status/src/LaravelJobStatusServiceProvider.php(54): Illuminate\\Queue\\Jobs\\BeanstalkdJob->attempts()
#5 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(349): Imtigger\\LaravelJobStatus\\LaravelJobStatusServiceProvider->Imtigger\\LaravelJobStatus\\{closure}(Object(Illuminate\\Queue\\Events\\JobExceptionOccurred))
#6 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(200): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}('Illuminate\\\\Queu...', Array)
#7 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(475): Illuminate\\Events\\Dispatcher->dispatch('Illuminate\\\\Queu...')
#8 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(356): Illuminate\\Queue\\Worker->raiseExceptionOccurredJobEvent('beanstalkd', Object(Illuminate\\Queue\\Jobs\\BeanstalkdJob), Object(Pheanstalk\\Exception\\ServerException))
#9 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(324): Illuminate\\Queue\\Worker->handleJobException('beanstalkd', Object(Illuminate\\Queue\\Jobs\\BeanstalkdJob), Object(Illuminate\\Queue\\WorkerOptions), Object(Pheanstalk\\Exception\\ServerException))
#10 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(270): Illuminate\\Queue\\Worker->process('beanstalkd', Object(Illuminate\\Queue\\Jobs\\BeanstalkdJob), Object(Illuminate\\Queue\\WorkerOptions))
#11 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(227): Illuminate\\Queue\\Worker->runJob(Object(Illuminate\\Queue\\Jobs\\BeanstalkdJob), 'beanstalkd', Object(Illuminate\\Queue\\WorkerOptions))
#12 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(101): Illuminate\\Queue\\Worker->runNextJob('beanstalkd', 'default', Object(Illuminate\\Queue\\WorkerOptions))
#13 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(85): Illuminate\\Queue\\Console\\WorkCommand->runWorker('beanstalkd', 'default')
#14 [internal function]: Illuminate\\Queue\\Console\\WorkCommand->handle()
#15 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#16 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#17 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#18 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(549): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#19 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Illuminate\\Container\\Container->call(Array)
#20 /home/vagrant/code/vendor/symfony/console/Command/Command.php(252): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#21 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Console/Command.php(167): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#22 /home/vagrant/code/vendor/symfony/console/Application.php(936): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#23 /home/vagrant/code/vendor/symfony/console/Application.php(240): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Queue\\Console\\WorkCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#24 /home/vagrant/code/vendor/symfony/console/Application.php(148): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#25 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Console/Application.php(88): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#26 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(121): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#27 /home/vagrant/code/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#28 {main}
"} 

from laravel-job-status.

imTigger avatar imTigger commented on May 25, 2024

Hello, this package listen to internal event of Laravel Jobs.
Status should update even your Job does nothing.

Please provide more information:

  • Your PHP version
  • Which queue driver are you using?
  • How do you run your worker? (And that command-line)
  • Your Job class source code

from laravel-job-status.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.