On my RH 6.2 system,
org.apache.flume.api.TestNettyAvroRpcClient.testServerDisconnect is
flaky. Has anyone else seen this?

When it runs successfully, I get the error past the break. However,
once in a while I get the following and the test hangs forever:

2012-03-30 20:00:52,699 (main) [INFO -
org.apache.flume.api.RpcTestUtils.startServer(RpcTestUtils.java:117)]
Server started on hostname: localhost, port: 51859
2012-03-30 20:00:53,002 (New I/O server boss #52 ([id: 0x74893969,
/127.0.0.1:51859])) [INFO -
org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.handleUpstream(NettyServer.java:123)]
[id: 0x4548e798, /127.0.0.1:33810 => /127.0.0.1:51859] OPEN
2012-03-30 20:00:53,003 (main) [INFO -
org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.handleUpstream(NettyServer.java:123)]
[id: 0x4548e798, /127.0.0.1:33810 :> /127.0.0.1:51859] DISCONNECTED
2012-03-30 20:00:53,003 (main) [INFO -
org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.handleUpstream(NettyServer.java:123)]
[id: 0x4548e798, /127.0.0.1:33810 :> /127.0.0.1:51859] UNBOUND
2012-03-30 20:00:53,003 (main) [INFO -
org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.handleUpstream(NettyServer.java:123)]
[id: 0x4548e798, /127.0.0.1:33810 :> /127.0.0.1:51859] CLOSED
2012-03-30 20:00:53,003 (New I/O server worker #52-1) [INFO -
org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.handleUpstream(NettyServer.java:123)]
[id: 0x4548e798, /127.0.0.1:33810 :> /127.0.0.1:51859] BOUND:
/127.0.0.1:51859
2012-03-30 20:00:53,004 (New I/O server worker #52-1) [INFO -
org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.handleUpstream(NettyServer.java:123)]
[id: 0x4548e798, /127.0.0.1:33810 :> /127.0.0.1:51859] CONNECTED:
/127.0.0.1:33810

What a successful run looks like:

2012-03-30 20:00:51,283 (main) [INFO -
org.apache.flume.api.RpcTestUtils.startServer(RpcTestUtils.java:117)]
Server started on hostname: localhost, port: 39090
2012-03-30 20:00:51,585 (New I/O server boss #51 ([id: 0x0daa0e3b,
/127.0.0.1:39090])) [INFO -
org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.handleUpstream(NettyServer.java:123)]
[id: 0x2967c5e3, /127.0.0.1:50540 => /127.0.0.1:39090] OPEN
2012-03-30 20:00:51,586 (main) [INFO -
org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.handleUpstream(NettyServer.java:123)]
[id: 0x2967c5e3, /127.0.0.1:50540 :> /127.0.0.1:39090] DISCONNECTED
2012-03-30 20:00:51,586 (main) [INFO -
org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.handleUpstream(NettyServer.java:123)]
[id: 0x2967c5e3, /127.0.0.1:50540 :> /127.0.0.1:39090] UNBOUND
2012-03-30 20:00:51,586 (main) [INFO -
org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.handleUpstream(NettyServer.java:123)]
[id: 0x2967c5e3, /127.0.0.1:50540 :> /127.0.0.1:39090] CLOSED
2012-03-30 20:00:51,586 (New I/O server worker #51-1) [INFO -
org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.handleUpstream(NettyServer.java:123)]
[id: 0x2967c5e3, /127.0.0.1:50540 :> /127.0.0.1:39090] BOUND:
/127.0.0.1:39090
2012-03-30 20:00:51,587 (New I/O server worker #51-1) [INFO -
org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.handleUpstream(NettyServer.java:123)]
[id: 0x2967c5e3, /127.0.0.1:50540 :> /127.0.0.1:39090] CONNECTED:
/127.0.0.1:50540
2012-03-30 20:00:51,688 (main) [ERROR -
org.apache.flume.api.NettyAvroRpcClient.append(NettyAvroRpcClient.java:171)]
RPC request IO exception.
java.io.IOException: Error connecting to localhost/127.0.0.1:39090
        at 
org.apache.avro.ipc.NettyTransceiver.getChannel(NettyTransceiver.java:250)
        at 
org.apache.avro.ipc.NettyTransceiver.getRemoteName(NettyTransceiver.java:358)
        at org.apache.avro.ipc.Requestor.writeHandshake(Requestor.java:202)
        at org.apache.avro.ipc.Requestor.access$300(Requestor.java:52)
        at org.apache.avro.ipc.Requestor$Request.getBytes(Requestor.java:478)
        at org.apache.avro.ipc.Requestor.request(Requestor.java:147)
        at org.apache.avro.ipc.Requestor.request(Requestor.java:129)
        at 
org.apache.avro.ipc.specific.SpecificRequestor.invoke(SpecificRequestor.java:68)
        at $Proxy6.append(Unknown Source)
        at 
org.apache.flume.api.NettyAvroRpcClient.append(NettyAvroRpcClient.java:169)
        at 
org.apache.flume.api.NettyAvroRpcClient.append(NettyAvroRpcClient.java:149)
        at 
org.apache.flume.api.TestNettyAvroRpcClient.testServerDisconnect(TestNettyAvroRpcClient.java:145)
        at 
org.apache.flume.api.TestNettyAvroRpcClient.testTest(TestNettyAvroRpcClient.java:116)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
        at 
org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.connect(NioClientSocketPipelineSink.java:384)
        at 
org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processSelectedKeys(NioClientSocketPipelineSink.java:354)
        at 
org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:276)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
org.apache.flume.EventDeliveryException: RPC request IO exception.
Exception follows.
        at 
org.apache.flume.api.NettyAvroRpcClient.append(NettyAvroRpcClient.java:172)
        at 
org.apache.flume.api.NettyAvroRpcClient.append(NettyAvroRpcClient.java:149)
        at 
org.apache.flume.api.TestNettyAvroRpcClient.testServerDisconnect(TestNettyAvroRpcClient.java:145)
        at 
org.apache.flume.api.TestNettyAvroRpcClient.testTest(TestNettyAvroRpcClient.java:116)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.io.IOException: Error connecting to localhost/127.0.0.1:39090
        at 
org.apache.avro.ipc.NettyTransceiver.getChannel(NettyTransceiver.java:250)
        at 
org.apache.avro.ipc.NettyTransceiver.getRemoteName(NettyTransceiver.java:358)
        at org.apache.avro.ipc.Requestor.writeHandshake(Requestor.java:202)
        at org.apache.avro.ipc.Requestor.access$300(Requestor.java:52)
        at org.apache.avro.ipc.Requestor$Request.getBytes(Requestor.java:478)
        at org.apache.avro.ipc.Requestor.request(Requestor.java:147)
        at org.apache.avro.ipc.Requestor.request(Requestor.java:129)
        at 
org.apache.avro.ipc.specific.SpecificRequestor.invoke(SpecificRequestor.java:68)
        at $Proxy6.append(Unknown Source)
        at 
org.apache.flume.api.NettyAvroRpcClient.append(NettyAvroRpcClient.java:169)
        ... 26 more
Caused by: java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
        at 
org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.connect(NioClientSocketPipelineSink.java:384)
        at 
org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processSelectedKeys(NioClientSocketPipelineSink.java:354)
        at 
org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:276)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

Reply via email to