Mongodb connection refused 127.0.0.1:27017 error solved | mongoose connect error running npm start
HTML-код
- Опубликовано: 1 апр 2023
- fixed with 3 possible solutions :
Mongodb Error : couldn't connect to server 127.0.0.1:27017, connection attempt failed : solved in less than 2 minutes
change to 0.0.0.0
MongooseSeverSelectError:connect ECONNREFUSED 127.0.0.1:27017
connect ECONNREFUSED 127 0 0 127017 Resolved this error in mongo Db in English
Download mongodb :
www.mongodb.com/try/download/...
Watch how to connect your mern app with mongodb :
• How to connect your ME...
✔Connect with CodingBot
[ RUclips ]
/ @codingbotindia
Make sure to subscribe !
Thank you for tuning on.
©codingbot_2021
.all rights reserved by FROYO CHANNEL NETWORK
#npm #mern #mernstack #mongodb #programming #edureka #codingbot #mongodberror #react #webdevelopment #express #nodejs #cleverprogrammer #programmingtutorials #froyo #webapp #webdeveloper
Watch this playlist .Your problems will be solved , sure👇ruclips.net/p/PL2Iudrib2UqBMfWubK0zavAh_Hr9e6i8H
Subscribe to the channel it means a lot ❤️
thank you so much bro from the last two days i was stuck in this . Now i connected by third method😃😃😃🤩
Great ❤️
You're clear and concise with solutions. Please keep it up, you are a life saver ! 😅😅
Thank you for this video. I can't begin to tell you how much I've been struggling with connection errors. You just earned a new subscriber! Thank you
Thanks for the comment 🤩
subscribed! Thank you for the help. It actually worked when i changed "localhost" into "0.0.0.0" . Thank you.
❤️❤️🤗
thank yooooooooou, I spent 3 hours of trying to solve this issue
🤩🤩🤩
Thanks bud! I was trying to connect the db from last two days 🤝🤝
😍😍❤️
For providing this solution...now my MongoDB server is connected..... thanks again..🎉
😍❤️
one of the best and quickest solution ever...thank you so much for sharing
🤩🤩❤️
Bro thank you so much, I almost spend a day to fix this error
❤️❤️😍
Thanks ...it worked...I was stuck on this from last 2 hour
Nice ❤️😍
Thank you soo much for this helpful tutorial. The last one worked for me
😍😍💪
Thank you so much! I expend hours and hours and it was something as silly as changing localhost to 0.0.0.0
🤩🤩🤩💟
Thank you so much! , last step did the trick.
Great 😍
thanks, that was straightforward and it worked fine.
🤩❤️
The last option worked for me, Thanks
Great 😍
Thank you so much. Keep it up the good work❤
🤩❤️
You saved my life. Thank you so much 😅
😍😍
thank you so
much the third trick is working
Great 🤩
thank you so much last step worked
Great 🤩
Thank you very much, comrade.
🤩🤩
thank u so much , the third solution comes for me
🤩🤩
thank you so much i was frustated now i get connected successfully
😍😍
thank you biro for help me through this video ❤
😍😍❤️
Thank you so much
bro thanks u are lifesaver
😌❤️
My error is solved, alhamdulillah 😊
🔥💪
Thank you so much ❤
Welcome 😍❤️
Thank you so much year!
🤩❤️
in my case I'm having no mongoDB services in task manager and done the replacing 0.0.0.0, or 127.0.0.1:27017, or localhost and in my cmd nothing is getting which is related to the command mongo, then what to do, or what is missing from there, kindly help in this case ...
Try uninstall and reinstalling matched with your OS bit version
Thanks so much man ❤️
❤️😍welcome
Thanku so much 🙏
🤩🤩
thank you really helpful
😍😍😍
Thank you so much bro
😍❤️
thankyou so much
😍😍
Thankyou sir 😊
❤️❤️❤️
Thanks👍
🤩🤩
thanks it work for me
❤️❤️😍
thank you dear
🤩🤩🤩
thanks a lot brother
💟
thank you soo much man
❤️😍
Thnks my bro❤
🤩🤩
Thanks man.
❤️🤩
Thanks Bro!!
🤩🤩
Thanks bro.❤
🤩🤩
Thanks
😍❤️
Nice video helpfula
😍😍
Worked
Great ❤️
Thnx bro ❤
🤩🤩
While clicking on mongo db services it says that could not start MongoDB services (MongoDB) service on Local Computer. Error 1067: The process terminated unexpectedly.
Try uninstall and reinstall mongodb
Thaaaaaanks❤️❤️
😍❤️
thansk
🤩
thanks man
❤️😌
Gracias :D
❤️❤️
thanks
😍❤️
thanks u
❤️❤️😍
Thank you sir.. Change localhost to 0.0.0.0 worked out for me..
Can u explain the reason behind this? Is it a laptop problem.. Can u pls elaborate sir.
the localhost is just a name. The IP address assigned with that 'localhost' is 0.0.0.0 which means every web address has an unique ip address. Ex:- lets say google.com = 123.34.0.21 like this
@@CodingBotIndia So should I do something extra sir..do u recommend something extra for future coding...so prblm like this don't occur ever
Thanks for sharing. But the problem still persists even after doing that?
Try reinstalling mongodb according to the bit version of your system. Ex:- 64 bit or 32 bit. Or try upgrading the version
@@CodingBotIndia G:\Coding Acadamy\js\Advanced fun\MongoD
ode_modules\mongoose\lib\connection.js:791
err = new ServerSelectionError();
^
MongooseServerSelectionError: connect ECONNREFUSED ::1:27017
at _handleConnectionErrors (G:\Coding Acadamy\js\Advanced fun\MongoD
ode_modules\mongoose\lib\connection.js:791:11)
at NativeConnection.openUri (G:\Coding Acadamy\js\Advanced fun\MongoD
ode_modules\mongoose\lib\connection.js:766:11) {
reason: TopologyDescription {
type: 'Unknown',
servers: Map(1) {
'localhost:27017' => ServerDescription {
address: 'localhost:27017',
type: 'Unknown',
hosts: [],
passives: [],
arbiters: [],
tags: {},
minWireVersion: 0,
maxWireVersion: 0,
roundTripTime: -1,
lastUpdateTime: 1952326,
lastWriteDate: 0,
error: MongoNetworkError: connect ECONNREFUSED ::1:27017
at connectionFailureError (G:\Coding Acadamy\js\Advanced fun\MongoD
ode_modules\mongoose
ode_modules\mongodb\lib\cmap\
connect.js:370:20)
at Socket. (G:\Coding Acadamy\js\Advanced fun\MongoD
ode_modules\mongoose
ode_modules\mongodb\lib\cmap\conn
ect.js:293:22)
at Object.onceWrapper (node:events:628:26)
at Socket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
cause: Error: connect ECONNREFUSED ::1:27017
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
errno: -4078,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 27017
},
[Symbol(errorLabels)]: Set(1) { 'ResetPool' }
},
topologyVersion: null,
setName: null,
setVersion: null,
electionId: null,
logicalSessionTimeoutMinutes: null,
primary: null,
me: null,
'$clusterTime': null
}
},
stale: false,
compatible: true,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
setName: null,
maxElectionId: null,
maxSetVersion: null,
commonWireVersion: 0,
logicalSessionTimeoutMinutes: null
},
code: undefined
}
Node.js v18.16.0
Here is the message I am getting
@@soldour7597 how did u solve this?
What if I'm hosting it on a host? How to solve it on host?
Which host?
good
🤩🤩
const MongoClient = require('mongodb').MongoClient;
const url = "mongodb://0.0.0.0:27017/";
MongoClient.connect(url, (err, client)=>{
if(err) throw err;
console.log("db connected");
})
plz help it is not running
Follow this video ruclips.net/video/SBKG7zzKxAA/видео.html
Thanks
😍❤️
Thanks
❤️😍