Giter Club home page Giter Club logo

Comments (2)

pieterlouw avatar pieterlouw commented on June 2, 2024

Hi @klingtnet,

It seems the problem is there's another plugin that uses grpc and https://github.com/grpc/grpc-go/blob/master/trace.go imports golang.org/x/net/trace which in turn registers /debug/requests and /debug/events handlers in it's init() function to the Go default http muxer.
(https://github.com/golang/net/blob/master/trace/trace.go#L112-L117)

I'm not sure yet if it will be possible to fix it from within my plugin as the problem is deeply entrenched in the grpc package.

I've established that it's the dns server type that's also using grpc, so a temporary solution would be to exclude the other plugin if you want to use one of them(exclude dns if you want to use grpc or vice versa ). Obviously this is not ideal if you want to use both plugins.
I have tested it by excluding dns plugin as follows:

curl -Lsf 'https://caddyserver.com/download/linux/amd64?plugins=http.authz,http.awslambda,http.cgi,http.cors,http.datadog,http.expires,http.filemanager,http.filter,http.git,http.gopkg,http.grpc,http.hugo,http.ipfilter,http.jwt,http.login,http.mailout,http.minify,http.prometheus,http.proxyprotocol,http.ratelimit,http.realip,http.reauth,http.upload,net,tls.dns.cloudflare,tls.dns.digitalocean,tls.dns.dnsimple,tls.dns.dnspod,tls.dns.dyn,tls.dns.exoscale,tls.dns.gandi,tls.dns.googlecloud,tls.dns.linode,tls.dns.namecheap,tls.dns.ovh,tls.dns.rackspace,tls.dns.rfc2136,tls.dns.route53,tls.dns.vultr' | tar -xvz caddy && ./caddy

Pieter

from caddy-grpc.

linquize avatar linquize commented on June 2, 2024

If I add all the plugins as well as github.com/pieterlouw/caddy-grpc,

panic: /debug/requests is already registered. You may have two independent copies of golang.org/x/net/trace in your binary, trying to maintain separate state. This may involve a vendored copy of golang.org/x/net/trace.

from caddy-grpc.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.