Mongodb Configuration Startup Problem

  mongodb, question

This is my profile

Port=27017 # port number
 Fork=true # runs as a daemon, creating a server process
 # master=true # set as master server in single master-slave configuration
 #salve=true ## Set as Slave in Single Master-Slave Configuration
 Log path = ~/database/data/log.log # log output file path
 Logappend=true # log output method
 Dbpath=~/database/data/db/ # database path
 # replSet=testrs # sets the name of the rich set
 # shardsvr=true # sets whether to slice
 # auth=true# open license
mongod -f ~/database/data/mongodb.conf

Try to start and report an error:

about to fork child process, waiting until server is ready for connections.
 forked process: 27916
 ERROR: child process failed, exited with error number 1

This situation is more likely because there are problems with the path and permissions of the log file.

There was a similar discussion on stackoverflow:http://stackoverflow.com/ques …

The landlord himself found the solution is to change the path of the log file to/home/<user>Absolute path.

Use~On behalf of home is an alias provided by the shell and can only be used in the shell.