Hi,
were you able to resolve the issue? Can you please provide us with an update? If not I will try to help you out!
Regards
Stoyan
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi guys.
In my test environment, I have SCOM 2019 UR6 consisting of three Management Servers, four Gateway Servers, one server for the Data Warehouse database, and one server for the Operational database.
Yesterday, I attempted to perform an in-place upgrade to SCOM 2022. I followed the required pre-upgrade steps according to Microsoft’s documentation and Kevin Holman’s blog.
When I tried to upgrade the first Management Server, the wizard failed at the "Configure Operational Database" step, and then the Management Server was automatically removed from the system. After that, the other two Management Servers also went down.
To recover the environment, I first restored both the Operational Database and the Data Warehouse Database to their pre-upgrade state. Then, I recovered the first failed Management Server using the /Recover command, and I was able to reconnect the console.
Afterward, I re-entered the password for the Management Server Action Account in the console. However, in the Event Viewer of all Management Servers, I am still seeing the following event:
could you guys please help me to resolve the issue?
thank you
OpsMgr has no configuration for management group SCOMMGTEST and is requesting new configuration from the Configuration Service.
OpsMgr Management Configuration Service failed to process configuration request (Xml configuration file or management pack request) due to the following exception
Microsoft.EnterpriseManagement.ManagementConfiguration.Interop.HealthServicePublicKeyNotRegisteredException: Padding is invalid and cannot be removed.
Server stack trace:
at Microsoft.EnterpriseManagement.RuntimeService.RootConnectorMethods.OnRetrieveSecureData(Guid healthServiceId, ReadOnlyCollection`1 addedSecureStorageReferences, ReadOnlyCollection`1 removedSecureStorageReferences, ReadOnlyCollection`1 addedSecureStorageElements, ReadOnlyCollection`1 removedSecureStorageElements, String hashAlgorithmName, Byte[]& hashValue)
at Microsoft.EnterpriseManagement.RuntimeService.SDKReceiver.OnRetrieveSecureData(Guid healthServiceId, ReadOnlyCollection`1 addedSecureStorageReferences, ReadOnlyCollection`1 removedSecureStorageReferences, ReadOnlyCollection`1 addedSecureStorageElements, ReadOnlyCollection`1 removedSecureStorageElements, String hashAlgorithmName, Byte[]& hashValue)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.EnterpriseManagement.Mom.Internal.ISdkService.OnRetrieveSecureData(Guid healthServiceId, ReadOnlyCollection`1 addedSecureStorageReferences, ReadOnlyCollection`1 removedSecureStorageReferences, ReadOnlyCollection`1 addedSecureStorageElements, ReadOnlyCollection`1 removedSecureStorageElements, String hashAlgorithmName, Byte[]& hashValue)
at Microsoft.EnterpriseManagement.ManagementConfiguration.Communication.CredentialDataProvider.GetSecureDataUnwrapped(Guid agentId, ICollection`1 addedReferenceList, ICollection`1 deletedReferenceList, ICollection`1 addedCredentialList, ICollection`1 deletedCredentialList, Byte[]& hashValue)
at Microsoft.EnterpriseManagement.ManagementConfiguration.Communication.CredentialDataProvider.GetSecureData(Guid agentId, ICollection`1 addedReferenceList, ICollection`1 deletedReferenceList, ICollection`1 addedCredentialList, ICollection`1 deletedCredentialList, Byte[]& hashValue)
at Microsoft.EnterpriseManagement.ManagementConfiguration.Engine.TracingCredentialDataProvider.GetSecureData(Guid agentId, ICollection`1 addedReferenceList, ICollection`1 deletedReferenceList, ICollection`1 addedCredentialList, ICollection`1 deletedCredentialList, Byte[]& hashValue)
at Microsoft.EnterpriseManagement.ManagementConfiguration.Engine.AgentConfigurationFormatter.WriteSecureData(AgentConfigurationStream stream, XmlWriter writer, Guid agentId, Hashtable credentialAssociationList, Hashtable credentialList)
at Microsoft.EnterpriseManagement.ManagementConfiguration.Engine.AgentConfigurationFormatter.WriteSnapshotState(AgentConfigurationStream stream, XmlWriter writer, AgentValidatedConfiguration validatedConfig)
at Microsoft.EnterpriseManagement.ManagementConfiguration.Engine.AgentConfigurationFormatter.GetSnapshotConfigurationStream(AgentValidatedConfiguration validatedConfig, AgentConfigurationCookie oldCookie, AgentConfigurationCookie& newCookie)
at Microsoft.EnterpriseManagement.ManagementConfiguration.Engine.AgentConfigurationBuilder.FormatConfig(ConfigurationRequestDescriptor requestDescriptor, IAgentConfiguration agentConfig)
at Microsoft.EnterpriseManagement.ManagementConfiguration.Engine.AgentRequestProcessor.ProcessConfigurationRequest(ICollection`1 requestList, Int32& processedRequestsCount)
at Microsoft.EnterpriseManagement.ManagementConfiguration.Engine.AgentRequestProcessor.Execute()
at Microsoft.EnterpriseManagement.ManagementConfiguration.Engine.ThreadManager.ResponseThreadStart(Object state)
Hi,
were you able to resolve the issue? Can you please provide us with an update? If not I will try to help you out!
Regards
Stoyan
Hi,
based on the symptoms and your recovery steps, what you are seeing now is no longer the original upgrade problem but a configuration/crypto issue in the recovered SCOM 2019 management group.
The exception
HealthServicePublicKeyNotRegisteredException: Padding is invalid and cannot be removed
is thrown when the Management Configuration Service tries to build configuration that contains secure data (Run As credentials, action accounts, etc.) but cannot decrypt that data with the current encryption keys. This is a known pattern after a restore/recovery when not all Run As / service account credentials or keys are in a consistent state.
Because the exact cause is not obvious from a single event, you will need some generic health checks first, then a focused pass on Run As accounts and secure storage. Below is a step-by-step plan; several steps only collect more information.
1. Baseline – confirm the recovered state of the management group
This ensures you truly have a clean 2019 UR6 environment to stabilize.
2. Check core services and All Management Servers Resource Pool
On each management server, make sure these services are:
Then in the console:
If the pool is completely down, everything else will be affected, so this is the first thing to get back to green.
On each management server:
Make a note of the exact set of repeating event IDs – this will show whether we are dealing with a pure secure-data problem or a broader connectivity issue.
4. Re-enter all Run As and service account passwords
After a DB restore or management server recovery, it is mandatory to re-enter the passwords for every Run As account, not just the Management Server Action Account. Missing or stale Run As credentials after recovery are a documented cause of this exact error
In the SCOM console:
do the following:
5. Open Properties.
6. On the credentials page, re-enter the password (even if you are sure it is correct).
7. Finish the wizard without changing distribution or scope.
Then watch the Operations Manager log for 10–15 minutes:
5. Flush the Health Service cache on the management servers
If 21023 / 29120 continues, force a clean configuration snapshot on each management server.
On each management server:
Clearing this folder is the supported way to flush the Health Service cache; it is a standard step when fixing broken agents and applies to management servers as well.
After this:
6. Verify the secure-storage / encryption situation
Decryption of Run As credentials relies on an encryption key that was created when the first management server in the management group was installed. That key is stored in the registry and normally copied to all other management servers; it is then used to decrypt the secure data stored in the database. If that key is lost or changed (for example due to a rebuild that didn’t preserve the registry), SCOM can no longer decrypt Run As credentials and you get exactly this kind of exception.
Given your sequence (failed upgrade → DB restore → /Recover on one MS):
If the OS itself was never rebuilt and only an in-place SCOM upgrade was attempted, the key is probably still intact and the more likely issue is still in Run As credentials or cache, so focus on steps 4–5 first.
7. Sanity check: database connectivity and accounts
In parallel, validate that there are no basic SQL issues:
If you see SQL connectivity errors, resolve those first – the configuration service cannot build valid config if it cannot read or write the OpsMgr DB.
8. Only after 2019 is stable – prepare a new 2019 → 2022 upgrade attempt
Once:
then you can treat the environment as a healthy 2019 UR6 management group again and start to re-prepare the upgrade.
At that point, make sure you:
If you post back (in the forum thread) the outcome of steps 3–5 – especially which event IDs remain after re-entering all Run As credentials and clearing the Health Service cache – it will be much easier to decide whether you “only” had stale credentials, or whether the secure-storage key itself is out of sync and needs deeper remediation.
Stoyan Chalakov
"If my response was useful, please consider marking it as the answer. It keeps the forum clean, structured, and more helpful for everyone. Thank you for supporting the community."