当前位置: 首页 > 知识库问答 >
问题:

Apache Flume在我第一次在Windows上安装时没有卡住

商冠玉
2023-03-14

我已经下载了最新版本的Apache Flume“apache-flume-1.8.0-bin”,并在第一次启动时更改了配置,如下所示。我正在Windows 8.1中设置apache flume

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#  http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.


# The configuration file needs to define the sources, 
# the channels and the sinks.
# Sources, channels and sinks are defined per agent, 
# in this case called 'agent'

na.sources = nas1
na.channels = nac1
na.sinks = nal1

# For each one of the sources, the type is defined
na.sources.nas1.type = netcat
na.sources.nas1.bind = localhost
na.sources.nas1.port = 44444

# The channel can be defined as follows.
na.sources.nas1.channels = nac1

# Each sink's type must be defined
na.sinks.nal1.type = logger

#Specify the channel the sink should use
na.sinks.nal1.channel = nac1

# Each channel's type is defined.
na.channels.nac1.type = memory

# Other config values specific to each type of channel(sink or source)
# can be defined as well
# In this case, it specifies the capacity of the memory channel
na.channels.nac1.capacity = 100

保存此配置后,我尝试使用以下命令启动水槽代理

flume-ng agent -n na -f C:/apache-flume-1.8.0-bin/conf/flume-conf-log.properties

之后,它陷入了水槽代理的启动,如下所示,

C:\apache-flume-1.8.0-bin\bin>flume-ng agent -n na -f C:/apache-flume-1.8.0-bin/conf/flume-conf-log.properties

C:\apache-flume-1.8.0-bin\bin>powershell.exe -NoProfile -InputFormat none -ExecutionPolicy unrestricted -File C:\apache-flume-1.8.0-bin\bin\flume-ng.ps1 agent -n na -f C:/apache-fl
ume-1.8.0-bin/conf/flume-conf-log.properties

WARN: Config directory not set. Defaulting to C:\apache-flume-1.8.0-bin\conf
Sourcing environment configuration script C:\apache-flume-1.8.0-bin\conf\flume-env.ps1
Including Hadoop libraries found in (C:\hadoop-2.7.6) for DFS access
Including HBase libraries found via (C:\hbase-2.1.0) for HBase access
WARN: HIVE_HOME not found

  Running FLUME agent :
    class: org.apache.flume.node.Application
    arguments: -n na -f "C:\apache-flume-1.8.0-bin\conf\flume-conf-log.properties"

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/apache-flume-1.8.0-bin/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/hadoop-2.7.6/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

我附上了错误截图供参考。我需要处理服务器日志来捕捉错误消息,为此我需要使用Flume将日志流至HDFS。

启动时水槽卡住-截图

共有1个答案

汤承德
2023-03-14

在通过添加Java路径更改了“flume-env.sh”之后,它就可以使用下面的命令了。

flume-ng agent -n na --conf ./conf/ -f C:/apache-flume-1.8.0-bin/conf/flume-conf-log.properties

我也附上了工作截图。工作截图

 类似资料:
  • 在新机器上设置开发环境时,brew安装了Postgres。现在我第一次需要,我应该为这个命令指定哪个目录?

  • 问题内容: 这听起来像是关于SF的重复问题,但我仍未找到明确的答案。我使用“ setup.py install”命令安装了Paramiko 1.7,并在运行demo.py程序时收到此错误: 即使安装了PyCrypto 2.1,我也收到此错误。在运行test.py(安装随附)时,出现以下错误- 在所有这些之后,我没有信心继续安装AES,因为我知道我可能还会遇到另一个ImportError!请指教。安

  • 问题内容: 我根本无法在Windows上安装NumPy。我不断收到此错误- 我之前有Python 64位版本,但不确定NumPy版本是否与64位Python兼容。因此,我将其卸载并安装了32位Python版本。但是我仍然遇到相同的错误。虽然我的Python 32位版本运行正常。 我尝试了“ pip install numpy”,但最后却给我以下错误- 请告诉我我可能做错了什么。 问题答案: 一些解

  • 本文向大家介绍在Windows上安装Python,包括了在Windows上安装Python的使用技巧和注意事项,需要的朋友参考一下 Python发行版可用于多种平台。您只需要下载适用于您的平台的二进制代码并安装Python。 如果平台的二进制代码不可用,则需要C编译器来手动编译源代码。在安装所需的功能选择方面,编译源代码可提供更大的灵活性。 以下是在Windows计算机上安装Python的步骤。

  • 问题内容: 我发现这里有一个类似问题的老问题: 如何在Windows上安装PyCairo(Python的Cairo)? 由于它是从2012年开始的,所以我认为它已经过时了。 我试图在装有Python 3.6.3的Windows 7 64位笔记本电脑上安装pycairo。如果重要的话,我还安装了最新的setuptools。 我正面临以下错误。 因为我对Python及其所有事物都了解,所以这对我来说听

  • 我是新来的弹性堆栈。我已经能够通过Docker使用elastic上的说明安装Elasticsearch和Kibana。然而,我在使用elastic上的说明安装filebeats时遇到了一些困难。开始Elasticsearch和Kibana后,当我跑步时: Docker运行docker.elastic.co/beats/filebeat: 7.13.0设置-Esetup.kibana.host=ki