MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
See original GitHub issueMup version (1.4.5
):
Mup config
module.exports = {
servers: {
one: {
// TODO: set host address, username, and authentication method
host: '52.54.66.198',
username: 'ubuntu',
pem: '/home/edge-1/test.pem'
// password: 'server-password'
// or neither for authenticate from ssh-agent
}
},
app: {
// TODO: change app name and path
name: 'addisonhouse',
path: '/home/edge-1/Documents/cuurentproject/Pianca/addisonhouse',
servers: {
one: {},
},
buildOptions: {
serverOnly: true,
},
env: {
// TODO: Change to your app's url
// If you are using ssl, it needs to start with https://
ROOT_URL: 'http://52.54.66.198:3000',
MONGO_URL: 'mongodb://localhost/meteor',
PORT:3000
//MONGO_OPLOG_URL: 'mongodb://localhost/local',
},
docker: {
// change to 'abernix/meteord:base' if your app is using Meteor 1.4 - 1.5
image: 'abernix/meteord:node-8.4.0-base',
//imagePort: 3000
},
// Show progress bar while uploading bundle to server
// You might need to disable it on CI servers
enableUploadProgressBar: true
},
// (Optional)
// Use the proxy to setup ssl or to route requests to the correct
// app when there are several apps
// proxy: {
// domains: 'mywebsite.com,www.mywebsite.com',
// ssl: {
// // Enable Let's Encrypt
// letsEncryptEmail: 'email@domain.com'
// }
// }
};
Output of command
/built_app/programs/server/node_modules/fibers/future.js:313
throw(ex);
^
MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
at Pool.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/server.js:336:35)
at emitOne (events.js:115:13)
at Pool.emit (events.js:210:7)
at Connection.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:280:12)
at Object.onceWrapper (events.js:318:30)
at emitTwo (events.js:125:13)
at Connection.emit (events.js:213:7)
at Socket.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:189:49)
at Object.onceWrapper (events.js:316:30)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at emitErrorNT (internal/streams/destroy.js:64:8)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
=> Redeploying previous version of the app
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
failed to connect to server [localhost:27017] on first connect ...
You have to install MongoDB database server first in your system and start it. Use the below link to install MongoDB.
Read more >Connect ECONNREFUSED 127.0.0.1:27017 in Mongodb ...
Upon start it seems to me that Mongodb server generates a lock that blocks another process to take that port (this may be...
Read more >mongodb connect econnrefused 127.0.0.1 - You.com | The AI ...
I installed mongodb compass on windows 10 but compass app give this error ."connect ECONNREFUSED 127.0.0.1:27017 MongoDb Compass" I changed all version ...
Read more >ECONNREFUSED 127.0.0.1:27017 | Resolve the connection ...
So this is a connection issue that server is refusing... ... 127.0.0.1:27017 | Resolve the connection refused error for MongoDB server.
Read more >failed to connect to server [localhost:27017] on first ... - Intellipaat
You have to first install the MongoDB database server first in your system and start it. Use the below link to install MongoDB....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It was not only about adding the
mongo
section into your configuration. The environment variable must also fit. I highly doubt thatlocalhost
is the correct server inMONGO_URL
because this would require that you use a different base-image thanabernix/meteord:node-8.4.0-base
.I guess this is a test server and you just want it to work, right? Then please follow the following steps:
mup setup
to make sure the mongo container is installed and running.MONGO_URL
in your configuration tomongodb://mongodb:27017/meteor
(you can changemeteor
to what you want to call your app - if you want)MONGO_OPLOG_URL
tomongodb://mongodb:27017/local
in your configurationmup deploy
mup logs --tail=200
and ssh on your server and show the result of callingdocker stats
Because I only have limited time on this, I can just forward you to the docs 😉 http://meteor-up.com/docs.html#example-configs. Read carefully through those and I guess they’ll provide you with an answer.
Otherwise it might also be a good idea to read yourself into docker and their networking …