Tomcat在Ubuntu Server 启动报错

Ubuntu Server上的Tomcat启动老是报错:

Java代码

StandardServer.await: create[8005]:  
ava.net.BindException: Cannot assign requested address  
       at java.net.PlainSocketImpl.socketBind(Native Method)  
       at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)  
       at java.net.ServerSocket.bind(ServerSocket.java:319)  
       at java.net.ServerSocket.<init>(ServerSocket.java:185)  
       at org.apache.catalina.core.StandardServer.await(StandardServer.java:373                                                                             )  
       at org.apache.catalina.startup.Catalina.await(Catalina.java:647)  
       at org.apache.catalina.startup.Catalina.start(Catalina.java:607)  
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.                                                                             java:39)  
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces                                                                             sorImpl.java:25)  
       at java.lang.reflect.Method.invoke(Method.java:597)  
       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)  
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)  
009-9-16 16:14:52 org.apache.coyote.http11.Http11Protocol pause 

后来发现是服务器的IP设置有问题,把http_proxy设置为空,还是不行,最后发现还是hosts设置的有问题,吧红色的从127.0.0.1变成本机IP既可以。奇怪的问题。

cims@lst-ubuntu:~/software$ cat /etc/hosts
172.29.128.251  lst-ubuntu.localdomain  lst-ubuntu
[color=red]172.29.128.251[/color]  localhost

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

PS:ubuntu server:
强制杀死进程的命令 kill -9 进程号
查看所有进程命令 ps -A
按名称杀死进程 kill 进程名