500 Internal Server Error "can't cast underlying response writer to Hijacker" in WS tail in microservice deployment in 2.2.0

Hello,

I filed a bug that I was able to reproduce with curl over here: msg="Error in upgrading websocket" err="badResponseLoggingWriter: can't cast underlying response writer to Hijacker" · Issue #3499 · grafana/loki · GitHub

This issue completely prevents WS tail from working through Grafana. The issue is that websocket tail works through querier but query frontend fails with 500 for exactly the same query.

The “can’t cast” indicates to me that it’s a code bug, which potentially masks the true cause.
Debug logs are not helpful as that code path does not log much.

Anybody has any idea as to the cause and/or if there is a workaround?

Thanks!

1 Like

i`m facing a problem that looks lije the same as yours, but using the zabbix plugin. Whem I try to view graphs with long time range, I get the error 500 internal Server error)

Object

request:Object

url:“api/datasources/1/resources/zabbix-api”

method:“POST”

hideFromInspector:false

data:Object

datasourceId:1

method:“history.get”

params:Object

response:Object

error:“Internal Server Error”

message:“request failed, status: 500 Internal Server Error”