You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by seven <ho...@gmail.com> on 2007/05/09 10:51:13 UTC

SSL Client does not send any data

Hello,

I have a problem with mina-filter-ssl-1.1.0 release: sometimes for unknown
reasons and in an arbitrary way, after a client connects to a SSL enabled
server, it does not send anything. On the server side and the client side as
well, only CREATED and OPENED events are fired and nothing further happens (
except IDDLE events ) even if the client issued the first session.write().

In order to reproduce this, I wrote a simple client that connects to the
echo server found in the examples.
org.apache.mina.example.echoserver.Main should be modified with
USE_SSL=true, PORT = 8090 and bogus.cert has to be generated as documented
in org.apache.mina.example.echoserver.ssl.BogusSSLContextFactory and placed
in the classpath of the server and server launchers.

Until mina-1.1.0 was released I worked with a snapshot release and did not
encounter this problem. So if one uses a mina-filter-ssl-1.1.0-SNAPSHOT.jar
instead of mina-filter-ssl-1.1.0.jar the 'silence' problem does not occur.
Fortunately I have the snapshot sources from the svn that were used to build
mina-filter-ssl-1.1.0-SNAPSHOT.jar.
The revision number for the working SSLHandler is 471502 respectively 507461
for SSLFilter.

Attached is the client  source that reproduces the problem. It has to be
placed in org.apache.mina.example.echoserver package.

Regards,
Horia
http://www.nabble.com/file/8269/Client.java Client.java 
-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a10390620
Sent from the mina dev mailing list archive at Nabble.com.


Re: SSL Client does not send any data

Posted by Trustin Lee <tr...@gmail.com>.
On 7/10/07, Raman Gupta <ro...@fastmail.fm> wrote:
> Trustin Lee wrote:
> >
> > On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
> >> I found unexpected write order problem in SSL handshaking process, but
> >> I still don't know why the order is sometimes mixed up.  I suspect
> >> there might be a kind of visibility problem.  I believe I am very
> >> close to the solution anyway.
> >
> > I guess I found why.  Please try the following JAR and let me know if
> > it fixes the problem.
> >
> > http://tinyurl.com/36y83t
> >
>
> Trustin, could you summarize what was changed in this jar, or point me to a
> JIRA issue or svn commit? I am trying to determine if the changes made might
> fix the problem I described here:
>
> http://www.nabble.com/forum/ViewPost.jtp?post=11326681&framed=y

Yes, if your problem appears right after the connection is
established.  If not, I guess it won't fix your problem.  But you'd
better give it a try.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by Raman Gupta <ro...@fastmail.fm>.

Trustin Lee wrote:
> 
> On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
>> I found unexpected write order problem in SSL handshaking process, but
>> I still don't know why the order is sometimes mixed up.  I suspect
>> there might be a kind of visibility problem.  I believe I am very
>> close to the solution anyway.
> 
> I guess I found why.  Please try the following JAR and let me know if
> it fixes the problem.
> 
> http://tinyurl.com/36y83t
> 

Trustin, could you summarize what was changed in this jar, or point me to a
JIRA issue or svn commit? I am trying to determine if the changes made might
fix the problem I described here:

http://www.nabble.com/forum/ViewPost.jtp?post=11326681&framed=y

Thanks,
Raman Gupta

-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a11509446
Sent from the mina dev mailing list archive at Nabble.com.


Re: SSL Client does not send any data

Posted by Trustin Lee <tr...@gmail.com>.
On 6/21/07, seven <ho...@gmail.com> wrote:
>
> Definitely good news!
> After hours of running the problem didn't show up.

That's a great news.  Your log file helped me indeed.

Cheers,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by seven <ho...@gmail.com>.
Definitely good news!
After hours of running the problem didn't show up.

Regards,
Horia


seven wrote:
> 
> Good news!
> 
> Seems that mina-filter-ssl-1.1.1-20070611.145558-5.jar solves the problem.
> I will let the test running for a couple of hours more but in the first
> half hour the problem did't show up.
> Great job!
> 
> Regards,
> Horia 
> 
> 
> Trustin Lee wrote:
>> 
>> Any good news? :)
>> 
>> Trustin
>> 
>> On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
>>> On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
>>> > On 6/7/07, seven <ho...@gmail.com> wrote:
>>> > >
>>> > > I attached logs.zip witch contain client.log and server.log
>>> > > They are rather verbose ( DEBUG enabled ).
>>> > >
>>> > > I noticed that the problem occurs later than sooner with DEBUG
>>> enabled but
>>> > > it happens anyway.
>>> >
>>> > I found unexpected write order problem in SSL handshaking process, but
>>> > I still don't know why the order is sometimes mixed up.  I suspect
>>> > there might be a kind of visibility problem.  I believe I am very
>>> > close to the solution anyway.
>>>
>>> I guess I found why.  Please try the following JAR and let me know if
>>> it fixes the problem.
>>>
>>> http://tinyurl.com/36y83t
>>>
>>> HTH,
>>> Trustin
>>> --
>>> what we call human nature is actually human habit
>>> --
>>> http://gleamynode.net/
>>> --
>>> PGP Key ID: 0x0255ECA6
>>>
>> 
>> 
>> -- 
>> what we call human nature is actually human habit
>> --
>> http://gleamynode.net/
>> --
>> PGP Key ID: 0x0255ECA6
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a11227174
Sent from the mina dev mailing list archive at Nabble.com.


Re: SSL Client does not send any data

Posted by seven <ho...@gmail.com>.
Good news!

Seems that mina-filter-ssl-1.1.1-20070611.145558-5.jar solves the problem. I
will let the test running for a couple of hours more but in the first half
hour the problem did't show up.
Great job!

Regards,
Horia 


Trustin Lee wrote:
> 
> Any good news? :)
> 
> Trustin
> 
> On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
>> On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
>> > On 6/7/07, seven <ho...@gmail.com> wrote:
>> > >
>> > > I attached logs.zip witch contain client.log and server.log
>> > > They are rather verbose ( DEBUG enabled ).
>> > >
>> > > I noticed that the problem occurs later than sooner with DEBUG
>> enabled but
>> > > it happens anyway.
>> >
>> > I found unexpected write order problem in SSL handshaking process, but
>> > I still don't know why the order is sometimes mixed up.  I suspect
>> > there might be a kind of visibility problem.  I believe I am very
>> > close to the solution anyway.
>>
>> I guess I found why.  Please try the following JAR and let me know if
>> it fixes the problem.
>>
>> http://tinyurl.com/36y83t
>>
>> HTH,
>> Trustin
>> --
>> what we call human nature is actually human habit
>> --
>> http://gleamynode.net/
>> --
>> PGP Key ID: 0x0255ECA6
>>
> 
> 
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
> 

-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a11208881
Sent from the mina dev mailing list archive at Nabble.com.


Re: SSL Client does not send any data

Posted by seven <ho...@gmail.com>.
I am sorry for the late answer but i was in vacation. I will be able to try
the snapshot in a couple of days.

Regards,
Horia


Trustin Lee wrote:
> 
> Any good news? :)
> 
> Trustin
> 
> On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
>> On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
>> > On 6/7/07, seven <ho...@gmail.com> wrote:
>> > >
>> > > I attached logs.zip witch contain client.log and server.log
>> > > They are rather verbose ( DEBUG enabled ).
>> > >
>> > > I noticed that the problem occurs later than sooner with DEBUG
>> enabled but
>> > > it happens anyway.
>> >
>> > I found unexpected write order problem in SSL handshaking process, but
>> > I still don't know why the order is sometimes mixed up.  I suspect
>> > there might be a kind of visibility problem.  I believe I am very
>> > close to the solution anyway.
>>
>> I guess I found why.  Please try the following JAR and let me know if
>> it fixes the problem.
>>
>> http://tinyurl.com/36y83t
>>
>> HTH,
>> Trustin
>> --
>> what we call human nature is actually human habit
>> --
>> http://gleamynode.net/
>> --
>> PGP Key ID: 0x0255ECA6
>>
> 
> 
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
> 

-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a11183191
Sent from the mina dev mailing list archive at Nabble.com.


Re: SSL Client does not send any data

Posted by Trustin Lee <tr...@gmail.com>.
Any good news? :)

Trustin

On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
> On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
> > On 6/7/07, seven <ho...@gmail.com> wrote:
> > >
> > > I attached logs.zip witch contain client.log and server.log
> > > They are rather verbose ( DEBUG enabled ).
> > >
> > > I noticed that the problem occurs later than sooner with DEBUG enabled but
> > > it happens anyway.
> >
> > I found unexpected write order problem in SSL handshaking process, but
> > I still don't know why the order is sometimes mixed up.  I suspect
> > there might be a kind of visibility problem.  I believe I am very
> > close to the solution anyway.
>
> I guess I found why.  Please try the following JAR and let me know if
> it fixes the problem.
>
> http://tinyurl.com/36y83t
>
> HTH,
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>


-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by Trustin Lee <tr...@gmail.com>.
On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
> On 6/7/07, seven <ho...@gmail.com> wrote:
> >
> > I attached logs.zip witch contain client.log and server.log
> > They are rather verbose ( DEBUG enabled ).
> >
> > I noticed that the problem occurs later than sooner with DEBUG enabled but
> > it happens anyway.
>
> I found unexpected write order problem in SSL handshaking process, but
> I still don't know why the order is sometimes mixed up.  I suspect
> there might be a kind of visibility problem.  I believe I am very
> close to the solution anyway.

I guess I found why.  Please try the following JAR and let me know if
it fixes the problem.

http://tinyurl.com/36y83t

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by Trustin Lee <tr...@gmail.com>.
On 6/7/07, seven <ho...@gmail.com> wrote:
>
> I attached logs.zip witch contain client.log and server.log
> They are rather verbose ( DEBUG enabled ).
>
> I noticed that the problem occurs later than sooner with DEBUG enabled but
> it happens anyway.

I found unexpected write order problem in SSL handshaking process, but
I still don't know why the order is sometimes mixed up.  I suspect
there might be a kind of visibility problem.  I believe I am very
close to the solution anyway.

Could you please send me the log files that print the name of the
current thread?  Adding "%t" flag to your Log4J pattern layout will do
the job.

Thanks,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by seven <ho...@gmail.com>.
I attached logs.zip witch contain client.log and server.log
They are rather verbose ( DEBUG enabled ).

I noticed that the problem occurs later than sooner with DEBUG enabled but
it happens anyway.

Regards,
Horia

http://www.nabble.com/file/p11007693/logs.zip logs.zip  


Trustin Lee wrote:
> 
> On 6/5/07, seven <ho...@gmail.com> wrote:
>>
>> Unfortunately it does not resolve my problem. Still the same behavior.
>> I am using java version "1.6.0_01" on WinXP SP2.
>> I have tried different combinations:
>>
>> server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
>> mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
>> server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
>> mina-filter-ssl-1.1.0.jar = FAILS after few rounds
>> server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
>> mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS after few rounds
>> -----
>> server using mina-filter-ssl-1.1.0.jar, client using
>> mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
>> server using mina-filter-ssl-1.1.0.jar, client using
>> mina-filter-ssl-1.1.0.jar = FAILS after few rounds
>> server using mina-filter-ssl-1.1.0.jar, client using
>> mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS mostly after few
>> rounds
>> -----
>> server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
>> mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
>> server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
>> mina-filter-ssl-1.1.0.jar = FAILS after few rounds
>> server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
>> mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS after few rounds
> 
> Please use mina-filter-ssl-1.1.1-20070605.030254-4.jar  only and show
> us all the log messages you got in both sides (client and server).
> 
> To enable DEBUG level, you have to use slf4j-log4j12 and log4j 1.2.x.
> The output file with DEBUG level enabled is appreciated.
> 
> Thanks,
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
> 

-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a11007693
Sent from the mina dev mailing list archive at Nabble.com.


Re: SSL Client does not send any data

Posted by Trustin Lee <tr...@gmail.com>.
On 6/5/07, seven <ho...@gmail.com> wrote:
>
> Unfortunately it does not resolve my problem. Still the same behavior.
> I am using java version "1.6.0_01" on WinXP SP2.
> I have tried different combinations:
>
> server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
> mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
> server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
> mina-filter-ssl-1.1.0.jar = FAILS after few rounds
> server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
> mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS after few rounds
> -----
> server using mina-filter-ssl-1.1.0.jar, client using
> mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
> server using mina-filter-ssl-1.1.0.jar, client using
> mina-filter-ssl-1.1.0.jar = FAILS after few rounds
> server using mina-filter-ssl-1.1.0.jar, client using
> mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS mostly after few rounds
> -----
> server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
> mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
> server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
> mina-filter-ssl-1.1.0.jar = FAILS after few rounds
> server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
> mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS after few rounds

Please use mina-filter-ssl-1.1.1-20070605.030254-4.jar  only and show
us all the log messages you got in both sides (client and server).

To enable DEBUG level, you have to use slf4j-log4j12 and log4j 1.2.x.
The output file with DEBUG level enabled is appreciated.

Thanks,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by seven <ho...@gmail.com>.
Unfortunately it does not resolve my problem. Still the same behavior.
I am using java version "1.6.0_01" on WinXP SP2.
I have tried different combinations:

server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
mina-filter-ssl-1.1.0.jar = FAILS after few rounds
server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS after few rounds
-----
server using mina-filter-ssl-1.1.0.jar, client using
mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
server using mina-filter-ssl-1.1.0.jar, client using
mina-filter-ssl-1.1.0.jar = FAILS after few rounds
server using mina-filter-ssl-1.1.0.jar, client using
mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS mostly after few rounds
-----
server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
mina-filter-ssl-1.1.0.jar = FAILS after few rounds
server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS after few rounds

Regards,
Horia


Trustin Lee wrote:
> 
> I'm not 100% sure that I fixed this issue, but I found a small
> visibility issue in SSLFilter.  Please try the following snapshot to
> test if my fix resolves the problem.
> 
> http://tinyurl.com/29u77b
> 
> HTH,
> Trustin
> 
> On 6/5/07, Gaston Dombiak <ga...@jivesoftware.com> wrote:
>> Yep, the issue is still "alive and kicking". :) Unfortunately, we are
>> only seeing it in some production environments (of some users using
>> Openfire) and still haven't found a way to reproduce it. I modified MINA
>> 1.1 to System.out.print in the following places and nothing was printed:
>>
>> 1. SocketIOProcessor#doFlush() when key is null
>> 2. SocketIOProcessor#doFlush() when key is invalid
>>
>> Since nothing was printed and things were still queuing up then we can
>> say that the problem is not in those places. Being optimistic....it is
>> good to have less uncertainty although we are still uncertain of what is
>> going on. :D
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
> 

-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a10969241
Sent from the mina dev mailing list archive at Nabble.com.


RE: SSL Client does not send any data

Posted by Gaston Dombiak <ga...@jivesoftware.com>.
Hey Trustin,

I will give it a try and let you know. I don't have MINA code at hand
now but my impression was that the problem is that (one or more?)
sessions have byte buffers pending to be flushed and for some reason
they remain there forverver. IIRC, that queue of things to send is
filled after the chain of filters has been applied so I don't see how a
fix in SSLFilter can do it. Anyway, I will give it a try. :)

Thanks,

  -- Gato

-----Original Message-----
From: Trustin Lee [mailto:trustin@gmail.com] 
Sent: Monday, June 04, 2007 8:16 PM
To: dev@mina.apache.org
Cc: Horia Muntean
Subject: Re: SSL Client does not send any data

I'm not 100% sure that I fixed this issue, but I found a small
visibility issue in SSLFilter.  Please try the following snapshot to
test if my fix resolves the problem.

http://tinyurl.com/29u77b

HTH,
Trustin

On 6/5/07, Gaston Dombiak <ga...@jivesoftware.com> wrote:
> Yep, the issue is still "alive and kicking". :) Unfortunately, we are
> only seeing it in some production environments (of some users using
> Openfire) and still haven't found a way to reproduce it. I modified
MINA
> 1.1 to System.out.print in the following places and nothing was
printed:
>
> 1. SocketIOProcessor#doFlush() when key is null
> 2. SocketIOProcessor#doFlush() when key is invalid
>
> Since nothing was printed and things were still queuing up then we can
> say that the problem is not in those places. Being optimistic....it is
> good to have less uncertainty although we are still uncertain of what
is
> going on. :D
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by Trustin Lee <tr...@gmail.com>.
I'm not 100% sure that I fixed this issue, but I found a small
visibility issue in SSLFilter.  Please try the following snapshot to
test if my fix resolves the problem.

http://tinyurl.com/29u77b

HTH,
Trustin

On 6/5/07, Gaston Dombiak <ga...@jivesoftware.com> wrote:
> Yep, the issue is still "alive and kicking". :) Unfortunately, we are
> only seeing it in some production environments (of some users using
> Openfire) and still haven't found a way to reproduce it. I modified MINA
> 1.1 to System.out.print in the following places and nothing was printed:
>
> 1. SocketIOProcessor#doFlush() when key is null
> 2. SocketIOProcessor#doFlush() when key is invalid
>
> Since nothing was printed and things were still queuing up then we can
> say that the problem is not in those places. Being optimistic....it is
> good to have less uncertainty although we are still uncertain of what is
> going on. :D
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

RE: SSL Client does not send any data

Posted by Gaston Dombiak <ga...@jivesoftware.com>.
Yep, the issue is still "alive and kicking". :) Unfortunately, we are
only seeing it in some production environments (of some users using
Openfire) and still haven't found a way to reproduce it. I modified MINA
1.1 to System.out.print in the following places and nothing was printed:

1. SocketIOProcessor#doFlush() when key is null
2. SocketIOProcessor#doFlush() when key is invalid

Since nothing was printed and things were still queuing up then we can
say that the problem is not in those places. Being optimistic....it is
good to have less uncertainty although we are still uncertain of what is
going on. :D

Thanks,

  -- Gato
 
-----Original Message-----
From: Trustin Lee [mailto:trustin@gmail.com] 
Sent: Monday, June 04, 2007 1:24 AM
To: dev@mina.apache.org
Subject: Re: SSL Client does not send any data

On 5/24/07, seven <ho...@gmail.com> wrote:
>
>
> Gaston Dombiak wrote:
> >
> > Hey,
> >
> > I'm using MINA 1.1 and tracking a problem where byte buffers stay in
the
> > outgoing queue and are never flushed. So far the problem is hiding
from
> > me. :( Not sure if that is also your case.
> >
> > Any ideas on this issue?
> >
> > Thanks,
> >
> >   -- Gato
> >
>
> Not sure either. My problem appears only when using SSL FIlter.
> If you can prepare a short test case I can run it on my machine to
confirm
> it at least.

Still suffering from this issue?  It would be really nice if I can
reproduce it by myself.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by Trustin Lee <tr...@gmail.com>.
On 5/24/07, seven <ho...@gmail.com> wrote:
>
>
> Gaston Dombiak wrote:
> >
> > Hey,
> >
> > I'm using MINA 1.1 and tracking a problem where byte buffers stay in the
> > outgoing queue and are never flushed. So far the problem is hiding from
> > me. :( Not sure if that is also your case.
> >
> > Any ideas on this issue?
> >
> > Thanks,
> >
> >   -- Gato
> >
>
> Not sure either. My problem appears only when using SSL FIlter.
> If you can prepare a short test case I can run it on my machine to confirm
> it at least.

Still suffering from this issue?  It would be really nice if I can
reproduce it by myself.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

RE: SSL Client does not send any data

Posted by seven <ho...@gmail.com>.

Gaston Dombiak wrote:
> 
> Hey,
> 
> I'm using MINA 1.1 and tracking a problem where byte buffers stay in the
> outgoing queue and are never flushed. So far the problem is hiding from
> me. :( Not sure if that is also your case.
> 
> Any ideas on this issue?
> 
> Thanks,
> 
>   -- Gato
> 

Not sure either. My problem appears only when using SSL FIlter.
If you can prepare a short test case I can run it on my machine to confirm
it at least.

Regards,
Horia
-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a10779682
Sent from the mina dev mailing list archive at Nabble.com.


RE: SSL Client does not send any data

Posted by Gaston Dombiak <ga...@jivesoftware.com>.
Hey,

I'm using MINA 1.1 and tracking a problem where byte buffers stay in the
outgoing queue and are never flushed. So far the problem is hiding from
me. :( Not sure if that is also your case.

Any ideas on this issue?

Thanks,

  -- Gato

-----Original Message-----
From: seven [mailto:horia.muntean@gmail.com] 
Sent: Wednesday, May 23, 2007 2:22 PM
To: dev@mina.apache.org
Subject: Re: SSL Client does not send any data


Hi, 

I apologize for nagging but could someone please confirm or not if this
is
happening to other people?
I've tried it on another computer at work and it can be reproduced
always.

Regards,
Horia


seven wrote:
> 
> 
> Trustin Lee wrote:
>> 
>> On 5/9/07, seven <ho...@gmail.com> wrote:
>>>
>>> Hello,
>>>
>>> I have a problem with mina-filter-ssl-1.1.0 release: sometimes for
>>> unknown
>>> reasons and in an arbitrary way, after a client connects to a SSL
>>> enabled
>>> server, it does not send anything. On the server side and the client
>>> side as
>>> well, only CREATED and OPENED events are fired and nothing further
>>> happens (
>>> except IDDLE events ) even if the client issued the first
>>> session.write().
>>>
>>> In order to reproduce this, I wrote a simple client that connects to
the
>>> echo server found in the examples.
>>> org.apache.mina.example.echoserver.Main should be modified with
>>> USE_SSL=true, PORT = 8090 and bogus.cert has to be generated as
>>> documented
>>> in org.apache.mina.example.echoserver.ssl.BogusSSLContextFactory and
>>> placed
>>> in the classpath of the server and server launchers.
>>>
>>> Until mina-1.1.0 was released I worked with a snapshot release and
did
>>> not
>>> encounter this problem. So if one uses a
>>> mina-filter-ssl-1.1.0-SNAPSHOT.jar
>>> instead of mina-filter-ssl-1.1.0.jar the 'silence' problem does not
>>> occur.
>>> Fortunately I have the snapshot sources from the svn that were used
to
>>> build
>>> mina-filter-ssl-1.1.0-SNAPSHOT.jar.
>>> The revision number for the working SSLHandler is 471502
respectively
>>> 507461
>>> for SSLFilter.
>>>
>>> Attached is the client  source that reproduces the problem. It has
to be
>>> placed in org.apache.mina.example.echoserver package.
>>>
>>> Regards,
>>> Horia
>>> http://www.nabble.com/file/8269/Client.java Client.java
>> 
>> I made a big change in SSLFilter and SSLHandler to fix a deadlock
>> issue when releasing 1.1.0.    But I couldn't reproduce your problem
>> with the source code you provided.  How often can it be reproduced?
>> 
>> Please attach the full thread dump and the log file with DEBUG level
>> enabled for MINA.
>> 
>> Trustin
>> -- 
>> what we call human nature is actually human habit
>> --
>> http://gleamynode.net/
>> --
>> PGP Key ID: 0x0255ECA6
>> 
>> 
> 
> The problem can be reproduced always. I reproduced this situation with
> JDK1.5.0 as well even if with JDK1.5.0 takes much longer to happen:
let it
> run for 5 minutes or more. With JDK1.6.0 it happens in few seconds.
> 
> Below I attached 4 files: 2 for the server and client with jdk1.5.0_05
and
> the other 2 for server and client with jdk1.6.0_01. I've hit
Ctlr+Break
> when I saw that the client did't send any data. In the JDK1.6.0
related
> files you can see how the client and server were started. If a more
> verbose ( DEBUG ) level is wanted, could you please tell me how can I
> enable DEBUG level for the Simple wrapper of SLF4J?
> 
>  http://www.nabble.com/file/8419/jdk1.5.0_5.client.txt
> jdk1.5.0_5.client.txt 
>  http://www.nabble.com/file/8420/jdk1.5.0_5.server.txt
> jdk1.5.0_5.server.txt 
>  http://www.nabble.com/file/8421/jdk1.6.0_01.client.txt
> jdk1.6.0_01.client.txt 
>  http://www.nabble.com/file/8422/jdk1.6.0_01.server.txt
> jdk1.6.0_01.server.txt 
> 
> Regards,
> Horia
> 
> 

-- 
View this message in context:
http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a
10773054
Sent from the mina dev mailing list archive at Nabble.com.


Re: SSL Client does not send any data

Posted by seven <ho...@gmail.com>.
Hi, 

I apologize for nagging but could someone please confirm or not if this is
happening to other people?
I've tried it on another computer at work and it can be reproduced always.

Regards,
Horia


seven wrote:
> 
> 
> Trustin Lee wrote:
>> 
>> On 5/9/07, seven <ho...@gmail.com> wrote:
>>>
>>> Hello,
>>>
>>> I have a problem with mina-filter-ssl-1.1.0 release: sometimes for
>>> unknown
>>> reasons and in an arbitrary way, after a client connects to a SSL
>>> enabled
>>> server, it does not send anything. On the server side and the client
>>> side as
>>> well, only CREATED and OPENED events are fired and nothing further
>>> happens (
>>> except IDDLE events ) even if the client issued the first
>>> session.write().
>>>
>>> In order to reproduce this, I wrote a simple client that connects to the
>>> echo server found in the examples.
>>> org.apache.mina.example.echoserver.Main should be modified with
>>> USE_SSL=true, PORT = 8090 and bogus.cert has to be generated as
>>> documented
>>> in org.apache.mina.example.echoserver.ssl.BogusSSLContextFactory and
>>> placed
>>> in the classpath of the server and server launchers.
>>>
>>> Until mina-1.1.0 was released I worked with a snapshot release and did
>>> not
>>> encounter this problem. So if one uses a
>>> mina-filter-ssl-1.1.0-SNAPSHOT.jar
>>> instead of mina-filter-ssl-1.1.0.jar the 'silence' problem does not
>>> occur.
>>> Fortunately I have the snapshot sources from the svn that were used to
>>> build
>>> mina-filter-ssl-1.1.0-SNAPSHOT.jar.
>>> The revision number for the working SSLHandler is 471502 respectively
>>> 507461
>>> for SSLFilter.
>>>
>>> Attached is the client  source that reproduces the problem. It has to be
>>> placed in org.apache.mina.example.echoserver package.
>>>
>>> Regards,
>>> Horia
>>> http://www.nabble.com/file/8269/Client.java Client.java
>> 
>> I made a big change in SSLFilter and SSLHandler to fix a deadlock
>> issue when releasing 1.1.0.    But I couldn't reproduce your problem
>> with the source code you provided.  How often can it be reproduced?
>> 
>> Please attach the full thread dump and the log file with DEBUG level
>> enabled for MINA.
>> 
>> Trustin
>> -- 
>> what we call human nature is actually human habit
>> --
>> http://gleamynode.net/
>> --
>> PGP Key ID: 0x0255ECA6
>> 
>> 
> 
> The problem can be reproduced always. I reproduced this situation with
> JDK1.5.0 as well even if with JDK1.5.0 takes much longer to happen: let it
> run for 5 minutes or more. With JDK1.6.0 it happens in few seconds.
> 
> Below I attached 4 files: 2 for the server and client with jdk1.5.0_05 and
> the other 2 for server and client with jdk1.6.0_01. I've hit Ctlr+Break
> when I saw that the client did't send any data. In the JDK1.6.0 related
> files you can see how the client and server were started. If a more
> verbose ( DEBUG ) level is wanted, could you please tell me how can I
> enable DEBUG level for the Simple wrapper of SLF4J?
> 
>  http://www.nabble.com/file/8419/jdk1.5.0_5.client.txt
> jdk1.5.0_5.client.txt 
>  http://www.nabble.com/file/8420/jdk1.5.0_5.server.txt
> jdk1.5.0_5.server.txt 
>  http://www.nabble.com/file/8421/jdk1.6.0_01.client.txt
> jdk1.6.0_01.client.txt 
>  http://www.nabble.com/file/8422/jdk1.6.0_01.server.txt
> jdk1.6.0_01.server.txt 
> 
> Regards,
> Horia
> 
> 

-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a10773054
Sent from the mina dev mailing list archive at Nabble.com.


Re: SSL Client does not send any data

Posted by seven <ho...@gmail.com>.

Trustin Lee wrote:
> 
> On 5/9/07, seven <ho...@gmail.com> wrote:
>>
>> Hello,
>>
>> I have a problem with mina-filter-ssl-1.1.0 release: sometimes for
>> unknown
>> reasons and in an arbitrary way, after a client connects to a SSL enabled
>> server, it does not send anything. On the server side and the client side
>> as
>> well, only CREATED and OPENED events are fired and nothing further
>> happens (
>> except IDDLE events ) even if the client issued the first
>> session.write().
>>
>> In order to reproduce this, I wrote a simple client that connects to the
>> echo server found in the examples.
>> org.apache.mina.example.echoserver.Main should be modified with
>> USE_SSL=true, PORT = 8090 and bogus.cert has to be generated as
>> documented
>> in org.apache.mina.example.echoserver.ssl.BogusSSLContextFactory and
>> placed
>> in the classpath of the server and server launchers.
>>
>> Until mina-1.1.0 was released I worked with a snapshot release and did
>> not
>> encounter this problem. So if one uses a
>> mina-filter-ssl-1.1.0-SNAPSHOT.jar
>> instead of mina-filter-ssl-1.1.0.jar the 'silence' problem does not
>> occur.
>> Fortunately I have the snapshot sources from the svn that were used to
>> build
>> mina-filter-ssl-1.1.0-SNAPSHOT.jar.
>> The revision number for the working SSLHandler is 471502 respectively
>> 507461
>> for SSLFilter.
>>
>> Attached is the client  source that reproduces the problem. It has to be
>> placed in org.apache.mina.example.echoserver package.
>>
>> Regards,
>> Horia
>> http://www.nabble.com/file/8269/Client.java Client.java
> 
> I made a big change in SSLFilter and SSLHandler to fix a deadlock
> issue when releasing 1.1.0.    But I couldn't reproduce your problem
> with the source code you provided.  How often can it be reproduced?
> 
> Please attach the full thread dump and the log file with DEBUG level
> enabled for MINA.
> 
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
> 

The problem can be reproduced always. I reproduced this situation with
JDK1.5.0 as well even if with JDK1.5.0 takes much longer to happen: let it
run for 5 minutes or more. With JDK1.6.0 it happens in few seconds.

Below I attached 4 files: 2 for the server and client with jdk1.5.0_05 and
the other 2 for server and client with jdk1.6.0_01. I've hit Ctlr+Break when
I saw that the client did't send any data. In the JDK1.6.0 related files you
can see how the client and server were started. If a more verbose ( DEBUG )
level is wanted, could you please tell me how can I enable DEBUG level for
the Simple wrapper of SLF4J?

http://www.nabble.com/file/8419/jdk1.5.0_5.client.txt jdk1.5.0_5.client.txt 
http://www.nabble.com/file/8420/jdk1.5.0_5.server.txt jdk1.5.0_5.server.txt 
http://www.nabble.com/file/8421/jdk1.6.0_01.client.txt
jdk1.6.0_01.client.txt 
http://www.nabble.com/file/8422/jdk1.6.0_01.server.txt
jdk1.6.0_01.server.txt 

Regards,
Horia

-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a10617860
Sent from the mina dev mailing list archive at Nabble.com.


Re: SSL Client does not send any data

Posted by seven <ho...@gmail.com>.

Trustin Lee wrote:
> 
> On 5/9/07, seven <ho...@gmail.com> wrote:
>>
>> Hello,
>>
>> I have a problem with mina-filter-ssl-1.1.0 release: sometimes for
>> unknown
>> reasons and in an arbitrary way, after a client connects to a SSL enabled
>> server, it does not send anything. On the server side and the client side
>> as
>> well, only CREATED and OPENED events are fired and nothing further
>> happens (
>> except IDDLE events ) even if the client issued the first
>> session.write().
>>
>> In order to reproduce this, I wrote a simple client that connects to the
>> echo server found in the examples.
>> org.apache.mina.example.echoserver.Main should be modified with
>> USE_SSL=true, PORT = 8090 and bogus.cert has to be generated as
>> documented
>> in org.apache.mina.example.echoserver.ssl.BogusSSLContextFactory and
>> placed
>> in the classpath of the server and server launchers.
>>
>> Until mina-1.1.0 was released I worked with a snapshot release and did
>> not
>> encounter this problem. So if one uses a
>> mina-filter-ssl-1.1.0-SNAPSHOT.jar
>> instead of mina-filter-ssl-1.1.0.jar the 'silence' problem does not
>> occur.
>> Fortunately I have the snapshot sources from the svn that were used to
>> build
>> mina-filter-ssl-1.1.0-SNAPSHOT.jar.
>> The revision number for the working SSLHandler is 471502 respectively
>> 507461
>> for SSLFilter.
>>
>> Attached is the client  source that reproduces the problem. It has to be
>> placed in org.apache.mina.example.echoserver package.
>>
>> Regards,
>> Horia
>> http://www.nabble.com/file/8269/Client.java Client.java
> 
> I made a big change in SSLFilter and SSLHandler to fix a deadlock
> issue when releasing 1.1.0.    But I couldn't reproduce your problem
> with the source code you provided.  How often can it be reproduced?
> 
> Please attach the full thread dump and the log file with DEBUG level
> enabled for MINA.
> 
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
> 

The problem can be reproduced always. I reproduced this situation with
JDK1.5.0 as well even if with JDK1.5.0 takes much longer to happen: let it
run for 5 minutes or more. With JDK1.6.0 it happens in few seconds.

Below I attached 4 files: 2 for the server and client with jdk1.5.0_05 and
the other 2 for server and client with jdk1.6.0_01. I've hit Ctlr+Break when
I saw that the client did't send any data. In the JDK1.6.0 related files you
can see how the client and server were started. 
http://www.nabble.com/file/8419/jdk1.5.0_5.client.txt jdk1.5.0_5.client.txt 
http://www.nabble.com/file/8420/jdk1.5.0_5.server.txt jdk1.5.0_5.server.txt 
http://www.nabble.com/file/8421/jdk1.6.0_01.client.txt
jdk1.6.0_01.client.txt 
http://www.nabble.com/file/8422/jdk1.6.0_01.server.txt
jdk1.6.0_01.server.txt  DEBUG ) level is wanted, could you please tell me
how can I enable DEBUG level for the Simple wrapper of SLF4J?

Regards,
Horia

-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a10617860
Sent from the mina dev mailing list archive at Nabble.com.


Re: SSL Client does not send any data

Posted by Trustin Lee <tr...@gmail.com>.
On 5/9/07, seven <ho...@gmail.com> wrote:
>
> Hello,
>
> I have a problem with mina-filter-ssl-1.1.0 release: sometimes for unknown
> reasons and in an arbitrary way, after a client connects to a SSL enabled
> server, it does not send anything. On the server side and the client side as
> well, only CREATED and OPENED events are fired and nothing further happens (
> except IDDLE events ) even if the client issued the first session.write().
>
> In order to reproduce this, I wrote a simple client that connects to the
> echo server found in the examples.
> org.apache.mina.example.echoserver.Main should be modified with
> USE_SSL=true, PORT = 8090 and bogus.cert has to be generated as documented
> in org.apache.mina.example.echoserver.ssl.BogusSSLContextFactory and placed
> in the classpath of the server and server launchers.
>
> Until mina-1.1.0 was released I worked with a snapshot release and did not
> encounter this problem. So if one uses a mina-filter-ssl-1.1.0-SNAPSHOT.jar
> instead of mina-filter-ssl-1.1.0.jar the 'silence' problem does not occur.
> Fortunately I have the snapshot sources from the svn that were used to build
> mina-filter-ssl-1.1.0-SNAPSHOT.jar.
> The revision number for the working SSLHandler is 471502 respectively 507461
> for SSLFilter.
>
> Attached is the client  source that reproduces the problem. It has to be
> placed in org.apache.mina.example.echoserver package.
>
> Regards,
> Horia
> http://www.nabble.com/file/8269/Client.java Client.java

I made a big change in SSLFilter and SSLHandler to fix a deadlock
issue when releasing 1.1.0.    But I couldn't reproduce your problem
with the source code you provided.  How often can it be reproduced?

Please attach the full thread dump and the log file with DEBUG level
enabled for MINA.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by seven <ho...@gmail.com>.
Hello, could anybody else reproduce this one? Should I post an issue to JIRA?

Regards,
Horia


seven wrote:
> 
> Hello,
> 
> I have a problem with mina-filter-ssl-1.1.0 release: sometimes for unknown
> reasons and in an arbitrary way, after a client connects to a SSL enabled
> server, it does not send anything. On the server side and the client side
> as well, only CREATED and OPENED events are fired and nothing further
> happens ( except IDDLE events ) even if the client issued the first
> session.write().
> 
> In order to reproduce this, I wrote a simple client that connects to the
> echo server found in the examples.
> org.apache.mina.example.echoserver.Main should be modified with
> USE_SSL=true, PORT = 8090 and bogus.cert has to be generated as documented
> in org.apache.mina.example.echoserver.ssl.BogusSSLContextFactory and
> placed in the classpath of the server and server launchers.
> 
> Until mina-1.1.0 was released I worked with a snapshot release and did not
> encounter this problem. So if one uses a
> mina-filter-ssl-1.1.0-SNAPSHOT.jar instead of mina-filter-ssl-1.1.0.jar
> the 'silence' problem does not occur. Fortunately I have the snapshot
> sources from the svn that were used to build
> mina-filter-ssl-1.1.0-SNAPSHOT.jar.
> The revision number for the working SSLHandler is 471502 respectively
> 507461 for SSLFilter.
> 
> Attached is the client  source that reproduces the problem. It has to be
> placed in org.apache.mina.example.echoserver package.
> 
> Regards,
> Horia
>  http://www.nabble.com/file/8269/Client.java Client.java 
> 

-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a10600450
Sent from the mina dev mailing list archive at Nabble.com.