23:56:38.303Z INFO Reaction: Registered plugin address-validation-test (1.0.1)
23:56:38.304Z INFO Reaction: Initializing MongoDB replica set...
23:56:38.305Z INFO Reaction: Connecting to MongoDB...
23:57:08.321Z WARN Reaction: Failed to initialize a MongoDB replica set. This may result in errors or some things not working. Error: Server selection timed out after 30000 ms
23:57:08.321Z INFO Reaction: Connecting to MongoDB...
23:57:38.326Z ERROR Reaction: Server selection timed out after 30000 ms
MongoServerSelectionError: Server selection timed out after 30000 ms
at Timeout._onTimeout (/usr/local/src/app/node_modules/mongodb/lib/core/sdam/topology.js:438:30)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node --experimental-modules --experimental-json-modules ./src/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/node/.npm/_logs/2020-12-17T23_57_38_346Z-debug.log
Prerequisites
Have been trying to setup reaction-development-platform but this error keeps coming up with the latest release v3.11.0. I was able to deploy without any issues by using older version.
3.11.0
Just verified this is 100% a 3.11.0 issue. Fired up 2 fresh gcp instances with ubuntu and 3.10.0 ran perfectly.
Same error, leads to errors in the reaction identity and reaction admin containers as well because they cant find the replica set, leading to problems with sign-in and sign-up.
It was mongodb problem. Try to set MONGO_USE_UNIFIED_TOPOLOGY=false in your .env file.
This solution was recommended by Davian on Gitter.
Reaction Commerce dev addressed and temporarily resolved the issue here:
https://github.com/reactioncommerce/api-core/pull/15#issue-543807479
Most helpful comment
It was mongodb problem. Try to set MONGO_USE_UNIFIED_TOPOLOGY=false in your .env file.This solution was recommended by Davian on Gitter.