Skip to content

[receiver/dockerstatsreceiver] Does not support setting TLS settings #33557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
moserke opened this issue Jun 13, 2024 · 7 comments
Open

[receiver/dockerstatsreceiver] Does not support setting TLS settings #33557

moserke opened this issue Jun 13, 2024 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed receiver/dockerstats Stale

Comments

@moserke
Copy link

moserke commented Jun 13, 2024

Component(s)

receiver/dockerstats

What happened?

Description

In trying to set up a receiver for a TLS protected containerd daemon over a docker socket, can not set TLS settings and therefore get malformed http responses. Because you can't specify the scheme in the unix socket name the net/http layer assumes http protocol.

You can see this in the error output of

"http://containerd.sock/v1.25/containers/json?filters=%7B%22status%22%3A%7B%22running%22%3Atrue%7D%7D": net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x00\x00\x06\x04\x00\x00\x00\x00\x00\x00\x05\x00\x00@\x00".
* Are you trying to connect to a TLS-enabled daemon without TLS?

Can you actually do this or is this something that is not supported today?

Collector version

0.102.1

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

docker_stats:
  endpoint: unix://containerd.sock

Log output

No response

Additional context

No response

@moserke moserke added bug Something isn't working needs triage New item requiring triage labels Jun 13, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@jamesmoessis
Copy link
Contributor

@moserke I would be happy to review if you raise a PR for this. I am assuming this would only apply if the daemon is done over TCP, not unix socket?

Copy link
Contributor

github-actions bot commented Dec 2, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Dec 2, 2024
@jamesmoessis jamesmoessis added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers and removed bug Something isn't working labels Jan 23, 2025
@jamesmoessis
Copy link
Contributor

Given there's not much demand for contacting docker socket using TLS, but would be nice to have, I have added relevant tags to this issue. Can review any contributions

@sonalgaud12
Copy link
Contributor

Hi @jamesmoessis , I've raised a PR and would appreciate your review.

Copy link
Contributor

github-actions bot commented Apr 7, 2025

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed receiver/dockerstats Stale
Projects
None yet
4 participants