Wednesday, April 20, 2011

Error Code: 80004005 and the error ‘The Operations Manager Server could not execute WMI Query "(null)" on computer…’ when pushing an Agent to Windows Server

Got this error while trying to push a SCOM R2 Agent to a Windows 2003 Server:

The Operations Manager Server could not execute WMI Query "(null)" on computer xxxxxxxxxxxx

Operation: Agent Install

Install account: xxxxxxxxx

Error Code: 80004005

Error Description: Unspecified error

First thing I did was checking out Kevin Holman’s article ‘Console based Agent Deployment Troubleshooting table’. But this time I couldn’t find a real solution.

The Issue
So it was time for some more detailed troubleshooting. I started the special logging for Agent installations as stated here.

When finished, the log file OpsMgrCustom.log was created. There were some errors to be found, related to the Agent push going wrong. The first two errors didn’t reveal much information though. Searching for it on the internet didn’t give anything solid to go on.

The Cause
But this part of the log file turned out to be the key to success: ‘The Operations Manager Server could not execute WMI Query "Select * from Win32_Environment where NAME='PROCESSOR_ARCHITECTURE'" on computer xxxxxxxxxxxxx .Operation: Agent InstallInstall account: xxxxxxxxxxxx. Error Code: 80004005Error Description: Unspecified error".’

Also the Management Server where the Agent was being pushed from logged an event in the OpsMgr Event log, EventID 10629:

First I thought it was a security related issue. So I started a RDP session to the server with the account being used to push the Agent. No issues there. Then I started wbemtest, connected to root/cimv2 and fired the same query. And to my surprise it turned out empty! No data was shown.

Strange. The same WMI query was run on other servers and here data was returned. So something was amiss with WMI. Time to fix it.

The Workaround
First WMI was repaired. But still the query turned out empty. Then WMI was reregistered. Again to no avail.

So it was time for using the ‘The Other Bing’ for some more searching. Soon I bumped into this thread on the System Center Forums. Here some one bumped into the same issue where also repairing/reregistering WMI didn’t work:

But after adding a key in the hive HKEY_CURRENT_USER he got it working. Not a solution but a work around. So I logged out of the server, logged on again with the same account being used for pushing the Agent, so the correct hive would be loaded under HKCU, and added the key:

And now the query, run against WMI, returned data. Time to push the Agent once more:

Yes! Issue solved! Even though the underlying issue hasn’t been fixed (it’s a workaround), the Agent is pushed none the less. Thanks to Peter Fischer who shared this, so all credits go to him.


John Bradshaw said...

Saved again!
Thx Marnix
John Bradshaw

00Shep said...

Worked like a charm. Thanks Marnix!