×


WMI ERROR: Retrieve result data - Fix it Now ?

With Windows Management Instrumentation (WMI) we can have agentless monitoring of Windows machines.

Nagios supports WMI monitoring. It provides admins with a simple method of monitoring their Windows servers and workstations without having to install or configure agents.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Nagios queries.

In this context, we shall look into how to fix this error.


Nature of WMI ERROR: Retrieve result data

Here, we will troubleshoot this error.

When we run the WMI Configuration Wizard, we receive the error:

UNKNOWN – The WMI query had problems. The error text from wmic is: [wmi/wmic.c:212:main()]
ERROR: Retrieve result data.
NTSTATUS: NT code 0x80041003 – NT code 0x80041003

In such a case, we need additional permissions for our Windows machine.

On the Windows machine in a command prompt, we execute:

wmic useraccount where name=’wmiagent’ get sid

This command assumes the user account for WMI is wmiagent.


Our output will be like this:

SID
S-1-5-21-2343277006-4046424753-211511363-1002

This is the SID number.


Then to get the current security descriptor (SD) for SCMANAGER, we run:

sc sdshow SCMANAGER
D:(A;;CC;;;AU)(A;;CCLCRPRC;;;IU)(A;;CCLCRPRC;;;SU)(A;;CCLCRPWPRC;;;SY)(A;;KA;;;BA)S:(AU;FA;KA;;;WD)(AU;OIIOFA;GA;;;WD)

This is the SD string, specific to our Windows machine and we need to use it.


Then we need to add an entry to the SD that contains our SID.


For example, we use the SID above:

(A;;CCLCRPRC;;;S-1-5-21-2343277006-4046424753-211511363-1002)

We need to insert this to the beginning of the SD after the D:, using the example above it looks like:

D:(A;;CCLCRPRC;;;S-1-5-21-2343277006-4046424753-211511363-1002)(A;;CC;;;AU)(A;;CCLCRPRC;;;IU)(A;;CCLCRPRC;;;SU)(A;;CCLCRPWPRC;;;SY)(A;;KA;;;BA)S:(AU;FA;KA;;;WD)(AU;OIIOFA;GA;;;WD)

Since we have altered the SD, we can execute the following command using our new SD to apply the SD:

sc sdset SCMANAGER D:(A;;CCLCRPRC;;;S-1-5-21-2343277006-4046424753-211511363-1002)(A;;CC;;;AU)(A;;CCLCRPRC;;;IU)(A;;CCLCRPRC;;;SU)(A;;CCLCRPWPRC;;;SY)(A;;KA;;;BA)S:(AU;FA;KA;;;WD)(AU;OIIOFA;GA;;;WD)

Eventually, we should re-run the configuration wizard and ensure the resolution.


[Need help with the fixing Nagios errors? We'd be happy to assist. ]


Conclusion

This article covers process to fix WMI ERROR for our Customers. Due to a memory leak in the WMI functions in Windows 2008 and Windows 7, the system resources may be exhausted in the Windows system, resulting in the error message found above.

It has been seen that systeminfo and wmic commands executed via the command prompt fails in case this issue is present, displaying error messages such as:

The paging file is too small for this operation to complete.

Looking at the process list in the Windows system, it can be determined that the WmiPrvSE.exe process has allocated unusually large amounts of memory.