[ https://issues.apache.org/jira/browse/AMQCPP-754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17861070#comment-17861070 ]
Liviu Citu edited comment on AMQCPP-754 at 7/1/24 6:15 AM: ----------------------------------------------------------- I have been able to replicate the problem using a Java Artemis Client. In those cases the errors are: _jakarta.jms.JMSException: Could not connect to broker URL: ssl://linux_host:61617?keepAlive=true&wireFormat.maxInactivityDuration=0. Reason: java.net.SocketException: Broken pipe_ _at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:423) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:353) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:245) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _........................................................................._ _Caused by: java.net.SocketException: Broken pipe_ _at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:425) ~[?:?]_ _at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:445) ~[?:?]_ _at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:831) ~[?:?]_ _at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1035) ~[?:?]_ _at java.base/sun.security.ssl.SSLSocketOutputRecord.deliver(SSLSocketOutputRecord.java:345) ~[?:?]_ _at java.base/sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1308) ~[?:?]_ _at org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:115) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at java.base/java.io.DataOutputStream.flush(DataOutputStream.java:128) ~[?:?]_ _at org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:194) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.transport.AbstractInactivityMonitor.doOnewaySend(AbstractInactivityMonitor.java:336) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.transport.AbstractInactivityMonitor.oneway(AbstractInactivityMonitor.java:318) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:181) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:84) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:74) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache._ I was unable to find anything suspicious on the Artemis server side logs. was (Author: JIRAUSER300236): I have been able to replicate the problem using a Java Artemis Client. In those cases the errors are: _jakarta.jms.JMSException: Could not connect to broker URL: ssl://linux_host:61617?keepAlive=true&wireFormat.maxInactivityDuration=0. Reason: java.net.SocketException: Broken pipe_ _at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:423) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:353) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:245) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _........................................................................._ _Caused by: java.net.SocketException: Broken pipe_ _at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:425) ~[?:?]_ _at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:445) ~[?:?]_ _at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:831) ~[?:?]_ _at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1035) ~[?:?]_ _at java.base/sun.security.ssl.SSLSocketOutputRecord.deliver(SSLSocketOutputRecord.java:345) ~[?:?]_ _at java.base/sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1308) ~[?:?]_ _at org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:115) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at java.base/java.io.DataOutputStream.flush(DataOutputStream.java:128) ~[?:?]_ _at org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:194) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.transport.AbstractInactivityMonitor.doOnewaySend(AbstractInactivityMonitor.java:336) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.transport.AbstractInactivityMonitor.oneway(AbstractInactivityMonitor.java:318) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:181) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:84) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:74) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64) ~[activemq-client-6.1.2.jar!/:6.1.2]_ _at org.apache._ I was unable to find anything suspicious on the Artemis server side logs. Keep investigating. If the problem is indeed related to Artemis (we cannot replicate it on Amq Classic) then I will log an Artemis issue. > [Artemis Broker] CMS exception: OpenWireFormatNegotiator::onewayWire format > negotiation timeout: peer did not send his wire format. > ----------------------------------------------------------------------------------------------------------------------------------- > > Key: AMQCPP-754 > URL: https://issues.apache.org/jira/browse/AMQCPP-754 > Project: ActiveMQ C++ Client > Issue Type: Bug > Affects Versions: 3.9.5 > Reporter: Liviu Citu > Priority: Critical > Attachments: broker.xml > > > We are currently in process of migrating our JMS Broker from Classic 5.x to > Artemis. > We are currently using CMS C++ client for connecting to JMS Broker. > Everything works fine when using non-SSL setup (on both Windows and Linux) > but we have some issues when using SSL on Linux (SSL on Windows is OK). > The initial problem started with the following exceptions on the client side: > *_024-02-22 09:54:37.377 [ERROR] [activemq_connection.cc:336] CMS exception: > Channel was inactive for too long:_* > *_FILE: activemq/core/ActiveMQConnection.cpp, LINE: 1293_* > *_FILE: activemq/core/ActiveMQConnection.cpp, LINE: 1371_* > *_FILE: activemq/core/ActiveMQConnection.cpp, LINE: 573_* > while on the JMS Broker side we had: > *_2024-03-20 12:29:08,700 ERROR [org.apache.activemq.artemis.core.server] > AMQ224088: Timeout (10 seconds) on acceptor "netty-ssl-acceptor" during > protocol handshake with /10.21.70.53:33053 has occurred._* > To bypass these we have added the following setting to the *broker.xml* > *netty-ssl-acceptor* acceptor: *handshake-timeout=0* > However now the exceptions we are receiving are: > *_2024-05-22 09:26:40.842 [ERROR] [activemq_connection.cc:348] CMS exception: > OpenWireFormatNegotiator::onewayWire format negotiation timeout: peer did not > send his wire format._* > *_FILE: activemq/core/ActiveMQConnection.cpp, LINE: 1293_* > *_FILE: activemq/core/ActiveMQConnection.cpp, LINE: 1371_* > *_FILE: activemq/core/ActiveMQConnection.cpp, LINE: 573_* > The problem replicates with the following: > * SSL on Linux. Problem does not replicate if non-SSL configuration is used. > Also does not replicate on Windows (regardless if SSL or non-SSL is used) > * two Artemis JMS Broker instances running on the same Linux host (problem > does not replicate if there is only one Artemis JMS Broker instance running) > * problem also replicates if there is one Artemis Broker and one Classic > Broker instance running on the same host > * *problem does not replicate with two instances of Classic Brokers. So it > is specific to Artemis broker* > * when testing with both Classic Broker and Artemis Broker, the client > connections using the Classic Broker were fine. Only those using Artemis > Broker were failing > * CMS C++ client is also on Linux running on the same host. Basically both > client and server are running on the same host > * there are many connections done in the same time to the broker (50+). If > there are only few then the problem does not happen > * example of JMS Broker URL used by the client (the other instance just uses > a different port) > *ssl://linux_host:61617?soKeepAlive=true&wireFormat.MaxInactivityDuration=0* > * JMS Broker configuration file attached (just mangled the SSL stuff and > name of the host). The other one is similar (different ports) > > My first intention was to increase the OpenWire format negotiation timeout > which is currently hardcoded in CMS CPP client to {*}15 seconds{*}. > However when monitoring the successful connections I found out that they took > less than 0.5 seconds. I was unable to find any successful connection that > took more than this. > Those that failed were unable to get the response from the Broker after 15 > seconds. This means that the timeout value is not the issue here, It is > something else. > Looking to the JMS Broker logs we are unable to find any relevant message > when the connection fails. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@activemq.apache.org For additional commands, e-mail: issues-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact