TESTFAIL:java/rmi/activation/ActivationSystem/stubClassesPermitted/StubClassesPermitted.java
java/rmi/activation/ActivationSystem/stubClassesPermitted/StubClassesPermitted.java fails intermittently due to "Port already in use".
As TestLibrary is also used by other rmi tests, same issue also happened to other rmi tests as reported in JDK-8049309, JDK-8043707
RMID: starting rmid on port #45001...
...
...
RMID: rmid not started, will retry for 9900ms
RMID: rmid not started, will retry for 9800ms
Activation.main: an exception occurred: java.rmi.server.ExportException: Port already in use: 45001; nested exception is:
java.net.BindException: Address already in use
java.rmi.server.ExportException: Port already in use: 45001; nested exception is:
java.net.BindException: Address already in use
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:326)
at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:234)
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:411)
at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:147)
at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:206)
at sun.rmi.server.Activation$ActivatorImpl.<init>(Activation.java:428)
at sun.rmi.server.Activation.init(Activation.java:250)
at sun.rmi.server.Activation.startActivation(Activation.java:219)
at sun.rmi.server.Activation.main(Activation.java:2111)
Caused by: java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:382)
at java.net.ServerSocket.bind(ServerSocket.java:376)
at java.net.ServerSocket.<init>(ServerSocket.java:238)
at java.net.ServerSocket.<init>(ServerSocket.java:130)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:45)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:341)
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:666)
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:315)
... 8 more
RMID: rmid not started, will retry for 9700ms
...
...
RMID: rmid not started, will retry for 100ms
TEST FAILED: start rmid failed... giving up
TEST FAILED:
Test failed with: TEST FAILED: start rmid failed... giving up
TestFailedException: TEST FAILED: start rmid failed... giving up
at TestLibrary.bomb(TestLibrary.java:121)
at RMID.start(RMID.java:290)
at RMID.start(RMID.java:219)
at StubClassesPermitted.main(StubClassesPermitted.java:91)
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:484)
at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
at java.lang.Thread.run(Thread.java:745)
ACTIVATION_LIBRARY: tried to shutdown when rmid was not running
TEST FAILED: rmid not destroyed in: 60000 milliseconds
TestFailedException: TEST FAILED: rmid not destroyed in: 60000 milliseconds
at TestLibrary.bomb(TestLibrary.java:121)
at TestLibrary.bomb(TestLibrary.java:124)
at ActivationLibrary.rmidCleanup(ActivationLibrary.java:111)
at StubClassesPermitted.main(StubClassesPermitted.java:174)
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:484)
at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
at java.lang.Thread.run(Thread.java:745)