Flume启动日志控制台出错

问题遇到的现象和发生背景

以下代码完全按照林子雨编著《大数据基础编程、实验和案例教程》课本实施

问题相关代码,请勿粘贴截图

flume为1.7.0版本。jave为1.8版本

~/.bashrc配置如下

img

修改配置文件flume-env.sh

img

启动flume

cd /usr/local/flume
./bin/flume-ng version

img

使用Flume 接收来自AvroSource的信息
在/usr/local/flume/conf/avro.conf写入以下内容

#example.conf: A single-node Flume configuration
# Name the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# Describe/configure the source
a1.sources.r1.type = netcat
a1.sources.r1.bind = localhost
a1.sources.r1.port = 44444  #记住该端口号,后面会用到
# Describe the sink
a1.sinks.k1.type = logger
# Use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100
# Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
运行结果及报错内容

运行

/usr/local/flume/bin/flume-ng agent --conf ./conf --conf-file ./example.conf --name a1 -Dflume.root.logger=INFO,console

报错

img

在令一个端口写入hello world.

cd /usr/local/flume
sudo sh -c 'echo "hello world" > /usr/local/flume/log.00'

再建一个端口

cd /usr/local/flume
./bin/flume-ng avro-client --conf conf -H localhost -p 4141 -F /usr/local/flume/log.00

img


这里也有出现错误

我的解答思路和尝试过的方法

flume启动成功但在运行案例时出错。总共出现了两个错误把 在网上查了很久都没法解决,安全是按照书本来的,网上有说是source配置出错,但检查了没出错啊。

我想要达到的结果

希望有会的可以帮下 能正常运行案例!这是实验报告来的 谢谢啦!可以给个详细解决方法~谢谢

你好,我是有问必答小助手,非常抱歉,本次您提出的有问必答问题,技术专家团超时未为您做出解答


本次提问扣除的有问必答次数,已经为您补发到账户,我们后续会持续优化,扩大我们的服务范围,为您带来更好地服务。