mongodb 连接后无法使用 发现已经有进程在运行
mongod 命令执行发现已经有进程在运行mongod数据库--errno:48 Address already in use for socket: 0.0.0.0:27017
错误信息:
listen(): bind() failed errno:48 Address already in use for socket: 0.0.0.0:27017
27017端口已经被占用
完整error信息
2016-10-24T23:46:56.314+0800 E NETWORK [initandlisten] listen(): bind() failed errno:48 Address already in use for socket: 0.0.0.0:27017
2016-10-24T23:46:56.314+0800 E NETWORK [initandlisten] addr already in use
2016-10-24T23:46:56.314+0800 E STORAGE [initandlisten] Failed to set up sockets during startup.
2016-10-24T23:46:56.314+0800 I CONTROL [initandlisten] dbexit: rc: 48
处理方法:终端中输入:
ps aux | grep mongod
找到对应进程id,杀死:
kill -9 pid
如下图,

再次执行 mongod 命令就可以开启 mongodb 服务
window 下解决方法:
Find the process running on port 27017:
C:\Users\hughes> netstat -aon | findstr 27017
TCP 0.0.0.0:27017 0.0.0.0:0 LISTENING 3344
The last column shows the PID (3344). Find the process name for that PID:
C:\Users\hughes> tasklist /fi "pid eq 3344"
Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
VirtualBox.exe 3344 Console 1 101,908 K
For me it turned out that VirtualBox's port forwarding was the issue.
mongodb 连接后无法使用 发现已经有进程在运行的更多相关文章
- 如何在关闭ssh连接的情况下,让进程继续运行?
#screen 1 回车后进入Screen子界面,此时putty标题栏会指示处于子界面状态,然后运行你的程序 #应用程序名 1 然后按下Ctrl+A后抬起,然后按下d键,此时切换回主界面,Putty的 ...
- mongod 命令执行发现已经有进程在运行mongod数据库--errno:48 Address already in use for socket: 0.0.0.0:27017
错误信息: listen(): bind() failed errno:48 Address already in use for socket: 0.0.0.0:27017 27017端口已经被占用 ...
- 搭建集群后再namenode上查看进程发现除了三个基本进程还可能有别的进程,例如本来在子节点出现的进程出现在了主节点上
搭建集群后再namenode上查看进程发现除了三个基本进程还可能有别的进程,例如本来在子节点出现的进程出现在了主节点上,namenode按正常来说是有三个进程的:namenode,resourcema ...
- PHP - MongoDB连接攻略
http://blog.163.com/lgh_2002/blog/static/44017526201261111044608/ 使用PHP的Mongo扩展连接MongoDB.通过new Mongo ...
- MongoDB学习笔记——MongoDB 连接配置
MongoDB连接标准格式: mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[dat ...
- iPhone不为人知的功能常用技巧,看完后才发现很多用iPhone的人实在是愧对乔布斯! - imsoft.cnblogs
很多人花了四五千买部苹果,结果只用到四五百块钱的普通手机功能. iPhone不为人知的功能,常用技巧: 网上搜集整理的iPhone快捷键操作,虽然表面上iPhone按键只有一个HOME键,大部分操作都 ...
- MongoDB 连接
启动 MongoDB服务 在前面的教程中,我们已经讨论了如何启动MongoDB服务,你只需要在MongoDB安装目录的bin目录下执行'mongod'即可. 执行启动操作后,mongodb在输出一些必 ...
- 关于centos7中使用rpm方式安装mysql5.7版本后无法使用root登录的问题
最近在centos7中通过rpm方式安装了最新版本的mysql-server 5.7 (mysql57-community-release-el7-7.noarch.rpm) ,发现安装成功后无法使用 ...
- Hive concat函数连接后结果为null
Hive concat函数连接后结果为null concat函数是用来连接字符串的 使用示例: select concat('Hello','World','Java'); 运行结果: 最近我们在做需 ...
随机推荐
- 优化编辑器的编程语言 mlton
MLton 是整个程序的优化编译器的标准ML编程语言.
- BZOJ 1458 / Luogu P4311 士兵占领 (上下界最小流 / 直接最大流)
做法1:上下界最小流 先来一发上下界最小流,思路比较暴力,就是把行和列看作n+mn+mn+m个点,(i,j)(i,j)(i,j)如果能占领就从第iii行向第jjj列连一条边,上界为1下界为0;然后从s ...
- HDU-3341-Lost's revenge(AC自动机, DP, 压缩)
链接: https://vjudge.net/problem/HDU-3341 题意: Lost and AekdyCoin are friends. They always play "n ...
- 15、生命周期-BeanPostProcessor-后置处理器
15.生命周期-BeanPostProcessor-后置处理器 BeanPostProcessor 接口 package org.springframework.beans.factory.confi ...
- centos安装JDK、Tomcat、mysql
1.下载 jdk-8u131-linux-x64.tar.gz 下载地址: https://pan.baidu.com/s/1o8LW9eE 密码: miva 2.下载 apache-tomcat-8 ...
- ** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.
https://blog.csdn.net/qq_15071263/article/details/78459087 1. 警告解读 ** WARNING ** : Your ApplicationC ...
- 从 s 点到 t 点的最短路(简单模板)(迪杰斯特拉)
迪杰斯特拉简单版 #include <bits/stdc++.h> using namespace std; int m,n; const int inf = 0x3f3f3f3f; in ...
- vue中插槽(slot)的使用
刚学vue的时候,曾经学习过slot插槽的使用,但是后面接触的不多,因为之前我还没使用element-ui... 但是使用了element-ui之后,里面的许多组件,有时候会使用插槽,为了巩固一下插槽 ...
- 解决MySQL5.7在MAC下登录ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)问题
问题描述 今天在MAC上安装完MYSQL后,MYSQL默认给分配了一个默认密码,但当自己在终端上使用默认密码登录的时候,总会提示一个授权失败的错误:ERROR 1045 (28000): Access ...
- python 多线程_thread
import _thread import time def print_time(threadName, delay, iterations): start = int(time.time()) , ...