tomcat启动报java.net.BindException: Cannot assign requested address

2019-08-15 16:07:56 浏览数 (1)

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。

本文链接:https://ligang.blog.csdn.net/article/details/43796371

tomcat启动时报如下错:

代码语言:javascript复制
Feb 13, 2015 6:47:57 PM org.apache.catalina.ha.tcp.SimpleTcpCluster start
SEVERE: Unable to start cluster.
org.apache.catalina.tribes.ChannelException: java.net.BindException: Cannot assign requested address; No faulty members identified.
        at org.apache.catalina.tribes.group.ChannelCoordinator.internalStart(ChannelCoordinator.java:169)
        at org.apache.catalina.tribes.group.ChannelCoordinator.start(ChannelCoordinator.java:97)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInterceptorBase.java:149)
        at org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor.start(MessageDispatchInterceptor.java:147)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInterceptorBase.java:149)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInterceptorBase.java:149)
        at org.apache.catalina.tribes.group.GroupChannel.start(GroupChannel.java:407)
        at org.apache.catalina.ha.tcp.SimpleTcpCluster.start(SimpleTcpCluster.java:671)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1043)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
        at org.apache.catalina.core.StandardService.start(StandardService.java:525)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
        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)
Caused by: java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind(Native Method)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
        at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:205)
        at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
        at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
        at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
        at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
        at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
        at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
        at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
        at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
        at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
        at org.apache.catalina.tribes.transport.nio.NioReceiver.bind(NioReceiver.java:132)
        at org.apache.catalina.tribes.transport.nio.NioReceiver.start(NioReceiver.java:102)
        at org.apache.catalina.tribes.group.ChannelCoordinator.internalStart(ChannelCoordinator.java:142)
        ... 18 more

原因:本机host配置有误! //查看机器名

代码语言:javascript复制
hostname

//查看本机器名对应的ip地址

代码语言:javascript复制
hostname -i   

//查看修改主机名,系统配置文件:/etc/sysconfig/network

代码语言:javascript复制
cat /etc/sysconfig/network  
vi  /etc/sysconfig/network

//查看修改hostname,系统配置文件:/etc/hosts

代码语言:javascript复制
cat /etc/hosts
vi /etc/hosts   

0 人点赞