While testing my SSL implementation for the .NET Client against the Java
broker, I seem to be causing some intermittent exceptions on the broker if
the client. 

Basically, what happens is this:

1- The client opens and closes a new SSL connection to the broker. Works
just fine the first time.
2- Try (1) again one or two more times.
3- The broker has an internal exception. Here's the last part of the log
including the entire session:

2007-02-16 22:53:19,307 INFO  [SocketAcceptorIoProcessor-0.2]
protocol.AMQPFastProtocolHandler (AMQPFastProtocolHandler.java:85) -
Protocol session created
2007-02-16 22:53:19,307 INFO  [SocketAcceptorIoProcessor-0.2]
protocol.AMQPFastProtocolHandler (AMQPFastProtocolHandler.java:130) -
Session opened
2007-02-16 22:53:19,718 INFO  [pool-8-thread-4]
handler.ConnectionStartOkMethodHandler
(ConnectionStartOkMethodHandler.java:65) - SASL Mechanism selected: CRAM-MD5
2007-02-16 22:53:19,718 INFO  [pool-8-thread-4]
handler.ConnectionStartOkMethodHandler
(ConnectionStartOkMethodHandler.java:66) - Locale selected: en_US
2007-02-16 22:53:19,738 INFO  [pool-8-thread-4]
handler.ConnectionSecureOkMethodHandler
(ConnectionSecureOkMethodHandler.java:92) - Connected as: guest
2007-02-16 22:53:19,738 INFO  [pool-8-thread-4]
handler.ConnectionStartOkMethodHandler
(ConnectionStartOkMethodHandler.java:141) - Framesize set to 65535
2007-02-16 22:53:19,768 INFO  [pool-8-thread-4]
handler.ConnectionCloseMethodHandler (ConnectionCloseMethodHandler.java:52)
- ConnectionClose received with reply code/reply text 200/Qpid.NET client is
closing the connection. for AMQProtocolSession(/127.0.0.1:3357)
2007-02-16 22:53:19,818 INFO  [SocketAcceptorIoProcessor-0.2]
protocol.AMQPFastProtocolHandler (AMQPFastProtocolHandler.java:135) -
Protocol Session closed
2007-02-16 22:53:19,818 INFO  [SocketAcceptorIoProcessor-0.2]
pool.PoolingFilter (PoolingFilter.java:189) - Destroy called on
PoolingFilter AsynchronousWriteFilter
2007-02-16 22:53:19,828 ERROR [pool-8-thread-4]
protocol.AMQPFastProtocolHandler (AMQPFastProtocolHandler.java:190) -
Exception caught inAMQProtocolSession(/127.0.0.1:3357), closing session
explictly: java.lang.IllegalStateException: Handed undecoded ByteBuffer buf
= HeapBuffer[pos=0 lim=37 cap=32768: 15 03 01 00 20 A0 9D DE 54 51 D5 28 E7
CF C9 35 F4 CF 75
2F A8 FA 7C 52 FB FC 7C DA 17 FB 76 57 40 A9 C0 D7 BC]
java.lang.IllegalStateException: Handed undecoded ByteBuffer buf =
HeapBuffer[pos=0 lim=37 cap=32768: 15 03 01 00 20 A0 9D DE 54 51 D5 28 E7 CF
C9 35 F4 CF 75 2F A8 FA 7C 52 FB FC
7C DA 17 FB 76 57 40 A9 C0 D7 BC]
        at
org.apache.qpid.server.protocol.AMQPFastProtocolHandler.messageReceived(AMQP
FastProtocolHandler.java:212)
        at
org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceived(Abstr
actIoFilterChain.java:189)
        at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived
(AbstractIoFilterChain.java:502)
        at
org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoF
ilterChain.java:52)
        at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageRece
ived(AbstractIoFilterChain.java:777)
        at org.apache.qpid.pool.Event$ReceivedEvent.process(Event.java:53)
        at org.apache.qpid.pool.Job.processAll(Job.java:80)
        at org.apache.qpid.pool.Job.run(Job.java:102)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
va:650)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
75)
        at java.lang.Thread.run(Thread.java:595)


Some things to point out:
1- This does not happen for non-ssl connections.
3- This only seems to happen (so far) for SSL connections where the client
specifies a client certificate.

Might it be something the client is incorrectly doing (like a misconfigured
option causing it to send more data than it should) or is there something on
the broker side that causes the issue? (i.e. can anyone repro it using the
java client).

Tomas Restrepo
[EMAIL PROTECTED]
http://www.winterdom.com/weblog/



Reply via email to