WMI timeout parameter ignored and forced to 5 seconds
Description
Acceptance / Success Criteria
None
Lucidchart Diagrams
Activity
Show:
Tim Miller Dyck November 20, 2012 at 11:19 AM
Just to report I have also seen mysterious WMI timeouts despite setting long timeouts in wmi-config.xml, collectd-configuration.xml and poller-configuration.xml, and not seeing similar timeouts on other services (e.g. SNMP, pollerd) on the same node at the same time. I had written this off to WMI being slower to query than other services, but the bug report above sheds light on this.
Regards,
Tim Miller Dyck
Some WMI requests always fail, and seem to be caused by a socket timeout:
Caused by: java.net.SocketTimeoutException
at sun.nio.ch.SocketAdaptor$SocketInputStream.read(SocketAdaptor.java:201)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:86)
at org.jinterop.dcom.transport.JIComTransport.receive(JIComTransport.java:152)
I've started to modify some ONMS code:
I added a 'mgr.setTimeout(30000);' in CheckWmi.java, but it didn't worked
So I dug deeper and found the setTimeout() did nothing !
Moreover, in WmiClient.java the timeout is forced to 5 seconds.
I added 'm_Session.setGlobalSocketTimeout(30000);' in WmiClient.java and my requests are OK now.
So the fix would be to modify WmiClient and WmiManager classes to take into account the "timeout" parameter.