Closed kevpfowler closed 2 years ago
You can use docker's --add-host
option. For example, in your mup config you can add
module.exports = {
app: {
docker: {
args: ['--add-host="host-name:ip-address"', '--add-host="host-2:1.1.1.1"']
}
}
}
Ah - thank you, adding that fixed the problem and it deploys successfully now! Thank you for the speedy response.
This is likely related to #1294, except that was about replica set for local mongo server (in docker container), and this concerns an external mongo server with a replica set. The mongo driver seems to be attempting to connect to the replica set hostnames instead of the IP address in the mup config. Since the hostnames are not resolved within the app server docker container, this fails, so the deploy fails.
Perhaps if there was a way to tell the app server container how to resolve those hostnames?
This has worked correctly up through Meteor 2.5.6. After upgrading to Meteor 2.6 and testing successfully on local system, the mup deploy failed. The server being deployed to uses an external mongo server that is setup as a replica set. We have always provided a MONGO_URL that points to the primary server:
MONGO_URL: 'mongodb://user:password@10.33.2.12/meteor',
The mup deploy fails with three MongoNetworkError exceptions, one for each of the three server hostnames in the replica set. It seems that meteor is obtaining the replica set hostnames from the mongo server, and then trying to connect by resolving that hostname, rather than just using the IP address in the MONGO_URL?
Perhaps this is an issue in the upgraded Meteor mongo package or the updated nodejs mongo it uses?
Mup version: 1.5.7
Mup config
Output of command