-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
When running multiple environments simultaneously container hostnames sometimes resolve to wrong container #65
Comments
@Elamurugan-Nallathambi Are you getting error messages of any sort? Also how do you have the database connection configured in the M1 and M2 application? Each individual environment would normally be configured to use
|
This is local.xml, env.php config settings
pinging from individual containers shows the db container links from M2 on both php shell prompt [It could be because I started m2 environment early]
Any suggestion on how I can debug to find the issue here? Am running this from Macbook pro with Catalina latest update. |
@Elamurugan-Nallathambi |
What I believe is causing this issue is the fact that
The end result (although as stated above, I have yet to personally see it…) of this is So the challenge to permanently resolving this is either getting docker-compose to not apply aliases to both networks or somehow de-coupling service containers to avoid "cross-talk" |
@davidalger thanks for detailed analysis and direction on this. I could able to connect to environment based DB using It works ok one time while visiting both m1 , m2 frontend from browser and randomly its redirecting to other environment or giving response as It will be really helpful to have multiple environments working since some times need to compare/debug in both environments |
This should be resolve in commit 258213b which will be part of upcoming 0.3.0 release. If installing via git clone, simply checkout develop to start utilizing this code, or use Net direction on this is documented in the change log update notes: 8d3ed13. The short version however is this: environment specific containers are no longer part of the |
@Elamurugan-Nallathambi This should be fixed in Warden 0.3.0 for which I've just tagged a release. Environments no longer belong to multiple networks, eliminating the possibility for the non-determinate resolution of service DNS names. :) |
@davidalger just upgraded and tested, it works with both M1 & M2. Thank you so much for keeping this in loop and posting it here. Just note (its not an issue and am just sharing), with M1 Mutagen configuration does not exist for environment type "magento1" |
@Elamurugan-Nallathambi Thanks for the note regarding that issue; would be related to the work done on #90 and my not testing it thoroughly enough it seems, as that should not happen on normal environment operations. Easily fixed though, and just pushed up 0.3.1 release to resolve that bug. |
@davidalger wow, that was very fast response and action. Upgraded again and tested, now am no longer seeing this message in M1. |
When I try run Multiple M1, M2 environments DB connectivity inside application not working but from Tableplus it works ok against both environments.
warden env up -d
orwarden env start
shows all containers started anddocker ps
shows all containers from m1, m2 are running ok.Do I have to do something different to make both environments able to connect to DB?
The text was updated successfully, but these errors were encountered: