系统相关
首页 > 系统相关> > [Tomcat/Java EE/Linux]Tomcat启动异常:StandardServer.await: create[localhost:8005]: java.net.BindExceptio

[Tomcat/Java EE/Linux]Tomcat启动异常:StandardServer.await: create[localhost:8005]: java.net.BindExceptio

作者:互联网

1 问题背景

严重: StandardServer.await: create[localhost:8005]:
java.net.BindException: 无法指定被请求的地址
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:382)
    at java.net.ServerSocket.bind(ServerSocket.java:375)
    at java.net.ServerSocket.<init>(ServerSocket.java:237)
    at org.apache.catalina.core.StandardServer.await(StandardServer.java:444)
    at org.apache.catalina.startup.Catalina.await(Catalina.java:781)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:727)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:4
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)

2 原因分析

create[localhost:8005]:入手,可分析出2类情况:

已修正localhost的域名IP映射配置后:↓

3 解决方法

vi /etc/hosts
  192.168.191.96 localhost
  (或: 127.0.0.1 localhosts)

X 参考文献

标签:catalina,Java,Tomcat,StandardServer,8005,java,net,localhost
来源: https://www.cnblogs.com/johnnyzen/p/14872469.html