flume error is not specified port

Port Unspecified error

2019-12-28 11:27:44,246 (conf-file-poller-0) [INFO - org.apache.flume.sink.DefaultSinkFactory.create(DefaultSinkFactory.java:42)] Creating instance of sink: k1, type: avro
2019-12-28 11:27:44,252 (conf-file-poller-0) [ERROR - org.apache.flume.node.AbstractConfigurationProvider.loadSinks(AbstractConfigurationProvider.java:469)] Sink k1 has been removed due to an error during configuration
java.lang.IllegalStateException: No port specified
at com.google.common.base.Preconditions.checkState(Preconditions.java:145)
at org.apache.flume.sink.AbstractRpcSink.configure(AbstractRpcSink.java:172)
at org.apache.flume.conf.Configurables.configure(Configurables.java:41)
at org.apache.flume.node.AbstractConfigurationProvider.loadSinks(AbstractConfigurationProvider.java:453)
at org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:106)
at org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:145)

Profiles

# 五大步骤 主机1 通过选择器 发送到2个channel中 两个channel下沉到不同的另外两台主机中
#本脚本运行在t1主机中

#1. 定义这个agent中各组件的名字
a1.sources = s1
a1.channels = c1 c2
a1.sinks = k1 k2

# 2. 描述和配置source组件:s1
a1.sources.s1.type = exec
a1.sources.s1.command = tail -F /root/app/flumeData/a.log

#关键步骤 复制数据选择器
a1.sources.s1.selector.type = replicating


# 3. 描述和配置channel组件,此处使用是内存缓存的方式
a1.channels.c1.type = memory
a1.channels.c2.type = memory

# 4. 描述和配置sink组件:向哪里发送 指明主机和端口 
a1.sinks.k1.type = avro
a1.sinks.k1.hostname = t2
#a1.sinks.k1.type = 8888 导致重大错误
#a1.sinks.k1.port = 8888


a1.sinks.k2.type = avro
a1.sinks.k2.hostname = t3
#a1.sinks.k2.type = 8888 导致重大错误
#a1.sinks.k2.port = 8888


#5.组件关联
a1.sources.s1.channels = c1 c2
a1.sinks.k1.channel = c1
a1.sinks.k2.channel = c2

the reason

Ports are comments
#a1.sinks.k1.port = 8888

If you think my article useful for you, please feel free to point praise. Your support will encourage me to continue to create!
I heard that, I point like people eventually find true love!

I heard thumbs up on me, I went into the Forbes list!

The thumbs are an angel!

Like the point people will become beautiful!

Eventually became the point man like IT technology cattle!

Published 33 original articles · won praise 12 · views 3330

Guess you like

Origin blog.csdn.net/IT_BULL/article/details/103867020