prometheus: Prometheus returns HTTP 500 "seeker can't seek" error on /favicon.ico

What did you do?

  1. Run Prometheus (I did docker run -it -p 9090:9090 quay.io/prometheus/prometheus:latest)
  2. Go to http://localhost:9090/favicon.ico

What did you expect to see?

Prometheus’ favicon.

What did you see instead? Under which circumstances?

A HTTP 500 response with Go’s seeker can't seek error message.

System information

Darwin 21.4.0 x86_64

Prometheus version

prometheus, version 2.35.0 (branch: HEAD, revision: 6656cd29fe6ac92bab91ecec0fe162ef0f187654)
  build user:       root@cf6852b14d68
  build date:       20220421-09:53:42
  go version:       go1.18.1
  platform:         linux/amd64

Prometheus configuration file

No response

Alertmanager version

No response

Alertmanager configuration file

No response

Logs

None relevant to the issue (not even with --log.level=debug).

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 7
  • Comments: 15 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Hello everyone, do you notice that alertmanager 0.24.0 have the same issue?

Thank you, folks!

After some testing, I confirm that prometheus/common#385 fixes the issue.

My initial thinking: https://github.com/prometheus/common/blob/627089d3a7af73be778847aa577192b937b8d89a/server/static_file_server.go#L21

We need more extensions here. If the extension is not known, go http will seek the file to know the mimetype, which is not possible.

This HTTP 500 on /favicon.ico seems to appear only when running Prometheus using docker. I have a 2.35.0 version running as a service and I get HTTP 200 and the actual image when I’m browsing /favicon.ico.