-
Notifications
You must be signed in to change notification settings - Fork 454
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
OTEL Dependency Panic #871
Comments
now I am blind =D I can't see any metrics because I had to disable it |
sounds like some package is using some different package version which it doesn't implement Hijacker interface |
Hi @karmops |
I didn't do anything too special. I just increased the version of my Krakend from my krakend-settings {
"$schema": "https://www.krakend.io/schema/v2.6/krakend.json",
"version": 3,
"name": "KrakenD Open Source API Gateway",
"port": "{{ env "KRAKEND_PORT" }}",
"host": ["{{ env "HOST" }}"],
"debug_endpoint": true,
"timeout": "6000ms",
"tls": {
"public_key": "/etc/krakend/ssl/certs/tls.crt",
"private_key": "/etc/krakend/ssl/certs/tls.key",
"min_version": "TLS12"
},
"endpoints": [
{{ template "some-template.tmpl" }}
],
"extra_config": {
"router": {
"return_error_msg": true
},
"security/cors": {
"allow_origins": ["*"],
"allow_methods": ["GET", "POST", "PATCH", "DELETE"],
"allow_headers": [
"Origin",
"Authorization",
"Content-Type",
"Content-Length",
"User-Agent",
"X-Forwarded-For",
"Accept-Language",
"trackingId"
],
"expose_headers": ["Content-Length", "Content-Type"],
"allow_credentials": true,
"debug": false,
"max_age": "12h"
},
"security/bot-detector": {
"empty_user_agent_is_bot": true,
"cache_size": 1000
},
"security/http": {
"frame_deny": true,
"custom_frame_options_value": "DENY",
"referrer_policy": "same-origin",
"content_type_nosniff": true,
"browser_xss_filter": true,
"content_security_policy": "default-src 'self';",
"is_development": false
},
"telemetry/opentelemetry": {
"metric_reporting_period": 0,
"exporters": {
"prometheus": [
{
"port": 9091,
"name": "krakend"
}
]
}
}
}
} |
2024/04/10 22:02:08 http2: panic serving 10.1.21.208:36858: interface conversion: *http.http2responseWriter is not http.Hijacker: missing method Hijack
goroutine 131196 [running]:
net/http.(*http2serverConn).runHandler.func1()
/usr/local/go/src/net/http/h2_bundle.go:6104 +0x138
panic({0x2d73560, 0x4027f6a510})
/usr/local/go/src/runtime/panic.go:884 +0x1f4
github.com/krakend/krakend-otel/http/server.newTrackingResponseWriter(...)
/go/pkg/mod/github.com/krakend/krakend-otel@v0.2.0/http/server/response_writer.go:90
github.com/krakend/krakend-otel/http/server.(*trackingHandler).ServeHTTP(0x4000ee03c0, {0x3989540, 0x400012a980}, 0x4008a63500)
/go/pkg/mod/github.com/krakend/krakend-otel@v0.2.0/http/server/server.go:37 +0x418
net/http.serverHandler.ServeHTTP({0x0?}, {0x3989540, 0x400012a980}, 0x4008a63500)
/usr/local/go/src/net/http/server.go:2936 +0x2c0
net/http.initALPNRequest.ServeHTTP({{0x398b520?, 0x4027f6a270?}, 0x402ab7e000?, {0x4000768c30?}}, {0x3989540, 0x400012a980}, 0x4008a63500)
/usr/local/go/src/net/http/server.go:3545 +0x1d0
net/http.(*http2serverConn).runHandler(0x4b4?, 0x31590f5?, 0x16?, 0x4027f65eb0?)
/usr/local/go/src/net/http/h2_bundle.go:6111 +0xc0
created by net/http.(*http2serverConn).scheduleHandler
/usr/local/go/src/net/http/h2_bundle.go:6046 +0x21c but this sounds like some library version in some component should upgrade to a more recent version of |
Hi @karmops, Thank you for reporting it |
gonna try and let you know |
@alombarte Thank you very much, it is fixed. no panic anymore and krakend is generating the open telemetry metrics. |
Migrating from 2.5.0 to 2.6.1
the issue also happens on: 2.6.0
targeting ARM machines
just ran the same deployment I had, updating the OTEL config to:
Stack Trace
The text was updated successfully, but these errors were encountered: