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
Open some network service (Jaeger in my case) on ::4317
Start the otlp grpc unit tests
Expected Result
The tests should be independent of what else is running on the OS.
In case a network service is started and connected to, the exact same addresses for serving and connecting need to be used.
In case a listening socket can not be opened, the test shall fail.
Actual Result
This pointed me towards the solution:
ERROR opentelemetry.exporter.otlp.proto.grpc.exporter:exporter.py:268 Failed to export metrics to localhost:4317, error code: StatusCode.UNIMPLEMENTED
I had some Jaeger instance running on IPv6 ::1:4317:
> netstat -alnp | grep 4317
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 0 0 ::1:4317 :::* LISTEN -
Turning it of unbreaks the unit tests again.
Why is that? It looks like the reason is that some unit tests open a server on 127.0.0.1:4317 and then connect to localhost:4317. In case something is running on IPv6 4317 the tests connect to that port. In case it is not running, the tests connect to IPv4 4317. This behavior is based on the OS level config, I guess.
Additional context
No response
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered:
LarsMichelsen
changed the title
Unit tests break in case Jaeger listens on ::1:4137
Unit tests break in case service (e.g Jaeger) listens on ::1:4137
Jul 16, 2024
Describe your environment
OS: Ubuntu 24.04
Python version: 3.12
SDK version: main
API version: main
What happened?
Running unit tests suddenly failed for me, e.g. like this for some initially unclear reason:
Steps to Reproduce
::4317
Expected Result
The tests should be independent of what else is running on the OS.
In case a network service is started and connected to, the exact same addresses for serving and connecting need to be used.
In case a listening socket can not be opened, the test shall fail.
Actual Result
This pointed me towards the solution:
I had some Jaeger instance running on
IPv6 ::1:4317
:Turning it of unbreaks the unit tests again.
Why is that? It looks like the reason is that some unit tests open a server on 127.0.0.1:4317 and then connect to localhost:4317. In case something is running on IPv6 4317 the tests connect to that port. In case it is not running, the tests connect to IPv4 4317. This behavior is based on the OS level config, I guess.
Additional context
No response
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: