Skip to content
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

Opening logs from a container causes continous error messages in syslog (superfluous response.WriteHeader call) #11251

Open
2 tasks done
KomtGoed opened this issue Feb 24, 2024 · 7 comments
Assignees
Labels
kind/bug Applied to Bugs

Comments

@KomtGoed
Copy link

Before you start please confirm the following.

Problem Description

As soon as I use the UI to navigate to the logs of a container (tried it e.g. with Watchtower), /var/log/syslog is filled with
Feb 24 08:16:04 server dockerd[2663]: 2024/02/24 08:16:04 http: superfluous response.WriteHeader call from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.(*respWriterWrapper).WriteHeader (wrap.go:98) Feb 24 08:16:07 server dockerd[2663]: 2024/02/24 08:16:07 http: superfluous response.WriteHeader call from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.(*respWriterWrapper).WriteHeader (wrap.go:98)

This stops as soon the log window is closed.

Expected Behavior

No error messages in syslog

Actual Behavior

See above.

Steps to Reproduce

  1. Go to a container
  2. Click on "Logs"

Portainer logs or screenshots

No response

Portainer version

2.19.4

Portainer Edition

Community Edition (CE)

Platform and Version

Docker 25.0.3

OS and Architecture

Debian 12.5

Browser

Firefox 122.0.1

What command did you use to deploy Portainer?

version: "3"

networks:
  portainer:
    external: false

services:
  portainer:
    container_name: portainer
    image: portainer/portainer-ce:latest
    networks:
      - portainer
    dns: 192.168.1.1
    restart: always
    volumes:
      - /data/portainer:/data
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - "192.168.1.1:9443:9443"

Additional Information

No response

@jamescarppe
Copy link
Member

What is your logging configuration for Docker itself? Are you using the default logging driver or have you made adjustments to the default config?

@jamescarppe
Copy link
Member

jamescarppe commented Feb 26, 2024

I've been able to reproduce this here and am opening an internal issue - as an interim measure if you disable auto-refresh when viewing the logs it should stop it spamming syslog.

Internal Ref: PCT-374

@jamescarppe
Copy link
Member

jamescarppe commented Feb 26, 2024

On further investigation this appears to be a result of Docker 25.0.0 introducing OpenTelemetry. At present we don't fully support Docker 25.x which is why this is appearing now, but we've logged this internally in any case.

Edit: On even further investigation, this same syslog entry occurs when simply using docker logs at the command line, so this appears to be a bug in Docker itself. To that end, I've opened this issue.

@KomtGoed
Copy link
Author

Thanks James, much appreciate the quick and detailed analysis!

Copy link

This issue has been marked as stale as it has not had recent activity, it will be closed if no further activity occurs in the next 7 days. If you believe that it has been incorrectly labelled as stale, leave a comment and the label will be removed.

@jamescarppe
Copy link
Member

It looks like a fix for this has been merged upstream at Docker, tagged for Docker 27. moby/moby#47796

@PrplHaz4
Copy link

It looks like a fix for this has been merged upstream at Docker, tagged for Docker 27. moby/moby#47796

With any luck we'll see it in 26.1.4 shortly: moby/moby#47843

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Applied to Bugs
Projects
None yet
Development

No branches or pull requests

3 participants