mongodb - mongo: ERROR: child process failed, exited with error number 100 -


i created replica set of 3 instances on mongodb. each member of replica set instantiated using config file. when tested it, went well, , executed without errors.

the next step, generating error in title enable internal authentication. in order that, followed mongo documentation found in page:

[a] https://docs.mongodb.com/v3.0/tutorial/enable-internal-authentication/

first, generated keyfile using 2 lines of code below

openssl rand -base64 755 > <path-to-keyfile> chmod 400 <path-to-keyfile>  

i couldn't exeucte lines without being root did using root.

then added keyfile inside instance's config file.

# , how store data. storage:   dbpath: /mon/data1/ journal:   enabled: true #engine: #mmapv1: #wiredtiger:  #where write logging data. systemlog:   destination: file   logappend: true   path: /var/log/mongodb/mongod1.log  #network interfaces net:   port: 27018   bindip: 127.0.0.1  processmanagement:   fork: true  security:   keyfile: /etc/keyfiles  replication:   replsetname: "myrepl" 

now in order start mongo again, wrote following command, use everytime

sudo mongod --config /etc/mongod1.config 

and got error above. made sure owned root. dbpath, config file, , keyfile.

then, switched owned regular user , tried start mongod regular user (without sudo). received same error.

what think solution?

normally log file tells wrong... try make few changes. put "" round strings (like down here) , add pidfilepath:

processmanagement: fork: true pidfilepath: "/var/run/mongodb/mongod.pid"

(of course 'monogdb' directory must owned user use running mongod)

then 1 way test things put config file values parameters (and no --fork), way error message tell went wrong.

mongod --dbpath /mon/data1/ --logpath /var/log/mongodb/mongod1.log --logappend --keyfile /etc/keyfiles --replset myrepl


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -