MongoDB keeps crashing--is it running out of memory or CPU? - mongodb

I have an issue where MongoDB keeps crashing on me:
$ sudo cat /var/log/syslog ->
Nov 28 14:06:58 ns557017 systemd[1]: mongod.service: Main process exited, code=killed, status=6/ABRT
Nov 28 14:06:58 ns557017 systemd[1]: mongod.service: Unit entered failed state.
Nov 28 14:06:58 ns557017 systemd[1]: mongod.service: Failed with result 'signal'.
Nov 28 14:06:59 ns557017 systemd[1]: mongod.service: Service hold-off time over, scheduling restart.
Nov 28 14:06:59 ns557017 systemd[1]: Stopped MongoDB Database Server.
I am using Mongo's free monitoring, and it points me towards the CPU being overused:
However if I look at htop, the CPU always seems fine:
How can I deduce what is causing Mongo to crash on me? Thanks

Related

Why I got the next errors?

could someone help me with this error please:
Output for command: systemctl start postgresql-13.service
Job for postgresql-13.service failed because the control process exited with error code.
See "systemctl status postgresql-13.service" and "journalctl -xeu postgresql-13.service" for details.
Output for command systemctl status postgresql-13.service
× postgresql-13.service - PostgreSQL 13 database server
Loaded: loaded (/usr/lib/systemd/system/postgresql-13.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2022-08-23 12:17:50 CDT; 1min 47s ago
Docs: https://www.postgresql.org/docs/13/static/
Process: 1079 ExecStartPre=/usr/pgsql-13/bin/postgresql-13-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
Process: 1110 ExecStart=/usr/pgsql-13/bin/postmaster -D ${PGDATA} (code=exited, status=1/FAILURE)
Main PID: 1110 (code=exited, status=1/FAILURE)
CPU: 40ms
Aug 23 12:17:47 fedora systemd[1]: Starting PostgreSQL 13 database server...
Aug 23 12:17:50 fedora postmaster[1110]: 2022-08-23 12:17:50.144 CDT [1110] LOG: redirecting log output to logging collector process
Aug 23 12:17:50 fedora postmaster[1110]: 2022-08-23 12:17:50.144 CDT [1110] HINT: Future log output will appear in directory "log".
Aug 23 12:17:50 fedora systemd[1]: postgresql-13.service: Main process exited, code=exited, status=1/FAILURE
Aug 23 12:17:50 fedora systemd[1]: postgresql-13.service: Killing process 1132 (postmaster) with signal SIGKILL.
Aug 23 12:17:50 fedora systemd[1]: postgresql-13.service: Killing process 1132 (postmaster) with signal SIGKILL.
Aug 23 12:17:50 fedora systemd[1]: postgresql-13.service: Failed with result 'exit-code'.
Aug 23 12:17:50 fedora systemd[1]: postgresql-13.service: Unit process 1132 (postmaster) remains running after unit stopped.
Aug 23 12:17:50 fedora systemd[1]: Failed to start PostgreSQL 13 database server.
Already I uninstall and reinstall postgresql but nothing works. Also I tried to install postgresql-14 but I get the same error.
I have to install postgresql to work alongs with Ruby on Rails.

Error running mongodb as service on Centos 7

I've got a VPS with Centos 7, But when I try to run MongoDB as service I get the following message:
Apr 06 03:11:46 server.backupserver.com systemd[1]: Starting MongoDB Database Server...
Apr 06 03:11:46 server.backupserver.com mongod[3767]: about to fork child process, waiting until server is ready for connections.
Apr 06 03:11:46 server.backupserver.com mongod[3767]: forked process: 3769
Apr 06 03:11:49 server.backupserver.com systemd[1]: Can't open PID file /var/run/mongodb/mongod.pid (yet?) after start: Too many levels of symbolic links
Apr 06 03:13:17 server.backupserver.com systemd[1]: mongod.service start operation timed out. Terminating.
Apr 06 03:13:17 server.backupserver.com systemd[1]: Failed to start MongoDB Database Server.
Apr 06 03:13:17 server.backupserver.com systemd[1]: Unit mongod.service entered failed state.
Apr 06 03:13:17 server.backupserver.com systemd[1]: mongod.service failed.
I tested the responses from another topics, but it doesn't work yet.
The "var/run/mongodb" directory and the file "mongod.pid" has the right permissions and user (mongod).
Please, help
This seems to be a message that systemd can produce under a variety of conditions. To troubleshoot:
Start with a pristine Docker, Vagrant, VirtualBox etc. image of CentOS 7.
Follow the official MongoDB installation instructions.
If you succeed, follow the official installation instructions on your VPS.

Plex media server on Raspberry pi zero w not working

I'm trying to install Plex media server on my raspberrypi zero w and i keep getting this error:
plexmediaserver.service - Plex Media Server for Linux
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled;
vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2018-09-06 18:22:09 UTC; 12s ago
Process: 1043 ExecStart=/bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserv
Process: 1039 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR
Main PID: 1043 (code=exited, status=132)
Sep 06 18:22:04 raspberrypi systemd[1]: plexmediaserver.service: Unit entered failed state.
Sep 06 18:22:04 raspberrypi systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Sep 06 18:22:09 raspberrypi systemd[1]: plexmediaserver.service: Service hold-off time over, scheduli
Sep 06 18:22:09 raspberrypi systemd[1]: Stopped Plex Media Server for Linux.
Sep 06 18:22:09 raspberrypi systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Sep 06 18:22:09 raspberrypi systemd[1]: Failed to start Plex Media Server for Linux.
Sep 06 18:22:09 raspberrypi systemd[1]: plexmediaserver.service: Unit entered failed state.
Sep 06 18:22:09 raspberrypi systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
If anyone can help I'd really appreciate it, Thanks!
(btw I'm quite a noob when it comes to raspberry pi's)
As far as I know it is not supported anymore due to lots of API changes of Plex resulting in the discontinued support of ARM v61 (Pi Zero W has ARM v61) and only "supports" ARM v7 and v8 (v64)
See also: https://forums.plex.tv/t/pi-zero-w-problems/191899/7

IPFS failed to start in Ubuntu server

I am a newbie in IPFS. I am trying to install and run the IPFS service in my Ubuntu server and hosting on the MS Azure VM instance.
Everything went well, except for one thing when I run the IPFS as service using systemd.
Here is the error that I caught it from the log file.
Aug 17 01:56:25 UbuntuTest systemd[1]: Started IPFS daemon.
Aug 17 01:56:25 UbuntuTest systemd[1]: ipfs.service: Main process exited, code=exited, status=217/USER
Aug 17 01:56:25 UbuntuTest systemd[1]: ipfs.service: Unit entered failed state.
Aug 17 01:56:25 UbuntuTest systemd[1]: ipfs.service: Failed with result 'exit-code'.
Aug 17 01:56:26 UbuntuTest systemd[1]: ipfs.service: Service hold-off time over, scheduling restart.
Aug 17 01:56:26 UbuntuTest systemd[1]: Stopped IPFS daemon.
Aug 17 01:56:26 UbuntuTest systemd[1]: Started IPFS daemon.
Aug 17 01:56:26 UbuntuTest systemd[1]: ipfs.service: Main process exited, code=exited, status=217/USER
Aug 17 01:56:26 UbuntuTest systemd[1]: ipfs.service: Unit entered failed state.
Aug 17 01:56:26 UbuntuTest systemd[1]: ipfs.service: Failed with result 'exit-code'.
Aug 17 01:56:26 UbuntuTest systemd[1]: ipfs.service: Service hold-off time over, scheduling restart.
Aug 17 01:56:26 UbuntuTest systemd[1]: Stopped IPFS daemon.
Aug 17 01:56:26 UbuntuTest systemd[1]: Started IPFS daemon.
Aug 17 01:56:26 UbuntuTest systemd[1]: ipfs.service: Main process exited, code=exited, status=217/USER
Aug 17 01:56:26 UbuntuTest systemd[1]: ipfs.service: Unit entered failed state.
Aug 17 01:56:26 UbuntuTest systemd[1]: ipfs.service: Failed with result 'exit-code'.
Aug 17 01:56:26 UbuntuTest systemd[1]: ipfs.service: Service hold-off time over, scheduling restart.
Aug 17 01:56:26 UbuntuTest systemd[1]: Stopped IPFS daemon.
Aug 17 01:56:26 UbuntuTest systemd[1]: Started IPFS daemon.
Aug 17 01:56:26 UbuntuTest systemd[1]: ipfs.service: Main process exited, code=exited, status=217/USER
Aug 17 01:56:26 UbuntuTest systemd[1]: ipfs.service: Unit entered failed state.
Aug 17 01:56:26 UbuntuTest systemd[1]: ipfs.service: Failed with result 'exit-code'.
Aug 17 01:56:26 UbuntuTest systemd[1]: ipfs.service: Service hold-off time over, scheduling restart.
Aug 17 01:56:26 UbuntuTest systemd[1]: Stopped IPFS daemon.
Aug 17 01:56:26 UbuntuTest systemd[1]: ipfs.service: Start request repeated too quickly.
Aug 17 01:56:26 UbuntuTest systemd[1]: Failed to start IPFS daemon
.
The log file it seems no longer generate info.
Why does that happen?
When I run with ipfs daemon and it works well without error.
Please advise.
Thank you

Could not start RStudio Server 0.99.893-x86_64

I installed it a Centos 7 box.
R studio server service could not start.
I run the command
systemctl status rstudio-server.service
and it showed:
● rstudio-server.service - RStudio Server
Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Thu 2016-01-28 20:18:20 ICT; 1min 6s ago
Process: 48820 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=203/EXEC)
Jan 28 20:18:20 localhost.localdomain systemd[1]: rstudio-server.service: control process exited, code=exited s...=203
Jan 28 20:18:20 localhost.localdomain systemd[1]: Failed to start RStudio Server.
Jan 28 20:18:20 localhost.localdomain systemd[1]: Unit rstudio-server.service entered failed state.
Jan 28 20:18:20 localhost.localdomain systemd[1]: rstudio-server.service failed.
Jan 28 20:18:20 localhost.localdomain systemd[1]: rstudio-server.service holdoff time over, scheduling restart.
Jan 28 20:18:20 localhost.localdomain systemd[1]: start request repeated too quickly for rstudio-server.service
Jan 28 20:18:20 localhost.localdomain systemd[1]: Failed to start RStudio Server.
Jan 28 20:18:20 localhost.localdomain systemd[1]: Unit rstudio-server.service entered failed state.
Jan 28 20:18:20 localhost.localdomain systemd[1]: rstudio-server.service failed.
I installed and run an old version (rstudio-server-0.99.491-1.x86_64) on the same box without any problem.
How could I fix the issues?
Although you asked this question 3 years ago, I think it's still necessary to share my solution to this problem.
I encounter this problem after I updated R.
The reason why you can not restart rstudio-server is that the PORT 8787 was been using by previous rserver. After knowing this, the solution is easy.
First, check the pid that was using PORT 8787
sudo netstat -anp | grep 8787
tcp 0 0 0.0.0.0:8787 0.0.0.0:* LISTEN pid/rserver
Second, kill this pid (use your pid)
sudo kill -9 pid
Third, restart rstudio-server or reinstall resutio server package