0
votes

this is the error appears on console on my aws instance.

2014-08-09 12:22:41,803 (lifecycleSupervisor-1-2) [INFO -org.apache.flume.source.AvroSource.start(AvroSource.java:142)] Starting Avro source fromLocal: { bindAddress: ec2-54-221-143-114.compute-1.amazonaws.com, port: 44444 }... 2014-08-09 12:22:42,072 (lifecycleSupervisor-1-1) [WARN - org.apache.flume.sink.AvroSink.start(AvroSink.java:244)] Unable to create avro client using hostname: ec2-54-221-143-114.compute-1.amazonaws.com, port: 41414 org.apache.flume.FlumeException: NettyAvroRpcClient { host: ec2-54-221-143-114.compute-1.amazonaws.com, port: 41414 }: RPC connection error at org.apache.flume.api.NettyAvroRpcClient.connect(NettyAvroRpcClient.java:117) at org.apache.flume.api.NettyAvroRpcClient.connect(NettyAvroRpcClient.java:93) at org.apache.flume.api.NettyAvroRpcClient.configure(NettyAvroRpcClient.java:514) at org.apache.flume.api.RpcClientFactory.getInstance(RpcClientFactory.java:88) at org.apache.flume.sink.AvroSink.createConnection(AvroSink.java:182) at org.apache.flume.sink.AvroSink.start(AvroSink.java:242) at org.apache.flume.sink.DefaultSinkProcessor.start(DefaultSinkProcessor.java:46) at org.apache.flume.SinkRunner.start(SinkRunner.java:79) at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:236) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: java.io.IOException: Error connecting to ec2-54-221-143-114.compute-1.amazonaws.com/10.80.54.114:41414 at org.apache.avro.ipc.NettyTransceiver.getChannel(NettyTransceiver.java:261) at org.apache.avro.ipc.NettyTransceiver.(NettyTransceiver.java:203) at org.apache.avro.ipc.NettyTransceiver.(NettyTransceiver.java:152) at org.apache.flume.api.NettyAvroRpcClient.connect(NettyAvroRpcClient.java:106) ... 15 more Caused by: java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.connect(NioClientSocketPipelineSink.java:401) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processSelectedKeys(NioClientSocketPipelineSink.java:370) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:292)

1

1 Answers

0
votes

Run flume agent with Avro Source on your local machine first, then run the flume agent with avro sink. The reason is that Avro Source starts the Avro RPC Server binded at given IP and port. Avro Sink is a avro rpc client that listens to Avro RPC Server and sends the flume events to it.