mongodb と mongod プロセスを起動する mongodb mongodb

サイトにアクセスすると 500 でアクセスできなかった
容量みると 100% だった。これにともない、mongodb がおちてたっぽい
まず不要なログを削除し、容量を確保した上で、
その後 mongod プロセスを起動したのが以下

■monhodb プロセス確認
# service mongod status
Redirecting to /bin/systemctl status mongod.service
● mongod.service - MongoDB Database Server
Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2024-09-23 23:19:47 JST; 1h 15min ago
Docs: https://docs.mongodb.org/manual
Process: 2831 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=1/FAILURE)
Process: 2826 ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb (code=exited, status=0/SUCCESS)
Process: 2824 ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb (code=exited, status=0/SUCCESS)
Process: 2815 ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb (code=exited, status=0/SUCCESS)
#
# ps -ef | grep mongo
root 15707 10909 0 00:35 pts/0 00:00:00 grep --color=auto mongo


■mongodb 再起動
#
# service mongod restart
Redirecting to /bin/systemctl restart mongod.service
#


■monhodb プロセス確認
# ps -ef | grep mongo
mongod 15734 1 13 00:35 ? 00:00:01 /usr/bin/mongod -f /etc/mongod.conf
root 15774 10909 0 00:36 pts/0 00:00:00 grep --color=auto mongo
#
# service mongod status
Redirecting to /bin/systemctl status mongod.service
● mongod.service - MongoDB Database Server
Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2024-09-24 00:35:54 JST; 17s ago
Docs: https://docs.mongodb.org/manual
Process: 15731 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=0/SUCCESS)
Process: 15729 ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb (code=exited, status=0/SUCCESS)
Process: 15727 ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb (code=exited, status=0/SUCCESS)
Process: 15726 ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb (code=exited, status=0/SUCCESS)
Main PID: 15734 (mongod)
CGroup: /system.slice/mongod.service
└─15734 /usr/bin/mongod -f /etc/mongod.conf

Sep 24 00:35:52 118-27-32-178 systemd[1]: Starting MongoDB Database Server...
Sep 24 00:35:52 118-27-32-178 mongod[15731]: about to fork child process, waiting until server is ready for connections.
Sep 24 00:35:52 118-27-32-178 mongod[15731]: forked process: 15734
Sep 24 00:35:54 118-27-32-178 systemd[1]: Started MongoDB Database Server.