D:\Tools\apache-flume-1.9.0-bin>.\bin\flume-ng agent --conf .\conf --conf-file .\conf\example.conf --name al -property flume.root.logger=INFO,console
D:\Tools\apache-flume-1.9.0-bin>powershell.exe -NoProfile -InputFormat none -ExecutionPolicy unrestricted -File D:\Tools\apache-flume-1.9.0-bin\bin\flume-ng.ps1 agent --conf .\conf --conf-file .\conf\example.conf --name al -property flume.root.logger=INFO,console
Sourcing environment configuration script .\conf\flume-env.ps1
Including Hadoop libraries found in (D:\Hadoop\hadoop-3.1.3) for DFS access
WARN: HBASE_HOME not found
WARN: HIVE_HOME not found
Running FLUME agent :
class: org.apache.flume.node.Application
arguments: -n al -f "D:\Tools\apache-flume-1.9.0-bin\conf\example.conf"
2023-10-17 20:21:49,047 (lifecycleSupervisor-1-0) [INFO - org.apache.flume.node.PollingPropertiesFileConfigurationProvider.start(PollingPropertiesFileConfigurationProvider.java:62)] Configuration provider starting
2023-10-17 20:21:49,048 (conf-file-poller-0) [INFO - org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:138)] Reloading configuration file:D:\Tools\apache-flume-1.9.0-bin\conf\example.conf
2023-10-17 20:21:49,056 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addComponentConfig(FlumeConfiguration.java:1203)] Processing:c1
2023-10-17 20:21:49,057 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addComponentConfig(FlumeConfiguration.java:1203)] Processing:c1
2023-10-17 20:21:49,057 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addComponentConfig(FlumeConfiguration.java:1203)] Processing:r1
2023-10-17 20:21:49,057 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addComponentConfig(FlumeConfiguration.java:1203)] Processing:r1
2023-10-17 20:21:49,058 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addComponentConfig(FlumeConfiguration.java:1203)] Processing:r1
2023-10-17 20:21:49,058 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty(FlumeConfiguration.java:1117)] Added sinks: k1 Agent: a1
2023-10-17 20:21:49,058 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addComponentConfig(FlumeConfiguration.java:1203)] Processing:c1
2023-10-17 20:21:49,059 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addComponentConfig(FlumeConfiguration.java:1203)] Processing:k1
2023-10-17 20:21:49,059 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addComponentConfig(FlumeConfiguration.java:1203)] Processing:r1
2023-10-17 20:21:49,059 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addComponentConfig(FlumeConfiguration.java:1203)] Processing:k1
2023-10-17 20:21:49,060 (conf-file-poller-0) [WARN - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.validateConfigFilterSet(FlumeConfiguration.java:623)] Agent configuration for 'a1' has no configfilters.
2023-10-17 20:21:49,071 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration.validateConfiguration(FlumeConfiguration.java:163)] Post-validation flume configuration contains configuration for agents: [a1]
2023-10-17 20:21:49,071 (conf-file-poller-0) [WARN - org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:139)] No configuration found for this host:al
2023-10-17 20:21:49,075 (conf-file-poller-0) [INFO - org.apache.flume.node.Application.startAllComponents(Application.java:162)] Starting new configuration:{ sourceRunners:{} sinkRunners:{} channels:{} }
2023-10-17 20:30:34,677 (agent-shutdown-hook) [INFO - org.apache.flume.node.Application.stopAllComponents(Application.java:125)] Shutting down configuration: { sourceRunners:{} sinkRunners:{} channels:{} }
2023-10-17 20:30:34,677 (agent-shutdown-hook) [INFO - org.apache.flume.lifecycle.LifecycleSupervisor.stop(LifecycleSupervisor.java:78)] Stopping lifecycle supervisor 22
2023-10-17 20:30:34,693 (agent-shutdown-hook) [INFO - org.apache.flume.node.PollingPropertiesFileConfigurationProvider.stop(PollingPropertiesFileConfigurationProvider.java:84)] Configuration provider stopping
在学习flume的过程中,在做采集netcat数据显示到控制台例子时,遇到一直无法创建44444端口的问题,经检查自己的配置文件没有问题。
经过排查,发现a1 输入成了al
正确的启动flume的语句为
D:\Tools\apache-flume-1.9.0-bin>powershell.exe -NoProfile -InputFormat none -ExecutionPolicy unrestricted -File D:\Tools\apache-flume-1.9.0-bin\bin\flume-ng.ps1 agent --conf .\conf --conf-file .\conf\example1.conf --name a1 -property flume.root.logger=INFO,console