Skip to content

Quick Start docker run fails on Windows with An attempt was made to access a socket in a way forbidden by its access permissions #5231

Open
@johnmccabe

Description

@johnmccabe

What needs to be changed?
Docker run command in step 3 fails on Windows (in both WSL and natively) with the following error.

docker: Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:55679 -> 0.0.0.0:0: listen tcp 0.0.0.0:55679: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

The otel/opentelemetry-collector-contrib image binds zpages to port 55679 by default and this can clash with reserved ports on Windows (may be HyperV related).

# netsh interface ipv4 show excludedportrange protocol=tcp

Protocol tcp Port Exclusion Ranges

Start Port    End Port
----------    --------
     ... snip...
     55616       55715
     ... snip...

* - Administered port exclusions.

Passing in an updated config.yaml with zpages on an unreserved port, for example 9999 below, and altering the port mapping in the docker run works.

...snip...
extensions:
  health_check:
  pprof:
    endpoint: 0.0.0.0:1777
  zpages:
    endpoint: 0.0.0.0:9999
...snip...
docker run -p 127.0.0.1:4317:4317 -p 127.0.0.1:9999:9999 -v ${PWD}/config.yaml:/etc/otelcol-contrib/config.yaml otel/opentelemetry-collector-contrib:0.109.0  2>&1 | tee collector-output.txt

Primarily raising this for visibility should anyone else encounter the problem.

What is the name + path of the page that needs changed?
https://opentelemetry.io/docs/collector/quick-start/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status

      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions