Comments (4)
Hi,
I'm sorry but I was not able to reproduce it. Since I utilized a basic HelloWorld for the gRPC backend, I'm considering the possibility that there may be an issue with something in your gRPC backend.
Could you provide a reproducible use case with a public container image as backend?
from traefik.
There's definitely nothing wrong with the gRPC backend. I verified this by dialing it directly without the proxy in between. I'm running a fairly standard setup where I have an H2C server peek at the request protocol and content-type header and then route the request to the appropriate backend server (HTTP or gRPC). No TLS on the server side (termination happens at the Traefik layer). I know the backend isn't even receiving the request because of bookend logging I put into place.
bookend := log.Named("bookend")
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
bookend.Debug("start", zap.String("method", r.Method), zap.String("path", r.URL.Path))
defer bookend.Debug("end", zap.String("method", r.Method), zap.String("path", r.URL.Path))
if r.ProtoMajor == 2 && strings.HasPrefix(r.Header.Get("content-type"), "application/grpc") {
public.GRPC.Server.ServeHTTP(w, r)
} else {
public.HTTP.Handler.ServeHTTP(w, r)
}
})
public.H2C.Server = &http.Server{
Handler: h2c.NewHandler(handler, &http2.Server{}),
ConnContext: func(ctx context.Context, c net.Conn) context.Context {
return logger.ToContext(ctx, log)
},
}
return svr.H2C.Server.Serve(svr.listener)
Client isn't doing anything fancy either. Really just a direct dial with transport credentials set to the system cert pool.
pool, err := x509.SystemCertPool()
if err != nil {
return nil, err
}
creds = credentials.NewTLS(&tls.Config{
RootCAs: pool,
InsecureSkipVerify: c.Mode == "dev",
})
dialOptions := []grpc.DialOption{
grpc.WithAuthority(c.BaseURL),
grpc.WithTransportCredentials(creds),
}
clientConn, err := grpc.DialContext(context.Background(), net.JoinHostPort(host, port), dialOptions...)
if err != nil {
return nil, err
}
I've tried this both with and without the WithAuthority
option.
from traefik.
Hi,
I'm still not able to reproduce it, and a complete reproducible use case ( may be with a docker-compose etc... ) would be very helpful.
Could you share the /api/rawdata
and can you try to enable accesslogs in json, you will have more information on the request etc..., and share the results.
Thanks
from traefik.
Hi! I'm Træfiker 🤖 the bot in charge of tidying up the issues.I have to close this one because of its lack of activity 😞Feel free to re-open it or join our Community Forum.
from traefik.
Related Issues (20)
- Security vulnerability on Alpine Linux HOT 5
- Connection refused from container to container communication HOT 10
- [ECS] Dynamic Port for healthcheck service option HOT 1
- Errors on receving sigterm HOT 1
- Server reported as OK when it is not HOT 1
- [Bug] ping log in Accesslog HOT 5
- [Bug] APM data is not ingested into DATADOG using OTLP HOT 3
- A way to explain why a request match a certain router when router rules conflict happen HOT 6
- [CertResolvers] Support multiple designate instances HOT 1
- Cloudflare ACME error - cant renew/obtain certs HOT 1
- Cannot use lz4 as plugin dependency HOT 3
- systemd socket activation fails with panic: interface conversion: net.Listener is *net.UnixListener, not *net.TCPListener HOT 1
- Add possibility to select or deactivate compression algorithms in compress middleware HOT 6
- Some metrics are missing in v3 HOT 1
- Print a warning if a router is configured with both HTTP and HTTPs entrypoints HOT 7
- Troubleshooting 502 Bad Gateway: Keep-Alive and Timeout Settings in Traefik HOT 6
- High CPU usage with addMulVVW1024 HOT 1
- Internal Node IPs for NodePort services feature breaks namespace scoped Traefik deployments HOT 1
- HTTPRoute and other Gateway API routes updated even without changes HOT 2
- Invalid value: "array": tls must be specified for protocols ['HTTPS', 'TLS']
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traefik.