From e15f1abe770bf3e34030441b7ce36905b6cce89e Mon Sep 17 00:00:00 2001 From: tactonbishop Date: Tue, 30 Aug 2022 10:30:04 +0100 Subject: [PATCH] Last Sync: 2022-08-30 10:30:04 --- Databases/MongoDB/Create_database.md | 28 ---------------------- Databases/MongoDB/Troubleshooting.md | 36 ++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 28 deletions(-) create mode 100644 Databases/MongoDB/Troubleshooting.md diff --git a/Databases/MongoDB/Create_database.md b/Databases/MongoDB/Create_database.md index dd281f3..1c6cc92 100644 --- a/Databases/MongoDB/Create_database.md +++ b/Databases/MongoDB/Create_database.md @@ -26,31 +26,3 @@ This will run continuously in the terminal and should say somewhere that it is w _Compass_ is a graphical interface for viewing and interacting with the data in your Mongo database. It will automatically load to the default Mongo port: `27017`. ![](/img/mongo-compass.png) - -## Arch Linux troubleshooting - -Most times any problems will be a result of a Mongo process that is already running. Resolve with: - -```bash -# Kill running Mongo process... -# Identify PID -sudo lsof -iTCP -sTCP:LISTEN -n -P -sudo kill [pid] -``` - -Otherwise try the below. - -```bash -# Check that the systemd service is runnign for Mongo -sudo systemctl status mongodb - -# If not, enable and start service (only need to do this once for machine) -sudo systemctl enable --now mongodb -sudo systemctl start --now mongodb - -# If issues with Mongo daemon... -# Remove the current socket -rm /tmp/mongodb-27017.sock -``` - -For additional command line utilities you will also need to install `mongodb-tools` from the AUR. diff --git a/Databases/MongoDB/Troubleshooting.md b/Databases/MongoDB/Troubleshooting.md new file mode 100644 index 0000000..c53ee72 --- /dev/null +++ b/Databases/MongoDB/Troubleshooting.md @@ -0,0 +1,36 @@ +--- +categories: + - Databases + - Linux +tags: [mongo-db] +--- + +# Troubleshooting MongoDB connection issues + +## Arch Linux troubleshooting + +Most times any problems will be a result of a Mongo process that is already running. Resolve with: + +```bash +# Kill running Mongo process... +# Identify PID +sudo lsof -iTCP -sTCP:LISTEN -n -P +sudo kill [pid] +``` + +Otherwise try the below. + +```bash +# Check that the systemd service is runnign for Mongo +sudo systemctl status mongodb + +# If not, enable and start service (only need to do this once for machine) +sudo systemctl enable --now mongodb +sudo systemctl start --now mongodb + +# If issues with Mongo daemon... +# Remove the current socket +rm /tmp/mongodb-27017.sock +``` + +For additional command line utilities you will also need to install `mongodb-tools` from the AUR.