Mongo服务启动或重启始终失败

Chl*_*bta 11 linux ubuntu mongodb ubuntu-16.04

我已经安装了mongodb,然后我创建了一个mongo服务:

 [Unit]
    Description=High-performance, schema-free document-oriented database
    After=network.target

    [Service]
    User=mongodb
    ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf

    [Install]
    WantedBy=multi-user.target
Run Code Online (Sandbox Code Playgroud)

但是当我启动服务然后检查状态时,我总是得到这个错误:

? mongodb.service - High-performance, schema-free document-oriented database
   Loaded: loaded (/etc/systemd/system/mongodb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2017-04-24 13:08:55 UTC; 6min ago
  Process: 1094 ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf (code=exited, status=48)
 Main PID: 1094 (code=exited, status=48)

Apr 24 13:08:54 ip-172-31-37-163 systemd[1]: Started High-performance, schema-free document-oriented database.
Apr 24 13:08:55 ip-172-31-37-163 systemd[1]: mongodb.service: Main process exited, code=exited, status=48/n/a
Apr 24 13:08:55 ip-172-31-37-163 systemd[1]: mongodb.service: Unit entered failed state.
Apr 24 13:08:55 ip-172-31-37-163 systemd[1]: mongodb.service: Failed with result 'exit-code'.
Run Code Online (Sandbox Code Playgroud)

Chl*_*bta 12

问题出在配置文件和更改中

bindIp:127.0.0.1,XXXX

bindIp:[127.0.0.1,XXXX]

解决了我的问题