Hi,
I am facing issue while upgrading MongoDB server of RS member from 4.4 to 5.0 due to RW concern issue.
Getting below error while starting MongoDB server with 5.0 binary.
“ctx”:“ReplCoord-0”,“msg”:“Fatal assertion”,“attr”:{“msgid”:5624100,“error”:“IllegalOperation: Failed to start up: Replica set config contains customized getLastErrorDefaults, which has been deprecated and is now ignored. Use setDefaultRWConcern instead to set a cluster-wide default writeConcern.”,“file”:“src/mongo/db/repl/repl_set_config_checks.cpp”,“line”:444 "
I am using community edition of MongoDB server.
Thanks in advance.
chris
(Chris Dellaway)
2
Hi @Rahul_Kanaujia, welcome to the forums 
Please be sure to follow forum posting guidelines relating to code and log samples:
Staring in MongoDB 5.0 values that were previously set using getLastErrorDefaults should now be set using the setDefaultRWConcern command as documented in the 5.0 release notes.
https://www.mongodb.com/docs/manual/release-notes/5.0-compatibility/#removed-customizable-values-for-getlasterrordefaults
Removed Customizable Values For getLastErrorDefaults
Starting in MongoDB 5.0, you cannot specify a default write concern with settings.getLastErrorDefaults other than the default of { w: 1, wtimeout: 0 } . Instead, use the setDefaultRWConcern command to set the default read or write concern configuration for a replica set or sharded cluster.
The replicaset configuration will need to be updated before upgrading the binaries to 5.0.
Proceed with the upgrade to MongoDB 5.0 
system
(system)
Closed
3
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.