# service mongod restart
Stopping mongod: Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â [Â OKÂ ]
Starting mongod: Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â [FAILED]
The log just shows the shutdown, as it fails to start.
My old config file, the one that works, looks like this:
-----
# mongod.conf
#where to log
logpath=/var/log/mongo/mongod.log
logappend=true
# fork and run in background
fork=true
#port=27017
dbpath=/var/lib/mongo
# location of pidfile
pidfilepath=/var/run/mongodb/mongod.pid
# Listen to local interface only. Comment out to listen on all interfaces.Â
#bind_ip=127.0.0.1
# Disables write-ahead journaling
# nojournal=true
# Enables periodic logging of CPU utilization and I/O wait
#cpu=true
# Turn on/off security. Off is currently the default
#noauth=true
auth=true
# Verbose logging output.
#verbose=true
# Inspect all client data for validity on receipt (useful for
# developing drivers)
#objcheck=true
# Enable db quota management
#quota=true
# Set oplogging level where n is
# Â 0=off (default)
# Â 1=W
# Â 2=R
# Â 3=both# Â 7=W+some reads
#diaglog=0
# Ignore query hints
#nohints=true
# Enable the HTTP interface (Defaults to port 28017).
#httpinterface=true
# Turns off server-side scripting. This will result in greatly limited
# functionality
#noscripting=true
# Turns off table scans. Any query that would do a table scan fails.
#notablescan=true
# Disable data file preallocation.
#noprealloc=true
# Specify .ns file size for new databases.
# nssize=<size>
# Replication Options
# in replicated mongo databases, specify the replica set name here
#replSet=setname
# maximum size in megabytes for replication operation log
#oplogSize=1024
# path to a key file storing authentication info for connections
# between replica set members
#keyFile=/path/to/keyfile
-----
My new config file that doesn't work looks like this, aside from the IPs being changed for confidentiality:
-----
# new style YAML mongod.conf, -Kit, 09-04-14
# storage
storage:
    dbPath: "/var/lib/mongo"
# logging
systemLog:
    destination: file
    path: "/var/log/mongo/mongod.log"
    quiet: true
    logAppend: true
 Â
processManagement:
    fork: true
    pidFilePath: "/var/run/mongodb/mongod.pid"
    Â
net:
    bindIp: 127.0.0.1, 10.171.22.22, 50.22.221.22
    port: 27017
    Â
security:
     authorization: enabled
-----
Can anyone spare a clue for me? I am puzzled as to why and how this fails.
Thanks,
-Kit
# service mongod stop
Stopping mongod: Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â [Â OKÂ ]
# /usr/bin/mongod --config /etc/mongod.conf.yamlÂ
about to fork child process, waiting until server is ready for connections.
forked process: 24369
child process started successfully, parent exiting
# ps ax | grep mongo
 8974 ?    S   0:00 su -s /bin/bash mongodb-mms-agent -c /usr/bin/mongodb-mms-monitoring-agent -conf /etc/mongodb-mms/monitoring-agent.config
 8983 ?    Ssl  31:06 /usr/bin/mongodb-mms-monitoring-agent -conf /etc/mongodb-mms/monitoring-agent.config
24460 pts/0Â Â S+ Â Â 0:00 grep mongo
# ps ax | grep 24369
24525 pts/0Â Â S+ Â Â 0:00 grep 24369
What's in the log file?
Asya
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/de2d9e52-0ccf-4bbd-bcb0-32655adffa43%40googlegroups.com.
# /usr/bin/mongod --config /etc/mongod.conf.yamlÂ
about to fork child process, waiting until server is ready for connections.
forked process: 32024
child process started successfully, parent exiting
# tail /var/log/mongo/mongod.logÂ
2014-11-12T19:09:00.171+0000 [initandlisten] shutdown: going to close sockets...
2014-11-12T19:09:00.171+0000 [initandlisten] shutdown: waiting for fs preallocator...
2014-11-12T19:09:00.171+0000 [initandlisten] shutdown: lock for final commit...
2014-11-12T19:09:00.171+0000 [initandlisten] shutdown: final commit...
2014-11-12T19:09:00.176+0000 [initandlisten] shutdown: closing all files...
2014-11-12T19:09:00.178+0000 [initandlisten] closeAllFiles() finished
2014-11-12T19:09:00.178+0000 [initandlisten] journalCleanup...
2014-11-12T19:09:00.178+0000 [initandlisten] removeJournalFiles
2014-11-12T19:09:00.180+0000 [initandlisten] shutdown: removing fs lock...
2014-11-12T19:09:00.180+0000 [initandlisten] dbexit: really exiting now
-----