Error @node2 creation ,Please help me on this

----Error @node2 creation ------

vagrant@m103:~$ mongod -f node2.conf
Error parsing YAML config file: yaml-cpp: error at line 5, column 14: illegal map value
try ‘mongod --help’ for more information

-----------------node2 content mentioned in the below ,Please correct me if am wrong ----------------------
cat node2.conf
storage:
dbPath: /home/vagrant/var/mongodb/db/node2
net:
bindIp: 192.168.103.100,localhost
port: 27
security:
authorization: enabled
keyFile: /home/vagrant/var/mongodb/pki/m103-keyfile
systemLog:
destination: file
path: /home/vagrant/var/mongodb/db/node2/mongod.log
logAppend: true
processManagement:
fork: true
replication:
replSetName: m103-example
vagrant@m103:~$

--------------- please refer the node1 content mentioned in the below —

vagrant@m103:~$ cat node1.conf
storage:
dbPath: /home/vagrant/var/mongodb/db/node1
net:
bindIp: 192.168.103.100,localhost
port: 27011
security:
authorization: enabled
keyFile: /home/vagrant/var/mongodb/pki/m103-keyfile
systemLog:
destination: file
path: /home/vagrant/var/mongodb/db/node1/mongod.log
logAppend: true
processManagement:
fork: true
replication:
replSetName: m103-example

------Below is the responce while crating node1 ,which is fine ------
vagrant@m103:~/var/mongodb/db/node1$ cd /home/vagrant
vagrant@m103:~ ls data first_mongod node1.conf second_mongod var vagrant@m103:~ mongod -f node1.conf
about to fork child process, waiting until server is ready for connections.
forked process: 17103
child process started successfully, parent exiting
vagrant@m103:~$ ls


Looks like your port is wrong as per above output
27?
should be 27012 i think

Hi Ram,

Thanks for the response ,I caught the error , port number is correct but there was

colon ( : ) ,right next ,I correct it and able to execute it ,Thanks again.

port: 27012:

Port is correct :slight_smile:

vagrant@m103:~ cat node2.conf storage: dbPath: /home/vagrant/var/mongodb/db/node2 net: bindIp: 192.168.103.100,localhost port: 27012: security: authorization: enabled keyFile: /home/vagrant/var/mongodb/pki/m103-keyfile systemLog: destination: file path: /home/vagrant/var/mongodb/db/node2/mongod.log logAppend: true processManagement: fork: true replication: replSetName: m103-example vagrant@m103:~