activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mbmerr <...@nmi.net>
Subject Cannot get SSL working
Date Fri, 26 May 2006 21:00:53 GMT

I have been unable to set SSL working error-free.

I've attempted the following with the SNAPSHOT, RC3, and
incubator-activemq-4.0 downloads on Windows XP SP2, using Java 1.5.0_06:

- Download, unzip, start ActiveMQ.
- In distinct command windows, run 'ant consumer' and 'ant producer'.  Watch
them succeed.
- Follow the instructions on
http://www.activemq.com/site/how-do-i-use-ssl.html to generate certificates
and keystores for ActiveMQ and each of the clients.
- Modify example's build.xml to include required jvmargs for producer and
consumer.
- Modify example's build.xml to set connection url to
'ssl://localhost:61616'
- Modify activemq.bat to include required jvmargs.
- Modify activemq.xml to change 'tcp://localhost:61616' to
'ssl://localhost:61616'

Now when I attempt to rerun the example, it appears the producer and
consumer each succeed and produce/consume messages, but each client records
a 'Connection closed by remote host' exception.

Consumer Output:

consumer:
     [echo] Running consumer against server at $url = ssl://localhost:61616
for subject $subject = TEST.FOO
     [java] Connecting to URL: ssl://localhost:61616
     [java] Consuming queue: TEST.FOO
     [java] Using non-durable subscription
     [java] We are about to wait until we consume: 10 message(s) then we
will shutdown
     [java] Received: Message: 0 sent at: Fri May 26 16:36:59 EDT 2006  ...
     [java] Received: Message: 1 sent at: Fri May 26 16:36:59 EDT 2006  ...
     [java] Received: Message: 2 sent at: Fri May 26 16:36:59 EDT 2006  ...
     [java] Received: Message: 3 sent at: Fri May 26 16:36:59 EDT 2006  ...
     [java] Received: Message: 4 sent at: Fri May 26 16:36:59 EDT 2006  ...
     [java] javax.jms.JMSException: Connection closed by remote host
     [java]     at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:57)
     [java] Received: Message: 5 sent at: Fri May 26 16:36:59 EDT 2006  ...
     [java] Received: Message: 6 sent at: Fri May 26 16:36:59 EDT 2006  ...
     [java]     at
org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1113)
     [java]     at
org.apache.activemq.ActiveMQConnection.close(ActiveMQConnection.java:566)
     [java] Received: Message: 7 sent at: Fri May 26 16:36:59 EDT 2006  ...
     [java] Received: Message: 8 sent at: Fri May 26 16:36:59 EDT 2006  ...
     [java]     at ConsumerTool.consumeMessagesAndClose(Unknown Source)
     [java]     at ConsumerTool.run(Unknown Source)
     [java] Received: Message: 9 sent at: Fri May 26 16:36:59 EDT 2006  ...
     [java] Closing connection
     [java] Caught: javax.jms.JMSException: Connection closed by remote host
     [java]     at ConsumerTool.main(Unknown Source)
     [java] Caused by: java.net.SocketException: Connection closed by remote
host
     [java]     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.e(DashoA6275)
     [java]     at
com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
     [java]     at
org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:108)
     [java]     at java.io.DataOutputStream.flush(DataOutputStream.java:101)
     [java]     at
org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:125)
     [java]     at
org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:141)
     [java]     at
org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:78)
     [java]     at
org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:77)
     [java]     at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:44)
     [java]     at
org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
     [java]     at
org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1111)
     [java]     ... 4 more

BUILD SUCCESSFUL


Producer Output:

producer:
     [echo] Running producer against server at $url = ssl://localhost:61616
for subject $subject = TEST.FOO
     [java] Connecting to URL: ssl://localhost:61616
     [java] Publishing a Message with size 1000 to queue: TEST.FOO
     [java] Using non-durable publishing
     [java] Sleeping between publish 0 ms
     [java] Sending message: Message: 0 sent at: Fri May 26 16:36:59 EDT
2006  ...
     [java] Sending message: Message: 1 sent at: Fri May 26 16:36:59 EDT
2006  ...
     [java] Sending message: Message: 2 sent at: Fri May 26 16:36:59 EDT
2006  ...
     [java] Sending message: Message: 3 sent at: Fri May 26 16:36:59 EDT
2006  ...
     [java] Sending message: Message: 4 sent at: Fri May 26 16:36:59 EDT
2006  ...
     [java] Sending message: Message: 5 sent at: Fri May 26 16:36:59 EDT
2006  ...
     [java] Sending message: Message: 6 sent at: Fri May 26 16:36:59 EDT
2006  ...
     [java] Sending message: Message: 7 sent at: Fri May 26 16:36:59 EDT
