Tomcat crashes and problems with port 8007
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   antonio_camporeale
Posted On:   Tuesday, July 2, 2002 07:47 AM

I'm using Tomcat 3.1.1 and Apache 1.3.20 SSL with jdk 1.2.2_07 on Sun Solaris 2.6. On Tomcat there are two context path (two directories in webapps, one serves the unsecure part and the other the secure part of a web site). Only to make you understand the global scenario Tomcat speaks with an Application Server that is behind some firewalls. The browsing of the web-site works well for some hours (from 2 to 8 or 9, sometimes for a couple of days), but suddenly Tomcat crashes. I mean that the jvm of Tomcat is still alive but doesn't serve the requests any more. I can see (trough the command "netstat") that Tomcat doesn't release the TCP connections with Apache (on port 8007); infact there are a lot of c   More>>

I'm using Tomcat 3.1.1 and Apache 1.3.20 SSL with jdk 1.2.2_07 on Sun Solaris 2.6.


On Tomcat there are two context path (two directories in webapps, one serves the unsecure part and the other the secure part of a web site).


Only to make you understand the global scenario Tomcat speaks with an Application Server that is behind some firewalls.


The browsing of the web-site works well for some hours (from 2 to 8 or 9, sometimes for a couple of days), but suddenly Tomcat crashes. I mean that the jvm of Tomcat is still alive but doesn't serve the requests any more. I can see (trough the command "netstat") that Tomcat doesn't release the TCP connections with Apache (on port 8007); infact there are a lot of connections TCP established on the port 8007 and no message TCP goes across these connections (I can see that trough the command "snoop").
When Tomcat is in this state he accepts other requests, that is if I try from the browser to access to a page of the site, Tomcat estabishes a new connection with Apache on port 8007 but the request is not served (that is the browser is waiting forever). So Tomcat establishes new connections with Apache but doesn't serve the requests coming from Apache.


This happens 2 or 3 times per day.


The error I can find (but not always) in the log of the application is


java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:38150 accept,resolve)
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable. (Compiled Code)
at java.lang.Exception. (Compiled Code)
at java.lang.RuntimeException. (RuntimeException.java:47)
at java.lang.SecurityException. (SecurityException.java:39)
at java.security.AccessControlException. (AccessControlException.java:57)
at java.security.AccessControlContext.checkPermission(Compiled Code)
at java.security.AccessController.checkPermission(AccessController.java:403)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at com.inprise.vbroker.rmi.CORBA.Java2RMISecurityManager.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkAccept(SecurityManager.java:1138)
at com.inprise.vbroker.util.RMISecurityManager.checkAccept(RMISecurityManager.java:128)
at java.net.ServerSocket.implAccept(Compiled Code)
at java.net.ServerSocket.accept(Compiled Code)
at org.apache.tomcat.service.PoolTcpEndpoint.acceptSocket(Compiled Code)
at org.apache.tomcat.service.TcpWorkerThread.run(Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)
Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8007] shutdown due to exception: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:38150 accept,resolve)


Besides I can see this log in mod_jserv.log:


(EMERGENCY) ajp12[1]: cannot scan servlet headers (500)
(ERROR) an error returned handling request via protocol "ajpv12"
(EMERGENCY) ajp12: can not connect to host 127.0.0.1:8007
(EMERGENCY) ajp12: connection fail
(ERROR) an error returned handling request via protocol "ajpv12"




I suppose that the problem is a permission problem on the sockets and so I have set the following type of policy (only to understand if I'm on the correct way) in the file /usr/java/jre/lib/security/java.policy


grant {permission java.security.AllPermission "", "";};


Since two days the web-site is stressed by some stress-test software and Tomcat is still alive. Maybe the way I followed is correct, but have you never had some problems like my problem on Apache/Tomcat? Do you think there are other solutions to my problem (if the problem will happen again) ?


Thank you very much in advance

   <<Less
About | Sitemap | Contact