PDA

View Full Version : java.net.SocketException: Permission denied: listen failed


manishrathi
10-04-2009, 19:51
When I am trying to load default page of tomcat, it gives error message "Internet Explorer cannot display the webpage"
I checked the log files and in catalina log file, I found following
------------------------------------------------------------------------------------------------------------------------------------------

Apr 9, 2009 6:55:20 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_11\bin;.;C:\WINDOWS\Sun\Java\b in;C:\WINDOWS\system32;C:\WINDOWS;C:\Perl\bin;C:\P rogram Files\Java\jdk1.6.0_11\bin;C:\Program Files\DivX\DivX Player;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\s ystem32\WBEM;;C:\Program Files\Common Files\DivX Shared\
Apr 9, 2009 6:55:42 PM org.apache.coyote.http11.Http11BaseProtocol init
SEVERE: Error initializing endpoint
java.net.SocketException: Permission denied: listen failed
at java.net.PlainSocketImpl.socketListen(Native Method)
at java.net.PlainSocketImpl.listen(PlainSocketImpl.ja va:374)
at java.net.ServerSocket.bind(ServerSocket.java:320)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:141)
at org.apache.tomcat.util.net.DefaultServerSocketFact ory.createSocket(DefaultServerSocketFactory.java:5 0)
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEnd point(PoolTcpEndpoint.java:293)
at org.apache.coyote.http11.Http11BaseProtocol.init(H ttp11BaseProtocol.java:139)
at org.apache.catalina.connector.Connector.initialize (Connector.java:1017)
at org.apache.catalina.core.StandardService.initializ e(StandardService.java:578)
at org.apache.catalina.core.StandardServer.initialize (StandardServer.java:782)
at org.apache.catalina.startup.Catalina.load(Catalina .java:504)
at org.apache.catalina.startup.Catalina.load(Catalina .java:524)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.load(Bootstr ap.java:267)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:432)
---------------------------------------------------------------------------------------------------------------------------------------------

I read different posts, it says this can be firewall settings or anti-virus software taking up the socket. I changed the port number, but still same the same error.

How to solve this problem ? Please explain every step in detail and from scratch.

thanks

kjkoster
11-04-2009, 21:40
Dear manishrathi,

I don't know much about Windows, as I try to avoid having to work with it. A quick search turned up this post (http://marc.info/?l=tomcat-user&m=121820007223794&w=2). The original reporter solved the issue by *uninstalling* his firewall software, not just disabling it.

Kees Jan

PS. Interesting that Microsoft suggests to turn off UAC.

Barry
16-04-2009, 13:33
Hi,

Kees Jan has a good point.. you may have a firewall preventing the VM to go out (in Vista you'd get a question if you want to allow Java, if you select block you can get this error)

What firewall do you run?