You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Gerdes, Mike" <mi...@airbus.com> on 2006/04/06 12:44:57 UTC
a strange ssl error
hi,
so in my experiments with ssl, which looked promising, I have encountered a new error. To be honest I have no clue what causes this error or why it is caused at all.
First this error happens in compination of ssl and jms, second the error only happens in about 50% of all cases, third and the strangest thing is, that the error only happens when a connection.close(); is in class file and I haven't noticed it when the connection is not closed. Also it looks like the error is happening shortly before the connection.close(); command is executed. At least the error is displayed right in the output of a loop that runs before the connection.close();.
I am totally confused by this error and and argh....
ok here is the error output.
cya
mike
[java] <component>
[java] <componentName>outputSender</componentName>
[java] <statistic>
[java] <InboundExchangeCount>45</InboundExchangeCount>
[java] <InboundExchangeRate>99450.33333333333</InboundExchangeRate>
[java] <OutboundExchangeCount>45</OutboundExchangeCount>
[java] <InboundQueueSize>0</InboundQueueSize>
[java] </statistic>
[java] </component>
[java] <component>
[java] Exception in thread "main" javax.jms.JMSException: Connection closed
by remote host
[java] at org.apache.activemq.util.JMSExceptionSupport.create(JMSExcept
ionSupport.java:57)
[java] at org.apache.activemq.ActiveMQConnection.asyncSendPacket(Active
MQConnection.java:1090)
[java] at org.apache.activemq.ActiveMQConnection.close(ActiveMQConnecti
on.java:543)
[java] at JMSClient.main(Unknown Source)
[java] Caused by: java.net.SocketException: Connection closed by remote hos
t
[java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkWrite(SSLSock
etImpl.java:1168)
[java] at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputS
tream.java:60)
[java] at org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flu
sh(TcpBufferedOutputStream.java:108)
[java] at java.io.DataOutputStream.flush(DataOutputStream.java:106)
[java] at org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTran
sport.java:121)
[java] at org.apache.activemq.transport.InactivityMonitor.oneway(Inacti
vityMonitor.java:141)
[java] at org.apache.activemq.transport.TransportFilter.oneway(Transpor
tFilter.java:86)
[java] at org.apache.activemq.transport.WireFormatNegotiator.oneway(Wir
eFormatNegotiator.java:77)
[java] at org.apache.activemq.transport.MutexTransport.oneway(MutexTran
sport.java:44)
[java] at org.apache.activemq.transport.ResponseCorrelator.oneway(Respo
nseCorrelator.java:55)
[java] at org.apache.activemq.ActiveMQConnection.asyncSendPacket(Active
MQConnection.java:1088)
[java] ... 2 more
[java] <componentName>SMNameSupply</componentName>
[java] <statistic>
[java] <InboundExchangeCount>27</InboundExchangeCount>
[java] <InboundExchangeRate>142681.44444444444</InboundExchangeRate>
[java] <OutboundExchangeCount>54</OutboundExchangeCount>
[java] <InboundQueueSize>0</InboundQueueSize>
[java] </statistic>
[java] </component>
Source Code snippet:
TextMessage m = (TextMessage) consumer.receive(1000*10);
if( m == null ) {
System.out.println("Response timed out.");
} else {
System.out.println("Response was: "+m.getText());
}
System.out.println("Closing.");
connection.close();
This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.
Re: a strange ssl error
Posted by James Strachan <ja...@gmail.com>.
On 4/6/06, Gerdes, Mike <mi...@airbus.com> wrote:
>
> hi,
>
> so in my experiments with ssl, which looked promising, I have encountered a new error. To be honest I have no clue what causes this error or why it is caused at all.
> First this error happens in compination of ssl and jms, second the error only happens in about 50% of all cases, third and the strangest thing is, that the error only happens when a connection.close(); is in class file and I haven't noticed it when the connection is not closed. Also it looks like the error is happening shortly before the connection.close(); command is executed. At least the error is displayed right in the output of a loop that runs before the connection.close();.
>
> I am totally confused by this error and and argh....
>From the stack trace it looks like you are trying to close a client
connection but that fails because the socket has already been closed
by someone else - though I've no bright ideas why that might be the
case I'm afraid. Could it be a firewall or some other part of your
network is simply just dropping the underlying socket? Or are there
any broker side warnings/errors that is causing it to drop the socket?
Or was the client just inactive for too long?
--
James
-------
http://radio.weblogs.com/0112098/