laraveloracle-databaselaravel-8oci8

Laravel queue work don't process jobs when connect with oracle


my laravel project connected with oracle database, when I execute the command php artisan queue:work The Job is not executed, and this error appears in logs

[stacktrace]
#0 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Bootstrap\\HandleExceptions.php(266): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'Array to string...', 'C:\\\\laragon\\\\www\\\\...', 32)
#1 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Support\\Stringable.php(32): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}(2, 'Array to string...', 'C:\\\\laragon\\\\www\\\\...', 32)
#2 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Support\\Str.php(68): Illuminate\\Support\\Stringable->__construct(Array)
#3 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\DatabaseQueue.php(261): Illuminate\\Support\\Str::of(Array)
#4 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\DatabaseQueue.php(239): Illuminate\\Queue\\DatabaseQueue->getLockForPopping()
#5 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\DatabaseQueue.php(224): Illuminate\\Queue\\DatabaseQueue->getNextAvailableJob('default')
#6 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Concerns\\ManagesTransactions.php(30): Illuminate\\Queue\\DatabaseQueue->Illuminate\\Queue\\{closure}(Object(Yajra\\Oci8\\Oci8Connection))
#7 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\DatabaseQueue.php(227): Illuminate\\Database\\Connection->transaction(Object(Closure))
#8 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\Worker.php(342): Illuminate\\Queue\\DatabaseQueue->pop('default')
#9 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\Worker.php(351): Illuminate\\Queue\\Worker->Illuminate\\Queue\\{closure}('default')
#10 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\Worker.php(160): Illuminate\\Queue\\Worker->getNextJob(Object(Illuminate\\Queue\\DatabaseQueue), 'default')
#11 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\Console\\WorkCommand.php(147): Illuminate\\Queue\\Worker->daemon('database', 'default', Object(Illuminate\\Queue\\WorkerOptions))
#12 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\Console\\WorkCommand.php(130): Illuminate\\Queue\\Console\\WorkCommand->runWorker('database', 'default')
#13 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(36): Illuminate\\Queue\\Console\\WorkCommand->handle()
#14 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#15 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#16 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#17 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(661): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#18 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php(183): Illuminate\\Container\\Container->call(Array)
#19 C:\\laragon\\www\\emt\\vendor\\symfony\\console\\Command\\Command.php(312): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#20 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php(153): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#21 C:\\laragon\\www\\emt\\vendor\\symfony\\console\\Application.php(1022): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#22 C:\\laragon\\www\\emt\\vendor\\symfony\\console\\Application.php(314): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Queue\\Console\\WorkCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#23 C:\\laragon\\www\\emt\\vendor\\symfony\\console\\Application.php(168): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#24 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php(102): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#25 C:\\laragon\\www\\emt\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php(155): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#26 C:\\laragon\\www\\emt\\artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#27 {main}
"} ```

If I connect the project with mysql, the command is executed successfully


Solution

  • I solve it After I traced the location of the problem and found it fails to fetch the database version value in framework\src\Illuminate\Queue\DatabaseQueue.php(261) file Str::of($databaseVersion) I added the following line in the config/oracel.php file 'version' => env('DB_SERVER_VERSION', '11g'),

    And then the job worked successfully