Skip to content

Regression: 3.7.0-rc.0 fails at oplog detection #18987

@TwizzyDizzy

Description

@TwizzyDizzy

Description:

Since upgrading my testing instance to 3.7.0-rc.0, Rocket.Chat seems to fail to detect whether the Replicaset Oplog is enabled.

I have a single instance, so there is only one MongoDB server and one instance of Rocket.Chat. mongod is in PRIMARY mode as seen below [1].

systemd unit is configured to use the oplog as shown in [2].

I suspect, that this might be related to the changes to app/models/server/models/_BaseDb.js in 3.7.0-rc.0 (diff: 3.6.2...3.7.0-rc.0)

If you need any additional debugging on my side, do not hesitate to get back! :)

Steps to reproduce:

  1. Properly configure Rocket.Chat to use the Replicaset Oplog via environment var MONGO_OPLOG_URL
  2. start server

Expected behavior:

Oplog detection should connect to the rs-oplog and detect the connection properly

Actual behavior:

ReplicaSet OpLog: Disabled

Server Setup Information:

  • Version of Rocket.Chat Server: 3.7.0-rc.0
  • Operating System: Linux
  • Deployment Method: Ansible
  • Number of Running Instances: 1
  • DB Replicaset Oplog: configured to be enabled, but not detected properly
  • NodeJS Version: 12.18.4 - x64
  • MongoDB Version: 3.6.17

Client Setup Information

not relevant

Additional context

See bottom

Relevant logs:

See bottom

[1]

rs0:PRIMARY> rs.status()
{
	"set" : "rs0",
	"date" : ISODate("2020-09-22T09:15:29.796Z"),
	"myState" : 1,
	"term" : NumberLong(47),
	"syncingTo" : "",
	"syncSourceHost" : "",
	"syncSourceId" : -1,
	"heartbeatIntervalMillis" : NumberLong(2000),
	"optimes" : {
		"lastCommittedOpTime" : {
			"ts" : Timestamp(1600766127, 1),
			"t" : NumberLong(47)
		},
		"readConcernMajorityOpTime" : {
			"ts" : Timestamp(1600766127, 1),
			"t" : NumberLong(47)
		},
		"appliedOpTime" : {
			"ts" : Timestamp(1600766127, 1),
			"t" : NumberLong(47)
		},
		"durableOpTime" : {
			"ts" : Timestamp(1600766127, 1),
			"t" : NumberLong(47)
		}
	},
	"members" : [
		{
			"_id" : 0,
			"name" : "127.0.0.1:27017",
			"health" : 1,
			"state" : 1,
			"stateStr" : "PRIMARY",
			"uptime" : 325,
			"optime" : {
				"ts" : Timestamp(1600766127, 1),
				"t" : NumberLong(47)
			},
			"optimeDate" : ISODate("2020-09-22T09:15:27Z"),
			"syncingTo" : "",
			"syncSourceHost" : "",
			"syncSourceId" : -1,
			"infoMessage" : "",
			"electionTime" : Timestamp(1600765815, 1),
			"electionDate" : ISODate("2020-09-22T09:10:15Z"),
			"configVersion" : 39898,
			"self" : true,
			"lastHeartbeatMessage" : ""
		}
	],
	"ok" : 1,
	"operationTime" : Timestamp(1600766127, 1),
	"$clusterTime" : {
		"clusterTime" : Timestamp(1600766127, 1),
		"signature" : {
			"hash" : BinData(0,"XTheg9r1CbMzufZMXmLplqIBPVs="),
			"keyId" : NumberLong("6822964842899439617")
		}
	}
}

[2]

[Service]
Type=simple
Restart=always
StandardOutput=syslog
SyslogIdentifier=RocketChat
User=rocketchat
Group=rocketchat
Environment=MONGO_URL=mongodb://USER:PASSWORD@127.0.0.1:27017/rocketchat
Environment=MONGO_OPLOG_URL=mongodb://USER:PASSWORD@127.0.0.1:27017/local?replSet=rs0&authSource=admin
Environment=ROOT_URL=https://dev-chat.mycompa.ny
Environment=PORT=3000
Environment=DEPLOY_PLATFORM=ansible
WorkingDirectory=/opt/rocketchat
ExecStart=/bin/node --tls-min-v1.2 /opt/rocketchat/bundle/main.js
Environment=NODE_EXTRA_CA_CERTS=/etc/pki/ca-trust/source/anchors/ROOT+ISSUINGCA.crt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions