# Error in connection with MongoDB

**URL:** <https://discourse.nodered.org/t/error-in-connection-with-mongodb/7239>\
**Category:** General\
**Created:** [25 January 2019 10:52 UTC](https://discourse.nodered.org/t/error-in-connection-with-mongodb/7239 "2019-01-25T10:52:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul\_Mathavan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rahul_mathavan/32/4550_2.png) [@Rahul\_Mathavan](https://discourse.nodered.org/u/Rahul_Mathavan)\
**Post date:** [25 January 2019 10:52 UTC](https://discourse.nodered.org/t/error-in-connection-with-mongodb/7239/1 "2019-01-25T10:52:38Z")

</div>

![mongodb](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/3/393cf1f0b1be24ab5b82facb40abb1872d82d57e.png)

This is the method i have tried to implement the MongoDB.  
it shows the error as  
"MongoError: failed to connect to server [127.0.0.1:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]"

I cannot connect to MongoDB to store the tweets.  
Help me with this.  
Thank you.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [25 January 2019 11:13 UTC](https://discourse.nodered.org/t/error-in-connection-with-mongodb/7239/2 "2019-01-25T11:13:11Z")

</div>

If you google the error message it will tell you that there are several different reasons for that error. You will have to work through them until you find the one you are hitting.

---

<div class="post-metadata">

**Author:** ![RahulMathavan](https://avatars.discourse-cdn.com/v4/letter/r/f4b2a3/32.png) [@RahulMathavan](https://discourse.nodered.org/u/RahulMathavan)\
**Post date:** [25 January 2019 11:38 UTC](https://discourse.nodered.org/t/error-in-connection-with-mongodb/7239/3 "2019-01-25T11:38:45Z")

</div>

Okay, Thanks.

---

<div class="post-metadata">

**Author:** ![rickirea](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rickirea/32/11770_2.png) [@rickirea](https://discourse.nodered.org/u/rickirea)\
**Post date:** [4 September 2019 23:54 UTC](https://discourse.nodered.org/t/error-in-connection-with-mongodb/7239/4 "2019-09-04T23:54:10Z")

</div>

Hi, I have the same issue, but google not have solution about node-red, did you solve it?
