I ran into the same error when trying to update my server running Unifi Network Application, which uses MongoDB3.6. There is a script by Glenn Rietveld for updating both Unifi Network Application and MongoDB to Version 4.4, which solved my problem, no more key expired errors.
The script has an Option to just upgrade MongoDB. Maybe you can take some parts of his script an adopt it to your needs…
1 Like