mongod instance restart not working

ashenoy9ashenoy9 EntrantActive Member Participant
I installed Percona for mongodb and they seem to work fine as a standalone instance. However, when I try to create a replica set , the startup is failing with the below message. It is not taking the parameter changes in mongod.conf too well (defaults work fine) I have set the ownerships correctly , included the BindIP to private IP, added the /etc/hosts . Can anyone guide me through this. I am currently trying to setup a 3 node replica set on GCP and stuck with this.

My VMs are on Linux mongo-1 4.9.0-12-amd64 #1 SMP Debian 4.9.210-1 (2020-01-20) x86_64 GNU/Linux.


Status after restart :

service mongod status
● mongod.service - High-performance, schema-free document-oriented database
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2020-03-10 06:47:05 UTC; 10h ago
Process: 12375 ExecStart=/usr/bin/env bash -c ${NUMACTL} /usr/bin/mongod ${OPTIONS} > ${STDOUT} 2> ${STDERR} (code=exited, status=2)
Process: 12356 ExecStartPre=/usr/bin/percona-server-mongodb-helper.sh (code=exited, status=0/SUCCESS)
Main PID: 3626 (code=exited, status=0/SUCCESS)

Mar 10 06:47:05 mongo-1 systemd[1]: Starting High-performance, schema-free document-oriented database...
Mar 10 06:47:05 mongo-1 systemd[1]: mongod.service: Control process exited, code=exited status=2
Mar 10 06:47:05 mongo-1 systemd[1]: Failed to start High-performance, schema-free document-oriented database.
Mar 10 06:47:05 mongo-1 systemd[1]: mongod.service: Unit entered failed state.
Mar 10 06:47:05 mongo-1 systemd[1]: mongod.service: Failed with result 'exit-code'.


Is it something to do with numactl , as I see in /usr/bin/percona-server-mongodb-helper.sh .


#
. /etc/default/mongod
DAEMON_OPTS="${OPTIONS}"
#
# Handle NUMA access to CPUs (SERVER-3574)
# This verifies the existence of numactl as well as testing that the command works
NUMACTL_ARGS="--interleave=all"
if which numactl >/dev/null 2>/dev/null && numactl $NUMACTL_ARGS ls / >/dev/null 2>/dev/null
then
NUMACTL="numactl $NUMACTL_ARGS"
DAEMON_OPTS=${DAEMON_OPTS:-"--config $CONF"}
NUMA_CONF=$(grep -c 'NUMACTL="numactl --interleave=all"' /etc/default/mongod)
if [ $NUMA_CONF = 0 ]
then
echo 'NUMACTL="numactl --interleave=all"' >> /etc/default/mongod
fi
else
NUMACTL=""
DAEMON_OPTS=${DAEMON_OPTS:-"--config $CONF"}
fi

However, numactl --interleave=all throws in the usage . Is there something I need to change here?


usage: numactl

command args ...
numactl
numactl
numactl

--shm | -S
--file | -f

memory policy | --dump | -d | --dump-nodes | -D

memory policy is --interleave | -i, --preferred | -p, --membind | -m, --localalloc | -l
is a comma delimited list of node numbers or A-B ranges or all.
Instead of a number a node can also be:
netdev:DEV the node connected to network device DEV
file:PATH the node the block device of path is connected to
ip:HOST the node of the network device host routes through
block:PATH the node of block device path
pci:[seg:]bus:dev[:func] The node of a PCI device
is a comma delimited list of cpu numbers or A-B ranges or all
all ranges can be inverted with !
all numbers and ranges can be made cpuset-relative with +
the old --cpubind argument is deprecated.
use --cpunodebind or --physcpubind instead
can have g (GB), m (MB) or k (KB) suffixes


Thank you ,
Amritha.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.