Skip to content
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

TCPServer returning "0:0:0:0:0:0:0:0" as bound ip address #8183

Open
HoneyryderChuck opened this issue Apr 2, 2024 · 1 comment
Open

TCPServer returning "0:0:0:0:0:0:0:0" as bound ip address #8183

HoneyryderChuck opened this issue Apr 2, 2024 · 1 comment

Comments

@HoneyryderChuck
Copy link

Environment Information

Provide at least:

  • JRuby version: jruby 9.4.6.0 (3.1.4) 2024-02-20 576fab2 OpenJDK 64-Bit Server VM 25.402-b06 on 1.8.0_402-b06 +jit [x86_64-linux]
  • Operating system and platform: docker image (jruby:9.4)

Expected Behavior

The httpx jruby suite started failing recently, when a certain proxy test would try to bind to the "0:0:0:0:0:0:0:0" address. This address was collected from here, where I confirmed that, after initiating the server with TCPServer.new(0), the call to .addr returns "0:0:0:0:0:0:0:0" in the 3rd and 4th array elements.

This seems to only happen on gitlab CI though, as locally it consistently returns "0:0:0:0"

@enebo enebo added this to the JRuby 9.4.7.0 milestone Apr 2, 2024
@headius
Copy link
Member

headius commented Apr 24, 2024

I suspect this is due to differences in that environment relaing to IPv6 and the Java/JDK being run.

You say that locally it's "0:0:0:0" which seems a strange address to me, given that the catch-all address for IPv6 should be "0:0:0:0:0:0:0:0" as you say it does on Gitlab CI. Do you mean "0.0.0.0"?

There are some JVM properties you can set (with -J-D<property> flag to JRuby or JAVA_OPTS=-D<property> env var) that will change how JDK decides to use IPv6 vs IPv4. Perhaps you can give some of these a try and see if it helps?

https://docs.oracle.com/javase/8/docs/technotes/guides/net/ipv6_guide/#ipv6-related

@headius headius removed this from the JRuby 9.4.7.0 milestone Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants