output is
Starting mongod: /usr/bin/dirname: extra operand `2>&1.pid'
Manual start via sudo mongod -f /etc/mongod.conf works
How can this be fixed?
Could you help us help you and provide some additional information?
What version of mongodb is this, was it recently upgraded? What's in the mongod.conf file? How was the service installed/upgraded?
By the way, are you sure mongod isn't working? It's possible the message is just cosmetic, if so, it's likely this bug:
(not specific to mongod but specific to upgrading to 6.6 RH/CentOS)
Version is v2.6.5
Last update from appears to have been on 20 Oct: mongodb-org-tools-2.6.5-1.x86_ 64, mongodb-org-mongos-2.6.5-1. x86_64, mongodb-org-server-2.6.5-1. x86_64, mongodb-org-shell-2.6.5-1.x86_ 64, mongodb-org-2.6.5-1.x86_64
config below (stripped comments)
# mongo.conf
logpath=/var2/log/mongo/ mongod.log
logappend=true
fork = true
port = 27017
dbpath=/var/lib/mongo
pidfilepath = /var/run/mongodb/mongod.pid
cpu = true
rest = true
replSet = rs01
jsonp = true
Not sure, but from the error seems that has something to do with positional arguments, specially with datadir and 2>&1.pid redirection.
Hope it helps,
problem line in /etc/init.d/mongod is
daemon --user "$MONGO_USER" "$NUMACTL $mongod $OPTIONS >/dev/null 2>&1"
Line is getting translated as
daemon --user mongod 'numactl --interleave=all /usr/bin/mongod -f /etc/mongod.conf >/dev/null 2>&1'
Yeah, that is what I figured out too. Somehow the functions in /etc/rc.d/init.d/functions bungles up when parsing the commandline sent to daemon().
The script works as it should once you remove the '>/dev/null 2>&1' bits, but you get the extra output ...
"Starting mongod: about to fork child process, waiting until server is ready for connections.
forked process: <nnnnn>
child process started successfully, parent exiting
[ OK ]"
I've not had time to trace it down into those /etc/rc.d/init.d/functions yet, but somehow the redirections are screwing the script up.
The script works as it should once you remove the '>/dev/null 2>&1' bits, but you get the extra output ...
"Starting mongod: about to fork child process, waiting until server is ready for connections.
forked process: <nnnnn>
child process started successfully, parent exiting
I've not had time to trace it down into those /etc/rc.d/init.d/functions yet, but somehow the redirections are screwing the script up.
댓글 없음:
댓글 쓰기