Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GodziLaravel's avatar

queue , no connector error

Hello ,

when I try to use : php artisan queue:work connection --daemon

I have this error bellow:

should I install something ?


   InvalidArgumentException  : No connector for []

  at /home/vagrant/code/crm/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php:172
    168|      */
    169|     protected function getConnector($driver)
    170|     {
    171|         if (! isset($this->connectors[$driver])) {
  > 172|             throw new InvalidArgumentException("No connector for [$driver]");
    173|         }
    174|
    175|         return call_user_func($this->connectors[$driver]);
    176|     }

  Exception trace:

  1   Illuminate\Queue\QueueManager::getConnector()
      /home/vagrant/code/crm/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php:156

  2   Illuminate\Queue\QueueManager::resolve("connection")
      /home/vagrant/code/crm/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php:138

  Please use the argument -v to see more details.

.env

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=database
SESSION_DRIVER=file
SESSION_LIFETIME=120
0 likes
5 replies
bobbybouwmann's avatar

Double check in the queue.php file if there is a database connection like this

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

Also try running config:clear to make sure no config has been cached!

GodziLaravel's avatar

@bobbybouwmann

Yes :

<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Default Queue Connection Name
    |--------------------------------------------------------------------------
    |
    | Laravel's queue API supports an assortment of back-ends via a single
    | API, giving you convenient access to each back-end using the same
    | syntax for every one. Here you may define a default connection.
    |
    */

    'default' => env('QUEUE_CONNECTION', 'sync'),

    /*
    |--------------------------------------------------------------------------
    | Queue Connections
    |--------------------------------------------------------------------------
    |
    | Here you may configure the connection information for each server that
    | is used by your application. A default configuration has been added
    | for each back-end shipped with Laravel. You are free to add more.
    |
    | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
    |
    */

    'connections' => [

        'sync' => [
            'driver' => 'sync',
        ],

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

        'beanstalkd' => [
            'driver' => 'beanstalkd',
            'host' => 'localhost',
            'queue' => 'default',
            'retry_after' => 90,
            'block_for' => 0,
        ],

        'sqs' => [
            'driver' => 'sqs',
            'key' => env('AWS_ACCESS_KEY_ID'),
            'secret' => env('AWS_SECRET_ACCESS_KEY'),
            'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
            'queue' => env('SQS_QUEUE', 'your-queue-name'),
            'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
        ],

        'redis' => [
            'driver' => 'redis',
            'connection' => 'default',
            'queue' => env('REDIS_QUEUE', 'default'),
            'retry_after' => 90,
            'block_for' => null,
        ],

    ],

    /*
    |--------------------------------------------------------------------------
    | Failed Queue Jobs
    |--------------------------------------------------------------------------
    |
    | These options configure the behavior of failed queue job logging so you
    | can control which database and table are used to store the jobs that
    | have failed. You may change them to any database / table you wish.
    |
    */

    'failed' => [
        'database' => env('DB_CONNECTION', 'mysql'),
        'table' => 'failed_jobs',
    ],

];

bobbybouwmann's avatar

Did you clear your config as well?

The only reason you can get this error is whenever your .env returns null.

Please or to participate in this conversation.