fix command line example
loomis opened this issue · 2 comments
loomis commented
The provided command line example in example/Example
does not work. When running it, none of the logs are processed by the OpenTelemetry Collector and there are no errors within the OpenTelemetry Collector logs.
Additionally, there is a network error when trying to write the logs over gRPC. The port forwarding error is:
Handling connection for 4317
Handling connection for 4318
E0502 07:43:29.359390 3314 portforward.go:391] error copying from local connection to remote stream: read tcp6 [::1]:4317->[::1]:50466: read: connection reset by peer
Handling connection for 4317
E0502 07:43:29.379933 3314 portforward.go:406] an error occurred forwarding 4317 -> 4317: error forwarding port 4317 to pod 1cc094e409b1398b02ebf1256e88bd519dbedd50bb18a978cce25e158e22d8c0, uid : failed to execute portforward in network namespace "/var/run/netns/cni-bdeefc6b-cb37-64d7-dc09-0dee964076e4": read tcp4 127.0.0.1:58374->127.0.0.1:4317: read: connection reset by peer
E0502 07:43:29.380095 3314 portforward.go:234] lost connection to pod
When writing only to the HTTP endpoint (4318), there are no errors, but the log is not processed by the Collector.
nblumhardt commented
I think I've figured this one out - I was testing against an HTTPS endpoint and accidentally committed changes to the example with the URL left as https://...
. I'll send a fix 😊 sorry!
loomis commented
I verified that the switch from https to http fixes the problem. Will look at PR.