1

我正在尝试在 Debian 8.6 上运行 Rocketchat 服务器。

我已按照此页面https://rocket.chat/docs/installation/manual-installation/debian/ 的所有说明操作,这会将我发送到此页面 https://rocket.chat/docs/installation/manual-installation/ ubuntu/#2-install-rocketchat

现在我被困在这部分。

启动 MongoDB shell 并启动副本集:

mongo rs.initiate()

它返回这个

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
}

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

replication:
    replSetName: "001-rs"

有了这个

--replSet=001-rs

如此处推荐的副本集错误代码 76,但没有任何改变


这里有一些重要的文字:

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

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

这是我的/etc/mongodb.conf文件(“ journal=true ”行后面跟着 65 行,它们都以 # 开头)

# 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/mongod.conf文件

# 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:

这是我的/etc/hosts文件

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

在运行mongo命令之前,我已经完成了这个(在另一个选项卡中) 。

root@viejo:/# mongod
2016-10-02T12:19:33.499-0700 I CONTROL  [initandlisten] MongoDB starting : pid=1665 port=27017 dbpath=/data/db 64-bit host=viejo
2016-10-02T12:19:33.500-0700 I CONTROL  [initandlisten] db version v3.2.10
2016-10-02T12:19:33.500-0700 I CONTROL  [initandlisten] git version: 79d9b3ab5ce20f51c272b4411202710a082d0317
2016-10-02T12:19:33.500-0700 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.1t  3 May 2016
2016-10-02T12:19:33.500-0700 I CONTROL  [initandlisten] allocator: tcmalloc
2016-10-02T12:19:33.500-0700 I CONTROL  [initandlisten] modules: none
2016-10-02T12:19:33.500-0700 I CONTROL  [initandlisten] build environment:
2016-10-02T12:19:33.500-0700 I CONTROL  [initandlisten]     distmod: debian71
2016-10-02T12:19:33.501-0700 I CONTROL  [initandlisten]     distarch: x86_64
2016-10-02T12:19:33.501-0700 I CONTROL  [initandlisten]     target_arch: x86_64
2016-10-02T12:19:33.501-0700 I CONTROL  [initandlisten] options: {}
2016-10-02T12:19:33.611-0700 I -        [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2016-10-02T12:19:33.611-0700 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=1G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
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] 
2016-10-02T12:19:35.159-0700 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2016-10-02T12:19:35.160-0700 I NETWORK  [initandlisten] waiting for connections on port 27017
2016-10-02T12:19:35.161-0700 I NETWORK  [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2016-10-02T12:19:50.030-0700 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:39524 #1 (1 connection now open)

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

4

0 回答 0