tomcat java.net.BindException: Cannot assign requested address 解决方法

今天线上TOMCAT启动时遇到了下比较麻烦的问题,错误如下:

21-Apr-2016 15:14:19.077 SEVERE [main] org.apache.catalina.core.StandardServer.await StandardServer.await: create[localhost:8015]:
 java.net.BindException: Cannot assign requested address
	at java.net.PlainSocketImpl.socketBind(Native Method)
	at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
	at java.net.ServerSocket.bind(ServerSocket.java:376)
	at java.net.ServerSocket.<init>(ServerSocket.java:237)
	at org.apache.catalina.core.StandardServer.await(StandardServer.java:420)
	at org.apache.catalina.startup.Catalina.await(Catalina.java:717)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:663)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

21-Apr-2016 15:14:19.077 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-80"]
21-Apr-2016 15:14:19.082 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]

  从日志来看一直以为端口占用,认真分析端口占用原因一直没有找到。系统在绑定8015端口的时候,发现TCP8015端口无法创建,因此系统出现await并对应出现了pause,过了预设的超时时间还没有完成我们可以看到tomcat执行了stop的操作,所以很显然,tomcat没有启动成功!

经过多次排查,发现tomcat在绑定数据的时候是绑定在localhost上面的,查看一下HOST,发现运维改了host文件里面有输入中文的因为符号,一般都看不了来,修改后启动成功了。

127.0.0.1 localhost

时间: 2024-11-04 01:42:29

tomcat java.net.BindException: Cannot assign requested address 解决方法的相关文章

Tomcat启动时报StandardServer.await: create[8005]: java.net.BindException: Cannot assign requested address: JVM_Bind

问题描述: 今天一早,所有淡定下来后准备启动本地Tomcat,突然出现一堆错误: 严重: 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.

Tomcat启动报错:严重: StandardServer.await: create[8005] java.net.BindException: Cannot assign requested address

org.apache.catalina.core.StandardServer await        SEVERE: StandardServer.await: create[8005]:        java.net.BindException: Cannot assign requested address java.net.BindException: Cannot assign requested address        at java.net.PlainSocketImpl

Tomcat启动异常 java.net.BindException: Cannot assign requested address: JVM_Bind

从Apache官网下载的tomcat7,在MyEclipse中启动时抛出如下异常: 严重: StandardServer.await: create[localhost:8005]: java.net.BindException: Cannot assign requested address: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Plain

java.net.BindException: Cannot assign requested address

tomcat启动后报错 2017-6-7 17:23:49 org.apache.catalina.core.StandardServer await 严重: StandardServer.await: create[localhost:8005]: java.net.BindException: Cannot assign requested address at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.Pl

Caused by: java.net.BindException: Cannot assign requested address: JVM_Bind问题

Caused by: java.net.BindException: Cannot assign requested address: JVM_Bind更改这个问题可以从两方面着手:一:查看ip和端口是否正确(大多数都是这个问题引起的)二:查看端口是否被占用了

Problem binding to [yarn.com:8031] java.net.BindException: Cannot assign requested address

at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.main(ResourceManager.java:1467)Caused by: java.net.BindException: Problem binding to [yarn.com:8031] java.net.BindException: Cannot assign requested address; For more details see: 是由于虚拟

redis数据导出,报错Could not connect to Redis at ip:port: Cannot assign requested address解决方法

因为需啊把redis的数据导出和数据库数据作对比,用管道符连接的方式导出数据: /opt/$company_name/redis-3.0.5/bin/redis-cli -h $IP -p $PORT  -a  $PASSWORD  keys  \* |xargs -n 1 /opt/$company_name/redis-3.0.5/bin/redis-cli -h   $IP -p $PORT -a  $PASSWORD  get > key.txt 导出过程中,报错 : Could not

对于高并发短连接造成Cannot assign requested address解决方法

https://www.cnblogs.com/dadonggg/p/8778318.html 感谢这篇文章给予的启发 在tcp四次挥手断开连接时,主动释放连接的一方最后会进入TIME_WAIT状态,是为了防止最后一次ACK对方没有响应,一般时间为几分钟,这样主动释放连接的一方如果高并发短连接将造成端口资源全部在TIME_WAIT状态而无法分配端口资源,解决方法修改系统配置 修改/etc/sysctl.conf文件,sysctl -p生效 net.ipv4.tcp_syncookies = 1

在linux上用jmeter压测时出现很多异常java.net.NoRouteToHostException: Cannot assign requested address.

今天压力测试时, 刚开始出现了很多异常, 都是 java.net.NoRouteToHostException: Cannot assign requested address. 经网上查资料, 是由于linux分配的客户端连接端口用尽, 无法建立socket连接所致,虽然socket正常关闭,但是端口不是立即释放, 而是处于TIME_WAIT状态, 默认等待60s后才释放. 查看linux支持的客户端连接端口范围, 也就是28232个端口: cat /proc/sys/net/ipv4/ip_