与docker容器的ssl连接问题

时间:2018-02-07 11:27:40

标签: java ssl docker activemq

我在一个docker容器中运行一个活动的mq,这个容器配置了ssl支持。 当我试着将我的java应用程序连接到conntainer主机(url = ssl:// localhost:555)时,它似乎无法正常工作。 注意: 当获取活动mq的二进制文件并在主机上运行时,非docker innvolve一切正常。

主机操作系统是mac

这是我得到的例外:

Caused by: javax.jms.JMSException: Could not connect to broker URL: ssl://127.0.0.1:555?wireFormat.maxInactivityDuration=0. Reason: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at ..Dispatcher.java:31)
    at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:36)
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:358)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1002)
    at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:303)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
    at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:243)
    at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:757)
    at com.cloudally.queue.QueueManager.connect(QueueManager.java:229)
    at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
    ... 2 more
    at org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:115)
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at java.io.DataOutputStream.flush(DataOutputStream.java:123)
    at org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:176)
    at org.apache.activemq.transport.AbstractInactivityMonitor.doOnewaySend(AbstractInactivityMonitor.java:304)
    at org.apache.activemq.transport.AbstractInactivityMonitor.oneway(AbstractInactivityMonitor.java:286)
    at org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:168)
    at org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:84)
    at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:74)
    at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
    at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
    at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:338)
    ... 5 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
    at sun.security.ssl.InputRecord.read(InputRecord.java:505)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
    ... 19 more
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1002)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
    at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:757)
    at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
    at org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:115)
    at java.io.DataOutputStream.flush(DataOutputStream.java:123)
    at org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:176)
    at org.apache.activemq.transport.AbstractInactivityMonitor.doOnewaySend(AbstractInactivityMonitor.java:304)
    at org.apache.activemq.transport.AbstractInactivityMonitor.oneway(AbstractInactivityMonitor.java:286)
    at org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:168)
    at org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:84)
    at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:74)
    at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
    at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
    at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:338)
    ... 5 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
    at sun.security.ssl.InputRecord.read(InputRecord.java:505)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
    ... 19 more

0 个答案:

没有答案