telnet: connect to address xxxxxxxxxxx: Connection refused

来源:4-19 Flume自定义拦截器功能测试

酱汁怪兽

2021-11-24

通过以下命令,查看了44444端口,只有本机才能telnet连接
[root@spark000 ~]# netstat -nultp
tcp6 0 0 127.0.0.1:44444 :::* LISTEN 7673/java

所以,spark000这个ip地址是telnet不通的
[root@spark000 ~]# telnet spark000 44444
Trying xxxxxxxxxxx
telnet: connect to address xxxxxxxxxxx: Connection refused

是因为在配置flume01.conf时,配置的localhost的原因吧??????
#通过netcat、本机以及44444端口来接收数据
a1.sources.r1.type = netcat
a1.sources.r1.bind = localhost
a1.sources.r1.port = 44444

所以,依次启动了flume03、flume02、flume01后,
我只能在flume03上,看到了gifshow、pk等信息的接收
在flume02上,看到了imooc信息的接收
在flume01上,无信息接收

这样的理解是对的吗?

现在,我要在flume01看到信息的加载过程,将上述的localhost改为spark000,可以这样修改吗?

写回答

1回答

Michael_PK

2021-11-24

localhost这么写,其他地方进来可能有影响, 可以用0.0.0.0

0
0

Spark3实时处理-Streaming+StructuredStreaming实战

实战Spark3实时处理,掌握两套企业级处理方案

340 学习 · 238 问题

查看课程