Documentation Errata: Deploy Rocket.Chat without Docker
ENVIRONMENT: VPS, non-docker installation on Ubuntu 14.04 clean install, stock kernel 3.13.0-55-generic, mongoDB 3.0.6
WHAT: Error during rs.instantiate()
WHERE: Wiki guide "Deploying Rocket.Chat without Docker", Section 2
WHEN / HOW: After editing /etc/mongod.conf file per instructions, upon executing command rs.instantiate() from mongodb shell, output is as follows:
{
"info2" : "no configuration explicitly specified -- making one",
"errmsg" : "exception: bad --replSet config string format is: <'setname'>[<'seedhost1'>,<'seedhost2'>",...]",
"code" : 13093, "ok" : 0
}
Incidentally, using either replSet=001-rs or replication: replSetName: "001-rs" results in the error.
SOLUTION: Using replicaSet=001-rs worked for me, resulting in the following output from rs.initiate():
{
"info2" : "no configuration explicitly specified -- making one",
"me" : "my_hostname.com:27017",
"ok" : 1
}
@MuhClaren could you please update the referred wiki article and close this issue?
Of course, my pleasure.
mongodb-org version 3.0.7 reintroduves the yaml syntax, so with it you'll want something like
replication: replSetName: "rs01"
The message now as following:
> rs.initiate()
{
"info2" : "no configuration explicitly specified -- making one",
"me" : "ubuntu:27017",
"ok" : 0,
"errmsg" : "No host described in new configuration 1 for replica set 001-rs maps to this node",
"code" : 93
}
Is this correct?
@leftstick
No that's not correct. I believe you're getting that error because you have your hostname set to "ubuntu", thus the errmsg ""No host described in new configuration 1...".
Try using your FQDN and see if that works. For example, in my setup it is: "me" : "chat.my_domain.com:27017"
Have you edited your /etc/hosts file?
Actually, you need to make sure that the anwser of hostname is contained into /etc/hosts and pointing to 127.0.0.1; there's no need to set the hostname to the expected/actual FQDN.
True. As long as the hostname is mapped in the hosts file so Mongo can resolve it to 127.0.0.1 it should work, unless it's a remote 3rd party mongo provider.
Hi I have same problem in ubuntu 14.04 64bit
mongo --help | grep "version:"
MongoDB shell version: 3.0.7
cat /etc/hosts
127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters
Auto-generated hostname. Please do not remove this comment.
xxx.xxx.xxx.xxx MY-REAL.IP-ADDERESS.ORG MY-REAL 127.0.0.1 chat.myrealdoman.org chat
then: hostnamectl set-hostname chat hostname chat
cat /etc/mongod.conf | grep rep #replication: replicaSet=001-rs
service mongod restart stop: Unknown instance: mongod start/running, process 27731
mongo MongoDB shell version: 3.0.7 connecting to: test 2015-10-25T18:49:50.570+0100 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused 2015-10-25T18:49:50.572+0100 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at connect (src/mongo/shell/mongo.js:179:14) at (connect):1:6 at src/mongo/shell/mongo.js:179 exception: connect failed
my firewall is open.
deleting the "replicaSet=001-rs" from configuration the service can restart. I tried with replSetName: "001-rs" and replicaSet=001-rs with no success. Mongod won't restart
There is something that I can do to solve?
A question the replica is necessary for a simple chat in a server?
I have seen replSet = xyz in a few setups. Could you please try that instead of replicaSet or replSetName?
It still resit me!!
cat /etc/mongod.conf | grep rep #replication: #replicaSet=001-rs #replSetName: "001-rs" #replicaSet=001-rs replicaSet = xyz root@chat:~# root@chat:~# mongo MongoDB shell version: 3.0.7 connecting to: test 2015-10-25T19:09:56.942+0100 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused 2015-10-25T19:09:56.943+0100 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at connect (src/mongo/shell/mongo.js:179:14) at (connect):1:6 at src/mongo/shell/mongo.js:179 exception: connect failed
Not replicaSet, replSet! :)
no... doesn't works for me
#replicaSet=001-rs #replSetName: "001-rs" #replicaSet=001-rs #replicaSet = xyz replSet = 001-rs
root@chat:~#
:(
That looks more like the mongo daemon is not running, try typing mongod and see if it starts then try mongo
No, the daemon won't start with the replica configuration.
Tomorrow I will create a new fresh vps with ubuntu, so I will check again. El 25/10/2015 20:23, "Ed" [email protected] escribió:
That looks more like the mongo daemon is not running, try typing mongod and see if it starts then try mongo
— Reply to this email directly or view it on GitHub https://github.com/RocketChat/Rocket.Chat/issues/1026#issuecomment-150960410 .
Ran into the same issue with 3.0.7 on Ubuntu. Running mongod with:
mongod --replSet "001-rs" seems to fix it.
At least as far as getting 3.0.7 daemon to start, the following changes to /etc/mongod.conf helped...
net: port: 27017 bindIp: localhost
replication: replSetName: "001-rs"
I confirm that it's works.
root@chat:~# mcedit /etc/mongod.conf
root@chat:~# service mongodb restart stop: Unknown instance: mongodb start/running, process 1096 root@chat:~# service mongodb restart mongodb stop/waiting mongodb start/running, process 1123
Only a question: Followinf with the instructions in https://github.com/RocketChat/Rocket.Chat/wiki/Deploy-Rocket.Chat-without-docker
I can read that in my mongodb console is missing this info message:
"info" : "Config now saved locally. Should come online in about a minute.",
it's normal? Please have a loo below.
root@chat:~# mongo MongoDB shell version: 3.0.7 connecting to: test Server has startup warnings: 2015-10-28T21:43:26.599+0100 I CONTROL [initandlisten] 2015-10-28T21:43:26.599+0100 I CONTROL [initandlisten] ** WARNING: You are running in OpenVZ which can cause issues on versions of RHEL older than RHEL6. 2015-10-28T21:43:26.599+0100 I CONTROL [initandlisten]
rs.initiate() { "info2" : "no configuration explicitly specified -- making one", "me" : "chat:27017", "ok" : 1 } 001-rs:OTHER> 001-rs:PRIMARY> exit bye
root@chat:~#
regards MaX
On 10/28/15, unquietwiki [email protected] wrote:
At least as far as getting 3.0.7 daemon to start, the following changes to /etc/mongod.conf helped...
net: port: 27017 bindIp: localhost
replication: replSetName: "001-rs"
Reply to this email directly or view it on GitHub: https://github.com/RocketChat/Rocket.Chat/issues/1026#issuecomment-151951218
ciao, MaX
also issue on clean ubuntu, with mongo 3.0.7. when trying to run mongod:

mkdir -p /data/db
If you are reading this and you are feeling hopeless. This may help you out:
Assuming that dbpath is : /var/lib/mongodb
1/ You may (or may not ) need to set host name to localhost
hostnamectl set-hostname localhost
Verify using hostname command => localhost
2/ In you /etc/mongod.conf : set bindIP
net:
port: 27017
bindIp: localhost
3/ now stop mongod
4/ Run this command : mongod --port 27017 --dbpath /var/lib/mongodb --replSet "001-rs"
5/ exit; then go to /var/lib/mongodb, set ownership to /var/lib/mongodb
6/ service mongod start => SHOULD be SUCCESS