Running IDE for chapter 1

Hi, i had issues with IDE in M001, now in M103 I see that the IDE most be used
While writing “mongod” I get this


then, It seems like the terminal does not respond to my user, and anything I’m typing results in nothing.

also, there is an error on the top of the screen but this error pops whenever i refresh the page

cc: @Kushagra_Kesav

and for “mongo” I receive this

You can connect only when your mongod is up & running
When you issue just mongo it tries to connect to default mongod which runs on port 27017
How did you start your mongod?
With config file or command line or just mongod?

In the first screenshot it shows that mongod is running. The fifth line from the bottom says:

waiting for connections on port 27017

The problem here is that the process was not started with either the --fork command line option or the processManagement.fork option being set to true in the configuration file. Either of these options would start the mongod process in the background and you would be given an operating system prompt once more.

From the look of things, you ran mongod on the command line. I assume from the second screenshot you had killed this process and then tried to run mongo. As Ramachandra states, you can’t do that.

Since you’re on the Launching mongod lab, you just need to start the process on the proper port and then click on the Run Test. This lab doesn’t have you fork the process, so that explains what you are seeing.

i just ran “mongod” in the IDE shell
The MongoDB is running on my laptop
image

I’m sure that something I’m doing is wrong but I’m not sure why

What is the actual steps I need to do on the IDE?

You have to start mongod on the port you are asked to start
mongod --port port_number
Please read lab instructions and go as per that else your test result will fail

The lab is done solely through the browser page. It will not interact with your locally running copy of MongoDB.

In the lab, click on the Launch IDE button. In the portion of the web page titled Terminal 0 type in the command to start the MongoDB process on the proper port. Once that’s running and you see the message waiting for connections on port 27000, click on the Run Test button in the lower right hand corner of the web page. If you don’t see this button you might need to maximize your screen or reduce your font using either CTL + - to reduce the font size.

2 Likes

Hey @Liron_Moskovich,

With the response from @Ramachandra_Tummala and @Doug_Duncan, I hope your issue has been resolved. If you are still experiencing problems while attempting the labs, let us know.

Thanks,
Kushagra

Thank you guys for being very responsive here.
I ran “mongod --port 27000” and I had a message on the screen “waiting for connections on port 27000”
then, I hit the “run test” and I receive this

You should start the mongod using a config file with authorization enabled
What you started is from command line

3 Likes

@Ramachandra_Tummala im still noob in all of this
not familiar with the config file, I saw the videos and at the point of the IDE I’m not sure how to use the mongod.conf

I see in the code editor
"# fill out this configuration file, mongod.conf!

and then use it to run mongod with:

mongod -f mongod.conf"

But I don’t understand how to fill it correctly and using the port 27000

Add those two parameters to your config file and try to start mongod
No harm in trying different ways.If you get error correct it and try again
You can get sample config files from our forum

What is this config file? how do I create it or when can I find it?
I am not familiar with different ways, and I am trying already a week to try again and again…
i searched in

for sample config file but I don’t know what to do with it

Config file is a parameter file to start your mongod with different params like port,dbpath,logpath etc
Instead of starting it from command line you will be using a file
In your code editor empty config file is there
Just add the two parameters with proper heading and indentation
If you see the sample file from mongo documentation you may get confused with so many params
That’s why suggested you to check our forum threads where you find contents needed for this lab

In the IDE, the top pane would be the mongod.conf file that you need to edit. Any changes you make there will be automatically saved to the file.

I would recommend reading the configuration file settings documentation, especially around net and security. These are the top level YAML entries that contain the settings you need to configure.

1 Like