报错: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 ...
随机推荐
- CloudCompare 的简单的使用说明
来自:https://blog.csdn.net/datase/article/details/79797795 File open:打开 save:保存 Global Shift settings: ...
- grep命令选项
-c:只输出匹配行的计数. -I:不区分大 小写(只适用于单字符). -h:查询多文件时不显示文件名. -l:查询多文件时只输出包含匹配字符的文件名. -n:显示匹配行及 行号. -s:不显示不存在或 ...
- 一.使用LDAP认证
作用:网络用户认证,用户集中管理 网络用户信息:LDAP服务器提供 本地用户信息:/etc/passwd /etc/shadow提供 LDAP服务器:虚拟机classroom LDAP ...
- php实现大文件上传分片上传断点续传
前段时间做视频上传业务,通过网页上传视频到服务器. 视频大小 小则几十M,大则 1G+,以一般的HTTP请求发送数据的方式的话,会遇到的问题:1,文件过大,超出服务端的请求大小限制:2,请求时间过长, ...
- P4555 【[国家集训队]最长双回文串】
不知道有没有人跟我一样数据结构学傻了 首先这道题是要求回文串,那么我们可以想到manacher算法 但由于\(manacher\)不能求出双回文子串,我们要考虑一些性质 首先对于一个回文串,删掉两边的 ...
- (28)打鸡儿教你Vue.js
单件商品金额计算和单选全选功能 new Vue({ el: '#app', data: { totalMoney: 0, productList: [] }, filters: { formatMon ...
- mysql创建账号、授权、数据导出、导入
1.账号创建及授权 grant all privileges on *.* to 'yangxin'@'%' identified by 'yangxin123456' with grant opti ...
- 备用shell管理方案之butterfly+nginx+https
安装butterfly+nginx https 1. 安装butterfly yum install python36 python36-pip python36-devel -y pip insta ...
- Pytest权威教程25-配置
目录 配置 命令行选项和配置文件设置 初始化:确定ROOTDIR和INIFILE 寻找rootdir 如何更改命令行选项默认值 内置的配置文件选项 返回: Pytest权威教程 配置 命令行选项和配置 ...
- Pytest权威教程12-跳过(Skip)及预期失败(xFail): 处理不能成功的测试用例
目录 跳过(Skip)及预期失败(xFail): 处理不能成功的测试用例 Skip跳过用例 xFail:将测试函数标记为预期失败 Skip/xFail参数设置 返回: Pytest权威教程 跳过(Sk ...