Bind Issues With Multicast Address

Solution In Progress - Updated -

Environment

Red Hat JBoss Enterprise Application Platform (EAP)

  • 5.x

Issue

  • We are attempting to start up a cluster, but can't due to bind issues with the multicast address:
WARN  [org.jgroups.protocols.UDP] (JBoss System Threads(1)-3) could not bind to /239.255.2.79 (IPv4 address); make sure your mcast_addr is of the same type as the preferred IP stack (IPv4 or IPv6) by checking the value of the system properties java.net.preferIPv4Stack and java.net.preferIPv6Addresses.
Will ignore mcast_addr, but this may lead to cross talking (see https://www.jboss.org/community/docs/DOC-9469 for details). 
Exception was: java.net.BindException: Address already in use
...
ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=HAPartition state=Create
org.jgroups.ChannelException: failed to start protocol stack
    at org.jgroups.JChannel.startStack(JChannel.java:1617)
    at org.jgroups.JChannel.connect(JChannel.java:366)
    at org.jboss.ha.framework.server.ClusterPartition$ChannelConnectTask.run(ClusterPartition.java:183)
    at org.jboss.util.threadpool.RunnableTaskWrapper.run(RunnableTaskWrapper.java:147)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
...
Caused by: java.lang.Exception: problem creating sockets (bind_addr=/192.168.1.5, mcast_addr=null)
    at org.jgroups.protocols.UDP.start(UDP.java:402)
    at org.jgroups.stack.Configurator.startProtocolStack(Configurator.java:121)
    at org.jgroups.stack.ProtocolStack.startStack(ProtocolStack.java:402)
...
Caused by: java.net.BindException: Address already in use
    at java.net.PlainDatagramSocketImpl.bind0(Native Method)
    at java.net.PlainDatagramSocketImpl.bind(Unknown Source)
    at java.net.DatagramSocket.bind(Unknown Source)
  • We are receiving the following error when attempting to start up a cluster node:
WARN  [org.jgroups.protocols.UDP] (JBoss System Threads(1)-3) could not bind to /239.255.2.79 (IPv4 address); make sure your mcast_addr is of the same type as the preferred IP stack (IPv4 or IPv6) by checking the value of the system properties java.net.preferIPv4Stack and java.net.preferIPv6Addresses.
Will ignore mcast_addr, but this may lead to cross talking (see https://www.jboss.org/community/docs/DOC-9469 for details). 
Exception was: java.net.BindException: Address already in use

Resolution

  • UDP.mcast_port (default 45688) is being used by another process. Change the port via jgroups-channelfactory-stacks.xml.
  • Resolve network/OS level issues (hindering JBoss from opening the designated port).
  • Switch to TCP-based clustering.

Diagnostic Steps

  • Use netstat to verify the required JBoss ports are not being occupied by other processes.

  • Use the attached Java code to verify that the OS has no issue opening the designated port.

[jdoe@server Downloads]$ javac Test.java 
[jdoe@server Downloads]$ java Test 239.255.100.100 45688
Succeeded

Attachments

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments