欢迎您访问365答案网,请分享给你的朋友!
生活常识 学习资料

报错解决:Flume实现多节点AvroSource报错

时间:2023-04-20

实操背景:其实很简单,就是想要使用 Avro Source ,在 master 上启动 Flume 的 Agent ,然后让 slave1 节点发送信息过来,让 master 采集到。

有小伙伴报了以下错误:

org.apache.flume.FlumeException: Failed to set up server socketat org.apache.flume.source.AvroSource.start(AvroSource.java:248)at org.apache.flume.source.EventDrivenSourceRunner.start(EventDrivenSourceRunner.java:44)at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:249)at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)at java.lang.Thread.run(Thread.java:748)Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: /192.168.128.132:4141at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)at org.apache.avro.ipc.NettyServer.(NettyServer.java:106)at org.apache.flume.source.AvroSource.start(AvroSource.java:243)..、9 moreCaused by: java.net.BindException: Cannot assign requested addressat sun.nio.ch.Net.bind0(Native Method)


打开 slave1
启动 avro-client ,报错如下:

22/02/25 16:31:26 WARN api.NettyAvroRpcClient: Using default maxIOWorkers22/02/25 16:31:26 ERROR avro.AvroCLIClient: Unable to open connection to Flume、Exception follows.org.apache.flume.FlumeException: NettyAvroRpcClient { host: master, port: 4141 }: RPC connection errorat org.apache.flume.api.NettyAvroRpcClient.connect(NettyAvroRpcClient.java:181)at org.apache.flume.api.NettyAvroRpcClient.connect(NettyAvroRpcClient.java:120)at org.apache.flume.api.NettyAvroRpcClient.configure(NettyAvroRpcClient.java:638)

解决办法:
1、检查 master 的配置,ip地址和端口是否配置错了,应该配的是监听自己 master 的ip地址和端口。
2、先启动Agent,再启动 avro-client 就可以了。

就这样,完美解决,Nice!!!

Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:

部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。