You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When specifying the TLS options for both the client and server, the gRPC server is correctly set with those options, but the cmux matcher doesn't get a chance of getting a peek into the content, as the TLS handshake happens before these headers can be evaluated. As such, cmux will fallback to HTTP, which will cause clients to fail with:
transport: authentication handshake failed: tls: first record does not look like a TLS handshake
Note that this message is swallowed and the end-user will just not get any feedback (see #1192). One easy way to verify this is to setup two pipelines, with the first sending the spans to the second, and both having the logging exporter. This way, two log entries are expected, but only one will appear (see config below).
Changing the cmux matcher to match on cmux.TLS() makes it work, as the gateway's HTTP port isn't ever configured to use TLS, even when the TLS options are specified.
Steps to reproduce
generate a set of certs (see below)
use the configuration file below
generate a span
To generate the certs, start with a /tmp/cert/csr.json as follows:
This is fixed in #1223. I could not find a solution to reuse the same port and support custom TLS credentials for gRPC and http. But now it should work
* Add a Shutdown method to api TraceProvider
- sdktraceprovider shutdown span processors
- In examples, replace processosr shutdown with
traceprovider's shutdown
Signed-off-by: Hui Kang <[email protected]>
* remove shutdown in the api provider interface
* Add context in parameter and return error
* handle error in shutdown
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <[email protected]>
Troels51
pushed a commit
to Troels51/opentelemetry-collector
that referenced
this issue
Jul 5, 2024
Describe the bug
When specifying the TLS options for both the client and server, the gRPC server is correctly set with those options, but the
cmux
matcher doesn't get a chance of getting a peek into the content, as the TLS handshake happens before these headers can be evaluated. As such,cmux
will fallback to HTTP, which will cause clients to fail with:Note that this message is swallowed and the end-user will just not get any feedback (see #1192). One easy way to verify this is to setup two pipelines, with the first sending the spans to the second, and both having the logging exporter. This way, two log entries are expected, but only one will appear (see config below).
Changing the
cmux
matcher to match oncmux.TLS()
makes it work, as the gateway's HTTP port isn't ever configured to use TLS, even when the TLS options are specified.Steps to reproduce
To generate the certs, start with a
/tmp/cert/csr.json
as follows:Then:
cd /tmp/cert
cfssl genkey -initca csr.json | cfssljson -bare ca
cfssl gencert -ca ca.pem -ca-key ca-key.pem -hostname=guarana,localhost,127.0.0.1 csr.json | cfssljson -bare self-signed
What did you expect to see?
What did you see instead?
What version did you use?
Version:
master
at12b3d9ccb8d20f072a25737c4b745512d60e2ee0
What config did you use?
Config:
Environment
OS: Fedora 32 latest updates applied
Compiler(if manually compiled):
go1.14.3
Additional context
The following diff would make the configuration work, but not sure it's a proper solution:
The text was updated successfully, but these errors were encountered: