Closed ageorget closed 1 year ago
It seems to me that the system property should have either true or false values
https://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html
'system' is not valid.
IIRC, it depends on the JVM/Java version. Support for system
is supported in newer Java versions.
That's the default value used by dCache since the 8.2 version https://github.com/dCache/dcache/commit/da994201f1e90191030a631c54241c8bbe240565
(not-for-services)dcache.java.options=\
-server \
-Xmx${dcache.java.memory.heap} \
-XX:MaxDirectMemorySize=${dcache.java.memory.direct} \
-Dsun.net.inetaddr.ttl=${dcache.net.inetaddr.lifetime} \
-Dorg.globus.tcp.port.range=${dcache.net.wan.port.min},${dcache.net.wan.port.max} \
-Dorg.dcache.dcap.port=${pool.mover.dcap.port} \
-Dorg.dcache.ftp.log-aborted-transfers=${pool.mover.ftp.enable.log-aborted-transfers} \
-Dorg.dcache.net.tcp.portrange=${dcache.net.lan.port.min}:${dcache.net.lan.port.max} \
-Djava.security.krb5.realm=${dcache.authn.kerberos.realm} \
-Djava.security.krb5.kdc=${dcache.authn.kerberos.key-distribution-center-list} \
-Djavax.security.auth.useSubjectCredsOnly=false \
-Djava.security.auth.login.config=${dcache.authn.jaas.config} \
-Dcontent.types.user.table=${dcache.paths.content-types} \
-Dzookeeper.sasl.client=false \
-Dcurator-dont-log-connection-problems=true \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath=${dcache.java.oom.file} \
-XX:+ExitOnOutOfMemoryError \
-XX:+StartAttachListener \
-XX:+UseCompressedOops \
-javaagent:${dcache.paths.classes}/aspectjweaver-1.9.2.jar \
-Djava.net.preferIPv6Addresses=system \
${dcache.java.options.common} \
${dcache.java.options.extra}
java.net.preferIPv6Addresses=system
is supported in OpenJDK v11 (and newer), but not in OpenJDK v8.
If you see this message, I assume you are running JDK v8.
According to our download page, all supported dCache versions require JDK v11 (or newer).
If you're currently running JDK v8 then I suggest upgrading to JDK v11 and see if that helps.
That's strange because we only use OpenJDK v11 on all of our dCache servers :
/usr/bin/java -version
openjdk version "11.0.17" 2022-10-18 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.17.0.8-2.el7_9) (build 11.0.17+8-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.17.0.8-2.el7_9) (build 11.0.17+8-LTS, mixed mode, sharing)
root 231548 6.3 11.2 17285576 3640608 ? Ssl Mar14 107:16 /usr/bin/java -server -Xmx4096m -XX:MaxDirectMemorySize=3072m -Dsun.net.inetaddr.ttl=1800 -Dorg.globus.tcp.port.range=30000,31000 -Dorg.dcache.dcap.port=0 -Dorg.dcache.ftp.log-aborted-transfers=true -Dorg.dcache.net.tcp.portrange=33115:33145 -Djava.security.krb5.realm= -Djava.security.krb5.kdc= -Djavax.security.auth.useSubjectCredsOnly=false -Djava.security.auth.login.config=/etc/dcache/jgss.conf -Dcontent.types.user.table=/etc/dcache/content-types.properties -Dzookeeper.sasl.client=false -Dcurator-dont-log-connection-problems=true -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/spool/dcache/log/ccdcacli372-pool-atlas-aod-read-li372a-Domain-oom.hprof -XX:+ExitOnOutOfMemoryError -XX:+StartAttachListener -XX:+UseCompressedOops -javaagent:/usr/share/dcache/classes/aspectjweaver-1.9.2.jar -Djava.net.preferIPv6Addresses=system -Djava.awt.headless=true -DwantLog4jSetup=n -Dorg.bouncycastle.dh.allow_unsafe_p_value=true -Ddcache.home=/usr/share/dcache -Ddcache.paths.defaults=/usr/share/dcache/defaults org.dcache.boot.BootLoader start ccdcacli372-pool-atlas-aod-read-li372a-Domain
It's not a great test, but could you try the following commands?
paul@sprocket:~$ echo 'System.out.println("Hello, world");' | jshell -J-Djava.net.preferIPv6Addresses=false -
Hello, world
paul@sprocket:~$ echo 'System.out.println("Hello, world");' | jshell -J-Djava.net.preferIPv6Addresses=foo -
Hello, world
paul@sprocket:~$ echo 'System.out.println("Hello, world");' | jshell -J-Djava.net.preferIPv6Addresses=true -
Launching JShell execution engine threw: FailOverExecutionControlProvider: FAILED: 0:jdi:hostname(0:0:0:0:0:0:0:1) [...]
[...]
paul@sprocket:~$ echo 'System.out.println("Hello, world");' | jshell -J-Djava.net.preferIPv6Addresses=system -
Launching JShell execution engine threw: FailOverExecutionControlProvider: FAILED: 0:jdi:hostname(0:0:0:0:0:0:0:1) [...]
[...]
paul@sprocket:~$
The above example is with Java 11:
paul@sprocket:~$ java -version
openjdk version "11.0.18" 2023-01-17
OpenJDK Runtime Environment (build 11.0.18+10-post-Debian-1deb11u1)
OpenJDK 64-Bit Server VM (build 11.0.18+10-post-Debian-1deb11u1, mixed mode, sharing)
paul@sprocket:~$
As an explanation, there's a bug in jshell where it crashes if given an IPv6 address to work with.
If preferIPv6Addresses
is false
or an unknown value (like foo
above) then jshell has an IPv4 address (127.0.0.1) and everything is fine. If it is true
then it has an IPv6 address (::1) and the bug is triggered.
If your JRE supports preferIPv6Addresses=system
then you should see a crash (like my last example above). It system
is not supported then jshell should launch without a problem (as system
is an unknown value, so treated as false
).
It crashed but with another exception :
echo 'System.out.println("Hello, world");' | jshell -J-Djava.net.preferIPv6Addresses=false -
Hello, world
echo 'System.out.println("Hello, world");' | jshell -J-Djava.net.preferIPv6Addresses=foo -
Hello, world
echo 'System.out.println("Hello, world");' | jshell -J-Djava.net.preferIPv6Addresses=true -
Launching JShell execution engine threw: FailOverExecutionControlProvider: FAILED: 0:jdi:hostname(0:0:0:0:0:0:0:1) --
Exception: java.lang.InternalError: Failed remote listen: java.lang.IllegalArgumentException: unable to parse port number in address @ com.sun.jdi.SocketListen (defaults: timeout=, port=, localAddress=) -- {timeout=timeout=5000, port=port=, localAddress=localAddress=0:0:0:0:0:0:0:1}
jdk.jshell/jdk.jshell.execution.JdiInitiator.reportLaunchFail(JdiInitiator.java:300)
jdk.jshell/jdk.jshell.execution.JdiInitiator.listenTarget(JdiInitiator.java:199)
jdk.jshell/jdk.jshell.execution.JdiInitiator.<init>(JdiInitiator.java:111)
jdk.jshell/jdk.jshell.execution.JdiDefaultExecutionControl.create(JdiDefaultExecutionControl.java:103)
jdk.jshell/jdk.jshell.execution.JdiExecutionControlProvider.generate(JdiExecutionControlProvider.java:152)
cause: java.lang.IllegalArgumentException: unable to parse port number in address
FailOverExecutionControlProvider: FAILED: 1:jdi:launch(true) --
Exception: java.net.SocketTimeoutException: Accept timed out
java.base/java.net.PlainSocketImpl.socketAccept(Native Method)
java.base/java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:474)
java.base/java.net.ServerSocket.implAccept(ServerSocket.java:565)
java.base/java.net.ServerSocket.accept(ServerSocket.java:533)
jdk.jshell/jdk.jshell.execution.JdiDefaultExecutionControl.create(JdiDefaultExecutionControl.java:116)
FailOverExecutionControlProvider: FAILED: 2:jdi --
Exception: java.net.SocketTimeoutException: Accept timed out
java.base/java.net.PlainSocketImpl.socketAccept(Native Method)
java.base/java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:474)
java.base/java.net.ServerSocket.implAccept(ServerSocket.java:565)
java.base/java.net.ServerSocket.accept(ServerSocket.java:533)
jdk.jshell/jdk.jshell.execution.JdiDefaultExecutionControl.create(JdiDefaultExecutionControl.java:116)
echo 'System.out.println("Hello, world");' | jshell -J-Djava.net.preferIPv6Addresses=system -
Launching JShell execution engine threw: FailOverExecutionControlProvider: FAILED: 0:jdi:hostname(0:0:0:0:0:0:0:1) --
Exception: java.lang.InternalError: Failed remote listen: java.lang.IllegalArgumentException: unable to parse port number in address @ com.sun.jdi.SocketListen (defaults: timeout=, port=, localAddress=) -- {timeout=timeout=5000, port=port=, localAddress=localAddress=0:0:0:0:0:0:0:1}
jdk.jshell/jdk.jshell.execution.JdiInitiator.reportLaunchFail(JdiInitiator.java:300)
jdk.jshell/jdk.jshell.execution.JdiInitiator.listenTarget(JdiInitiator.java:199)
jdk.jshell/jdk.jshell.execution.JdiInitiator.<init>(JdiInitiator.java:111)
jdk.jshell/jdk.jshell.execution.JdiDefaultExecutionControl.create(JdiDefaultExecutionControl.java:103)
jdk.jshell/jdk.jshell.execution.JdiExecutionControlProvider.generate(JdiExecutionControlProvider.java:152)
cause: java.lang.IllegalArgumentException: unable to parse port number in address
FailOverExecutionControlProvider: FAILED: 1:jdi:launch(true) --
Exception: java.net.SocketTimeoutException: Accept timed out
java.base/java.net.PlainSocketImpl.socketAccept(Native Method)
java.base/java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:474)
java.base/java.net.ServerSocket.implAccept(ServerSocket.java:565)
java.base/java.net.ServerSocket.accept(ServerSocket.java:533)
jdk.jshell/jdk.jshell.execution.JdiDefaultExecutionControl.create(JdiDefaultExecutionControl.java:116)
FailOverExecutionControlProvider: FAILED: 2:jdi --
Exception: java.net.SocketTimeoutException: Accept timed out
java.base/java.net.PlainSocketImpl.socketAccept(Native Method)
java.base/java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:474)
java.base/java.net.ServerSocket.implAccept(ServerSocket.java:565)
java.base/java.net.ServerSocket.accept(ServerSocket.java:533)
jdk.jshell/jdk.jshell.execution.JdiDefaultExecutionControl.create(JdiDefaultExecutionControl.java:116)
openjdk version "11.0.18" 2023-01-17 LTS OpenJDK Runtime Environment (Red_Hat-11.0.18.0.10-1.el7_9) (build 11.0.18+10-LTS) OpenJDK 64-Bit Server VM (Red_Hat-11.0.18.0.10-1.el7_9) (build 11.0.18+10-LTS, mixed mode, sharing)java11
This is a problem with Netty not supporting the system value.
I opened a GH issue with them, seems they have corrected the problem:
https://github.com/netty/netty/issues/13300
we will have to update the Netty dependency.
Al
Albert L. Rossi Senior Software Developer Scientific Computing Division, Scientific Data Services, Distributed Data Development WH 566 Fermi National Accelerator Laboratory Batavia, IL 60510 (630) 840-3023
From: ageorget @.> Sent: Wednesday, March 15, 2023 9:53 AM To: dCache/dcache @.> Cc: Albert Rossi @.>; Comment @.> Subject: Re: [dCache/dcache] Unable to parse the boolean system property java.net.preferIPv6Addresses (Issue #7056)
It crashed but with another exception :
echo 'System.out.println("Hello, world");' | jshell -J-Djava.net.preferIPv6Addresses=false - Hello, world
echo 'System.out.println("Hello, world");' | jshell -J-Djava.net.preferIPv6Addresses=foo - Hello, world
echo 'System.out.println("Hello, world");' | jshell -J-Djava.net.preferIPv6Addresses=true -
Launching JShell execution engine threw: FailOverExecutionControlProvider: FAILED: 0:jdi:hostname(0:0:0:0:0:0:0:1) --
Exception: java.lang.InternalError: Failed remote listen: java.lang.IllegalArgumentException: unable to parse port number in address @ com.sun.jdi.SocketListen (defaults: timeout=, port=, localAddress=) -- {timeout=timeout=5000, port=port=, localAddress=localAddress=0:0:0:0:0:0:0:1}
jdk.jshell/jdk.jshell.execution.JdiInitiator.reportLaunchFail(JdiInitiator.java:300)
jdk.jshell/jdk.jshell.execution.JdiInitiator.listenTarget(JdiInitiator.java:199)
jdk.jshell/jdk.jshell.execution.JdiInitiator.
echo 'System.out.println("Hello, world");' | jshell -J-Djava.net.preferIPv6Addresses=system -
Launching JShell execution engine threw: FailOverExecutionControlProvider: FAILED: 0:jdi:hostname(0:0:0:0:0:0:0:1) --
Exception: java.lang.InternalError: Failed remote listen: java.lang.IllegalArgumentException: unable to parse port number in address @ com.sun.jdi.SocketListen (defaults: timeout=, port=, localAddress=) -- {timeout=timeout=5000, port=port=, localAddress=localAddress=0:0:0:0:0:0:0:1}
jdk.jshell/jdk.jshell.execution.JdiInitiator.reportLaunchFail(JdiInitiator.java:300)
jdk.jshell/jdk.jshell.execution.JdiInitiator.listenTarget(JdiInitiator.java:199)
jdk.jshell/jdk.jshell.execution.JdiInitiator.
openjdk version "11.0.18" 2023-01-17 LTS OpenJDK Runtime Environment (Red_Hat-11.0.18.0.10-1.el7_9) (build 11.0.18+10-LTS) OpenJDK 64-Bit Server VM (Red_Hat-11.0.18.0.10-1.el7_9) (build 11.0.18+10-LTS, mixed mode, sharing)java11
— Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dCache_dcache_issues_7056-23issuecomment-2D1470153097&d=DwMCaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=60rQ0HHqHmEY1P6VSdyuTQ&m=UHphn6yJUCjTrTjYWAjmvjyt4UmdaZu1kxmm9BTN1i2WRP7RvB9dx7PeybWPbOr-&s=ut3MsLesoIIdNe1HwOIfCFOtFVKMI-K18eBnKVPx4LY&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AA6NBHEYNHM6ZM6ASN764SLW4HJWLANCNFSM6AAAAAAV2IK3M4&d=DwMCaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=60rQ0HHqHmEY1P6VSdyuTQ&m=UHphn6yJUCjTrTjYWAjmvjyt4UmdaZu1kxmm9BTN1i2WRP7RvB9dx7PeybWPbOr-&s=UuCpT-2YRbB_VI6gVrNXDSCc_f0Pb3EKtJDA6R2YHaA&e=. You are receiving this because you commented.Message ID: @.***>
Hello,
Any plans to update the Netty package in the next dCache release?
dCache is still using IPv4 protocol by default for transfers as the system
value is rejected.
Adrien
Hello,
I can see this error in pool logs :
We are using the default value
-Djava.net.preferIPv6Addresses=system
for dcache.java.options. with dCache 8.2.16.Cheers, Adrien