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

Reply via email to