Removing multicast endpoints using scripting

 

Removing multicast endpoints using scripting

Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.

WebSphere Application Server uses multicast broadcasting at the node level to allow a node agent to discover the managed processes in the node. The IPv4 and IPv6 multicast addresses are not compatible. Both the IPv4 and IPv6 multicast addresses are defined in the node agent configuration and when a node agent starts both addresses will be tried in sequence. IBM recommends that you disable one of the multicast addresses after installation. By limiting multicast discovery to one protocol, the node agent will run more efficiently. Perform the following steps to remove a multicast endpoint:

  1. Remove the multicast end point:

    • Using Jacl:
      set se [$AdminConfig getid /Node:y2001/ServerIndex:/]
      set eprs [lindex [$AdminConfig showAttribute $se endPointRefs] 0]
      foreach ep $eprs {
         set epName [$AdminConfig showAttribute $ep endPointName]
         if {$epName == "NODE_MULTICAST_DISCOVERY_ADDRESS"} {
            puts "Removing NODE_MULTICAST_DISCOVERY_ADDRESS..."
            $AdminConfig remove $ep    }
      }
      

    • Using Jython:
      se = AdminConfig.getid('/Node:y2001/ServerIndex:/')
      import java lineseparator = java.lang.System.getProperty('line.separator')
      eprs = AdminConfig.showAttribute(se, ['endPointRefs']).split(lineseparator)[0]
      print eprs for ep in eprs:
         epName = AdminConfig.showAttribute(ep, ['endPointName'])
         if (epName) == "[NODE_MULTICAST_DISCOVERY_ADDRESS]":
            print "Removing NODE_MULTICAST_DISCOVERY_ADDRESS..."
            AdminConfig.remove(ep)

  2. Save the configuration changes. See the Saving configuration changes with the wsadmin tool article for more information.

  3. In a network deployment environment only, synchronize the node. See the Synchronizing nodes with the wsadmin tool article for more information.



Related concepts
AdminConfig object for scripted administration

Related reference
Commands for the AdminConfig object