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

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

Closed
ricardbejarano opened this issue May 14, 2022 · 15 comments · Fixed by #10879 or #10889
Closed

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

ricardbejarano opened this issue May 14, 2022 · 15 comments · Fixed by #10879 or #10889

Comments

@ricardbejarano
Copy link

ricardbejarano commented May 14, 2022

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).

@fpapadamis
Copy link

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.

@mmuth
Copy link

mmuth commented Jun 8, 2022

Same issue here

@Nexucis
Copy link
Member

Nexucis commented Jun 17, 2022

the issue occurred also when using the PromQL editor. The UI cannot get the icon for the editor. There is a HTTP 500 Internal Server Error for http://localhost:9090/static/media/codicon.b3726f0165bf67ac6849.ttf.

And yes it's only in Docker. When we are using the binary directly, the issue doesn't happen.

@Nexucis
Copy link
Member

Nexucis commented Jun 17, 2022

issue wasn't there in 2.34. I'm looking about what changed between 2.34 and 2.35

@roidelapluie
Copy link
Member

It's not only in docker, it's when building with promu crossbuild.

@Nexucis
Copy link
Member

Nexucis commented Jun 17, 2022

that's weird @roidelapluie. I downloaded the last archive and run the binary and I don't see the issue like @fpapadamis said it too.

@roidelapluie
Copy link
Member

tar xvf prometheus-2.36.1.linux-amd64.tar.gz
cd prometheus-2.36.1.linux-amd64/
./prometheus 

then

curl 127.0.0.1:9090/favicon.ico
seeker can't seek

@Nexucis
Copy link
Member

Nexucis commented Jun 17, 2022

tar xvf prometheus-2.36.1.darwin-amd64.tar.gz
cd prometheus-2.36.1.darwin-amd64/
./prometheus
curl 127.0.0.1:9090/favicon.ico --output favicon.ico
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15086  100 15086    0     0   983k      0 --:--:-- --:--:-- --:--:-- 4910k

no issue in darwin arch.

Perhaps the issue is more on linux actually

@roidelapluie
Copy link
Member

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.

@roidelapluie
Copy link
Member

prometheus/common#385

@roidelapluie
Copy link
Member

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

@Nexucis
Copy link
Member

Nexucis commented Jun 17, 2022

cool, thank you @roidelapluie. I commented the PR in order to add more mimeTypes support.

roidelapluie added a commit to roidelapluie/prometheus that referenced this issue Jun 17, 2022
Closes prometheus#10697

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
@roidelapluie
Copy link
Member

#10879

@ricardbejarano
Copy link
Author

Thank you, folks!

Nexucis pushed a commit that referenced this issue Jun 18, 2022
Closes #10697

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
roidelapluie added a commit to roidelapluie/prometheus that referenced this issue Jun 20, 2022
Properly fix prometheus#10697

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
roidelapluie added a commit to roidelapluie/prometheus that referenced this issue Jun 20, 2022
Properly fix prometheus#10697

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
roidelapluie added a commit that referenced this issue Jun 20, 2022
Properly fix #10697

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
@DesireWithin
Copy link

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

roidelapluie added a commit to roidelapluie/prometheus that referenced this issue Jun 22, 2022
Closes prometheus#10697

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
roidelapluie added a commit to roidelapluie/prometheus that referenced this issue Jun 22, 2022
Properly fix prometheus#10697

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
@prometheus prometheus locked as resolved and limited conversation to collaborators Dec 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.