Tomcat启动报错:java.net.BindException: Cannot assign requested address: JVM_Bind
Tomcat启动报错:java.net.BindException: Cannot assign requested address: JVM_Bind
Tomcat Cannot assign requested address: JVM_Bind 非端口占用冲突
严重: StandardServer.await: create[8005]:
java.net.BindException: Cannot assign requested address: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.(ServerSocket.java:185)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:406)
at org.apache.catalina.startup.Catalina.await(Catalina.java:676)
at org.apache.catalina.startup.Catalina.start(Catalina.java:628)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
可能是Tomcat需要绑定的端口或某些资源被其他应用程序占用。
使用DOS命令netstat -an查看被占用的端口,并未发现有任何程序占用Tomcat使用的相关端口(例如8080),并且将Tomcat安装目录下的conf/server.xml文件中的端口改为其他端口,再次运行也无法正常启动。
通过多种测试,可以初步判断应该不是端口占用引起的问题。如果不是端口占用的问题的话,那么就要考虑是否是IP绑定的问题了。
经过检查,在服务器计算机的C:\Windows\System32\drivers\etc\hosts文件中发现如下部分内容:
127.0.0.1 localhost
169.196.254.14 localhost
169.196.254.14是一个不存在的本地IP地址,将hosts文件中的第二行内容169.196.254.14 localhost去掉后,再次启动Tomcat,发现运行正常!
在服务器领域,一台计算机配置多个IP地址是比较常见的。Tomcat在启动时,会根据配置去获取所有的IP地址,并且进行逐个绑定,当发现需要绑定的IP地址不存在时,将会触发上述异常,从而导致无法正常启动。
//输出localhost映射的所有IP地址
InetAddress[] ips = InetAddress.getAllByName("localhost");
if (ips != null) {
for (InetAddress ip : ips) {
System.out.println(ip.getHostAddress());
}
}
/* 修改上述hosts文件前,输出:
* 169.196.254.14
* 127.0.0.1
* 修改文件后,输出
* 127.0.0.1
*/
Tomcat启动报错:java.net.BindException: Cannot assign requested address: JVM_Bind的更多相关文章
- tomcat启动端口号报错java.net.BindException: Cannot assign requested address
异常信息 时间:2017-02-09 15:09:59,829 - 级别:[ERROR] - 消息: [other] Failed to start end point associated with ...
- 服务器启动socket服务报错 java.net.BindException:Cannot assign requested address
错误信息: 2017-06-13 11:18:00,865 [GateServer.java:82][ERROR]:启动服务出错了java.net.BindException: Cannot ass ...
- Tomcat启动异常 java.net.BindException: Cannot assign requested address: JVM_Bind
从Apache官网下载的tomcat7,在MyEclipse中启动时抛出如下异常: 严重: StandardServer.await: create[localhost:8005]: java.net ...
- Tomcat启动报错:StandardServer.await: create[8005] java.net.BindException: Cannot assign requested address
Tomcat启动报错:StandardServer.await: create[8005] java.net.BindException: Cannot assign requested addres ...
- Tomcat启动报错:严重: StandardServer.await: create[8005] java.net.BindException: Cannot assign requested address
org.apache.catalina.core.StandardServer await SEVERE: StandardServer.await: create[8005]: ...
- Kafka 启动报错java.io.IOException: Can't resolve address.
阿里云上 部署Kafka 启动报错java.io.IOException: Can't resolve address. 本地调试的,报错 需要在本地添加阿里云主机的 host 映射 linux ...
- tomcat java.net.BindException: Cannot assign requested address 解决方法
今天线上TOMCAT启动时遇到了下比较麻烦的问题,错误如下: 21-Apr-2016 15:14:19.077 SEVERE [main] org.apache.catalina.core.Stand ...
- DataNode启动不成功——java.net.BindException: Port in use: localhost:0 Caused by: java.net.BindException: Cannot assign requested address解决办法
爱折腾的人总是会出线各种奇怪的问题.记得之前听一位大师讲过,我们不能踩完前进路上的所有坑前进,而应该学会怎样避开前进路上的坑,踩得坑越多,可能你的经验越丰富,但是付出的时间代价可能不是经验能换来的.我 ...
- com.sun.xml.internal.ws.server.ServerRtException: Server Runtime Error: java.net.BindException: Cannot assign requested address: bind
在发布 web service 时报错: Endpoint.publish(publishAddress, hl7MessageReveiver); com.sun.xml.internal.ws.s ...
随机推荐
- Windows+QT+Eclipse+MinGW搭建QT开发环境详细教程
Windows+QT+Eclipse+MinGW搭建QT开发环境详细教程 一.准备工具: QT-SDK for Windows:http://get.qt.nokia.com/qtsdk/qt-sd ...
- POJ 1089 Intervals【合并n个区间/贪心】
There is given the series of n closed intervals [ai; bi], where i=1,2,...,n. The sum of those interv ...
- 洛谷P4331 [BOI2004] Sequence 数字序列 [左偏树]
题目传送门 数字序列 题目描述 给定一个整数序列 a1,a2,⋅⋅⋅,an ,求出一个递增序列 b1<b2<⋅⋅⋅<bn ,使得序列 ai 和 bi 的各项之差的绝对 ...
- go chapter 5 - 异常处理 error、panic、recover
https://blog.csdn.net/tennysonsky/article/details/78946265 error(不中断).panic(中断).recover(拦截中断 类似于 ca ...
- CXF浅析
CXF 框架支撑环境 CXF 框架是一种基于 Servlet 技术的 SOA 应用开发框架,要正常运行基于 CXF 应用框架开发的企业应用,除了 CXF 框架本身之外,还需要 JDK 和 Ser ...
- 【SPOJ 8093】Sevenk Love Oimaster
http://www.spoj.com/problems/JZPGYZ/ 查询一个询问串在上面n个串中多少个串的子串. 后缀数组+主席树,常熟有点大... 建出广义SAM,利用parent树的dfs序 ...
- [bzoj2433][Noi2011]智能车比赛
[题目链接] http://www.lydsy.com/JudgeOnline/problem.php?id=2433 http://221.192.240.123:8586/JudgeOnline/ ...
- [BZOJ5267]特工
一个套路题...但还是得写一下这个套路避免以后忘了 题目中的运算$f(i,j)=(i|j)\text^i$对单位二进制满足$f(0,0)=f(1,0)=f(1,1)=1,f(0,1)=0$ 先考虑求正 ...
- 【线段树】Gym - 101201J - Shopping
题意:n个数,m次询问,每次给你一个询问v,l,r,问你v%a[l]%a[l+1]%...%a[r]是多少. a%b,结果要么不变,要么至少缩小到a的一半,于是用线段树,每次询问当前区间最靠左侧的小于 ...
- 【推导】Codeforces Round #411 (Div. 1) B. Minimum number of steps
最后肯定是bbbb...aaaa...这样. 你每进行一系列替换操作,相当于把一个a移动到右侧. 会增加一些b的数量……然后你统计一下就行.式子很简单. 喵喵喵,我分段统计的,用了等比数列……感觉智障 ...