basir / node-react-ecommerce

Build ECommerce Website Like Amazon By React & Node & MongoDB
https://node-react-ecommerce-app.herokuapp.com/
1.69k stars 793 forks source link

Pt. 14 - MongoDB Error - {"message":"Operation `users.insertOne()` buffering timed out after 10000ms"} #139

Open christianzoll opened 3 years ago

christianzoll commented 3 years ago

At 3:21:23 when I type localhost:5000/api/users/createadmin in my browser this message is returned.

Screen Shot 2021-03-10 at 8 49 18 PM
christianzoll commented 3 years ago

I've replayed the section multiple times to check for typing errors but that hasn't fixed the problem.

larrycoons commented 3 years ago

This same issue came up with me. Have you found a resolution?

larrycoons commented 3 years ago

So, after downloading from the website, a little research and finding not much info, I decided to open

$ [filepath]/downloads/mongodb-macos-x86_64-4.4.5/bin directory then opened > install_compass > navigate to the $ [filepath/applications directory and open "MongoDB Compass" app [note: file extension .app] > opened that app and answered all the questions up to where I got to the "New Connection" page > selected "fill in fields manually" > selected the "connect" button

that made an error "connection to 52.24.221.173:27017 closed" so I had to play around with it a little bit to figure out I needt to do these things:

I then went and clicked on "create free cluster" (I think I answered some questions, maybe not) > navigate to setup "Database Access" (remember your username and password for later) > navigate to setup "Network Access" (using current IP address) > back to "Clusters" page > "connect" button > "Connect using mongoDB compass" option > "I have mongoDB Compass" option > copy/pasted connection string (but I updated the username and password in the string to match the Database User > click connect

That took me to a different screen in mongoDB compass but I am not clear what to do next so I am still looking into it. Attached is the screen I made it to:

Screen Shot 2021-04-27 at 10 29 24 AM
larrycoons commented 3 years ago

So I am back at it again. I double-checked that all three of these were okay:

1) Connect to your cluster

2) MongoDB node driver

3) Quick start Node.js

That's what I am working on right now at least. After that I am going to look over the code that was created in Pt. 14 and see if it matches what is suggested, if anything, in mongoose literature.