-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Panic when using OIDC auth extensions on gRPC receivers starting at version v0.30.0 #3734
Labels
bug
Something isn't working
Comments
@jpkrohling did you encountered this with latest opentelemetry-collector version? |
I don't remember seeing this, but will try to reproduce and fix ASAP. |
I also just ran into this -- can confirm the bug is still present under |
I'm on it. |
|
tigrannajaryan
pushed a commit
that referenced
this issue
Jul 30, 2021
Signed-off-by: Juraci Paixão Kröhling <[email protected]> Fixes #3734 by using chained interceptors for the gRPC servers. The tests making use of ToServerOptions were also changed to call grpc.NewServer with the obtained options, ensuring that they are valid. The test TestGrpcServerAuthSettings now calling grpc.NewServer, executed against the configgrpc without the chained interceptors confirms the bug: ``` $ go test ./config/configgrpc/ --- FAIL: TestGrpcServerAuthSettings (0.00s) panic: The unary server interceptor was already set and may not be reset. [recovered] panic: The unary server interceptor was already set and may not be reset. goroutine 23 [running]: testing.tRunner.func1.2(0xa6c2a0, 0xc0b8a0) /home/jpkroehling/bin/go/src/testing/testing.go:1144 +0x332 testing.tRunner.func1(0xc000103b00) /home/jpkroehling/bin/go/src/testing/testing.go:1147 +0x4b6 panic(0xa6c2a0, 0xc0b8a0) /home/jpkroehling/bin/go/src/runtime/panic.go:965 +0x1b9 google.golang.org/grpc.UnaryInterceptor.func1(0xc000374500) /home/jpkroehling/go/pkg/mod/google.golang.org/[email protected]/server.go:382 +0x6b google.golang.org/grpc.(*funcServerOption).apply(0xc0001243f0, 0xc000374500) /home/jpkroehling/go/pkg/mod/google.golang.org/[email protected]/server.go:201 +0x33 google.golang.org/grpc.NewServer(0xc000129900, 0x4, 0x4, 0x4) /home/jpkroehling/go/pkg/mod/google.golang.org/[email protected]/server.go:564 +0xeb go.opentelemetry.io/collector/config/configgrpc.TestGrpcServerAuthSettings(0xc000103b00) /home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/config/configgrpc/configgrpc_test.go:140 +0x2aa testing.tRunner(0xc000103b00, 0xb85528) /home/jpkroehling/bin/go/src/testing/testing.go:1194 +0xef created by testing.(*T).Run /home/jpkroehling/bin/go/src/testing/testing.go:1239 +0x2b3 FAIL go.opentelemetry.io/collector/config/configgrpc 0.006s FAIL ```
thanks @jpkrohling for the quick fix! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Starting at version v0.30.0, when configuring an OIDC auth extension on receiver, it generates a
panic
with the following error message:The unary server interceptor was already set and may not be reset
.Example:
Steps to reproduce
Enable a gRPC OTLP receiver using the OIDC auth extension and start the otel-collector application binary.
What did you expect to see?
I expect the application to not panic and crash.
What did you see instead?
The application panics and crashes.
What version did you use?
Versions
v0.30.0
andv0.30.1
.What config did you use?
Here is a config example:
Environment
OS:
Ubuntu 18.04
Compiler:
go 16.4
The text was updated successfully, but these errors were encountered: