Event Management OMi Connector error: WARNING *** WARNING *** Socket timeout


Description

An Event Management HP OMi Connector is set up to connect to an OMi Server that has a large number of events. When running the Test Connector UI Action, everything works fine and it shows that the Connector is able to reach the OMi Server through the MID Server.

However when the OMi Connector attempts to retrieve the first batch of events from the OMi Server, an error message is thrown, which can be seen in the MID Server's agent log for the Worker-Interactive:ConnectorProbe thread for the connector:

***** Script: OMi API Request: <OMI URL GET Request>
WARNING *** WARNING *** Socket timeout 
*** Script: ERROR: TypeError: Cannot convert null to an object. 
*** Script: ERROR: OMi API Connection Error when getting Events

Release or Environment

Where Event Management is used with an HP Operations Manager i (OMi) connector instance is used.

Cause

The cause is probably a slow query running on the OMi Server, that takes too long to complete, and is timed out.

You can confirm the cause is a slow query:-

  1. Copy the OMI URL GET Request from the MID Server agent logs, and run it from a browser on the MID Server host, and verify how long it takes. You can adjust the page_size to test how long does it take to request a certain number of events. The page_size value tells how many events should the connector attempt to retrieve. For example, one should first test to see how long it takes to retrieve 500 events.
  2. >If it takes more than a few seconds, or a minute, this usually indicates that there is an issue with the internal performance of the OMI Server or how the query is being performed.
  3. Remove one query filter, such as severity, from the URL and test again to see if the time has been improved significantly. If it does, this could indicate that the query is inefficient and should be reviewed by the OMI Server team responsible for it.

 

 

Resolution

Customers should raise the issue of the slow query with their internal HP OMi Server team and ask them to review why the query is slow or inefficient.

For temporary relief or to aid testing, customers could review the "OMIJS" MID Server Script Include, that manages the way the OMI connector works and performs the query.

Removing the query filter, such as the one built for retrieving only the events that have high severity first, and run the connector again, may help.

Note: After the ticket has been resolved and query is working efficiently, as expected, you should revert back the out-of-the-box OMIJS script to avoid any unexpected issues in the future.

Additional Information