...
I upgraded my Sharded cluster to MongoDB version 7.0.4. When I open a `mongosh` then I get this warning: Using MongoDB: 7.0.4 Using Mongosh: 2.1.1 ------ The server generated these startup warnings when booting 2024-01-08T12:53:48.900+01:00: This node is running as a shard server, but persisted Read/Write Concern (RWC) defaults are present. This node was likely previously in an unsharded replica set or a config server. The RWC defaults on this node will not be used ------ It is running as a config server, not a shard server as pointed out in the warning message. sharding: clusterRole: configsvr
xgen-internal-githook commented on Sat, 27 Apr 2024 00:31:34 +0000: Author: {'name': 'Ali Mir', 'email': 'ali.mir@mongodb.com', 'username': 'ali-mir'} Message: SERVER-84628 Only log startup warning about persisted CWRWC defaults for shard servers (#18421) (cherry picked from commit 58d45fe39687e4b8a82c6b7d6abe1c3da17d1f3c) GitOrigin-RevId: 612c6bb6b06aaa623b07cb9be9753d40b37db681 Branch: v7.3 https://github.com/mongodb/mongo/commit/85bb10be2170e626a32f802868f034a457b29f5e xgen-internal-githook commented on Tue, 13 Feb 2024 20:19:13 +0000: Author: {'name': 'Ali Mir', 'email': 'ali.mir@mongodb.com', 'username': 'ali-mir'} Message: SERVER-84628 Only log startup warning about persisted CWRWC defaults for shard servers (#18421) (cherry picked from commit 58d45fe39687e4b8a82c6b7d6abe1c3da17d1f3c) GitOrigin-RevId: fc18ea37a5e7deb19c69348da4e8715113f7ee52 Branch: v7.0 https://github.com/mongodb/mongo/commit/97a6ebc196678bb0817cce08141bae1cbd5b88cf xgen-internal-githook commented on Thu, 1 Feb 2024 03:55:49 +0000: Author: {'name': 'Ali Mir', 'email': 'ali.mir@mongodb.com', 'username': 'ali-mir'} Message: SERVER-84628 Only log startup warning about persisted CWRWC defaults for shard servers (#18421) GitOrigin-RevId: 58d45fe39687e4b8a82c6b7d6abe1c3da17d1f3c Branch: master https://github.com/mongodb/mongo/commit/3949b49f12ca4dbf07c199b54a8f5d0acda63820 JIRAUSER1275035 commented on Thu, 11 Jan 2024 16:06:26 +0000: Thanks wernfried.domscheit@sunrise.net , I understand this warning is misleading here. I am going to pass this ticket to Service Architecture team. To Service Architecture Team, 1.) Do we expect this warning to occur on config server? 2) If yes, although there is no customer impact from this warning on mongodb functionalities, however as pointed in this ticket, the warning could be misleading. Will it make sense to add another check or warning for config server? JIRAUSER1257089 commented on Thu, 11 Jan 2024 08:38:10 +0000: Yes, deleting the ReadWriteConcernDefaults (and restart the server) as advised in support article, removes the warning. However, I am running PSA (Primary-Secondary-Arbiter) shards and setting DefaultRWConcern is recommended according to Performance Issues with PSA replica sets If you don't set DefaultRWConcern in a PSA then you may get startupWarning "** WARNING: The default write concern may change when upgrading to 5.0. Use setDefaultRWConcern to set a cluster-wide default write concern that won't change." or even errors see [Add an arbiter to mongodb ReplicaSet failed|http://example.com] If you set DefaultRWConcern in a PSA then you get warning "This node is running as a shard server, but persisted Read/Write Concern (RWC) defaults are present...." I agree, it is just a warning and does not have any impact. But it is a bit misleading, it triggers the feeling, that you have done something "not optimal". At least in a PSA configuration, it is indeed the recommended setting. I see this warning as really useless. But as said, it is a minor issue, you hardly connect to a config-server directly. Kind Regards Wernfried JIRAUSER1275035 commented on Wed, 10 Jan 2024 22:37:15 +0000: Hi wernfried.domscheit@sunrise.net for sharing the details. This warning looks like a change made as a part of SERVER-46025. According to support article , this is simply a warning message to indicate that there was previously a cluster wide read-write concern level configured during the shardsvr’s past life as either a config server or unsharded replica set member. As mentioned in the support article attached previously, there is no action required and is not expected to impact mongodb functionalities. Please let me know if there are probable server issues that you are experiencing apart from this warning. JIRAUSER1257089 commented on Tue, 9 Jan 2024 07:18:58 +0000: Hi I followed the upgrade instruction and it worked well. I connected directly to the config-server mongod, because I wanted to check whether mongod is properly running after upgrade/restart: $ mongosh "mongodb://admin:password@${HOSTNAME%%.*}:27019/admin?authSource=admin&readPreference=primaryPreferred" Current Mongosh Log ID: 659cf03a022e48aea8e2b6d7 Connecting to: mongodb://@d-mipmdb-cfg-03:27019/admin?authSource=admin&readPreference=primaryPreferred&directConnection=true&appName=mongosh+2.1.1 Using MongoDB: 7.0.4 Using Mongosh: 2.1.1 For mongosh info see: https://docs.mongodb.com/mongodb-shell/ ------ The server generated these startup warnings when booting 2024-01-09T07:52:19.700+01:00: This node is running as a shard server, but persisted Read/Write Concern (RWC) defaults are present. This node was likely previously in an unsharded replica set or a config server. The RWC defaults on this node will not be used ------ Deprecation warnings: - Using mongosh on the current operating system is deprecated, and support may be removed in a future release. See https://www.mongodb.com/docs/mongodb-shell/install/#supported-operating-systems for documentation on supported platforms. admin@admin configRepSet:SECONDARY> db.serverCmdLineOpts().parsed.sharding { clusterRole: 'configsvr' } admin@admin configRepSet:SECONDARY> db.hello() { topologyVersion: { processId: ObjectId('659ced2265b8917133b505ef'), counter: Long('3') }, hosts: [ 'd-mipmdb-cfg-01.swi.srse.net:27019', 'd-mipmdb-cfg-02.swi.srse.net:27019', 'd-mipmdb-cfg-03.swi.srse.net:27019' ], setName: 'configRepSet', setVersion: 45, isWritablePrimary: false, secondary: true, primary: 'd-mipmdb-cfg-02.swi.srse.net:27019', me: 'd-mipmdb-cfg-03.swi.srse.net:27019', lastWrite: { opTime: { ts: Timestamp({ t: 1704783938, i: 21219 }), t: Long('89') }, lastWriteDate: ISODate('2024-01-09T07:05:38.000Z'), majorityOpTime: { ts: Timestamp({ t: 1704783938, i: 21219 }), t: Long('89') }, majorityWriteDate: ISODate('2024-01-09T07:05:38.000Z') }, isImplicitDefaultMajorityWC: true, cwwc: { w: 1, wtimeout: 0 }, configsvr: 2, maxBsonObjectSize: 16777216, maxMessageSizeBytes: 48000000, maxWriteBatchSize: 100000, localTime: ISODate('2024-01-09T07:05:38.578Z'), logicalSessionTimeoutMinutes: 30, connectionId: 309, minWireVersion: 0, maxWireVersion: 21, readOnly: false, ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1704783938, i: 21219 }), signature: { hash: Binary.createFromBase64('97whWoXW1zAu/poqFJPJGO1nQZk=', 0), keyId: Long('7270495895362234757') } }, operationTime: Timestamp({ t: 1704783938, i: 21219 }) } Log is also found in logfile: $ /opt/mongod/jq -r 'select(.id == 4615613)' mongod.log { "t": { "$date": "2024-01-09T07:52:19.700+01:00" }, "s": "I", "c": "SHARDING", "id": 4615613, "ctx": "initandlisten", "msg": "This node is running as a shard server, but persisted Read/Write Concern (RWC) defaults are present. This node was likely previously in an unsharded replica set or a config server. The RWC defaults on this node will not be used", "attr": { "configSettingsNamespace": "config.settings" }, "tags": [ "startupWarnings" ] } The message is also shown when I connect to the replica set: mongosh "mongodb://admin:password@d-mipmdb-cfg-01:27019,d-mipmdb-cfg-02:27019,d-mipmdb-cfg-03:27019/admin?authSource=admin&replicaSet=configRepSet&readPreference=primaryPreferred" ------ The server generated these startup warnings when booting 2024-01-08T13:22:11.117+01:00: This node is running as a shard server, but persisted Read/Write Concern (RWC) defaults are present. This node was likely previously in an unsharded replica set or a config server. The RWC defaults on this node will not be used ------ Logfile is attached. When I connect to a shard server or mongos router then this warning message is not shown. mongod.zip JIRAUSER1275035 commented on Mon, 8 Jan 2024 18:54:16 +0000: Hi wernfried.domscheit@sunrise.net, It looks like the above warning is coming from server, but I am a bit unclear about the server it is coming from. The description and warning message says that you are trying to connect to mongos (shard server), however we see that the server is actually a "config server". In order to understand the problem, can you share more details on cluster: 1. What node are you trying to connect to? 2. Mongodb logs messages with timestamps during the startup Also, please make sure that you have followed the upgrade instructions in https://www.mongodb.com/docs/manual/release-notes/7.0-upgrade-sharded-cluster/ , to avoid issues related to an upgrade itself.