-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
This issue is the same as reaction-platform issue 16, but since it's really a problem within the reaction codebase, I'm filing this here so we can track it with our normal process.
Issue Description
After running make from the clean reaction-platform folder, the created containers reaction_reaction_1, reaction_mongo-init-replica_1 and reaction-hydra_hydra-migrate_1 show as exited.
The reaction container fails, as it can't connect to the replica set:
docker logs -f reaction_reaction_1
npm WARN [email protected] requires a peer of react-dom@^15.4.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^15.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@^15.3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})up to date in 18.481s
ERROR: MongoDB replica set not ready in time.
no replset config has been received..%
The replica set fails to connect to the main mongo container:
docker logs -f reaction_mongo-init-replica_1
MongoDB shell version v3.6.3
connecting to: mongodb://mongo:27017/reaction
2018-10-04T11:25:18.048+0000 W NETWORK [thread1] Failed to connect to 172.30.0.2:27017, in(checking socket for error after poll), reason: Connection refused
2018-10-04T11:25:18.062+0000 E QUERY [thread1] Error: couldn't connect to server mongo:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:251:13
@(connect):1:6
exception: connect failed
I checked the internal IP, it seems to be right
docker inspect reaction_mongo_1 | grep IPAddress
"SecondaryIPAddresses": null,
"IPAddress": "",
"IPAddress": "172.30.0.2",
Steps to Reproduce
Please provide starting context, i.e. logged in as a user, configure a particular payment method.
clonethe repo- run
makeand wait for it to finish - run
docker ps -a | grep reactionand observe that bothreaction_reaction_1andreaction_mongo-init-replica_1exited
Possible Solution
Running docker start reaction_mongo-init-replica_1 afterwards seems to make it start - Maybe the build script needs to wait until the main mongodb container finished loading.