I’ve created folders, permissions, this file… but when execute I get :
This is the file into shared folder
What can I do?
Thanks a lot!!
Xavi
I’ve created folders, permissions, this file… but when execute I get :
This is the file into shared folder
What can I do?
Thanks a lot!!
Xavi
You show the content of the directory /shared/ yet you run the command from the vagrant home directory. If you run ls
over there you will see that the file in not there. By the instructions, the file is either in ./shared/ or /shared/ (notice the . in front of the first one). If you run
ls ./shared
from the directory where you ran mongod above and you see your file you can start mongod with
mongod -f ./shared/node1.conf
A good resource to understand files and directories is located at https://www.tutorialspoint.com/unix/unix-file-system.htm
The fact that you do not see anything means the server started correctly.
Try to connect with the mongo shell. Make sure you use the port specified in your config file.
Hi Steevej,
For node1 connection is ok
For node2 and node2 what I get is nothing… cursor blinking…
node2 and node3 conf files are ok so are the same as node 1 except port, logpath and dbpath
What I think is bad is permissions for /var/mongodb/db/node2 / 3 folders…
How can I know if are ok?
(Sorry but I’m newbie in linux)
Best regards and thanks for your valueable help !!
Xavi
Node1.conf
storage:
dbPath: /var/mongodb/db/node1
net:
bindIp: 192.168.103.100,localhost
port: 27011
security:
authorization: enabled
keyFile: /var/mongodb/pki/m103-keyfile
systemLog:
destination: file
path: /var/mongodb/db/node1/mongod.log
logAppend: true
replication:
replSetName: m103-example
Node2.conf
storage:
dbPath: /var/mongodb/db/node2
net:
bindIp: 192.168.103.100,localhost
port: 27012
security:
authorization: enabled
keyFile: /var/mongodb/pki/m103-keyfile
systemLog:
destination: file
path: /var/mongodb/db/node2/mongod.log
logAppend: true
replication:
replSetName: m103-example
Node3.conf
storage:
dbPath: /var/mongodb/db/node3
net:
bindIp: 192.168.103.100,localhost
port: 27013
security:
authorization: enabled
keyFile: /var/mongodb/pki/m103-keyfile
systemLog:
destination: file
path: /var/mongodb/db/node3/mongod.log
logAppend: true
replication:
replSetName: m103-example
If you are able to create dir for node1 same way create other two dirs
vagrant@m103:/var/mongodb/db$ mkdir -p /var/mongodb/db/node1
vagrant@m103:/var/mongodb/db$ ls -lrt node1
drwxrwxr-x 4 vagrant vagrant 4096 Jan 16 10:16 node1
Other two node dirs also should have same permissions
drwxrwxr-x 4 vagrant vagrant 4096 Jan 16 10:17 node2
drwxrwxr-x 4 vagrant vagrant 4096 Jan 16 10:16 node3