Invalid argument

JBoss Issue Tracker | Michal Karm Babacek | 1 year ago
  1. 0

    Depending on the actual operating system and IPv6 UDP multicast address chosen one may encounter the infamous {{ Invalid argument}} while attempting to bind both to address and port. Global scope addresses such as {{ff0e::1}} seems to work, but any {{ff02::1}} (local network nodes) or even {{ff01::9}} (interface local) causes {{ Invalid argument}} with {{new InetSocketAddress(address, port)}}. The solution, according to JGroups and mod_cluster subsystem code appears to be simply to sacrifice possible cross-talking and bind to port only, all multicast addresses: {{new InetSocketAddress(port)}}. The problem is that while, for instance, mod_cluster subsystem code is prepared for this eventuality on Linux-like systems and catches the exception: h4. mod_cluster warning, continues to operate {noformat} WARN [org.jboss.modcluster] (ServerService Thread Pool -- 62) MODCLUSTER000031: Could not bind multicast socket to /ff01:0:0:0:0:0:0:9 (IPv6 address): Invalid argument; make sure your multicast address is of the same type as the IP stack (IPv4 or IPv6). Multicast socket will not be bound to an address, but this may lead to cross talking (see for details). DEBUG [org.jboss.modcluster] (ServerService Thread Pool -- 62) Catching: Invalid argument at Method) at at at<init>( at org.jboss.modcluster.advertise.impl.MulticastSocketFactoryImpl.createMulticastSocket( at org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl.init( at org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl.start( at org.jboss.modcluster.ModClusterService.init( at org.wildfly.mod_cluster.undertow.UndertowEventHandlerAdapter.start( at org.wildfly.clustering.service.AsynchronousServiceBuilder$ at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at at {noformat} {code:java} try { return new MulticastSocket(new InetSocketAddress(address, port)); } catch (IOException e) { ModClusterLogger.LOGGER.potentialCrossTalking(address, (address instanceof Inet4Address) ? "IPv4" : "IPv6", e.getLocalizedMessage()); ModClusterLogger.LOGGER.catchingDebug(e); return new MulticastSocket(port); } {code} the Undertow mod_cluster proxy code does not handle the exception appropriately and causes the whole operation to shut down, which is unnecessary: h4. Undertow mod_cluster proxy failure {noformat} ERROR [] (MSC service thread 1-3) MSC000001: Failed to start service jboss.undertow.filter.mod-cluster: org.jboss.msc.service.StartException in service jboss.undertow.filter.mod-cluster: Failed to start service at org.jboss.msc.service.ServiceControllerImpl$ at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at Caused by: java.lang.RuntimeException: Invalid argument at org.wildfly.extension.undertow.filters.ModClusterService.start( at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService( at org.jboss.msc.service.ServiceControllerImpl$ ... 3 more Caused by: Invalid argument at Method) at at at at org.xnio.nio.NioXnioWorker.createUdpServer( at io.undertow.server.handlers.proxy.mod_cluster.MCMPAdvertiseTask.advertise( at io.undertow.server.handlers.proxy.mod_cluster.ModCluster.advertise( at org.wildfly.extension.undertow.filters.ModClusterService.start( ... 5 more {noformat} {code:java} if (group != null && linuxLike) { bindAddress = new InetSocketAddress(group, config.getAdvertisePort()); } else { bindAddress = new InetSocketAddress(config.getAdvertisePort()); } final MulticastMessageChannel channel = worker.createUdpServer(bindAddress, new ChannelListener<MulticastMessageChannel>() { @Override public void handleEvent(MulticastMessageChannel channel) { //channel.resumeWrites(); } }, OptionMap.EMPTY); {code} h4. Call to action IMHO, we should handle the situation in Undertow mod_cluster proxy the same way as it is handled in mod_cluster subsystem code and JGroups. WDYT?

    JBoss Issue Tracker | 1 year ago | Michal Karm Babacek Invalid argument
  2. 0

    Problem since last update - Altitude Game: Forums | 12 months ago Invalid argument
  3. 0

    Unhandled exception in SOAP call

    Oracle Community | 1 decade ago | 168717 Invalid argument Invalid argument
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Registering Portlets Sample Error

    Oracle Community | 1 decade ago | 183648 Invalid argument Invalid argument
  6. 0

    db:: 5.11::Socket Exception: An invalid argument was supplied Error Code 10022 7m | 6 months ago Invalid argument Invalid argument

    4 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis


      Invalid argument

    2. Java RT
      1. Method)
      4 frames
    3. org.jboss.modcluster
      1. org.jboss.modcluster.advertise.impl.MulticastSocketFactoryImpl.createMulticastSocket(
      2. org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl.init(
      3. org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl.start(
      4. org.jboss.modcluster.ModClusterService.init(
      4 frames
    4. WildFly: mod_cluster Undertow Integration
      1. org.wildfly.mod_cluster.undertow.UndertowEventHandlerAdapter.start(
      1 frame
    5. org.wildfly.clustering
      1. org.wildfly.clustering.service.AsynchronousServiceBuilder$
      1 frame
    6. Java RT
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(
      2. java.util.concurrent.ThreadPoolExecutor$
      3 frames
    7. JBoss Threads
      1 frame