-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
chore: reconfigure docker-compose networks #6068
Conversation
Signed-off-by: Eric Dobbertin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few issues I've come across:
I've had to manually create the following two networks when running make start
:
auth.reaction.localhost
reaction.localhost
thrown from start-reaction-hydra
:
Network auth.reaction.localhost declared as external, but could not be found. Please create the network manually using
docker network create auth.reaction.localhost and try again.
thrown from start-reaction-identity
:
Network reaction.localhost declared as external, but could not be found. Please create the network manually using
docker network create reaction.localhost and try again.
Should this all be done automatically at this point?
There is some sort of race condition we've been seeing where identity
needs api
to be started, so it fails starting the first time, but works fine after api
is started and identity
is restarted. This isn't new to this ticket, but just mentioning it here too.
Admin does not start correctly because of the above issue, but contraty to identity
, which starts as expected after api
is running, when i try to restart admin
at this point i get another missing address that wasn't thrown on the initial `make start:
FetchError: request to http://hydra.reaction.localhost:4445/clients/reaction-admin failed, reason: getaddrinfo ENOTFOUND hydra.reaction.localhost
at ClientRequest.<anonymous> (/usr/local/src/app/programs/server/npm/node_modules/node-fetch/lib/index.js:1444:11)
at ClientRequest.emit (events.js:210:5)
at ClientRequest.EventEmitter.emit (domain.js:475:20)
at Socket.socketErrorListener (_http_client.js:406:9)
at Socket.emit (events.js:210:5)
at Socket.EventEmitter.emit (domain.js:475:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
=> awaited here:
at Function.Promise.await (/usr/local/src/app/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
at imports/plugins/core/core/server/startup/oauth.js:40:26
at /usr/local/src/app/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
=> awaited here:
at Function.Promise.await (/usr/local/src/app/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
at startup (imports/plugins/core/core/server/startup/index.js:41:3)
at Function.time (/usr/local/src/app/programs/server/profile.js:273:30)
at /usr/local/src/app/programs/server/boot.js:412:15
at /usr/local/src/app/programs/server/boot.js:462:7
at Function.run (/usr/local/src/app/programs/server/profile.js:280:14)
at /usr/local/src/app/programs/server/boot.js:460:13 {
message: 'request to http://hydra.reaction.localhost:4445/clients/reaction-admin failed, reason: getaddrinfo ENOTFOUND hydra.reaction.localhost',
type: 'system',
errno: 'ENOTFOUND',
code: 'ENOTFOUND'
}
@kieckhafer Can you post your Hydra logs? It might be the same issue @manueldelreal saw. The race condition is separate from this issue. The network creation is expected, but I agree |
@aldeed Hydra Logs:
I do see a similar error from
I ran |
Fixed the Hydra startup issue in reactioncommerce/reaction-hydra@929119d |
With the
|
For me it's not just identity, it's also admin and example-storefront. startup for these three is way faster than the startup for the api container so they error out when they try to reach the api and it's still coming up, but this is for another ticket. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…#6068 Signed-off-by: Ross Hadden <[email protected]>
…#6068 Signed-off-by: Ross Hadden <[email protected]>
There are 5 related PRs that should be tested together:
reactioncommerce/example-storefront#653
reactioncommerce/reaction-hydra#46
reactioncommerce/reaction-admin#194
reactioncommerce/reaction-identity#23
#6068
All of these ensure that docker-compose defines exactly one external network named
reaction.localhost
and update all services and ENV to use that one. This is being done to cut down on confusion caused by having various arbitrary networks. This affects only local development using docker-compose.The only downside we're aware of is that project authors need to be more careful about giving Reaction services unique names (e.g., can't call them all
web
).One upside in addition to being generally less confusing is that the primary internal hostname for the API is now just
api.reaction.localhost
rather than the more confusingapi.api.reaction.localhost
.Testing
.env.example
to.env
in each project, completely replacing.env
.docker system prune
docker-compose.override.yml
file from each of the project directories. It doesn't technically matter whether you leave the override in place, but everything will start faster if you don't.make start
.