Auth schema version is incompatible: User and role management commands require auth data to have at least schema version 3 but f
ound 1. In order to upgrade the auth schema, first downgrade MongoDB binaries to version 2.6 and then run the authSchemaUpgrade command.
how to fix the problem ?
Hi @feng_deng
Was the equivalent of this run?
db.getSiblingDB('admin').system.version.updateOne({_id:'authSchema'},{$set: {currentVersion:1}})
And then mongod
was restarted?
If so I was able to reproduce this and fix it. However the easiest way would be a restore from backup.
when i set the Incorrect, auth is Unavailable, i want to restart it with auth disable , the instance can’t keep running .
i find a way to edit the binary data file to resolve the problem , i think we need a way to fix the dictionary of meta data . similar to recuse mode of linux . thank you very much
the resovle way is that correct the value with wiredtiger , i don’t think it a good way , but no choice for me .
- download wiredtiger from GitHub - wiredtiger/wiredtiger: WiredTiger's source tree , switch to your mongodb version , then build it , maybe reffer from 使用WT工具恢复MongoDB数据 - 墨天轮
- after u build Successfully , u can wt file with wt (no good suggestion), first u should backup all data directory under mongodb is off !
- fix the value , u may to ask for AI
/user/wiredtiger/wt dump file:admin/collection-10-673251780770839201.wt ( find the collection of system.version )
/user/wiredtiger/wt dump file:admin/collection-10-673251780770839201.wt > /tmp/dump_system.version.txt
replace the line of authSchema with “1\00\00\00\02_id\00\0b\00\00\00authSchema\00\01currentVersion\00\00\00\00\00\00\00\14@\00” with no quotes
/user/wiredtiger/wt -h $dbPath load -f /tmp/dump_system.version.txt -r admin/collection-10-673251780770839201.wt - start the instance with noath
manual and directly edit the wt file with wiredtiger is very dangerous for your data, think again and again before acting .
it not work , auth is Unsuccessfully on that instance of shard
I agree, binary edit it not a good idea.
There is a better way. I have a post almost ready with solution.
Can you confirm how the problem came to be. Was there something that made you make the change ?
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.