M150 Error 1102 with IDE

I am not sure what is going on or how to fix this, but I can’t complete any of the labs.

You are trying to run the configuration file as a command.

The command to start mongod is https://docs.mongodb.com/manual/reference/program/mongod/

I don’t understand what is going wrong…
Error code 1102…

Also have an issue on the next lab: creating a user administrator

Hi @Judith_Hackler, welcome to the community. Glad to have you here!

Please try connecting to port 27000 instead of 27001, and see if that resolves the issue.


1 Like

The command mongo starts the shell. The command mongod, for which I posted a link, starts the mongod server.

You have to start mongod before trying to connect with mongo.

If you are unsure about those concepts, I recommend that you take the courses M103 first.

This is for the M150 course, chapter 1 lab when I try to connect vi mongod.conf
I just need this lab to work, can someone verify that I haven’t messed it up , and if I have, reset it?

Found a swap file by the name “.mongod.conf.swp”
owned by: root dated: Tue Oct 05 17:16:19 2021
file name: ~root/workspace/mongod.conf
modified: YES
user name: root host name: IHXOA3S3D9kbezQjm7
process ID: 176
While opening file “mongod.conf”
dated: Tue Oct 05 17:15:45 2021
(1) Another program may be editing the same file. If this is the case,
be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use “:recover” or “vim -r mongod.conf”
to recover the changes (see “:help recovery”).
If you did this already, delete the swap file “.mongod.conf.swp”
to avoid this message.
“mongod.conf” 14 lines, 231 characters
Press ENTER or type command to continue

user@M150# mongo admin --host localhost:27001
MongoDB shell version v4.4.3
connecting to: mongodb://localhost:27001/admin?compressors=disabled&gssapiServiceName=mongodb
Error: couldn’t connect to server localhost:27001, connection attempt failed: SocketException: Error connecting to localhost:27001 ( :: caused by :: Connection refused :
exception: connect failed
exiting with code 1

You have to start mongod before doing the above.

How do I do that please?

Do not use vi inside the IDE. Use the integrated editor. The file you are supposed to edit is supposed to be already loaded in the editor. Try to reset the workspace before retrying anything.

As already mentioned: