The probability of running Tomcat is probably due to the installation of the Linux network: java.net.BindException: cannot assign the requested address

I cannot start tomcat due to the inserted stack trace, and I do not believe the answer is in Java. I tried changing the ports and confirmed that another port (8005) also did not work with the same error message. How to verify that my Linux network setup allows Java to use ports?

EDIT2: It appears that this field has been the victim of an invasion. I believe that it makes sense to mark this message for the moderator in order to close it, since one cannot expect that a compromised mailbox will behave normally. Thank you all for your time and efforts.

EDIT: It is likely that package corruption in / bin is responsible. I had to update a few using up2date.

ADDITIONAL INFORMATION:

Re: Similar questions, I ruled out the possibility of JVM_BIND by checking netstat.

ping localhost just freezes:

$ ping localhost PING localhost (127.0.0.1) 56(84) bytes of data. -- no responses --- --- localhost ping statistics --- 9 packets transmitted, 0 received, 100% packet loss, time 8000ms 

ping google works:

 $ ping google.com PING google.com (74.125.225.228) 56(84) bytes of data. -- responses removed --- --- google.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2001ms rtt min/avg/max/mdev = 1.389/1.417/1.443/0.048 ms, pipe 2 

an exception:

 SEVERE: StandardServer.await: create[8036]: java.net.BindException: Cannot assign requested address at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.(Unknown Source) at org.apache.catalina.core.StandardServer.await(StandardServer.java:373) at org.apache.catalina.startup.Catalina.await(Catalina.java:662) at org.apache.catalina.startup.Catalina.start(Catalina.java:614) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Jun 5, 2013 12:49:05 PM org.apache.coyote.http11.Http11Protocol pause INFO: Pausing Coyote HTTP/1.1 on http-8035 Jun 5, 2013 12:49:05 PM org.apache.catalina.connector.Connector pause SEVERE: Protocol handler pause failed java.net.SocketException: Invalid argument or cannot assign requested address at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.(Unknown Source) at java.net.Socket.(Unknown Source) at org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:492) at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:289) at org.apache.jk.server.JkMain.pause(JkMain.java:725) at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153) at org.apache.catalina.connector.Connector.pause(Connector.java:1029) at org.apache.catalina.core.StandardService.stop(StandardService.java:566) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744) at org.apache.catalina.startup.Catalina.stop(Catalina.java:648) at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:692) 
+4
source share
4 answers

It seems to me that your / etc / host configuration is incorrect. Can you ping 127.0.0.1? Also make sure you have a line in the host file

/ etc / host

 127.0.0.1 localhost 

.

Check if your The Loopback Interface is configured correctly.

+8
source

"java.net.BindException: Unable to assign the requested address" assumes that another Tomcat instance did not shut down correctly and is still using the port that you assigned tomcat to.

+1
source

Answer from user 1628502 is correct. Another instance is running and is using this address. Kill this process and try starting the server again. Do you work as root? then the entire port and resources used by the server will be loose and automatically released when the server closes / shuts down. And in the case of the user, when you do not close the server properly, the address remains connected, it could be your pblm.

Reboot the system and try to run it as root

+1
source

If you have already confirmed that no other process uses the same port that is configured for Tomcat, you need to check your network configuration.

Make sure your /etc/host file does not contain multiple entries for localhost . If so, make sure the IP addresses listed are actually assigned to your computer. If not, delete or update these entries using your current IP address.

0
source

Source: https://habr.com/ru/post/1484701/


All Articles