mongo命令错误"代码" :debian 8.6中的76

时间:2016-10-03 01:59:33

标签: node.js mongodb debian rocket.chat

我试图在Debian 8.6上运行一个火箭聊天服务器。

我已按照此页 https://rocket.chat/docs/installation/manual-installation/debian/ 中的所有说明向我发送 {strong> https://rocket.chat/docs/installation/manual-installation/ubuntu/#2-install-rocketchat

现在我被困在这一部分。

  

启动MongoDB shell并启动副本集:

     

const config = require('./config.json');

它返回此

mongo 
  rs.initiate()

/etc/mongod.conf 文件中,我手动替换了这个

root@viejo:/# mongo
MongoDB shell version: 3.2.10
connecting to: test
Server has startup warnings:
2016-10-02T12:19:35.158-0700 I CONTROL  [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2016-10-02T12:19:35.158-0700 I CONTROL  [initandlisten] 
2016-10-02T12:19:35.158-0700 I CONTROL  [initandlisten] 
2016-10-02T12:19:35.158-0700 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is always'.
2016-10-02T12:19:35.158-0700 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2016-10-02T12:19:35.158-0700 I CONTROL  [initandlisten] 
2016-10-02T12:19:35.158-0700 I CONTROL  [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 3902 processes, 65536 files. Number of processes should be at least 32768 : 0.5 times number of files.
2016-10-02T12:19:35.158-0700 I CONTROL  [initandlisten] 
> rs.initiate()
{
    "ok" : 0,
    "errmsg" : "This node was not started with the replSet option",
    "code" : 76
}

用这个

replication:
    replSetName: "001-rs"

按照 Replica Set Error Code 76 的建议,但没有改变

这里有一些重要的文字:

--replSet=001-rs
root@viejo:/# mongod --version
db version v3.2.10
git version: 79d9b3ab5ce20f51c272b4411202710a082d0317
OpenSSL version: OpenSSL 1.0.1t  3 May 2016
allocator: tcmalloc
modules: none
build environment:
distmod: debian71
distarch: x86_64
target_arch: x86_64re

这是我的 /etc/mongodb.conf 文件(" journal = true "行后跟65行,所有这些从#)开始

root@viejo:/# node --version
v4.5.0

这是我的 /etc/mongod.conf 文件

# mongodb.conf
# Where to store the data.
dbpath=/var/lib/mongodb
#where to log
logpath=/var/log/mongodb/mongodb.log
logappend=true
bind_ip = 127.0.0.1
#port = 27017
# Enable journaling, http://www.mongodb.org/display/DOCS/Journaling
journal=true

这是我的 / etc / hosts 文件

# mongod.conf
# for documentation of all options, see:
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
enabled: true
#  engine:
#  mmapv1:
#  wiredTiger:
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# network interfaces
net:
port: 27017
bindIp: 127.0.0.1
#processManagement:
#security:
#operationProfiling:

replication:
replSetName: "001-rs"
#sharding:
## Enterprise-Only Options:
#auditLog:
#snmp:

我在运行 mongo 命令之前已完成此操作(在另一个标签页中)。

127.0.0.1       localhost
127.0.1.1       viejo.primer    viejo
127.0.0.1       viejo


# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

我需要一些帮助! 提前谢谢。

0 个答案:

没有答案