0

I'm following this tutorial for a Rocket.Chat setup on an Ubuntu 14.04 LTS installation. After installation of Mongod, it says to setup a replica set and gives the instructions to insert the following at the end of /etc/mongod.conf:

replSet=001-rs 

However, when trying to initialize and create the replica set in the MongoDB shell with:

> rs.initiate() 

I'm greeted with this error message:

{ "info2" : "no configuration explicitly specified -- making one", "errmsg" : "exception: bad --replSet config string format is: <setname>[/<seedhost1>,<seedhost2>,...]", "code" : 13093, "ok" : 0 } 

Am I interpreting this to mean the mongod.conf line should read as something like:

replSet <name of set> 

Thanks in advance for any assistance.

1 Answer 1

0

the origin of your problem comes from the mongoDB service not started properly after you change.

It's a bit special under ubuntu...:-)

Create new file :

nano /etc/systemd/system/mongodb.service 

and write :

[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 

now, use with :

sudo systemctl start mongodb # OR sudo systemctl stop mongodb 

src

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.