flume报错客户机无法正常启动

博客详细记录了在启动Flume时遇到的`FlumeException`,指出由于配置错误导致服务器socket无法正常设置。问题根源在于`avro-logger.txt`文件存在两处错误:文件名应更改为`avro-logger.conf`,以及配置文件中的源和接收端口设置不正确。修复这两处错误后,Flume成功启动并恢复正常运行。

Exception follows.
org.apache.flume.FlumeException: Failed to set up server socket
at org.apache.flume.source.AvroSource.start(AvroSource.java:248)
at org.apache.flume.source.EventDrivenSourceRunner.start(EventDrivenSourceRunner.java:44)
at org.apache.flume.lifecycle.LifecycleSupervisorMonitorRunnable.run(LifecycleSupervisor.java:249)atjava.util.concurrent.ExecutorsMonitorRunnable.run(LifecycleSupervisor.java:249) at java.util.concurrent.ExecutorsMonitorRunnable.run(LifecycleSupervisor.java:249)atjava.util.concurrent.ExecutorsRunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access301(ScheduledThreadPoolExecutor.java:180)atjava.util.concurrent.ScheduledThreadPoolExecutor301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor301(ScheduledThreadPoolExecutor.java:180)atjava.util.concurrent.ScheduledThreadPoolExecutorScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutorWorker.run(ThreadPoolExecutor.java:624)atjava.lang.Thread.run(Thread.java:748)Causedby:org.jboss.netty.channel.ChannelException:Failedtobindto:bigdata03/192.168.52.223:52020atorg.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)atorg.apache.avro.ipc.NettyServer.<init>(NettyServer.java:106)atorg.apache.flume.source.AvroSource.start(AvroSource.java:243)...9moreCausedby:java.net.BindException:Cannotassignrequestedaddressatsun.nio.ch.Net.bind0(NativeMethod)atsun.nio.ch.Net.bind(Net.java:433)atsun.nio.ch.Net.bind(Net.java:425)atsun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)atsun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)atorg.jboss.netty.channel.socket.nio.NioServerBossWorker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: bigdata03/192.168.52.223:52020 at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) at org.apache.avro.ipc.NettyServer.<init>(NettyServer.java:106) at org.apache.flume.source.AvroSource.start(AvroSource.java:243) ... 9 more Caused by: java.net.BindException: Cannot assign requested address at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:433) at sun.nio.ch.Net.bind(Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) at org.jboss.netty.channel.socket.nio.NioServerBossWorker.run(ThreadPoolExecutor.java:624)atjava.lang.Thread.run(Thread.java:748)Causedby:org.jboss.netty.channel.ChannelException:Failedtobindto:bigdata03/192.168.52.223:52020atorg.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)atorg.apache.avro.ipc.NettyServer.<init>(NettyServer.java:106)atorg.apache.flume.source.AvroSource.start(AvroSource.java:243)...9moreCausedby:java.net.BindException:Cannotassignrequestedaddressatsun.nio.ch.Net.bind0(NativeMethod)atsun.nio.ch.Net.bind(Net.java:433)atsun.nio.ch.Net.bind(Net.java:425)atsun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)atsun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)atorg.jboss.netty.channel.socket.nio.NioServerBossRegisterTask.run(NioServerBoss.java:193)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296)
at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)

今天反复一台客户机报错,检查之后,发现是
avro-logger.txt有2处错误:
1.avro-logger.txt 修改为:avro-logger.conf;
2.配置错误,按照以下配置更新后
a1.sources = r1
a1.sinks = k1
a1.channels = c1

a1.sources.r1.type = avro
a1.sources.r1.channels = c1
a1.sources.r1.bind = bigdata03
a1.sources.r1.port = 52020

a1.sinks.k1.type = logger
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1

果然又恢复了正常

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值