3 Replies Latest reply on Aug 12, 2019 4:16 AM by Duncan Grisby

    Software connected to Load Balancer Member

    Danny Fleer
      Share This:

      Hello everybody,

       

      I've noticed that sometimes Software is linked to Load Balancer Members which doesn't have listening ports listening on remote IP Addresses. The reason seems to be the function "findListeningSoftware" in the pattern module Common_LoadBalancer:

       

         // 5) Look at DiscoveredListeningPorts with a pid that match,

       

         // then resolve to SI.


         instances := search(

         in host

         traverse InferredElement:Inference:Associate:DiscoveryAccess

         traverse DiscoveryAccess:DiscoveryAccessResult:DiscoveryResult:NetworkConnectionList

         traverse List:List:Member:DiscoveredListeningPort

         where local_port = %port%

         processwith processesForCommunication

         traverse :Inference:InferredElement:SoftwareInstance);

       

      The query which traverses from the Host to the Discovered Listening Ports filters only on the provided Port and doesn't consider the local IP Address. Therefore it returns also Software that is bound to localhost only (127.0.0.0/8).

       

      I would suggest to filter the local IP Address too to avoid returning Software listening on localhost:

       

         // 5) Look at DiscoveredListeningPorts with a pid that match,

       

         // then resolve to SI.


         instances := search(

         in host

         traverse InferredElement:Inference:Associate:DiscoveryAccess

         traverse DiscoveryAccess:DiscoveryAccessResult:DiscoveryResult:NetworkConnectionList

         traverse List:List:Member:DiscoveredListeningPort

         where local_port = %port% and local_ip_addr in ['%ip%', '0.0.0.0', '::']

         processwith processesForCommunication

         traverse :Inference:InferredElement:SoftwareInstance);

       

      Could someone from BMC please confirm my observations and tell me if this should be changed?

       

      Best regards

      Danny