Update Rocket.Chat

Hello,
I try to update my Rocket.Chat 0.74.3 to new version 1.0.1.

rocket01

In the link in this error there is /etc/mongod.conf, I don’t have such file, my file is mongodb.conf so I did

There is problem with mongo, how can I repair this error?

Hi,
did you proceed on your issue?
Looks like you mongoDB was not able to start after your change.
Did you took a look into the log?

you can try:
systemctl start mongodb
systemctl status monodb

To get some hints.
Best regards
Timmi

Without logs, we cannot help you:

journalctl -xe mongodb and paste the output here, wrap them in triple backticks like (```) without parenthesis.

Hello @Timmi ,
result of commands is:

Hi @robbyoconnor
I have an error

rocket04

Hey @zen,

please note that your config file has an error. The problem is the /etc/mongodb.conf file.
Maybe you are able to paste the full error message,
Also the file it self would be great.

Best regards
Timmi

Hi @Timmi
when I want to check status mongo there is such message:

admin1@chat:~$ systemctl status mongodb

● mongodb.service - An object/document-oriented database
   Loaded: loaded (/lib/systemd/system/mongodb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2019-04-30 07:41:37 CEST; 3h 26min ago
     Docs: man:mongod(1)
  Process: 6668 ExecStart=/usr/bin/mongod --unixSocketPrefix=${SOCKETPATH} --config ${CONF} $DAEMON_OPTS (code=exited, status=2)
 Main PID: 6668 (code=exited, status=2)

kwi 30 07:41:37 chat systemd[1]: Started An object/document-oriented database.
kwi 30 07:41:37 chat mongod[6668]: Error parsing INI config file: the options configuration file contains an invalid line 'replication:'
kwi 30 07:41:37 chat mongod[6668]: try '/usr/bin/mongod --help' for more information
kwi 30 07:41:37 chat systemd[1]: mongodb.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
kwi 30 07:41:37 chat systemd[1]: mongodb.service: Failed with result 'exit-code'.
admin1@chat:~$

If you want something more such log file please write where I can find it, I have just installed some time ago Rocket.Chat and it works fine, I am not expert in Linux.

Hi @zen

you need to fix you /etc/mongodb.conf file.
Looks like your version does not like:

kwi 30 07:41:37 chat mongod[6668]: Error parsing INI config file: the options configuration file contains an invalid line 'replication:

The error is preventing the mongodb to start.
Best regards
Timmi

Hi @Timmi,
in my file it looks like this according this link https://rocket.chat/docs/installation/manual-installation/mongo-replicas/

echo -e "replication:\n  replSetName: \"rs01\"" | sudo tee -a /etc/mongod.conf

There is a file /etc/mongod.conf, I don’t have it, so I have changed name in a command for a mongodb.conf

image

Hi @zen,

as I said you need to fix your conf file as the replication is not supported by your MongoDB version.
Please post the complete content of the file.

Best regards
Timmi

Hi @Timmi,
this is my file

# 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

# Enables periodic logging of CPU utilization and I/O wait
#cpu = true

# Turn on/off security.  Off is currently the default
#noauth = true
#auth = true

# Verbose logging output.
#verbose = true

# Inspect all client data for validity on receipt (useful for
# developing drivers)
#objcheck = true

# Enable db quota management
#quota = true

# Set diagnostic logging level where n is
#   0=off (default)
#   1=W
#   2=R
#   3=both
#   7=W+some reads
#diaglog = 0

# Diagnostic/debugging option
#nocursors = true

# Ignore query hints
#nohints = true

# Disable the HTTP interface (Defaults to localhost:27018).
#nohttpinterface = true

# Turns off server-side scripting.  This will result in greatly limited
# functionality
#noscripting = true

# Turns off table scans.  Any query that would do a table scan fails.
#notablescan = true

# Disable data file preallocation.
#noprealloc = true

# Specify .ns file size for new databases.
# nssize = <size>

# Accout token for Mongo monitoring server.
#mms-token = <token>

# Server name for Mongo monitoring server.
#mms-name = <server-name>

# Ping interval for Mongo monitoring server.
#mms-interval = <seconds>

# Replication Options

# in replicated mongo databases, specify here whether this is a slave or master
#slave = true
#source = master.example.com
# Slave only: specify a single database to replicate
#only = master.example.com
# or
#master = true
#source = slave.example.com

# Address of a server to pair with.
#pairwith = <server:port>
# Address of arbiter server.
#arbiter = <server:port>
# Automatically resync if slave data is stale
#autoresync
# Custom size for replication operation log.
#oplogSize = <MB>
# Size limit for in-memory storage of op ids.
#opIdMem = <bytes>

# SSL options
# Enable SSL on normal ports
#sslOnNormalPorts = true
# SSL Key file and password
#sslPEMKeyFile = /etc/ssl/mongodb.pem
#sslPEMKeyPassword = pass
replication:
  replSetName: "rs01"

Hi @zen

you need to remove the last two lines of the file.
After that you should be able to start the db again:
systemctl start mongodb

If this is successful you can try to add this to the end of the file:
replSet=rs01
After that restart mongodb
systemctl restart mongodb

If succesfull continue with https://rocket.chat/docs/installation/manual-installation/mongo-replicas/

Best regards
Timmi

Hi @Timmi,
it works, thank you very much for your help and time.