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

Issue with 'php artisan queue:failed' #489

Closed
robsoncombr opened this issue May 8, 2015 · 11 comments
Closed

Issue with 'php artisan queue:failed' #489

robsoncombr opened this issue May 8, 2015 · 11 comments

Comments

@robsoncombr
Copy link

Not able to retrieve failed jobs, it saves to the db, i can see them with .find() but artisan fails to retrieve:

Project in production, need a workaround please assist.

Error:
$ php artisan queue:failed
[ErrorException]
strstr() expects parameter 1 to be string, array given

From log:
[2015-05-08 19:20:14] dev.ERROR: exception 'ErrorException' with message 'strstr() expects parameter 1 to be string, array given' in /home/admin/voxtrader/www.dev/vendor/symfony/console/Symfony/Component/Console/Helper/Table.php:182
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'strstr() expect...', '/home/admin/vox...', 182, Array)
#1 /home/admin/voxtrader/www.dev/vendor/symfony/console/Symfony/Component/Console/Helper/Table.php(182): strstr(Array, '\n')
#2 /home/admin/voxtrader/www.dev/vendor/symfony/console/Symfony/Component/Console/Helper/Table.php(157): Symfony\Component\Console\Helper\Table->addRow(Array)
#3 /home/admin/voxtrader/www.dev/vendor/symfony/console/Symfony/Component/Console/Helper/Table.php(151): Symfony\Component\Console\Helper\Table->addRows(Array)
#4 /home/admin/voxtrader/www.dev/vendor/symfony/console/Symfony/Component/Console/Helper/TableHelper.php(81): Symfony\Component\Console\Helper\Table->setRows(Array)
#5 /home/admin/voxtrader/www.dev/vendor/laravel/framework/src/Illuminate/Queue/Console/ListFailedCommand.php(43): Symfony\Component\Console\Helper\TableHelper->setRows(Array)
#6 [internal function]: Illuminate\Queue\Console\ListFailedCommand->fire()
#7 /home/admin/voxtrader/www.dev/vendor/laravel/framework/src/Illuminate/Container/Container.php(523): call_user_func_array(Array, Array)
#8 /home/admin/voxtrader/www.dev/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array)
#9 /home/admin/voxtrader/www.dev/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /home/admin/voxtrader/www.dev/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /home/admin/voxtrader/www.dev/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))
#12 /home/admin/voxtrader/www.dev/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\ListFailedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /home/admin/voxtrader/www.dev/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))
#14 /home/admin/voxtrader/www.dev/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /home/admin/voxtrader/www.dev/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 {main}

My config/queue.php has:
'failed' => [
'database' => 'mongodb', 'table' => 'jobs_failed',
],

Thank you,

Robson

@robsoncombr
Copy link
Author

News? Thank you very much!

@levinhne
Copy link

Tôi có cách giải quyết đơn giản bằng sử dụng sqlite (install php5-sqlite)

'failed' => [
'database' => 'sqlite', 'table' => 'failed_jobs',
],

hoặc

http://packalyst.com/packages/package/pmatseykanets/file-queue-failer

Cảm ơn :)

@hackel
Copy link
Contributor

hackel commented Dec 2, 2015

I can confirm this issue. Thankfully queue:flush still works!

@lapswr
Copy link

lapswr commented Sep 7, 2016

i can confirm the issue too.

@lapswr
Copy link

lapswr commented Sep 30, 2016

i think the problem is has something to do with the Laravel Queues source code that use
Illuminate\Database\Eloquent\Collection
but @jenssegers use his own MongoDB\Collection
any ideas?

@pi0
Copy link
Contributor

pi0 commented Sep 30, 2016

We will investigate and resolve this issue soon :)

@sebastian-domagala
Copy link

Any feedback on this issue?

@anhphamt
Copy link

anhphamt commented Mar 1, 2017

Any news? got the same issue now.

@breart
Copy link

breart commented Aug 8, 2017

@robsoncombr @anhphamt Did you have Jenssegers\Mongodb\MongodbQueueServiceProvider::class provider in the app.php?

@nirradi
Copy link

nirradi commented Oct 26, 2017

+1

@breart
Copy link

breart commented Oct 26, 2017

@nirradi are you still solving this issue? 😄

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

10 participants