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
JRuby version: jruby 9.1.16.0 (2.3.3) 2018-02-21 8f3f95a OpenJDK 64-Bit Server VM 25.144-b01 on 1.8.0_144-b01 +jit [OpenBSD-x86_64]
Operating system: OpenBSD/amd64 6.2-current
Expected Behavior
$ jruby -r socket -e 'p 1'
1
Actual Behavior
$ jruby -r socket -e 'p 1'
2018-02-21T13:52:40.076-08:00 [main] WARN Ruby : Warning: not setting network stack system property because socket subsystem may already be booted.If you need this option please set it manually as a JVM property.
Use JAVA_OPTS=-Djava.net.preferIPv4Stack=true OR prepend -J as a JRuby option.
1
Let's say I try to take the advice it gives:
$ jruby -J-Djava.net.preferIPv4Stack=true -r socket -e 'p 1'
2018-02-21T13:52:40.076-08:00 [main] WARN Ruby : Warning: not setting network stack system property because socket subsystem may already be booted.If you need this option please set it manually as a JVM property.
Use JAVA_OPTS=-Djava.net.preferIPv4Stack=true OR prepend -J as a JRuby option.
1
$ JAVA_OPTS=-Djava.net.preferIPv4Stack=true jruby -r socket -e 'p 1'
2018-02-21T13:52:40.076-08:00 [main] WARN Ruby : Warning: not setting network stack system property because socket subsystem may already be booted.If you need this option please set it manually as a JVM property.
Use JAVA_OPTS=-Djava.net.preferIPv4Stack=true OR prepend -J as a JRuby option.
1
Well that sucks. I can only get the warning to be suppressed if I use a setting of false instead of true:
I believe this behavior broke in d55cd48, which was an attempt to fix #4869. Since I'm guessing you don't want to revert that, is there a way JRuby can be fixed so that it doesn't warn if the JDK defaults java.net.preferIPv4Stack to true?
The text was updated successfully, but these errors were encountered:
How did you install JRuby? You aren't passing that property and yet it is getting set somehow. That could mean it's using an older JRuby launcher script/executable that still tries to set it.
You may see the property being passed in bin/jruby if it's still a bash script.
Ahh, I see the bug. The property we deprecated is defaulting to whatever the JDK uses for the preferIPv4Stack property, so when the JDK defaults to true we warn. Oops.
I'll fix.
Ugly workaround for now would be to set it to false at startup and then alter it (via ENV_JAVA) before booting the socket subsystem.
Environment
JRuby version:
jruby 9.1.16.0 (2.3.3) 2018-02-21 8f3f95a OpenJDK 64-Bit Server VM 25.144-b01 on 1.8.0_144-b01 +jit [OpenBSD-x86_64]
Operating system: OpenBSD/amd64 6.2-current
Expected Behavior
Actual Behavior
Let's say I try to take the advice it gives:
Well that sucks. I can only get the warning to be suppressed if I use a setting of false instead of true:
However, that changes the behavior, since the OpenBSD OpenJDK default is true (see https://github.com/openbsd/ports/blob/master/devel/jdk/1.8/patches/patch-jdk_src_solaris_native_java_lang_java_props_md_c#L8-L10).
I believe this behavior broke in d55cd48, which was an attempt to fix #4869. Since I'm guessing you don't want to revert that, is there a way JRuby can be fixed so that it doesn't warn if the JDK defaults java.net.preferIPv4Stack to true?
The text was updated successfully, but these errors were encountered: