Hi,
The problem is that one or more plugins that import the "golang.org/x/net/trace"
package in a plugin type application (like Caddy) cause a panic:
panic: http: multiple registrations for /debug/requests
An issue has been logged inside the caddy-grpc project.
The reason is because both dns
and grpc
plugins use the Go gRPC package
which imports “golang.org/x/net/trace” in it’s trace.go file which in turn import the "golang.org/x/net/trace"
package. The trace
package has an init function that registers routes for the default http mux. This is where the panic occurs.
So when Caddy load and start both dns
and grpc
the panic occurs when the init()
runs for a second time.
I’m not really sure what the resolution for a problem like this is. Can the handlers that’s specified in the trace package init()
function be dynamically changed?
Pieter