SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused : connect@src/mongo/shell/mongo.js:341:17 @(connect):2:6
Shell
This method only works if you want to repair your data files without preserving the original files
To find where you dbpath resides- vim /etc/mongodb.conf
check for option dbpath=
(I have dbpath=/var/lib/mongodb)
Default: /data/db/
Typical locations include: /srv/mongodb, /var/lib/mongodb or /opt/mongodb .
Replace the /var/lib/mongodb with your dbpath
sudo rm /var/lib/mongodb/mongod.lock
sudo mongod --dbpath /var/lib/mongodb/ --repair
sudo mongod --dbpath /var/lib/mongodb/ --journal
(Make sure that you leave you terminal running in which you have run above lines, dont press 'Ctrl+c' or quit it.) Type the command to start mongo now in another window.
Hope this works for you ! for those who want to repair your data files while preserving the original files mongo recoversudo rm /var/lib/mongodb/mongod.lock
Also in Shell:
- Title
- sh declare variable
- Category
- Shell
- Title
- Port 3000 is already in use, but when I try to kill nothing is found
- Category
- Shell
- Title
- view host entires mac terminal
- Category
- Shell
- Title
- reset branch on local git
- Category
- Shell
- Title
- linux symlink directory example
- Category
- Shell
- Title
- how to install enzyme
- Category
- Shell
- Title
- kill process on port windows
- Category
- Shell
- Title
- git bisect
- Category
- Shell
- Title
- force pull github
- Category
- Shell
- Title
- laravel lumen
- Category
- Shell
- Title
- install deb file
- Category
- Shell
- Title
- screen recorder linux
- Category
- Shell
- Title
- Failed at the [email protected] postinstall script.
- Category
- Shell
- Title
- ubuntu terminal get version
- Category
- Shell
- Title
- boolean constants in bash
- Category
- Shell
- Title
- fast rsync
- Category
- Shell
- Title
- powershell bulk rename and add extra string to filename
- Category
- Shell
- Title
- Verificação de acesso de escrita [/srv/moodle/lib/editor/atto/plugins] Instalação abortada devido a falha de validação
- Category
- Shell
- Title
- npm install express-handlebars
- Category
- Shell
- Title
- bash list of integers
- Category
- Shell
- Title
- vim compare 2 files
- Category
- Shell
- Title
- install vue router
- Category
- Shell
- Title
- yarn change version
- Category
- Shell
- Title
- git create tag and push
- Category
- Shell
- Title
- debian install git server
- Category
- Shell
- Title
- clone repository git
- Category
- Shell
- Title
- disable open file explorer erverytime i connect usb ubuntu
- Category
- Shell
- Title
- ubuntu install sfml
- Category
- Shell
- Title
- split large file into smaller files
- Category
- Shell
- Title
- wireless network disconnected ubuntu
- Category
- Shell
- Title
- edit files from terminal linux
- Category
- Shell
- Title
- install vuex
- Category
- Shell
- Title
- how to save environment variables ubuntu
- Category
- Shell
- Title
- set feh wallpaper
- Category
- Shell
- Title
- find exclude hidden files
- Category
- Shell
- Title
- angular add service worker
- Category
- Shell
- Title
- bash find file
- Category
- Shell
- Title
- git authentication failed clone
- Category
- Shell
- Title
- increase no of watchers
- Category
- Shell
- Title
- git reset soft
- Category
- Shell
- Title
- kubernetes copy files to persistent volume
- Category
- Shell
- Title
- git files changed between two commits
- Category
- Shell
- Title
- cambiar nombre branch git
- Category
- Shell
- Title
- heic open linux
- Category
- Shell
- Title
- how to install gatsby with typescript
- Category
- Shell
- Title
- install tomcat on mac brew
- Category
- Shell
- Title
- install wireguard
- Category
- Shell
- Title
- copy folder from s3 to local
- Category
- Shell
- Title
- list config git
- Category
- Shell
- Title
- fcm post example curl
- Category
- Shell
- Title
- git flow
- Category
- Shell
- Title
- long term projects for java learners
- Category
- Shell
- Title
- cordova ios emulators
- Category
- Shell
- Title
- grep
- Category
- Shell
- Title
- rtl8821ce driver linux
- Category
- Shell
- Title
- linux generate file
- Category
- Shell
- Title
- git return from detached head
- Category
- Shell
- Title
- updated gitignore not working
- Category
- Shell
- Title
- how to install theme in sublime text 3
- Category
- Shell
- Title
- linux rsync example
- Category
- Shell
- Title
- list number of files in each folder linux
- Category
- Shell
- Title
- laravel generate mailable
- Category
- Shell
- Title
- create a zip file in linux
- Category
- Shell
- Title
- linux c++ from console
- Category
- Shell
- Title
- check if kubernetes is running
- Category
- Shell
- Title
- How to find your ip on debian linux wsl
- Category
- Shell
- Title
- unable to install deno in ubuntu
- Category
- Shell
- Title
- zip command in linux
- Category
- Shell
- Title
- install imblearn
- Category
- Shell
- Title
- kill port ubuntu
- Category
- Shell
- Title
- list all services using systemctl
- Category
- Shell
- Title
- centos 7 install iptables
- Category
- Shell
- Title
- ubuntu camera not longer found
- Category
- Shell
- Title
- install node 12 linux terminal w10
- Category
- Shell
- Title
- helm add stable hub
- Category
- Shell
- Title
- Could not install Visual Studio Build Tools.
- Category
- Shell
- Title
- install seaborn
- Category
- Shell
- Title
- tree process linux commnad
- Category
- Shell
- Title
- How do I see which version of Swift I'm using
- Category
- Shell
- Title
- linux give full permission to directory
- Category
- Shell
- Title
- conda install mmcv
- Category
- Shell
- Title
- git stash command with name
- Category
- Shell
- Title
- how to upload on github with command
- Category
- Shell
- Title
- remove .svn recursively linux
- Category
- Shell
- Title
- how to change directory linux
- Category
- Shell
- Title
- linux get full path
- Category
- Shell
- Title
- append a string in all files name linux
- Category
- Shell
- Title
- linux check cpu usage
- Category
- Shell
- Title
- how to remove git from project
- Category
- Shell
- Title
- how to add extension to all files terminal
- Category
- Shell
- Title
- serverless invoke sqs
- Category
- Shell
- Title
- install pip kali
- Category
- Shell
- Title
- remove mysql
- Category
- Shell
- Title
- delete git
- Category
- Shell
- Title
- how to change permissions on a file in linux
- Category
- Shell
- Title
- unir arquivos linux
- Category
- Shell
- Title
- git remove remote file keep local
- Category
- Shell
- Title
- how to convert ppk to pem in linux
- Category
- Shell
- Title
- delete git tag remote
- Category
- Shell
- Title
- how to move file in directory in linux
- Category
- Shell