Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoNetworkError when run adonis migration:run #260

Open
cassianogr opened this issue Aug 4, 2020 · 1 comment
Open

MongoNetworkError when run adonis migration:run #260

cassianogr opened this issue Aug 4, 2020 · 1 comment

Comments

@cassianogr
Copy link

Hi
I've had an error when I run this command above.

DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor

My configurations below:
mongodb: {
client: 'mongodb',
connectionString: Env.get('DB_CONNECTION_STRING', 'mongodb://admin:[email protected]:27017/yyyy'),
connection: {
host: Env.get('DB_HOST', 'localhost'),
port: Env.get('DB_PORT', 27017),
username: Env.get('DB_USER', 'admin'),
password: Env.get('DB_PASSWORD', 'xxxx'),
database: Env.get('DB_DATABASE', 'yyyy'),
options: {
useUnifiedTopology: true,
useNewUrlParser: true,
// replicaSet: Env.get('DB_REPLICA_SET', '')
// ssl: Env.get('DB_SSL, '')
// connectTimeoutMS: Env.get('DB_CONNECT_TIMEOUT_MS', 15000),
// socketTimeoutMS: Env.get('DB_SOCKET_TIMEOUT_MS', 180000),
// w: Env.get('DB_W, 0),
// readPreference: Env.get('DB_READ_PREFERENCE', 'secondary'),
// authSource: Env.get('DB_AUTH_SOURCE', ''),
// authMechanism: Env.get('DB_AUTH_MECHANISM', ''),
// other options
}
}
},

I tryied with or without the options (useNewUrlParser or useUnifiedTopology), and nothing.

Please, help me.

@alapan-sau
Copy link

alapan-sau commented Mar 13, 2021

Did you get any work around? I am also facing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants