[ 
https://issues.apache.org/jira/browse/DIRAPI-247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15162988#comment-15162988
 ] 

Emmanuel Lecharny commented on DIRAPI-247:
------------------------------------------

It's not that simple, Stefan. The underlying SSLEngine will throw a 
{{SSLHandshakeException}} which is not very explicit about the root cause. This 
is trapped in {{LdapNetworkConnection}} :

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

so you will have the information that the exception contains, ie, not that much.

The best possible route is to start the client with {{-Djavax.net.debug=all}} 
to get more information about what is wrong.

I'll close the issue.

> Could not connect to LDAP server over SSL
> -----------------------------------------
>
>                 Key: DIRAPI-247
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-247
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M31
>            Reporter: Steven Nguyen
>            Priority: Minor
>
> Hi Team,
> I need to connect to AD server through SSL using LDAP API. I configured SSL 
> on AD server and I could connect to it using Directory Studio.
> However, when I create a LdapNetworkConnection and tried to open connection 
> to AD server through SSL, I got "Unable to connect" error. No more stack 
> trace message.
> My code is simple as below:
> LdapConnectionConfig connConfig = new LdapConnectionConfig();
> connConfig.setLdapHost("<AD_host_name>");
> connConfig.setLdapPort(636);
> connConfig.setUseSsl(true);
> connConfig.setUseTls(true);
> connConfig.setSslProtocol("SSL");
> connConfig.setTimeout(10 * 1000);
> LdapNetworkConnection conn = new LdapNetworkConnection(connConfig);
> // error after calling connect() method
> conn.connect();
> Could you please check if I'm missing something?
> Thanks and Best Regards,
> Steven Nguyen



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to