You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by "Sathyanarayan, Harish" <Ha...@virtustream.com> on 2017/03/15 18:29:40 UTC

question on embedded apacheds with docker

Hello

Am exploring the use of ApacheDS as an embedded service running in Docker containers. I am using M23 Version and deploying the deployed instance (JAR file) and running it in Docker. I am not able to Bind to port 10389 with user Id on Docker. I am fairly knowledgeable with docker networking etc so pretty sure it is not an issue with Docker. The error am getting while connecting to the embedded instance (running within docker) from LDAP studio is the LDAP error code 2: protocol error.

It works fine outside of Docker.

Is there any known issue/bug around it and any known workarounds?

Thanks in advance
Harish


Re: question on embedded apacheds with docker

Posted by Stefan Seelmann <ma...@stefan-seelmann.de>.
On 03/15/2017 09:07 PM, Emmanuel L�charny wrote:
> Le 15/03/2017 � 19:29, Sathyanarayan, Harish a �crit :
>> Am exploring the use of ApacheDS as an embedded service running in Docker containers. I am using M23 Version and deploying the deployed instance (JAR file) and running it in Docker. I am not able to Bind to port 10389 with user Id on Docker. I am fairly knowledgeable with docker networking etc so pretty sure it is not an issue with Docker. The error am getting while connecting to the embedded instance (running within docker) from LDAP studio is the LDAP error code 2: protocol error.

What do you mean with "embedded"? Do you just run the downloaded zip or
tar.gz within the Docker container? Or you you run it as "embedded"
within your own application?

I ask because in the latter case it may be possible that ApacheDS only
binds to the loopback interface within the docker container which is
then of course not visible to the outside. Please check with netstat or
ss within the container at which interface(s) it listens.

> What request did you sent to the server ? The simple fact you received a
> protocol error means the server is responding. BTW, you should be able
> to verify that you can connect to the server with Studio, without
> authenticating (in teh connection popup, when you have entered the
> server address and port, you have a button to check the connection)

Unfortunately that won'th help in the Docker case. When mapping a port
with Docker (i.e. docker run -p 10389:10389 ...) then you can already
TCP connect to that port, even if the service within the container isn't
running.

Just tested this, run a container with

    docker run -it --rm -p 10389:10389 ubuntu bash

The "Check Network Parameter" button with parameters localhost:10389
just works. But binding then fails with the same error (when using LDAP
API): "LDAP: error code 2 - PROTOCOL_ERROR: The server will disconnect!"

Kind Regards,
Stefan


Re: question on embedded apacheds with docker

Posted by Emmanuel Lécharny <el...@gmail.com>.

Le 15/03/2017 à 19:29, Sathyanarayan, Harish a écrit :
> Hello
>
> Am exploring the use of ApacheDS as an embedded service running in Docker containers. I am using M23 Version and deploying the deployed instance (JAR file) and running it in Docker. I am not able to Bind to port 10389 with user Id on Docker. I am fairly knowledgeable with docker networking etc so pretty sure it is not an issue with Docker. The error am getting while connecting to the embedded instance (running within docker) from LDAP studio is the LDAP error code 2: protocol error.

What request did you sent to the server ? The simple fact you received a
protocol error means the server is responding. BTW, you should be able
to verify that you can connect to the server with Studio, without
authenticating (in teh connection popup, when you have entered the
server address and port, you have a button to check the connection)

-- 
Emmanuel Lecharny

Symas.com
directory.apache.org