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

sun/management/jmxremote/startstop/JMXStartStopTest.java fails with java.lang.Exception: Starting agent on port ... should report port in use

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • 9
    • 9
    • core-svc

      Test sun/management/jmxremote/startstop/JMXStartStopTest.java fails with "java.lang.Exception: Starting agent on port ... should report port in use".

      Log:

      **** Test six ****
      Command line: [C:\\local\\aurora\\CommonData\\jdk\\bin\\java.exe -cp C:\\local\\aurora\\sandbox\\results\\workDir\\classes\\sun\\management\\jmxremote\\startstop;C:\\local\\aurora\\sandbox\\results\\workDir\\classes\\lib\\testlibrary JMXStartStopDoSomething ]
      [JMXStartStopDoSomething]:C:\\local\\aurora\\CommonData\\jdk\\bin\\java.exe -cp C:\\local\\aurora\\sandbox\\results\\workDir\\classes\\sun\\management\\jmxremote\\startstop;C:\\local\\aurora\\sandbox\\results\\workDir\\classes\\lib\\testlibrary JMXStartStopDoSomething
      [JMXStartStopDoSomething] main enter
      [jcmd]:C:\\local\\aurora\\CommonData\\jdk\\bin\\jcmd.exe JMXStartStopDoSomething ManagementAgent.start jmxremote.port=49708 jmxremote.authenticate=false jmxremote.ssl=false
      [jcmd] 22880:
      [jcmd] Command executed successfully
      [jcmd]:C:\\local\\aurora\\CommonData\\jdk\\bin\\jcmd.exe JMXStartStopDoSomething ManagementAgent.start jmxremote.port=49708 jmxremote.authenticate=false jmxremote.ssl=false
      [jcmd] 22880:
      [jcmd]:C:\\local\\aurora\\CommonData\\jdk\\bin\\jcmd.exe JMXStartStopDoSomething ManagementAgent.start jmxremote.port=49709 jmxremote.authenticate=false jmxremote.ssl=false
      [jcmd] 22880:
      [jcmd]:C:\\local\\aurora\\CommonData\\jdk\\bin\\jcmd.exe JMXStartStopDoSomething ManagementAgent.stop
      [jcmd] 22880:
      [jcmd] Command executed successfully
      [jcmd]:C:\\local\\aurora\\CommonData\\jdk\\bin\\jcmd.exe JMXStartStopDoSomething ManagementAgent.stop
      [jcmd] 22880:
      [jcmd] Command executed successfully
      [jcmd]:C:\\local\\aurora\\CommonData\\jdk\\bin\\jcmd.exe JMXStartStopDoSomething ManagementAgent.start jmxremote.port=49715 jmxremote.rmi.port=49709 jmxremote.authenticate=false jmxremote.ssl=false
      [match] 22880: => false
      [jcmd] 22880:
      [match] java.lang.RuntimeException: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 49715; nested exception is: java.net.BindException: Address already in use: NET_Bind => true
      [JMXStartStopDoSomething] read: 0
      [JMXStartStopDoSomething] main exit
      (took 7493ms)

      ...

      ----------System.err:(35/2299)----------
      [jcmd] java.lang.RuntimeException: Invalid agent state: Agent already started
      [jcmd] java.lang.RuntimeException: Invalid agent state: Agent already started
      [jcmd] java.lang.RuntimeException: Invalid agent state: Agent already started
      [JMXStartStopDoSomething] Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 49715; nested exception is:
      [JMXStartStopDoSomething] java.net.BindException: Address already in use: NET_Bind
      [jcmd] java.lang.RuntimeException: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 49715; nested exception is: java.net.BindException: Address already in use: NET_Bind
      test_06 failed
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at JMXStartStopTest.main(JMXStartStopTest.java:295)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.Exception: Starting agent on port 49715 should report port in use
      at JMXStartStopTest.test_06(JMXStartStopTest.java:655)
      ... 11 more
      java.lang.Error
      at JMXStartStopTest.main(JMXStartStopTest.java:310)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
      at java.lang.Thread.run(Thread.java:745)

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

            jbachorik Jaroslav BachorĂ­k
            ykantser Yekaterina Kantserova (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: