报错: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 ...
随机推荐
- go实现文件的上传
上传端 send.go package main import ( "fmt" "io" "net" "os") fun ...
- 微信小程序引入Vant组件库
前期准备 Vant Weapp组件库:https://youzan.github.io/vant-weapp/#/intro 1.先在微信开发者工具中打开项目的终端: 然后初始化一个package.j ...
- DVWA-弱会话ID
本周学习内容: 1.学习web安全深度剖析: 2.学习安全视频: 3.学习乌云漏洞: 4.总结Web应用安全权威指南: 实验内容: 进行DVWA弱会话ID实验 实验步骤: Low 1.打开DVWA,进 ...
- 花样流水灯的verilog实现
LED(Light emitting diode)发光二极管将电能转化为可见光,正向电压导通,反向电压截止.对于该板子,二极管用低电压导通,其实验原理图为: 所谓流水灯,即让LED像水一样的点亮,从左 ...
- C++概念分析之 重载、重写(覆盖)和隐藏的区别
一.基本概念区别: 重载:是指同一可访问区内被声明的几个具有不同参数列(参数的类型,个数,顺序不同)的同名函数,根据参数列表确定调用哪个函数,重载不关心函数返回类型. 隐藏:是指派生类的函数屏蔽了与其 ...
- js中array.some()的用法
let array=[ { name:'jack', age:'19' }, { name:'rose', age:'19' } ] var box=array.some((value,index)= ...
- meshing-做类似ICEM的o型剖分
原版视频下载地址: https://pan.baidu.com/s/1nvxD0jn 密码: db42
- 《sicp》八皇后谜题
<sicp>八皇后谜题 书中练习2.42.八皇后谜题问的是如何将八个皇后摆在国际象棋棋盘上,使得任意一个皇后都不能攻击另一个皇后(也就是说任意两个皇后都不能在同一行,同一列和同一对角线上) ...
- RabbitMQ Management API调用
RabbitMQ在运行时,偶尔会有一些死信,即消息未正常消费,造成消息积压在消息队列中, 一直卡住,重复循环消费原来的消息队列 那么就需要有一种机制,来查看RabbitMQ是否有消息未正常消费,从而让 ...
- 【深度学习】关于Adam
版权声明:本文为博主原创文章,遵循CC 4.0 by-sa版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/weixin_31866177/articl ...