Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8221303

sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.java fails due to java.rmi.server.ExportException: Port already in use

    Details

      Backports

        Description

        DEBUG: Running tests with SSL sockets.

        DEBUG: Launching java tester for triplet (HOSTNAME,JMX_PORT,RMI_PORT) == (10.133.184.204,9272,9273)
        ...
        DEBUG: Started 1 Process(es).

        DEBUG: Launching java tester for triplet (HOSTNAME,JMX_PORT,RMI_PORT) == (127.0.0.1,9272,9273)
        ...
        DEBUG: Started 2 Process(es).
        [JMX-Tester-127.0.0.1]:/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk13-jdk.664/linux-x64-debug.jdk/jdk-13/fastdebug/bin/java -cp /scratch/opt/mach5/mesos/work_dir/slaves/2dd962d0-8988-479b-a804-57ab764ada59-S1297/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8e378359-174d-4a57-b7de-73acdf3f17a0/runs/c9bd8830-4a23-4471-a78f-9b64fd5d6a4a/testOutput/test-support/jtreg_open_test_jdk_jdk_management/classes/1/sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.d:/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk13-jdk.664/src.full/open/test/jdk/sun/management/jmxremote/bootstrap:/scratch/opt/mach5/mesos/work_dir/slaves/2dd962d0-8988-479b-a804-57ab764ada59-S1297/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8e378359-174d-4a57-b7de-73acdf3f17a0/runs/c9bd8830-4a23-4471-a78f-9b64fd5d6a4a/testOutput/test-support/jtreg_open_test_jdk_jdk_management/classes/1/test/lib:/scratch/opt/mach5/mesos/work_dir/jib-master/install/java/re/jtreg/4.2/promoted/all/b14/bundles/jtreg_bin-4.2.zip/jtreg/lib/javatest.jar:/scratch/opt/mach5/mesos/work_dir/jib-master/install/java/re/jtreg/4.2/promoted/all/b14/bundles/jtreg_bin-4.2.zip/jtreg/lib/jtreg.jar -classpath /scratch/opt/mach5/mesos/work_dir/slaves/2dd962d0-8988-479b-a804-57ab764ada59-S1297/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8e378359-174d-4a57-b7de-73acdf3f17a0/runs/c9bd8830-4a23-4471-a78f-9b64fd5d6a4a/testOutput/test-support/jtreg_open_test_jdk_jdk_management/classes/1/sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.d -Dcom.sun.management.jmxremote.host=127.0.0.1 -Dcom.sun.management.jmxremote.port=9272 -Dcom.sun.management.jmxremote.rmi.port=9273 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=true -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.registry.ssl=true -Djavax.net.ssl.keyStore=/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk13-jdk.664/src.full/open/test/jdk/sun/management/jmxremote/bootstrap/ssl/keystore -Djavax.net.ssl.trustStore=/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk13-jdk.664/src.full/open/test/jdk/sun/management/jmxremote/bootstrap/ssl/truststore -Djavax.net.ssl.keyStorePassword=password -Djavax.net.ssl.trustStorePassword=trustword JMXAgentInterfaceBinding 127.0.0.1 9272 9273 true
        --- ProcessLog ---
        cmd: /scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk13-jdk.664/linux-x64-debug.jdk/jdk-13/fastdebug/bin/java -cp /scratch/opt/mach5/mesos/work_dir/slaves/2dd962d0-8988-479b-a804-57ab764ada59-S1297/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8e378359-174d-4a57-b7de-73acdf3f17a0/runs/c9bd8830-4a23-4471-a78f-9b64fd5d6a4a/testOutput/test-support/jtreg_open_test_jdk_jdk_management/classes/1/sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.d:/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk13-jdk.664/src.full/open/test/jdk/sun/management/jmxremote/bootstrap:/scratch/opt/mach5/mesos/work_dir/slaves/2dd962d0-8988-479b-a804-57ab764ada59-S1297/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8e378359-174d-4a57-b7de-73acdf3f17a0/runs/c9bd8830-4a23-4471-a78f-9b64fd5d6a4a/testOutput/test-support/jtreg_open_test_jdk_jdk_management/classes/1/test/lib:/scratch/opt/mach5/mesos/work_dir/jib-master/install/java/re/jtreg/4.2/promoted/all/b14/bundles/jtreg_bin-4.2.zip/jtreg/lib/javatest.jar:/scratch/opt/mach5/mesos/work_dir/jib-master/install/java/re/jtreg/4.2/promoted/all/b14/bundles/jtreg_bin-4.2.zip/jtreg/lib/jtreg.jar -classpath /scratch/opt/mach5/mesos/work_dir/slaves/2dd962d0-8988-479b-a804-57ab764ada59-S1297/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8e378359-174d-4a57-b7de-73acdf3f17a0/runs/c9bd8830-4a23-4471-a78f-9b64fd5d6a4a/testOutput/test-support/jtreg_open_test_jdk_jdk_management/classes/1/sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.d -Dcom.sun.management.jmxremote.host=127.0.0.1 -Dcom.sun.management.jmxremote.port=9272 -Dcom.sun.management.jmxremote.rmi.port=9273 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=true -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.registry.ssl=true -Djavax.net.ssl.keyStore=/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk13-jdk.664/src.full/open/test/jdk/sun/management/jmxremote/bootstrap/ssl/keystore -Djavax.net.ssl.trustStore=/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk13-jdk.664/src.full/open/test/jdk/sun/management/jmxremote/bootstrap/ssl/truststore -Djavax.net.ssl.keyStorePassword=password -Djavax.net.ssl.trustStorePassword=trustword JMXAgentInterfaceBinding 127.0.0.1 9272 9273 true
        exitvalue: 1
        stderr:
        stdout:

        [JMX-Tester-10.133.184.204] DEBUG: Running test for triplet (hostname,jmxPort,rmiPort) = (10.133.184.204,9272,9273), useSSL = true
        [JMX-Tester-10.133.184.204] JMXConnectorThread: Attempting JMX connection on: 10.133.184.204 on port 9272
        [JMX-Tester-10.133.184.204] JMXConnectorThread: connection to JMX worked
        [JMX-Tester-10.133.184.204] JMXConnectorThread: connection to rmi socket worked host/port = 10.133.184.204/9273
        [JMX-Tester-10.133.184.204] MainThread: Finished waiting for JMX agent to become available: expired == false
        [JMX-Tester-10.133.184.204] MainThread: Ready for connections
        DEBUG: Found expected READY_MSG.
        [JMX-Tester-10.133.184.204] MainThread: Cooperative Exit
        --- ProcessLog ---
        cmd: /scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk13-jdk.664/linux-x64-debug.jdk/jdk-13/fastdebug/bin/java -cp /scratch/opt/mach5/mesos/work_dir/slaves/2dd962d0-8988-479b-a804-57ab764ada59-S1297/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8e378359-174d-4a57-b7de-73acdf3f17a0/runs/c9bd8830-4a23-4471-a78f-9b64fd5d6a4a/testOutput/test-support/jtreg_open_test_jdk_jdk_management/classes/1/sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.d:/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk13-jdk.664/src.full/open/test/jdk/sun/management/jmxremote/bootstrap:/scratch/opt/mach5/mesos/work_dir/slaves/2dd962d0-8988-479b-a804-57ab764ada59-S1297/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8e378359-174d-4a57-b7de-73acdf3f17a0/runs/c9bd8830-4a23-4471-a78f-9b64fd5d6a4a/testOutput/test-support/jtreg_open_test_jdk_jdk_management/classes/1/test/lib:/scratch/opt/mach5/mesos/work_dir/jib-master/install/java/re/jtreg/4.2/promoted/all/b14/bundles/jtreg_bin-4.2.zip/jtreg/lib/javatest.jar:/scratch/opt/mach5/mesos/work_dir/jib-master/install/java/re/jtreg/4.2/promoted/all/b14/bundles/jtreg_bin-4.2.zip/jtreg/lib/jtreg.jar -classpath /scratch/opt/mach5/mesos/work_dir/slaves/2dd962d0-8988-479b-a804-57ab764ada59-S1297/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8e378359-174d-4a57-b7de-73acdf3f17a0/runs/c9bd8830-4a23-4471-a78f-9b64fd5d6a4a/testOutput/test-support/jtreg_open_test_jdk_jdk_management/classes/1/sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.d -Dcom.sun.management.jmxremote.host=10.133.184.204 -Dcom.sun.management.jmxremote.port=9272 -Dcom.sun.management.jmxremote.rmi.port=9273 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=true -Djava.rmi.server.hostname=10.133.184.204 -Dcom.sun.management.jmxremote.registry.ssl=true -Djavax.net.ssl.keyStore=/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk13-jdk.664/src.full/open/test/jdk/sun/management/jmxremote/bootstrap/ssl/keystore -Djavax.net.ssl.trustStore=/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk13-jdk.664/src.full/open/test/jdk/sun/management/jmxremote/bootstrap/ssl/truststore -Djavax.net.ssl.keyStorePassword=password -Djavax.net.ssl.trustStorePassword=trustword JMXAgentInterfaceBinding 10.133.184.204 9272 9273 true
        exitvalue: 10
        stderr:
        stdout:

        DEBUG: OK. Spawned java process terminated with expected exit code of 10
        ----------System.err:(137/10698)----------
        [JMX-Tester-10.133.184.204] DEBUG: MainThread: actualTerm: 'Exit: 10'
        java.io.IOException: Stream closed
        at java.base/java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:176)
        at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:342)
        at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
        at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
        at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:107)
        at jdk.test.lib.process.StreamPumper.run(StreamPumper.java:109)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.lang.Thread.run(Thread.java:835)
        java.io.IOException: Stream closed
        at java.base/java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:176)
        at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:342)
        at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
        at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
        at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:107)
        at jdk.test.lib.process.StreamPumper.run(StreamPumper.java:109)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.lang.Thread.run(Thread.java:835)
        [JMX-Tester-127.0.0.1] DEBUG: MainThread: actualTerm: 'Exit: 10'
        java.io.IOException: Stream closed
        at java.base/java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:176)
        at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:342)
        at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
        at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
        at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:107)
        at jdk.test.lib.process.StreamPumper.run(StreamPumper.java:109)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.lang.Thread.run(Thread.java:835)
        java.io.IOException: Stream closed
        at java.base/java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:176)
        at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:342)
        at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
        at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
        at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:107)
        at jdk.test.lib.process.StreamPumper.run(StreamPumper.java:109)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.lang.Thread.run(Thread.java:835)
        PROBLEM: JMX agent of target JVM did not start as it should.
        [JMX-Tester-127.0.0.1] Error: JMX connector server communication error: service:jmx:rmi://127.0.0.1:9273
        [JMX-Tester-127.0.0.1] jdk.internal.agent.AgentConfigurationError: java.rmi.server.ExportException: Port already in use: 9273; nested exception is:
        [JMX-Tester-127.0.0.1] java.net.BindException: Address already in use (Bind failed)
        [JMX-Tester-127.0.0.1] at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.exportMBeanServer(ConnectorBootstrap.java:820)
        [JMX-Tester-127.0.0.1] at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:479)
        [JMX-Tester-127.0.0.1] at jdk.management.agent/jdk.internal.agent.Agent.startAgent(Agent.java:447)
        [JMX-Tester-127.0.0.1] at jdk.management.agent/jdk.internal.agent.Agent.startAgent(Agent.java:599)
        [JMX-Tester-127.0.0.1] Caused by: java.rmi.server.ExportException: Port already in use: 9273; nested exception is:
        [JMX-Tester-127.0.0.1] java.net.BindException: Address already in use (Bind failed)
        [JMX-Tester-127.0.0.1] at java.rmi/sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:335)
        [JMX-Tester-127.0.0.1] at java.rmi/sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:243)
        [JMX-Tester-127.0.0.1] at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:411)
        [JMX-Tester-127.0.0.1] at java.rmi/sun.rmi.transport.LiveRef.exportObject(LiveRef.java:147)
        [JMX-Tester-127.0.0.1] at java.rmi/sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:233)
        [JMX-Tester-127.0.0.1] at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap$PermanentExporter.exportObject(ConnectorBootstrap.java:203)
        [JMX-Tester-127.0.0.1] at java.management.rmi/javax.management.remote.rmi.RMIJRMPServerImpl.export(RMIJRMPServerImpl.java:153)
        [JMX-Tester-127.0.0.1] at java.management.rmi/javax.management.remote.rmi.RMIJRMPServerImpl.export(RMIJRMPServerImpl.java:138)
        [JMX-Tester-127.0.0.1] at java.management.rmi/javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:473)
        [JMX-Tester-127.0.0.1] at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.exportMBeanServer(ConnectorBootstrap.java:816)
        [JMX-Tester-127.0.0.1] ... 3 more
        [JMX-Tester-127.0.0.1] Caused by: java.net.BindException: Address already in use (Bind failed)
        [JMX-Tester-127.0.0.1] at java.base/java.net.PlainSocketImpl.socketBind(Native Method)
        [JMX-Tester-127.0.0.1] at java.base/java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:440)
        [JMX-Tester-127.0.0.1] at java.base/java.net.ServerSocket.bind(ServerSocket.java:386)
        [JMX-Tester-127.0.0.1] at java.base/java.net.ServerSocket.<init>(ServerSocket.java:249)
        [JMX-Tester-127.0.0.1] at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap$SslServerSocket.<init>(ConnectorBootstrap.java:1009)
        [JMX-Tester-127.0.0.1] at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap$HostAwareSslSocketFactory.createServerSocket(ConnectorBootstrap.java:935)
        [JMX-Tester-127.0.0.1] at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:666)
        [JMX-Tester-127.0.0.1] at java.rmi/sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:324)
        [JMX-Tester-127.0.0.1] ... 12 more

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dtitov Daniil Titov
                  Reporter:
                  fyuan Frank Yuan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: