Mongod.conf creation/modification issues in Lab

I use windows 10 and i m connected to Virtual box via cmd prompt , i do the linux commands to touch and edit the mongod.conf located in /etc and now when i do ctrl esc to actually use wq! to save , it does not really do anything !!

Am I doing something wrong here ?

@Parsurama_Reddy_84828 try and edit your post and tag it to the course so that everyone knows which course your question relates to. And in the future, if you create new topics, you can do it via here and it will link to that course:

To save in Vim either “:x” or “:wq

Yes but here the problem is !! i dont get to do a ctrl esc like we do it get to type wq , i can just edit the existing config file and i am stuck there !! is there anyother way to access these files and save instead of from cmd prompt

It’s not Ctrl+Esc, just Esc. Then you can type :x or :wq.

You can edit the file as normal if it’s in the shared folder.

2 Likes

Remember to ------->

1 Like

Hi

When running command:

~$ mongod --dbpath data/db --logpath data/log/mongod.log --port 27000 --bind_ip “127.0.0.1,192.168.103.100,localhost” --fork

I got the following error:

about to fork child process, waiting until server is ready for connections.

forked process: 8686

ERROR: child process failed, exited with error number 100

To see additional information in this output, start without the “–fork” option.

When removing the “–fork” option I get no messages but when launching “mongo --port 27000” from terminal 2 I got the following:

MongoDB shell version v3.6.14

connecting to: mongodb://127.0.0.1:27000/?gssapiServiceName=mongodb

2019-10-22T01:19:25.174+0000 W NETWORK [thread1] Failed to connect to 127.0.0.1:27000, in(checking socket for error after poll), reason: Connection refused

2019-10-22T01:19:25.174+0000 E QUERY [thread1] Error: couldn’t connect to server 127.0.0.1:27000, connection attempt failed :

connect@src/mongo/shell/mongo.js:263:13

@(connect):1:6

exception: connect failed

Please advice!

Thanks

Salvador

@Salvador_20710

Can you make this into a new topic? You question doesn’t seem related to this topic.

Hi @Salvador_20710,

Please correct your mongod command to use correct dbpath and logpath as “/data/db” and “/data/log/mongod.log”.

The other thing that needs to be corrected is bind_ip parameter - either use “127.0.0.1,192.168.103.100” or “localhost,192.168.103.100”.

Please let me know if you face any more issues.

Thanks,
Muskan
Curriculum Support Engineer

I have the same issue:

When I use
mongod --dbpath /data/db --logpath /data/log/mongod.log --port 27000 --fork --bind_ip “localhost, 192.168.103.100”

I get the Error

Blockquote

about to fork child process, waiting until server is ready for connections.

forked process: 8948

ERROR: child process failed, exited with error number 1

To see additional information in this output, start without the “–fork” option

Blockquote

Can you help me please?I am stuck since several days on this topic.

@Timija_80371 This thread is going completely off topic. Suggest you create a brand new thread of your own and someone will assist.

I figured out the solution to my issue:
I only should have specified the following:

–port
–dbpath
–bind_ip

(without --fork and without --logpath)

Closing the thread as the original issue has been resolved.