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 ...
随机推荐
- zip unzip tar 压缩相关
unzip 解压时,需要直接覆盖以解压的文件 -o 则不再进行询问,直接覆盖原文件解压缩 示例 unzip -o file_name.zip
- set的完整用法
#include<bits/stdc++.h> using namespace std; set<int>s; int main () { //begin()--返回指向第一个 ...
- [React] Use the React Effect Hook in Function Components
Similar to the State Hook, the Effect Hook is “first-class” in React and handy for performing side e ...
- GBDT 算法
GBDT (Gradient Boosting Decision Tree) 梯度提升迭代决策树.GBDT 也是 Boosting 算法的一种,但是和 AdaBoost 算法不同(AdaBoost 算 ...
- loj 3102
题目大意: 给定 \(m\) 棵无向树\(\left\{T_{1}=\left(V_{1}, E_{1}\right), T_{2}=\left(V_{2}, E_{2}\right), \cdots ...
- pcl-设置多线段宽度和颜色
显示点云有使用vtk的,有使用 ros 中riz ?库的,使用pcl显示点云数据比较方便,但是对于一些模型形状只能固定特定的效果,比如说直线段,只能绘制点到点两点之间的线段.但是项目需要绘制点1到点2 ...
- Day12:H5
掌握HTML+CSS+JavaScript相关知识 了解HTML5的结构标签: 掌握新增和删去的标签及相关属性 运用HTML5相关知识进行实际开发 下面哪种语法中是对大小写进行区分的? XHTML H ...
- 数据结构实验之排序七:选课名单 (SDUT 3404)
#include <stdio.h> #include <string.h> #include <stdlib.h> struct node { char data ...
- ACwing : 798. 差分矩阵
不得不说之前的差分我真的是掌握的不好.. 一维差分确实简单一看就会,但是学会了之后却并不能灵活的运用. 而二维的差分我甚至还琢磨了很长时间 懒得画图所以没有图..对于二维差分的定义,百度百科是这么说的 ...
- UOJ#299. 【CTSC2017】游戏 线段树 概率期望 矩阵
原文链接www.cnblogs.com/zhouzhendong/p/UOJ299.html 前言 不会概率题的菜鸡博主做了一道概率题. 写完发现运行效率榜上的人都没有用心卡常数——矩阵怎么可以用数组 ...