2006  ...
     [java] Sending message: Message: 8 sent at: Fri May 26 16:36:59 EDT
2006  ...
     [java] Sending message: Message: 9 sent at: Fri May 26 16:36:59 EDT
2006  ...
     [java] Done.
     [java] connection {
     [java]   session {
     [java]     messageCount{ count: 10 unit: count startTime: 1148675819169
lastSampleTime: 1148675819570 description: Number of messages exchanged }
     [java]     messageRateTime{ count: 10 maxTime: 131 minTime: 20
totalTime: 371 averageTime: 37.1 averageTimeExMinMax: 27.5 averagePerSecond:
26.954177897574123 averagePerSecondExMinMax: 36.36363636363637 unit: millis
startTime: 1148675819169 lastSampleTime: 1148675819570 description: Time
taken to process a message (thoughtput rate) }
     [java]     pendingMessageCount{ count: 0 unit: count startTime:
1148675819169 lastSampleTime: 1148675819169 description: Number of pending
messages }
     [java]     expiredMessageCount{ count: 0 unit: count startTime:
1148675819169 lastSampleTime: 1148675819169 description: Number of expired
messages }
     [java]     messageWaitTime{ count: 0 maxTime: 0 minTime: 0 totalTime: 0
averageTime: 0.0 averageTimeExMinMax: 0.0 averagePerSecond: 0.0
averagePerSecondExMinMax: 0.0 unit: millis startTime: 1148675819169
lastSampleTime: 1148675819169 description: Time spent by a message before
being delivered }
     [java]     durableSubscriptionCount{ count: 0 unit: count startTime:
1148675819169 lastSampleTime: 1148675819169 description: The number of
durable subscriptions }

     [java]     producers {
     [java]       producer queue://TEST.FOO {
     [java]         messageCount{ count: 10 unit: count startTime:
1148675819199 lastSampleTime: 1148675819570 description: Number of messages
processed }
     [java]         messageRateTime{ count: 10 maxTime: 131 minTime: 20
totalTime: 371 averageTime: 37.1 averageTimeExMinMax: 27.5 averagePerSecond:
26.954177897574123 averagePerSecondExMinMax: 36.36363636363637 unit: millis
startTime: 1148675819199 lastSampleTime: 1148675819570 description: Time
taken to process a message (thoughtput rate) }
     [java]         pendingMessageCount{ count: 0 unit: count startTime:
1148675819199 lastSampleTime: 1148675819199 description: Number of pending
messages }
     [java]         messageRateTime{ count: 10 maxTime: 131 minTime: 20
totalTime: 371 averageTime: 37.1 averageTimeExMinMax: 27.5 averagePerSecond:
26.954177897574123 averagePerSecondExMinMax: 36.36363636363637 unit: millis
startTime: 1148675819199 lastSampleTime: 1148675819570 description: Time
taken to process a message (thoughtput rate) }
     [java]         expiredMessageCount{ count: 0 unit: count startTime:
1148675819199 lastSampleTime: 1148675819199 description: Number of expired
messages }
     [java]         messageWaitTime{ count: 0 maxTime: 0 minTime: 0
totalTime: 0 averageTime: 0.0 averageTimeExMinMax: 0.0 averagePerSecond: 0.0
averagePerSecondExMinMax: 0.0 unit: millis startTime: 1148675819199
lastSampleTime: 1148675819199 description: Time spent by a message before
being delivered }
     [java] javax.jms.JMSException: Connection closed by remote host
     [java]     at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:57)
     [java]       }
     [java]     }
     [java]     consumers {
     [java]     }
     [java]   }
     [java]     at
org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1113)
     [java]     at
org.apache.activemq.ActiveMQConnection.close(ActiveMQConnection.java:566)
     [java] }
     [java] Caught: javax.jms.JMSException: Connection closed by remote host
     [java]     at ToolSupport.close(Unknown Source)
     [java]     at ProducerTool.run(Unknown Source)
     [java]     at ProducerTool.runTool(Unknown Source)
     [java]     at ProducerTool.main(Unknown Source)
     [java] Caused by: java.net.SocketException: Connection closed by remote
host
     [java]     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.e(DashoA6275)
     [java]     at
com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
     [java]     at
org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:108)
     [java]     at java.io.DataOutputStream.flush(DataOutputStream.java:101)
     [java]     at
org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:125)
     [java]     at
org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:141)
     [java]     at
org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:78)
     [java]     at
org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:77)
     [java]     at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:44)
     [java]     at
org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
     [java]     at
org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1111)
     [java]     ... 5 more

BUILD SUCCESSFUL


Anyone have any suggestions?  Thanks for your time.

--
View this message in context: http://www.nabble.com/Cannot+get+SSL+working-t1689166.html#a4583825
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message