[SERVER-58805] InternalError: DatabaseVersion doesn't exist in database entry { _id: "tap", partitioned: false, primary: "int-gws1" } despite the config server being in binary version 4.2 or later. Created: 23/Jul/21 Updated: 27/Oct/23 Resolved: 30/Jul/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | sandip Divekar | Assignee: | Antonio Fuschetto |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
Hi, We are using sharded cluster in our staging environment. Currently we are at version 4.0. We have upgraded from v3.6 to v4.0 successfully. But now facing issue while upgrade from v4.0 to v4.2. Following is the sequence of upgraded components. 1. Config servers - upgraded to v4.2 - No errors When we upgrade the first mongos server to v4.2 and start the service, we will see below logs in mongos.log file. Also, further if we run db command like “show ** collections”, we will get same error on mongo shell. *Mongos.log file:* ** Mongos shell:
|
| Comments |
| Comment by Antonio Fuschetto [ 30/Jul/21 ] |
|
Hi Sandip, Thank you for your reply and for the problem description. We can then close this ticket. Best, |
| Comment by sandip Divekar [ 30/Jul/21 ] |
|
Hi Antonio, No, there are no issues in Mongo packages while setting FCV to 4.0. We had invalid names in config.databases collection, because of that we were not able to set FCV to 4.0, so we did backup and restore of config data and set fcv to 4.0 which was not correct way, This allowed us to set fcv to 4.0 but version field was missing in config data. To generate version field, correct way was to delete these invalid database names using GUI tool, as we were not able to delete it using mongo shell and then set fcv to 4.0. We had faced below issue in setting fcv to 4.0 because of these invalid database names: Ex. of invalid database names: { "_id" : "���\u0016", "partitioned" : false, "primary" : "int-gws1" } { "_id" : "��Y�*+", "partitioned" : false, "primary" : "int-gws1" }
Thanks, |
| Comment by Antonio Fuschetto [ 29/Jul/21 ] |
|
Hi Sandip, Thank you very much for your update on this problem. As you correctly assumed, by setting FCV to 4.0, a value for the version field is generated for each database stored in the config.databases collections in the Config Server(s). This is a prerequisite for the correct functioning of MongoDB version 4.2. You mentioned that you faced an issue updating the FCV to 4.0. Was it something related to our product that we can improve? Many thanks, |
| Comment by sandip Divekar [ 29/Jul/21 ] |
|
Hi Antonio, You can close this ticket, we have resolved this issue. The cause of this issue was absence of "version" field in config.databases collection in config servers data. Invalid entry: { "_id" : "tap", "partitioned" : false, "primary" : "int-gws1" } } Earlier when we migrated from 3.6 to 4.0, we had faced issue while setting fcv to 4.0 which has caused absence of "version" field in config.databases collection.
Thanks for the support and taking this ticket into consideration. Thanks, |