-
Notifications
You must be signed in to change notification settings - Fork 440
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
gRPC OpenTelemetry can't take IPv6 endpoints #3114
Comments
There are C++ functions available as part of boost::url https://www.boost.org/ which will parse a string to determine whether it represents an IPv6 address and (if so) what the address is. This issue was first raised against the opentelemetry-collector repository, and got the following comment : This error seems to be coming from the C++ SDK (
|
Thanks for the report. File Which version of grpc is used here ? [edit] Somehow the host:port given to grpc is truncated to Please clarify which version of opentelemetry-cpp is used. Looks related to: |
I am using a binary tarball of opentelemetry with file timestamps of 18 March 2024. |
If you specify a server to OpenTelemetry as an IPv6 address, you get a parsing error. IPv6 servers specified by DNS name work fine, and IPv4 servers specified either by address or by DNS name work fine as well.
Describe your environment
OS: RHEL8
Steps to reproduce
exporterOtlpGrpcEndpoint: '[2620:1f7:298e:a014::2:136]:4317'
E1014 08:39:23.729563510 34187 grpc_ares_wrapper.cc:910] Failed to parse [2620:1 to host:port while attempting to resolve as ip literal.
2024-10-14 08:39:23.730764: BIP9570E: OpenTelemetry error: '[OTLP TRACE GRPC Exporter] Export() failed with status_code: "UNAVAILABLE" error_message: "DNS resolution failed for [2620:1: unparseable host:port"' - '[]'.
E1014 08:39:24.731289659 34183 grpc_ares_wrapper.cc:910] Failed to parse [2620:1 to host:port while attempting to resolve as ip literal.
E1014 08:39:26.221792529 34183 grpc_ares_wrapper.cc:910] Failed to parse [2620:1 to host:port while attempting to resolve as ip literal.
E1014 08:39:29.227147178 34183 grpc_ares_wrapper.cc:910] Failed to parse [2620:1 to host:port while attempting to resolve as ip literal.
E1014 08:39:34.000113217 34183 grpc_ares_wrapper.cc:910] Failed to parse [2620:1 to host:port while attempting to resolve as ip literal.
E1014 08:39:39.460472916 34183 grpc_ares_wrapper.cc:910] Failed to parse [2620:1 to host:port while attempting to resolve as ip literal.
Also fails to take HTTP IPv6 endpoint:
exporterOtlpHttpUrl: 'http://[2620:1f7:298e:a014::2:136]:4318/v1/traces'
2024-10-14 08:51:16.002504: BIP9570E: OpenTelemetry error: '[OTLP HTTP Client] Session state: connection failed.URL rejected: Bad IPv6 address' - '[]'.
2024-10-14 08:51:16.003609: BIP9570E: OpenTelemetry error: '[OTLP HTTP Client] ERROR: Export 1 trace span(s) error: 1' - '[]'.
2024-10-14 08:51:16.003227 34501 ImbOpenTelemetryDebugLog::Handle file:/build/jenkins_swg/slot0/product-build/WMB/src/DataFlowEngine/OpenTelemetry/lib/ImbOpenTelemetryDebugLog.cpp line:79 message:9570.BIPmsgs, 'Error from open telemetry logging', '[OTLP HTTP Client] Session state: connection failed.URL rejected: Bad IPv6 address', '[]'
2024-10-14 08:51:16.003227 34501 Error BIP9570E: OpenTelemetry error: '[OTLP HTTP Client] Session state: connection failed.URL rejected: Bad IPv6 address' - '[]'.
Describe exactly how to reproduce the error. Include a code sample if applicable.
What is the expected behavior?
What did you expect to see?
Connection to the specified server
What is the actual behavior?
What did you see instead?
Parse error messages
Additional context
The text was updated successfully, but these errors were encountered: