JDK-8027668 : sun/tools/jstatd/TestJstatdPort.java: java.net.ConnectException: Connection refused: connect
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 8,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-10-31
  • Updated: 2024-11-06
  • Resolved: 2015-04-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b64Fixed
Related Reports
Duplicate :  
Duplicate :  
Description
#Test Results (version 2)
#Wed Oct 30 19:42:43 PDT 2013
#checksum:1ba2e8fabc3ab84e
#-----testdescription-----
$file=C\:\\Users\\aurora\\sandbox\\testbase\\test\\sun\\tools\\jstatd\\TestJstatdPort.java
$root=C\:\\Users\\aurora\\sandbox\\testbase\\test
keywords=bug4990825
library=/lib/testlibrary
maxTimeout=60
run=USER_SPECIFIED build JstatdTest JstatGCUtilParser\r\nUSER_SPECIFIED main/timeout\=60 TestJstatdPort\r\n
source=TestJstatdPort.java
title=\ 

#-----environment-----

#-----testresult-----
description=file\:/C\:/Users/aurora/sandbox/testbase/test/sun/tools/jstatd/TestJstatdPort.java
elapsed=7756 0\:00\:07.756
end=Wed Oct 30 19\:42\:42 PDT 2013
environment=regtest
execStatus=Failed. Execution failed\: `main' threw exception\: java.lang.RuntimeException\: Exit value 1 , expected to get 0
hostname=SC11136076.us.oracle.com
javatestOS=Windows 7 6.1 (amd64)
javatestVersion=4.4
jtregVersion=jtreg 4.1 fcs b07
script=com.sun.javatest.regtest.RegressionScript 
sections=script_messages build build compile main
start=Wed Oct 30 19\:42\:35 PDT 2013
test=sun/tools/jstatd/TestJstatdPort.java
user.name=aurora
work=C\:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_tools\\JTwork\\sun\\tools\\jstatd

#section:script_messages
----------messages:(5/230)*----------
JDK under test: (C:\\Users\\aurora\\sandbox\\jdk)
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-langtools-nightly-h625-20131030-b114-b00)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b56, mixed mode)


#section:build
----------messages:(3/148)----------
command: build JstatdTest JstatGCUtilParser
reason: User specified action: run build JstatdTest JstatGCUtilParser 
elapsed time (seconds): 0.001
result: Passed. All files up to date

#section:build
----------messages:(3/102)----------
command: build TestJstatdPort
reason: Named class compiled on demand
elapsed time (seconds): 0.244
result: Passed. Build successful

#section:compile
----------messages:(3/211)*----------
command: compile -XDignore.symbol.file=true C:\\Users\\aurora\\sandbox\\testbase\\test\\sun\\tools\\jstatd\\TestJstatdPort.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.244
----------rerun:(22/2231)*----------
'PATH=C:\\Program Files\\Java\\jdk1.7.0_25\\bin;C:\\curl;C:\\mksnt\\bin64;C:\\mksnt\\bin;C:\\mksnt\\bin\\X11;C:\\mksnt\\mksnt;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Users\\aurora;' \\
SystemDrive=C: \\
'SystemRoot=C:\\Windows' \\
'TEMP=C:\\Users\\aurora\\AppData\\Local\\Temp' \\
'TMP=C:\\Users\\aurora\\AppData\\Local\\Temp' \\
'windir=C:\\Windows' \\
    'C:\\Users\\aurora\\sandbox\\jdk\\bin\\javac' \\
        -J-ea \\
        -J-esa \\
        -J-Xmx512m \\
        -J-Dtest.vm.opts='-ea -esa -Xmx512m' \\
        -J-Dcompile.jdk='C:\\Users\\aurora\\sandbox\\jdk' \\
        -J-Dtest.src.path='C:\\Users\\aurora\\sandbox\\testbase\\test\\sun\\tools\\jstatd;C:\\Users\\aurora\\sandbox\\testbase\\test\\lib\\testlibrary' \\
        -J-Dtest.src='C:\\Users\\aurora\\sandbox\\testbase\\test\\sun\\tools\\jstatd' \\
        -J-Dtest.tool.vm.opts='-J-ea -J-esa -J-Xmx512m' \\
        -J-Dtest.class.path='C:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_tools\\JTwork\\classes\\sun\\tools\\jstatd;C:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_tools\\JTwork\\classes\\lib\\testlibrary' \\
        -J-Dtest.classes='C:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_tools\\JTwork\\classes\\sun\\tools\\jstatd' \\
        -J-Dtest.class.path.prefix='C:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_tools\\JTwork\\classes\\sun\\tools\\jstatd;C:\\Users\\aurora\\sandbox\\testbase\\test\\sun\\tools\\jstatd' \\
        -J-Dtest.jdk='C:\\Users\\aurora\\sandbox\\jdk' \\
        -J-Dtest.java.opts= \\
        -J-Dtest.compiler.opts= \\
        -d 'C:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_tools\\JTwork\\classes\\sun\\tools\\jstatd' -classpath 'C:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_tools\\JTwork\\classes\\sun\\tools\\jstatd;C:\\Users\\aurora\\sandbox\\testbase\\test\\sun\\tools\\jstatd;C:\\Users\\aurora\\sandbox\\jdk\\lib\\tools.jar' -sourcepath 'C:\\Users\\aurora\\sandbox\\testbase\\test\\sun\\tools\\jstatd;C:\\Users\\aurora\\sandbox\\testbase\\test\\lib\\testlibrary' -XDignore.symbol.file=true 'C:\\Users\\aurora\\sandbox\\testbase\\test\\sun\\tools\\jstatd\\TestJstatdPort.java'
result: Passed. Compilation successful

#section:main
----------messages:(3/129)----------
command: main TestJstatdPort
reason: User specified action: run main/timeout=60 TestJstatdPort 
elapsed time (seconds): 7.503
----------rerun:(20/1822)*----------
'PATH=C:\\Program Files\\Java\\jdk1.7.0_25\\bin;C:\\curl;C:\\mksnt\\bin64;C:\\mksnt\\bin;C:\\mksnt\\bin\\X11;C:\\mksnt\\mksnt;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Users\\aurora;' \\
SystemDrive=C: \\
'SystemRoot=C:\\Windows' \\
'TEMP=C:\\Users\\aurora\\AppData\\Local\\Temp' \\
'TMP=C:\\Users\\aurora\\AppData\\Local\\Temp' \\
'windir=C:\\Windows' \\
    'C:\\Users\\aurora\\sandbox\\jdk\\bin\\java' \\
        -Dtest.vm.opts='-ea -esa -Xmx512m' \\
        -Dcompile.jdk='C:\\Users\\aurora\\sandbox\\jdk' \\
        -Dtest.src.path='C:\\Users\\aurora\\sandbox\\testbase\\test\\sun\\tools\\jstatd;C:\\Users\\aurora\\sandbox\\testbase\\test\\lib\\testlibrary' \\
        -Dtest.src='C:\\Users\\aurora\\sandbox\\testbase\\test\\sun\\tools\\jstatd' \\
        -Dtest.tool.vm.opts='-J-ea -J-esa -J-Xmx512m' \\
        -Dtest.class.path='C:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_tools\\JTwork\\classes\\sun\\tools\\jstatd;C:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_tools\\JTwork\\classes\\lib\\testlibrary' \\
        -Dtest.classes='C:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_tools\\JTwork\\classes\\sun\\tools\\jstatd' \\
        -Dtest.class.path.prefix='C:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_tools\\JTwork\\classes\\sun\\tools\\jstatd;C:\\Users\\aurora\\sandbox\\testbase\\test\\sun\\tools\\jstatd' \\
        -Dtest.jdk='C:\\Users\\aurora\\sandbox\\jdk' \\
        -Dtest.java.opts= \\
        -Dtest.compiler.opts= \\
        -classpath 'C:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_tools\\JTwork\\classes\\sun\\tools\\jstatd;C:\\Users\\aurora\\sandbox\\testbase\\test\\sun\\tools\\jstatd;C:\\Users\\aurora\\sandbox\\jdk\\lib\\tools.jar' \\
        TestJstatdPort
----------System.out:(33/1008)*----------

Start jstatd:
[C:\\Users\\aurora\\sandbox\\jdk\\bin\\jstatd.exe -J-XX:+UsePerfData -J-Djava.security.policy=C:\\Users\\aurora\\sandbox\\testbase\\test\\sun\\tools\\jstatd\\all.policy -p 58036]

Start jps:
[C:\\Users\\aurora\\sandbox\\jdk\\bin\\jps.exe -J-XX:+UsePerfData SC11136076:58036]
RMI Registry not available at SC11136076:58036
Connection refused to host: SC11136076; nested exception is: 
	java.net.ConnectException: Connection refused: connect

Waiting until jstatd is running...

Start jps:
[C:\\Users\\aurora\\sandbox\\jdk\\bin\\jps.exe -J-XX:+UsePerfData SC11136076:58036]
5968 Jstatd
4948 Jps
3244 Agent
3340 jtreg.jar

jstatd pid: 5968

Start jps:
[C:\\Users\\aurora\\sandbox\\jdk\\bin\\jps.exe -J-XX:+UsePerfData SC11136076:58036]
5968 Jstatd
1724 Jps
3244 Agent
3340 jtreg.jar


Start jstat:
[C:\\Users\\aurora\\sandbox\\jdk\\bin\\jstat.exe -J-XX:+UsePerfData -J-Duser.language=en -gcutil 5968@SC11136076:58036 250 5]
Could not read data for remote JVM 5968

----------System.err:(16/873)----------
java.lang.RuntimeException: Exit value 1 , expected to get 0
	at jdk.testlibrary.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:284)
	at JstatdTest.verifyJstatOutput(JstatdTest.java:239)
	at JstatdTest.runToolsAndVerify(JstatdTest.java:252)
	at JstatdTest.doTest(JstatdTest.java:350)
	at TestJstatdPort.main(TestJstatdPort.java:36)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:746)
	at java.lang.Thread.run(Thread.java:744)

JavaTest Message: Test threw exception: java.lang.RuntimeException
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Exit value 1 , expected to get 0


test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Exit value 1 , expected to get 0
Comments
URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/a5e61ab8c2d4 User: lana Date: 2015-05-13 21:19:45 +0000
13-05-2015

URL: http://hg.openjdk.java.net/jdk9/hs-rt/jdk/rev/a5e61ab8c2d4 User: ykantser Date: 2015-04-08 09:28:42 +0000
08-04-2015

Added rules from JDK-8037285 which has been closed as Duplicate of this one: RULE sun/tools/jstatd/TestJstatdServer.java Exception stderr: [sun.jvmstat.monitor.MonitorException: Could not read data for remote JVM ... RULE sun/tools/jstatd/TestJstatdPortAndServer.java Exception stderr: [sun.jvmstat.monitor.MonitorException: Could not read data for remote JVM ...
09-09-2014

After Staffan has fixed JDK-8028354 it's possible to see the original reason behind "Could not read data for remote JVM": ... ----------System.err:(36/2077)---------- stdout: []; stderr: [sun.jvmstat.monitor.MonitorException: Could not read data for remote JVM 269180 at sun.jvmstat.perfdata.monitor.protocol.rmi.PerfDataBuffer.<init>(PerfDataBuffer.java:68) at sun.jvmstat.perfdata.monitor.protocol.rmi.RemoteMonitoredVm.<init>(RemoteMonitoredVm.java:71) at sun.jvmstat.perfdata.monitor.protocol.rmi.MonitoredHostProvider.getMonitoredVm(MonitoredHostProvider.java:146) at sun.tools.jstat.Jstat.logSamples(Jstat.java:107) at sun.tools.jstat.Jstat.main(Jstat.java:70) Caused by: java.rmi.NoSuchObjectException: no such object in table at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162) at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194) at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148) at com.sun.proxy.$Proxy1.getCapacity(Unknown Source) at sun.jvmstat.perfdata.monitor.protocol.rmi.PerfDataBuffer.<init>(PerfDataBuffer.java:63) ... 4 more ] exitValue = 1 ... Aurora log: http://vmsqe-app.russia.sun.com/surl/aD The stack trace looks similar to one reported in JDK-8042215.
16-05-2014

Test sun/tools/jstatd/TestJstatdDefaults.java is failed with same issue RMI Registry not available at sc11d2107.us.oracle.com:1099 Connection refused to host: sc11d2107.us.oracle.com; nested exception is: java.net.ConnectException: Test run URL: http://aurora.ru.oracle.com/functional/faces/RunDetails.xhtml?names=381301.JAVASE.NIGHTLY.VM.RT_Baseline.2014-02-05-244&show-limit=0&filter= Host: sc11d2107, Sun Sparcv9 2848 MHz, 8 cores, 4G, Solaris / Solaris 11, sun4v Options:- d64 -server -Xmixed -XX:MaxRAMFraction=8 -XX:+CreateMinidumpOnCrash -XX:ReservedCodeCacheSize=256M
06-02-2014

Release team: Approved for deferral.
12-12-2013

RULE sun/tools/jstatd/TestJstatdExternalRegistry.java Exception java.lang.RuntimeException: Expected to get exit value of ...
03-12-2013

It doesn't seem the test does something wrong. It: 1) starts jstatd; 2) verifies the jstatd is up and running with help of jps; 3) runs jstat -gcutil; 4) verifies output from it. In this case jstat fails due to "Could not read data for remote JVM 5968". Unfortunately this information is not enough to figure out what has happened. I've opened JDK-8028354 to track this issue. Additionally I've rerun the test ~300 time on Windows 7 x86_64 machine but not managed to reproduce this failure.
14-11-2013

I've opened JDK-8027752 for the problem found by Alan, since it's a separate issue.
04-11-2013

ILW=MMH=P3, Lacking test coverage + produces noise, seems intermittent, no workaround
01-11-2013