Cent OS 7上需要把mongoDB添加到systemd,否则会出现上面的错误

将mongoDB添加到systemd

# vim /usr/lib/systemd/system/mongod.service

[Unit]
Description=mongodb database

[Service]
User=mongod
Group=mongod
Environment="OPTIONS=--quiet -f /etc/mongod.conf"
ExecStart=/usr/bin/mongod $OPTIONS run
PIDFile=/var/run/mongodb/mongod.pid

[Install]
WantedBy=multi-user.target

建立链接
ln -s /usr/lib/systemd/system/mongod.service /etc/systemd/system/multi-user.target.wants/

重新加载systemctl
systemctl daemon-reload

mongod.service: control process exited, code=exited status=1的更多相关文章

  1. CenOS7.1 vncserver@:1.service: control process exited, code=exited status=2

    参考:http://www.cnblogs.com/gaohong/p/4829206.html 报错细节: vncserver@:1.service: control process exited, ...

  2. centOS 7一个解决“network.service: control process exited, code=exited status=1”方法

    今天早上2017-08-04,我打开虚拟机,使用远程工具xshell对虚拟机进行连接,我发现连接不上去,然后我ifconfig,发现找不到ens33了,就剩一个本地回环,看来是我的网络出现了问题,然后 ...

  3. nginx.service: control process exited, code=exited status=1

    安装linux的宝塔面板,结果面板显示nginx和php已经运行了,但是机器系统上并没有运行.记录一次nginx报错,操作步骤看下代码: [root@localhost nginx]# systemc ...

  4. vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT和vsftpd:500 OOPS: vsftpd: refusing to run with writable root inside chroot ()错误的解决方法

    今天在配置VSFTPD过程中遇到两个错误 1是启动失败,通过 SERVICE VSFTPD STATUS 查看到报错 May 02 16:06:58 debian systemd[1]: Starti ...

  5. centos 7 network.service control process exited

    一.service network restart 出错 问题描述: vmware 12 下centos 7 网络模式,NAT 昨晚作者打算更新自己虚拟机python,发现没网络ping www.ba ...

  6. main process exited, code=exited, status=203/EXEC

    问题描述: Oct :: c_3. systemd[]: Started etcd. Oct :: c_3. systemd[]: Starting etcd... Oct :: c_3. syste ...

  7. (samba启动失败)smb.service: main process exited, code=exited, status=1/FAILURE

    按照指示,前往:journalctl -xe 没什么发现,搜的时候有人说也可以查看 journalctl -r 打出来之后我也看不出什么门道来 又看到有人说 smb 方面可以看看 testparm 我 ...

  8. Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details

    thinkphp 在Apache上配置启用伪静态,重启Apache1 restart 竟然失败了,报错 Job for httpd.service failed because the control ...

  9. Linux 重启网卡失败 Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

    linux下重启网卡使用命令 : service network restart 时报错: [root@slave01 hadoop]# service network restart Startin ...

随机推荐

  1. 使用pgrouting进行最短路径搜索

       PgRouting是基于开源空间数据库PostGIS用于网络分析的扩展模块,最初它被称作pgDijkstra,因为它只是利用Dijkstra算法实现最短路径搜索,之后慢慢添加了其他的路径分析算法 ...

  2. Flume概念与原理、与Kafka优势对比《转》

    https://blog.csdn.net/gyshun/article/details/79710534

  3. C# 获取指定路径下的文件结构(树形结构)

    namespace Vue.Content { public class FileNames { public int id { get; set; } public string text { ge ...

  4. Android给控件添加默认点击效果

    Android控件点击效果 Android中Button控件是有点击效果的,但是像TextView.ImageView.各种Layout是没有点击效果的,给TextView设置点击事件后,加个点击效果 ...

  5. JDK源码中使用的设计模式

    结构型模式: 适配器模式: 用来把一个接口转化成另一个接口. java.util.Arrays#asList() javax.swing.JTable(TableModel) java.io.Inpu ...

  6. 听说jupyter notebook代码提示不友好?

    作为一个业余的Python爱好者,我是一只在使用着最省事的pycharm 尽管以前见好多大牛都用过 但是今天又看到关于jupyter notebook的推送了,于是就尝试了一下 这好像也就是jupyt ...

  7. 字符型转换为字符串ToString

    字符型转换为字符串 // C 货币 2.5.ToString("C"); // ¥2.50 // D 10进制数 25.ToString("D5"); // 2 ...

  8. java序列化和反序列化中的serialVersionUID有啥用

     1.什么是序列化和反序列化 序列化就是将java对象转成字节序列的过程:反序列化就是将字节序列转成java对象的过程. java中,序列化的目的一种是需要将对象保存到硬盘上,一种是对象需要在网络中传 ...

  9. Open SuSE虚拟机分辨率不能自适应的解决办法

    装了一个比较老版本的open SuSE(12.3),即使编译安装VMtools之后分辨率依然不能自适应. 解决办法是手工运行下vmware-user-suid-wrapper这个命令即可解决.而且运行 ...

  10. Could not read document: Can not deserialize instance of java.lang.String out of START_ARRAY

    线上问题: { "timestamp": "1544510665", "status": 400, "error": & ...