Queue - Failed Jobs

Hello everyone,

In the system check, 24 failed jobs are displayed in the queue.

After my research in the forum, I saw the hint that the command “php artisan queue:flush” should be executed so that the error messages After executing the command, the console shows me that all failed jobs have been successfully deleted.

I then called up the system check again, but unfortunately the 24 failed jobs are still displayed.

Is there another way to delete the errors in the queue?

Here is the log of the errors in the queue:

TypeError: Elastic\Elasticsearch\ClientBuilder::setBasicAuthentication(): Argument #1 ($username) must be of type string, null given, called in /home/www/invoice/vendor/elasticsearch/elasticsearch/src/ClientBuilder.php on line 168 and defined in /home/www/invoice/vendor/elasticsearch/elasticsearch/src/ClientBuilder.php:242
Stack trace:
#0 /home/www/invoice/vendor/elasticsearch/elasticsearch/src/ClientBuilder.php(168): Elastic\Elasticsearch\ClientBuilder->setBasicAuthentication(NULL, NULL)
#1 /home/www/invoice/vendor/babenkoivan/elastic-client/src/ClientBuilder.php(42): Elastic\Elasticsearch\ClientBuilder::fromConfig(Array)
#2 /home/www/invoice/vendor/babenkoivan/elastic-client/src/ClientBuilder.php(24): Elastic\Client\ClientBuilder->connection('default')
#3 /home/www/invoice/vendor/babenkoivan/elastic-adapter/src/Client.php(16): Elastic\Client\ClientBuilder->default()
#4 [internal function]: Elastic\Adapter\Documents\DocumentManager->__construct(Object(Elastic\Client\ClientBuilder))
#5 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/Container.php(1004): ReflectionClass->newInstanceArgs(Array)
#6 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/Container.php(832): Illuminate\Container\Container->build('Elastic\\Adapter...')
#7 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\Container\Container->resolve('Elastic\\Adapter...', Array, true)
#8 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/Container.php(763): Illuminate\Foundation\Application->resolve('Elastic\\Adapter...', Array)
#9 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\Container\Container->make('Elastic\\Adapter...', Array)
#10 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/Container.php(1133): Illuminate\Foundation\Application->make('Elastic\\Adapter...')
#11 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/Container.php(1043): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#12 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/Container.php(994): Illuminate\Container\Container->resolveDependencies(Array)
#13 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/Container.php(832): Illuminate\Container\Container->build('Elastic\\ScoutDr...')
#14 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\Container\Container->resolve('Elastic\\ScoutDr...', Array, true)
#15 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/Container.php(763): Illuminate\Foundation\Application->resolve('Elastic\\ScoutDr...', Array)
#16 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\Container\Container->make('Elastic\\ScoutDr...', Array)
#17 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(124): Illuminate\Foundation\Application->make('Elastic\\ScoutDr...', Array)
#18 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(804): app('Elastic\\ScoutDr...', Array)
#19 /home/www/invoice/vendor/babenkoivan/elastic-scout-driver-plus/src/ServiceProvider.php(38): resolve('Elastic\\ScoutDr...')
#20 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Support/Manager.php(120): Elastic\ScoutDriverPlus\ServiceProvider::Elastic\ScoutDriverPlus\{closure}(Object(Illuminate\Foundation\Application))
#21 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Support/Manager.php(100): Illuminate\Support\Manager->callCustomCreator('null')
#22 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Support/Manager.php(80): Illuminate\Support\Manager->createDriver('null')
#23 /home/www/invoice/vendor/laravel/scout/src/EngineManager.php(31): Illuminate\Support\Manager->driver('null')
#24 /home/www/invoice/vendor/laravel/scout/src/Searchable.php(397): Laravel\Scout\EngineManager->engine()
#25 /home/www/invoice/vendor/babenkoivan/elastic-scout-driver-plus/src/Searchable.php(61): App\Models\Invoice->baseSearchableUsing()
#26 /home/www/invoice/vendor/laravel/scout/src/Jobs/MakeSearchable.php(42): App\Models\Invoice->searchableUsing()
#27 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Laravel\Scout\Jobs\MakeSearchable->handle()
#28 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#29 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#30 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#31 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/Container.php(696): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#32 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(126): Illuminate\Container\Container->call(Array)
#33 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(170): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(Laravel\Scout\Jobs\MakeSearchable))
#34 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(127): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Laravel\Scout\Jobs\MakeSearchable))
#35 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(130): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#36 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(126): Illuminate\Bus\Dispatcher->dispatchNow(Object(Laravel\Scout\Jobs\MakeSearchable), false)
#37 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(170): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(Laravel\Scout\Jobs\MakeSearchable))
#38 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(127): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Laravel\Scout\Jobs\MakeSearchable))
#39 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(121): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#40 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(69): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\DatabaseJob), Object(Laravel\Scout\Jobs\MakeSearchable))
#41 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(102): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\DatabaseJob), Array)
#42 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(442): Illuminate\Queue\Jobs\Job->fire()
#43 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(392): Illuminate\Queue\Worker->process('database', Object(Illuminate\Queue\Jobs\DatabaseJob), Object(Illuminate\Queue\WorkerOptions))
#44 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(178): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\DatabaseJob), 'database', Object(Illuminate\Queue\WorkerOptions))
#45 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(149): Illuminate\Queue\Worker->daemon('database', 'default', Object(Illuminate\Queue\WorkerOptions))
#46 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(132): Illuminate\Queue\Console\WorkCommand->runWorker('database', 'default')
#47 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Queue\Console\WorkCommand->handle()
#48 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#49 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#50 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#51 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Container/Container.php(696): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#52 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Console/Command.php(213): Illuminate\Container\Container->call(Array)
#53 /home/www/invoice/vendor/symfony/console/Command/Command.php(279): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#54 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#55 /home/www/invoice/vendor/symfony/console/Application.php(1094): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#56 /home/www/invoice/vendor/symfony/console/Application.php(342): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#57 /home/www/invoice/vendor/symfony/console/Application.php(193): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#58 /home/www/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(198): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#59 /home/www/invoice/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#60 {main}

image

Hi,

Try php artisan queue:clear

I’ll tried it, but it didn’t worked. The 24 failed Jobs are listed in the queue.

image

You’ve tried both queue:flush and queue:clear?

Yes, both. And both commands have no effect

What do you see when running php artisan queue:failed

image

image

Do you have more than one app install?

Can you post a screenshot of the health check dialog

The app is installed on two different computers

Do you see the records in the failed_jobs table in the database?

By app I meant the backend app, maybe it’s installed in different folders?

I’ll check it and give you a reply.
But I think tommorow.

Many thanks for your great help :heart:


All 24 failed Jobs are listed in the database

There is only one folder named “app”:

Or do I have to look in different folders?

I think we’re missing something, it’s not clear why the CLI commands aren’t working.

We generally advise against making changes to the database but one option is to manually empty the table.

The table is now emtpy. Hope, no negative side effect will come :folded_hands:

Many thanks for your quick and great help! :heart:

Happy to help, glad the issue is resolved.

1 Like