Home > OpsMgr > Opsmgr 2007 R2 events id 20070 21016 21023 after upgrade

Opsmgr 2007 R2 events id 20070 21016 21023 after upgrade

Here are some details about the second problem I had after upgrading to R2.


Some entities from a specific server are missing on console, when we try to install the agent again events 20070 and 21016 are logged on the agent.

Several agents do not download new management packs and event 21023 logged every 5 minutes in the operations manager event log.



These are 2 different problems, so I will start with 20070 and 21016, basically this 2 events indicate that the agent cannot connect to RMS, and the reason is that RMS is rejecting the agent. The agent is in the same domain as the RMS so what could be the problem?


I found that the server removed from SCOM several days before the upgrade, no one can explain how (deleted or Uninstalled?). To verify this I executed the following SQL query:


SELECT * FROM dbo.[BasemanagedEntity] where DisplayName Like ‘%ServerName%’


The result verified that the object is deleted from the DB.



The query give another sight about the problem, this server was managed by the management server and not by the root management server!!!  (search the path column)



Changing the primary management server (from RMS to MS), restarting the health service on the agent and the problem solved.


The second problem was much more difficult to solve. We tried to do the following with no luck.

·         Re-install MS XML Parser again.

·         Flush the agent cache.

·         Re-Install the agent.


Nothing helped to solve the problem….so what next?

Running again the previous SQL query showed us that the server object is still in deleted status.

So if we would wait several days until the grooming process will run, then the object will be deleted from the DB. After 1 week the object removed and we start the agent install process again.


SAME PROBLEM!!! Event 21023 is still logged every 5 minutes and the folder:

"C:Program FilesSystem Center Operations Manager 2007Health Service Statemanagement pack" is empty. The configuration process isn’t working.

OK, maybe the RMS is preventing the update. In RMS event log I found the following event:

Event Type: Information
Event Source: OpsMgr Connector
Event Category: None
Event ID:       21042
Date:            1/12/2009
Time:            09:01:57
User: N/A
Computer: RMS SERVER
Description: Operations Manager has discarded 1 items in management group MY-MG, which came from $$ROOT$$.  These items have been discarded because no valid route exists at this time.  This can happen when new devices are added to the topology but the complete topology has not been distributed yet.  The discarded items will be regenerated.

Finally I found the solution here:


I executed the following query:

DECLARE @BaseManagedEntityInternalId int
DECLARE @BaseManagedEntityId uniqueidentifier
DECLARE @ViewName sysname
DECLARE @Statement nvarchar(max)
SET @BaseManagedEntityInternalId = 0
WHILE EXISTS (SELECT * FROM BaseManagedEntity WHERE (BaseManagedEntityInternalId > @BaseManagedEntityInternalId))
@BaseManagedEntityInternalId = bme.BaseManagedEntityInternalId
,@BaseManagedEntityId = bme.BaseManagedEntityId
,@ViewName = met.ManagedTypeViewName
FROM BaseManagedEntity bme
JOIN ManagedType met ON (bme.BaseManagedTypeId = met.ManagedTypeId)
WHERE (bme.BaseManagedEntityInternalId > @BaseManagedEntityInternalId)
AND (bme.IsDeleted = 0)
ORDER BY BaseManagedEntityInternalId
SELECT @Statement = ‘IF NOT EXISTS (SELECT * FROM ‘ + QUOTENAME(@ViewName) + ‘WHERE BaseManagedEntityId = ”’ + CAST(@BaseManagedEntityId AS varchar(50)) + ”’)PRINT ”’ + CAST(@BaseManagedEntityId AS varchar(50)) + ‘ ‘ + @ViewName + ””

And the result was:


Then executed the following :

select fullname
from basemanagedentity
where basemanagedentityid = ‘<GUID>’

And there it was: Microsoft.Windows.Computer:ServerName.XXX.corp

The server was not listed under managed agents and we couldn’t find the object anywhere in the console.

Before executing the above query please ensure that you have a backup of the database. Also note that you need to run this query only incase you do not see the object in the console.

So now we will need to delete the object from the DB.

update basemanagedentity
set isdeleted = 1
where basemanagedentityid = ‘<GUID>’

After executing this query, run the following stored procedure to make sure the DB is fixed.

exec p_Detectandfixinstancespaceinconsistencies

Once you done restart all the three OpsMgr services.

And that’s all, after a couple of minutes all agents will start download all new configuration.

Categories: OpsMgr Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: