You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Martin Zdila (JIRA)" <ji...@apache.org> on 2011/07/04 15:57:21 UTC

[jira] [Created] (DIRSERVER-1630) LdapConnection.bind fails on timeout but there was SSL handshake problem

LdapConnection.bind fails on timeout but there was SSL handshake problem
------------------------------------------------------------------------

                 Key: DIRSERVER-1630
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1630
             Project: Directory ApacheDS
          Issue Type: Bug
    Affects Versions: 1.0-RC4
            Reporter: Martin Zdila


Affects 1.0.0.M6-SNAPSHOT (from today).

When SSL handshake error occurs LdapConnection.bind waits for timeout. Instead it should fail immediately.

I can see SSL exception in the logs and after couple of seconds I get timeout exception.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DIRAPI-47) LdapConnection.bind fails on timeout but there was SSL handshake problem

Posted by "Pierre-Arnaud Marcelot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRAPI-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13059487#comment-13059487 ] 

Pierre-Arnaud Marcelot commented on DIRAPI-47:
----------------------------------------------

Martin, I moved the issue to the LDAP Client API space in JIRA.

Is it also occuring with the just released 1.0.0-M5 version? Or is it just with the lates trunk?

Any pointer on how to reproduce the issue (test-case, main method)?

Thanks



> LdapConnection.bind fails on timeout but there was SSL handshake problem
> ------------------------------------------------------------------------
>
>                 Key: DIRAPI-47
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-47
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M6
>            Reporter: Martin Zdila
>
> Affects 1.0.0.M6-SNAPSHOT (from today).
> When SSL handshake error occurs LdapConnection.bind waits for timeout. Instead it should fail immediately.
> I can see SSL exception in the logs and after couple of seconds I get timeout exception.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DIRAPI-47) LdapConnection.bind fails on timeout but there was SSL handshake problem

Posted by "Emmanuel Lecharny (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRAPI-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13155332#comment-13155332 ] 

Emmanuel Lecharny commented on DIRAPI-47:
-----------------------------------------

The problem is that MINA does *not* do any SSL handshake *before* sending the first message. The consequence is that when the handshake fails, we get an exception and a messageReceived which contains absolutely no information about which BindRequest was the origin of the problem. We can't anymore set the BindRequest to close, so we have to wait for ever (timeout).

this is really bad, and this is a MINA issue.
                
> LdapConnection.bind fails on timeout but there was SSL handshake problem
> ------------------------------------------------------------------------
>
>                 Key: DIRAPI-47
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-47
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M6
>            Reporter: Martin Zdila
>
> Affects 1.0.0.M6-SNAPSHOT (from today).
> When SSL handshake error occurs LdapConnection.bind waits for timeout. Instead it should fail immediately.
> I can see SSL exception in the logs and after couple of seconds I get timeout exception.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DIRAPI-47) LdapConnection.bind fails on timeout but there was SSL handshake problem

Posted by "Pierre-Arnaud Marcelot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRAPI-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060536#comment-13060536 ] 

Pierre-Arnaud Marcelot commented on DIRAPI-47:
----------------------------------------------

OK, I managed to reproduce the issue.

Here's a main method that allows to reproduce the issue.
##########################################
    public static void main( String[] args ) throws Exception
    {
        LdapConnectionConfig config = new LdapConnectionConfig();
        config.setLdapHost( "localhost" );
        config.setLdapPort( 10636 );
        config.setName( "uid=admin,ou=system" );
        config.setCredentials( "secret" );
        config.setUseSsl( true );
        LdapNetworkConnection connection = new LdapNetworkConnection( config );
        connection.bind();

        EntryCursor cursor = connection.search( "ou=config", "(objectclass=*)", SearchScope.SUBTREE,
            new String[0] );
        while ( cursor.next() )
        {
            Entry entry = cursor.get();
            System.out.println( entry );
        }

        cursor.close();

        connection.close();
        
        System.out.println( "done.");
    }
##########################################

> LdapConnection.bind fails on timeout but there was SSL handshake problem
> ------------------------------------------------------------------------
>
>                 Key: DIRAPI-47
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-47
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M6
>            Reporter: Martin Zdila
>
> Affects 1.0.0.M6-SNAPSHOT (from today).
> When SSL handshake error occurs LdapConnection.bind waits for timeout. Instead it should fail immediately.
> I can see SSL exception in the logs and after couple of seconds I get timeout exception.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (DIRAPI-47) LdapConnection.bind fails on timeout but there was SSL handshake problem

Posted by "Emmanuel Lecharny (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRAPI-47?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny resolved DIRAPI-47.
-------------------------------------

    Resolution: Fixed

This is very true. The problem is that we don't do anything when we receive an exception, but printing a stack trace :/ 

    public void exceptionCaught( IoSession session, Throwable cause ) throws Exception
    {
        LOG.warn( cause.getMessage(), cause );

        if ( cause instanceof ProtocolEncoderException )
        {
            ...
        }
        else
        {
            cause.printStackTrace();
        }

                
> LdapConnection.bind fails on timeout but there was SSL handshake problem
> ------------------------------------------------------------------------
>
>                 Key: DIRAPI-47
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-47
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M6
>            Reporter: Martin Zdila
>
> Affects 1.0.0.M6-SNAPSHOT (from today).
> When SSL handshake error occurs LdapConnection.bind waits for timeout. Instead it should fail immediately.
> I can see SSL exception in the logs and after couple of seconds I get timeout exception.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (DIRAPI-47) LdapConnection.bind fails on timeout but there was SSL handshake problem

Posted by "Emmanuel Lecharny (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRAPI-47?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRAPI-47.
-----------------------------------


Fixed with http://svn.apache.org/viewvc?rev=1205532&view=rev
                
> LdapConnection.bind fails on timeout but there was SSL handshake problem
> ------------------------------------------------------------------------
>
>                 Key: DIRAPI-47
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-47
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M6
>            Reporter: Martin Zdila
>
> Affects 1.0.0.M6-SNAPSHOT (from today).
> When SSL handshake error occurs LdapConnection.bind waits for timeout. Instead it should fail immediately.
> I can see SSL exception in the logs and after couple of seconds I get timeout exception.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira