Can't accept UDP connections java.net.BindException: Address already in use_解决方案
一、问题描述
在Linux服务器(CentOS7系统)中配置并启动JMeter远程监控服务器资源所需的ServerAgent目录下的 startAgent.sh 文件时,系统出现异常提示,如下:
[root@fighter007 ServerAgent-2.2.]# ./startAgent.sh
INFO -- ::47.946 [kg.apc.p] (): Binding UDP to
ERROR -- ::47.966 [kg.apc.p] (): Can't accept UDP connections
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:)
at sun.nio.ch.DatagramChannelImpl.bind(DatagramChannelImpl.java:)
at sun.nio.ch.DatagramSocketAdaptor.bind(DatagramSocketAdaptor.java:)
at kg.apc.perfmon.PerfMonWorker.listenUDP(PerfMonWorker.java:)
at kg.apc.perfmon.PerfMonWorker.startAcceptingCommands(PerfMonWorker.java:)
at kg.apc.perfmon.AgentTool.processParams(AgentTool.java:)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.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 kg.apc.cmd.UniversalRunner.main(UniversalRunner.java:)
INFO -- ::47.967 [kg.apc.p] (): Binding TCP to
ERROR -- ::47.970 [kg.apc.p] (): Can't accept TCP connections
二、问题分析
从以上抛出的异常信息中提取关键的提示信息:
"Can't accept UDP connections
java.net.BindException: Address already in use"
分析:ServerAgent默认开始的是4444端口,提示“不能接收UDP连接,地址已在使用中”,很可能是该端口已被占用,需要修改为新的端口号再启用or先暂停该端口对应的进程,然后再启用ServerAgent服务
三、解决方案
方式1:先暂停4444端口,再启用ServerAgent服务
查询4444端口当前对应的进程:lsof -i:4444
[root@fighter007 ServerAgent-2.2.]# lsof -i:
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
java root 19u IPv6 UDP *:krb524
java root 20u IPv6 TCP *:krb524 (LISTEN)
关闭指定PID号码的进程(4444端口进程):kill -9 104069
此时,亦可正常启用ServerAgent服务,如下:
[root@fighter007 ServerAgent-2.2.]# ./startAgent.sh
INFO -- ::42.130 [kg.apc.p] (): Binding UDP to
INFO -- ::43.169 [kg.apc.p] (): Binding TCP to
INFO -- ::43.173 [kg.apc.p] (): JP@GC Agent v2.2.0 started
方式2:修改ServerAgent端口,再启用ServerAgent服务
./startAgent.sh –udp-port –tcp-port xxxx ("xxxx" 为新端口号,如:)
./startAgent.sh –udp-port –tcp-port
Can't accept UDP connections java.net.BindException: Address already in use_解决方案的更多相关文章
- JMeter 压测Server Agent无法监控资源问题,PerfMon Metrics Collector报Waiting for sample,Error loading results file - see file log, Can't accept UDP connections java.net.BindException: Address already in use 各种疑难杂症
如何安装插件此博主已经说得很详细了. https://www.cnblogs.com/saryli/p/6596647.html 但是需注意几点: 1.修改默认端口,这样可以避免掉一个问题.Serve ...
- connections java.net.BindException: Address already in use_解决方案
一.问题描述 在Linux服务器(CentOS7系统)中配置并启动JMeter远程监控服务器资源所需的ServerAgent目录下的 startAgent.sh 文件时,系统出现异常提示,如 [roo ...
- Jmeter接口压力测试,Java.net.BindException: Address already in use: connect
Java.net.BindException: Address already in use: connect 问题原因: 操作系统会为TCP/IP服务预留临时端口,Jmeter在跑并发测试的时候每开 ...
- Jenkins启动时报错:java.net.BindException: Address already in use: bind 解决方法
下载jenkins.war包后,进入Jenkins.war包目录下,运行java -jar jenkins.war时报端口被占用的错误:java.net.BindException: Address ...
- java.net.BindException: address already in use <null>:xxxx
linux下,tomcat突然关闭了,执行关闭(shutdown.sh)和启动(startup.sh)成功后,tomcat仍未运行,查看tomcat的catalina日志发现这样一个报错:java.n ...
- java.net.BindException: Address already in use: JVM_Bind
是端口占用,如果修改端口后仍提示这样的错误,可能是eclipse自动关闭或正在运行服务非正常中断导致端口没有关闭,这时你再启动,还是提示java.net.BindException: Address ...
- java.net.BindException: Address already in use: bind
环境:jxse-2.7, netty-3.6.6.Final 现象:每次执行都抛出以下异常 八月 08, 2013 8:45:19 下午 net.jxta.logging.Logging logChe ...
- (解决tomcat端口被占用的问题)create[8005]java.net.BindException: Address already in use: JVM_Bind
create[8005]java.net.BindException: Address already in use: JVM_Bind”,原来是Tomcat8005端口被其他进程占用,8005端口是 ...
- Exception in thread "main" java.net.BindException: Address already in use: JVM_Bind
Exception in thread "main" java.net.BindException: Address already in use: JVM_Bind at ...
随机推荐
- native与H5优缺点及H5测试
一.native(原生)与H5优缺点介绍 native(原生)优点 1.运行速度快 2.可以应用到底层的API 3.便捷性与易用性 4.打开会比较节省流量 native(原生)缺点 1.不同操作系统需 ...
- 针对jar里面的图片不显示问题
做了一个html生产pdf案例. 然后把图片放到resource/static/model/img下面,生成jar包运行,发现图片不显示, 发现html里面的src必须是http域名开头的图片. 下面 ...
- com.alibaba.fastjson把JSONObject转换为Map<String, String>对象
https://www.cnblogs.com/fomeiherz/p/6351287.html JSONObject obj = new JSONObject();{obj.put("ke ...
- Hbase表结构
1.Hbase表结构:可以看成map,里面有行键,行键是按照字母顺序排序.行键下面是列族,每个列族可以有不同数量的列甚至是没有列.每个列里面包含着不同时间版本的列的值. 行键:是按照字母的顺序排序的, ...
- gosched
Go语言runtime.Gosched()函数浅析 这个函数的作用是让当前goroutine让出CPU,好让其它的goroutine获得执行的机会.同时,当前的goroutine也会在未来的某个时间点 ...
- 2019.11.29 Mysql的数据操作
为名为name的表增加数据(插入所有字段) insert into name values(1,‘张三’,‘男’,20); 为名为name的表增加数据(插入部分字段) insert into name ...
- Code Chef JUNE Challenge 2019题解
题面 \(SUMAGCD\) 先去重,易知答案一定是一个数单独一组剩下的一组,前缀后缀\(gcd\)一下就行了 //quming #include<bits/stdc++.h> #defi ...
- EasyUI日期时间框DateTimeBox
WEB DEMO 日期时间框 DateTimeBox <!DOCTYPE html> <html> <HTML> <head> <HEAD> ...
- fluent提供的边界条件解析【转载】
转载自:http://chengkang8.blog.163.com/blog/static/6719535620113149552369/ 1. 速度入口边界条件 用于定义流动入口边界的速度和标量 ...
- vue+element 表格formatter数据格式化并且插入html标签
前言 vue中 element框架,其中表格组件,我既要行内数据格式化,又要插入html标签 一贯思维,二者不可兼得也 一.element 表格 数据格式化 demo <el-table-col ...