Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-552

TCP_NIO gives ClassCastException in cluster-service.xml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.4.1 SP4, 2.5
    • 2.4.1 SP3
    • None
    • Workaround Exists
    • Hide

      use <TCP bind_addr="${jboss.bind.address}" loopback="true" start_port="7800"/> instead of <TCP_NIO>

      Show
      use <TCP bind_addr="${jboss.bind.address}" loopback="true" start_port="7800"/> instead of <TCP_NIO>

      I'm trying to replace UDP protocol in cluster-service.xml in jboss4.2.1GA version.
      I commented out <UDP> and <PING> elements and put there:
      <TCP_NIO bind_addr="${jboss.bind.address}" recv_buf_size="20000000" send_buf_size="640000" loopback="false"
      discard_incompatible_packets="true" max_bundle_size="64000" max_bundle_timeout="30"
      use_incoming_packet_handler="true" use_outgoing_packet_handler="false" down_thread="false"
      up_thread="false" enable_bundling="true" start_port="7800" use_send_queues="false" sock_conn_timeout="300"
      skip_suspected_members="true" reader_threads="8" writer_threads="8" processor_threads="8"
      processor_minThreads="8" processor_maxThreads="8" processor_queueSize="100"/>
      <MPING timeout="2000" bind_addr="${jboss.bind.address}" mcast_addr="${jboss.partition.udpGroup:228.1.2.3}"
      mcast_port="${jboss.hapartition.mcast_port:45566}" ip_ttl="${jgroups.udp.ip_ttl:2}" num_initial_members="1"/>

      During startup jboss gives exception:
      2007-07-10 11:55:39,026 ERROR [org.jgroups.jmx.JmxConfigurator] failed creating a JMX wrapper instance for TCP_NIO(local address
      : null)
      java.lang.ClassCastException: org.jgroups.protocols.TCP_NIO
      at org.jgroups.jmx.protocols.TCP.attachProtocol(TCP.java:22)
      at org.jgroups.jmx.protocols.TCP_NIO.attachProtocol(TCP_NIO.java:19)
      at org.jgroups.jmx.JmxConfigurator.findProtocol(JmxConfigurator.java:152)
      at org.jgroups.jmx.JmxConfigurator.registerProtocols(JmxConfigurator.java:96)
      at org.jboss.ha.framework.server.ClusterPartition.registerChannelInJmx(ClusterPartition.java:553)
      at org.jboss.ha.framework.server.ClusterPartition.createService(ClusterPartition.java:341)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy0.create(Unknown Source)
      at org.jboss.system.ServiceController.create(ServiceController.java:330)
      at org.jboss.system.ServiceController.create(ServiceController.java:273)
      ...

      It could be workarouned by usage of <TCP>, but as I saw in wiki TCP is not recommended and will not be supported in future.

              rhn-engineering-bban Bela Ban
              ramazanyich_jira Ramil Israfilov (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: