MongoDB
Service overview
| Software owner | MongoDB, Inc. |
|---|---|
| Management | wfmanager (start | stop | restart | status) mongodb_db |
| Log files | /supervisord/log/mongodb_db.err.log /supervisord/log/mongodb_db.out.log |
| Installation directories | binaries: /mongodb_db/bin/ data: /mongodb_db/data/ |
| Configuration files | /mongodb_db/etc/mongodb.conf |
| Default Ports | tcp 27016 |
Troubleshooting
Check if TCP port 27106 is available. Port may be custom
netstat command output
$ netstat -lntp | grep mongod
tcp 0 0 0.0.0.0:27106 0.0.0.0:* LISTEN 5655/mongod
ss command output
$ ss -ltn | egrep '27016'
LISTEN 0 128 *:27016 *:*
lsof command output
$ lsof -P -n -i :27016 | grep LISTEN
mongod 5655 wfuser 6u IPv4 39040 0t0 TCP *:27016 (LISTEN)
Check the default main log files
<INSTALL_DIR>/supervisord/log/mongodb_db.out.log
<INSTALL_DIR>/supervisord/log/mongodb_db.err.log
<INSTALL_DIR>/mongodb_db/log/mongodb.log
$ tail -f <INSTALL_DIR>/supervisord/log/mongodb_db.err.log <INSTALL_DIR>/supervisord/log/mongodb_db.out.log
Wfmanager util can be used to check mongodb out log
wfmanager tail mongodb_db
Enable debug information
Add the appropriate log level to <INSTALL_DIR>/mongodb_db/etc/mongodb.conf (default is 0) using "verbosity" option and restart mongodb_db service:
${install_dir}/mongodb_db/etc/mongodb.conf
systemLog:
destination: file
path: /opt/workfusion/mongodb_db/log/mongodb.log
logAppend: true
verbosity: 4
The verbosity level can range
from 0 to 5:
0is the MongoDB’s default log verbosity level, to include Informational messages.1to5increases the verbosity level to include Debug messages.
wfmanager restart mongodb_db