Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-2396

Cannot Set Transport Properties on NIO Transport [AMQ-7121] Running Recent Versions of OpenJDK 1.8

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • JBoss AMQ 6.3 R17
    • None
    • broker
    • None
    • Hide
      • Configure a broker with the nio transport and set a transport option, such as soTimeout
                    <transportConnector name="openwire" uri="nio://0.0.0.0:0?maximumConnections=1000&amp;wireFormat.maxFrameSize=107374182400&amp;transport.soTimeout=20000&amp;maximumConnections=200000&amp;wireFormat.maxFrameSize=104857600"/>
        
      • Start the broker with JAVA_HOME pointing to a Java 1.8.0 b252 distribution
      • Observe the stacktrace in the description in the log
      Show
      Configure a broker with the nio transport and set a transport option, such as soTimeout <transportConnector name= "openwire" uri= "nio: //0.0.0.0:0?maximumConnections=1000&amp;wireFormat.maxFrameSize=107374182400&amp;transport.soTimeout=20000&amp;maximumConnections=200000&amp;wireFormat.maxFrameSize=104857600" /> Start the broker with JAVA_HOME pointing to a Java 1.8.0 b252 distribution Observe the stacktrace in the description in the log

      When trying to set transport options such as soTimeout on recent versions of Java 8, the resultant stacktrace is observed in the log:

      2020-07-15 16:55:16,116 | ERROR | AMQ-1-thread-1   | IntrospectionSupport             | tivemq.util.IntrospectionSupport  188 | 162 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630377-10 | Could not set property soTimeout on ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=61616]
      java.lang.IllegalAccessException: Class org.apache.activemq.util.IntrospectionSupport can not access a member of class sun.nio.ch.ServerSocketAdaptor with modifiers "public"
      	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102)[:1.8.0_252]
      	at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296)[:1.8.0_252]
      	at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288)[:1.8.0_252]
      	at java.lang.reflect.Method.invoke(Method.java:491)[:1.8.0_252]
      	at org.apache.activemq.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:184)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630377-10]
      	at org.apache.activemq.util.IntrospectionSupport.setProperties(IntrospectionSupport.java:155)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630377-10]
      	at org.apache.activemq.transport.tcp.TcpTransportServer.configureServerSocket(TcpTransportServer.java:202)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630377-10]
      	at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:143)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630377-10]
      	at org.apache.activemq.transport.tcp.TcpTransportFactory.doBind(TcpTransportFactory.java:56)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630377-10]
      	at org.apache.activemq.transport.TransportFactorySupport.bind(TransportFactorySupport.java:40)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630377-10]
      	at org.apache.activemq.broker.TransportConnector.createTransportServer(TransportConnector.java:315)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630377-10]
      	at org.apache.activemq.broker.TransportConnector.getServer(TransportConnector.java:141)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630377-10]
      	at org.apache.activemq.broker.TransportConnector.asManagedConnector(TransportConnector.java:107)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630377-10]
      	at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:2225)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630377-10]
      	at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:2684)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630377-10]
      	at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:2606)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630377-10]
      	at org.apache.activemq.broker.BrokerService.doStartBroker(BrokerService.java:754)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630377-10]
      	at org.apache.activemq.broker.BrokerService.startBroker(BrokerService.java:716)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630377-10]
      	at org.apache.activemq.broker.BrokerService.start(BrokerService.java:622)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630377-10]
      	at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration.doStart(ActiveMQServiceFactory.java:556)[176:io.fabric8.mq.mq-fabric:1.2.0.redhat-630377]
      	at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration.access$600(ActiveMQServiceFactory.java:359)[176:io.fabric8.mq.mq-fabric:1.2.0.redhat-630377]
      	at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration$1.run(ActiveMQServiceFactory.java:499)[176:io.fabric8.mq.mq-fabric:1.2.0.redhat-630377]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_252]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_252]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_252]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_252]
      	at java.lang.Thread.run(Thread.java:748)[:1.8.0_252]
      
      

      This was previously thought to affect only Java 11, but has also manifested in recent versions of Java 8.

      There is an upstream tracker for this at https://issues.apache.org/jira/browse/AMQ-7121

              gtully@redhat.com Gary Tully
              rhn-support-dhawkins Duane Hawkins
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: