Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5.5 Queue: No connector for []

Tags:

php

laravel-5

I have two websites running identical laravel 5.5 project. In fact both websites hosted on the same server. One of them works, another one has troubles with queues. I have double-checked everything. .env:

...
BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=database
QUEUE_DRIVER=database
...

conf/queue.php

'database' => [
            'driver' => 'database',
            'table' => 'jobs',
            'queue' => 'default',
            'retry_after' => 90,
        ],

I do have empty jobs table as well. Whenever I do try to run queues I'm getting an error

php artisan queue:work --daemon

In QueueManager.php line 172:

  No connector for []  
like image 376
Shirker Avatar asked Jan 11 '18 03:01

Shirker


2 Answers

Please check the config queue drive setting. If use Redis, you can use php artisan tinker check current the config. Check command queue:

php artisan queue:work redis --queue=QUEUE_NAME --tries=3 --memory=128 --timeout=300

Check job listen by command line: ps aux | grep php

like image 189
Tùng Phan Thanh Avatar answered Nov 04 '22 08:11

Tùng Phan Thanh


I just had to specify a "connection" (database for my case) after queue:work command like below:

php artisan queue:work database --queue=Q_NAME

and the error disappeared!

like image 1
Akshay Lokur Avatar answered Nov 04 '22 06:11

Akshay Lokur