directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "harish sat (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRSERVER-2183) Apacheds 2.00-M23 DefaultPoolableLdapConnectionFactory does not work within Docker container
Date Fri, 24 Mar 2017 13:01:41 GMT

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

harish sat commented on DIRSERVER-2183:
---------------------------------------

Hi Stefan,

connection is not from client, it is btwn 2 docker containers, so technically the aliases
assigned within the docker-compose should work. 

I am posting sample docker-compose am using for your reference:

version: "2"
services:
  <embedded srv name>:
     build: .
     ports:
     - "9179:9179"
     - "9180:9180"
     - "10389:10389"
     -  "389: 11389"
     links:
     - "vault:vault"
     - "ldapserver:ldapserver"
     
  vault:
     image: vault:${VAULT_VERSION}
     container_name: vault
     cap_add:
      - IPC_LOCK
     ports:
      - "8200:8200"
     environment:
      - "VAULT_DEV_ROOT_TOKEN_ID=${ROOT_TOKEN}"
      - "VAULT_DEV_LISTEN_ADDRESS=${VAULT_DEV_LISTEN_ADDRESS}"  
      
  ldapserver:
     image: <apacheds>
     ports:
      - "389:11389"

please note that the <apacheds> image works fine standalone as I can connect to it from
any ldapclient.  
 As part of compose,  my embedded service is using ldapserver as hostname and 389 as portname(exposed
port). As the code suggests, it is creating a pool of connections to the source ldapserver.
it should technically connect based on this configuration I would think. hope this helps....thanks!

> Apacheds 2.00-M23 DefaultPoolableLdapConnectionFactory does not work within Docker container
> --------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-2183
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-2183
>             Project: Directory ApacheDS
>          Issue Type: Bug
>         Environment: apacheds embedded running as docker instance connecting to another
apacheds standalone docker. the connection pool is btwn the first instance to the second.
>            Reporter: harish sat
>
> config.setLdapHost(connectorConfig.get(HOSTNAME));
> config.setLdapPort(Integer.parseInt(connectorConfig.get(PORT)));
> config.setName(connectorConfig.get(USERNAME));
> config.setCredentials(connectorConfig.get(PWD));
> final DefaultPoolableLdapConnectionFactory factory = new DefaultPoolableLdapConnectionFactory(config);
> 		pool = new LdapConnectionPool(factory);
> The above block of code does not take 0.0.0.0 or docker-compose defined servernames.
it throws back an bind exception. 
> let me know if any further info is needed. Thanks!



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message