skip to Main Content

I am currently facing following problem:
I build a docker container of a node server (a simple express server which sends tracing data to Zipkin on port 9411) and want to run it along Zipkin.
So as I understood, the node server should send tracing data to Zipkin using port 9411.
If I run the server with node only (not as docker), I can run it along Zipkin and everything is working fine.
But if I got Zipkin running and than want to fire up my Docker Container, I get the error

Error starting userland proxy: listen tcp4 0.0.0.0:9411: bind: address already in use.

My understanding is that there is a conflict concerning the port 9411, since it seems to be blocked by Zipkin, but obviously, also the server in the Docker container needs to use it to communicate with Zipkin.

I would appreciate if anybody got an idea how I could solve this problem.

Greetings,
Robert

2

Answers


  1. Chosen as BEST ANSWER

    I found the solution: using the flag --network="host" does the job, -p also is not needed.


  2. When you start a docker container, you add a port binding like this:

    docker run ... -p 8000:9000
    

    where 8000 is the port you can use on the pc to access port 9000 within the container.

    Don’t bind the express server to 9411 as zipkin is already using that port.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search