Skip to content

No suitable servers found (serverSelectionTryOnce set): [Failed to resolve 'localhost:27017'] #1456

@halaei

Description

@halaei

This config used to work in version 3.3 (laravel 5.5) it is not working now in 3.4 (laravel 5.6)

        'mongodb' => [
            'driver'   => 'mongodb',
            'dsn' => 'mongodb://localhost:27017',
            'database' => env('MONGODB_DATABASE'),
        ],

Error:

In Collection.php line 515:
                                                                                                   
  No suitable servers found (`serverSelectionTryOnce` set): [Failed to resolve 'localhost:27017'] 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions