报错:Error starting Jetty. JSON Metrics may not be available.java.net.BindException:地址已在使用
报错背景:
刚在CDH中集成Flume插件,启动报错
报错现象:
Error starting Jetty. JSON Metrics may not be available.
java.net.BindException: 地址已在使用
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:)
at sun.nio.ch.Net.bind(Net.java:)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:)
at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:)
at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:)
at org.mortbay.jetty.Server.doStart(Server.java:)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:)
at org.apache.flume.instrumentation.http.HTTPMetricsServer.start(HTTPMetricsServer.java:)
at org.apache.flume.node.Application.loadMonitoring(Application.java:)
at org.apache.flume.node.Application.startAllComponents(Application.java:)
at org.apache.flume.node.Application.handleConfigurationEvent(Application.java:)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
at java.lang.reflect.Method.invoke(Method.java:)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:)
at com.google.common.eventbus.EventBus.post(EventBus.java:)
at org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$(ScheduledThreadPoolExecutor.java:)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:)
at java.lang.Thread.run(Thread.java:)
报错原因:
我也没看懂具体原因,但是在解决的时候稀里糊涂就把报错解决了。
报错解决:
进入flume的配置目录:/etc/flume-ng/conf/
编辑文件:flume.conf
按照自己的需求填写相关语句
完成之后报错消失(CDH中的相同配置文件可能信息不同步,注意检查)
agent.sources = kafkaSource
agent.channels = memoryChannel
agent.sinks = hdfsSink #-------- kafkaSource相关配置-----------------
agent.sources.kafkaSource.channels = memoryChannel
# 定义消息源类型
agent.sources.kafkaSource.type=org.apache.flume.source.kafka.KafkaSource
# 这里特别注意: 是kafka的zookeeper的地址
agent.sources.kafkaSource.zookeeperConnect=192.168.52.26:
# 配置消费的kafka topic
agent.sources.kafkaSource.topic=AlarmHis
agent.sources.kafkaSource.kafka.consumer.timeout.ms= #------- memoryChannel相关配置-------------------------
# channel类型
agent.channels.memoryChannel.type=memory
# channel存储的事件容量
agent.channels.memoryChannel.capacity=
# 事务容量
agent.channels.memoryChannel.transactionCapacity= #---------hdfsSink 相关配置------------------
agent.sinks.hdfsSink.type=hdfs
agent.sinks.hdfsSink.channel = memoryChannel
# 写到HDFS的路径
agent.sinks.hdfsSink.hdfs.path=hdfs://master:8020/yk/dl/alarm_his
#配置前缀和后缀
agent.sinks.hdfsSink.hdfs.filePrefix = AlarmHis
agent.sinks.hdfsSink.hdfs.fileSuffix=.txt ## 表示只要过了60**24秒钟,就切换生成一个新的文件
agent.sinks.hdfsSink.hdfs.rollInterval =
## 如果记录的文件大于1024**1024字节时切换一次
agent.sinks.hdfsSink.hdfs.rollSize =
## 当写了5个事件时触发
agent.sinks.hdfsSink.hdfs.rollCount =
## 收到了多少条消息往dfs中追加内容
agent.sinks.hdfsSink.hdfs.batchSize =
## 使用本地时间戳
agent.sinks.hdfsSink.hdfs.useLocalTimeStamp = true agent.sinks.hdfsSink.hdfs.writeFormat=Text
#生成的文件类型,默认是Sequencefile,可用DataStream:为普通文本
agent.sinks.hdfsSink.hdfs.fileType=DataStream
报错:Error starting Jetty. JSON Metrics may not be available.java.net.BindException:地址已在使用的更多相关文章
- springboot启动报错,Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
报错: Error starting ApplicationContext. To display the conditions report re-run your application with ...
- 解决报错error the @annotation pointcut expression is only supported at Java 5
eclipse搭建环境后报错 error the @annotation pointcut expression is only supported at Java 5 错误意思大致是:注释切入点表达 ...
- 解决 docker 报错: Error starting daemon: error initializing graphdriver: backing file system is unsupported for this graph driver
CentOS 7.5 x64下 sudo yum install docker -y systemctl enable docker systemctl start docker 发现启动失败 jou ...
- spring boot启动报错Error starting ApplicationContext(未能配置数据源)
主要错误:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource c ...
- 关于MyEclipse启动报错:Error starting static Resources;下面伴随Failed to start component [StandardServer[8005]]; A child container failed during start.的错误提示解决办法.
最后才发现原因是Tomcat的server.xml配置文件有问题:apache-tomcat-7.0.67\conf的service.xml下边多了类似与 <Host appBase=" ...
- 倍福TwinCAT(贝福Beckhoff)常见问题(FAQ)-点击运行按钮进入到运行状态报错Error starting TwinCAT System怎么办 AdsWarning1823怎么办
一般提示如下 点击Device,然后选中当前真正连接到的网卡 一般是由于重装系统之后,没有把本来是realtime capable的设备Install,所以找不到支持EtherCAT的设备导致 ...
- npm install 报错 error Unexpected end of JSON input while parsing near '...sShrinkwrap":false,"d' 解决办法
npm install 报错 : error Unexpected end of JSON input while parsing near '...sShrinkwrap":false,& ...
- node模拟后台返回json书写格式报错--Unexpected token ' in JSON at position 1
最近在学习Node的知识,就尝试写了一个注册登陆的简单功能,但是自己在模拟后台返回值的时候,总是报错Unexpected token ' in JSON at position 1,查找原因之后,是因 ...
- docker pull / docker login 报错 Error response from daemon: Get https://registry-1.docker.io/v2/: x509
docker pull 和 docker login 的时候报错 Error response from daemon: Get https://registry-1.docker.io/v2/: x ...
随机推荐
- PHP——汉字完美转为ASCII码
前言 对接联通的接口,让我学会了不少PHP偏门函数....,主要对方用的py,我这用的PHP,人家一个函数解决了, 我这还要自己写方法,也是比较蛋疼,但是学到东西还是很开心的~ 代码 字符串转为ASC ...
- 远程连接Linux mysql报错:Access denied for user ‘root’@‘localhost’(using password: YES)的解决方法
在新安装好的Centos7上刚安装好mysql,准备进去看看,但是登陆的时候,发现报错啦: ERROR 1045 (28000): Access denied for user 'root'@'loc ...
- 四大网络之Alexnet
本文主要介绍AlextNet的一些知识,这些知识经常被忽略 一.AlextNet的创新点 (1)成功使用ReLU作为CNN的激活函数,并验证其效果在较深的网络超过了Sigmoid,成功解决了Si ...
- neo4j索引
1.创建索引 CREATE INDEX ON : Disease (name) 2.查询所有创建的索引 :schema 或者 call db.indexes 3.删除索引 drop index on ...
- QEventLoop以及QT事件循环
1.一般我们的事件循环都是由exec()来开启的,例如下面的例子: 1 QCoreApplicaton::exec() 2 QApplication::exec() 3 QDialog::exec() ...
- codevs 1729 单词查找树
二次联通门 : codevs 1729 单词查找树 /* codevs 1729 单词查找树 Trie树 统计节点个数 建一棵Trie树 插入单词时每新开一个节点就计数器加1 */ #include ...
- 洛谷P1731[NOI1999]生日蛋糕
题目 搜索+剪枝,主要考察细节和搜索的顺序,首先可以发现所有数据均为整数,所以初始化每层的蛋糕R和H是整数,然后从高层向低层搜索,然后预处理出各层向低层的最小面积和体积用来剪枝. 就可以每层从当前最大 ...
- java学习笔记(1)java的基础介绍 、JDK下载、配置环境变量、运行java程序
java工程师是开发软件的 什么是软件呢? 计算机包括两部分: 硬件: 鼠标.键盘.显示器.主机箱内部的cpu.内存条.硬盘等 软件: 软件包括:系统软件和应用软件 系统软件:直接和硬件交互的软件:w ...
- Leetcode44. 通配符匹配(动态规划)
44. 通配符匹配 动态规划 \(f_{i,j}\)为\(s\)匹配\(i\),\(t\)匹配\(j\)是否成功 贪心 相比之下这个思维性更强 考虑两个*,两个星号间的过渡,只需要过渡完到第二个星号, ...
- Compiling OpenCV: VTK Not Found on Ubuntu 16.04 LTS
When installing OpenCV: /usr/bin/vtk not found libvtkRenderingPythonTkWidgets.so not found /usr/bin/ ...