You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Collins, Jim" <ji...@uk.nomura.com> on 2002/08/14 14:23:29 UTC

RE: Application running on Tomcat 4.1.3 stops resonding when inst alled with the Manager app

Hi,

I have taken Andrews advise and upgraded Tomcat. I am now using version
4.1.8, however I am still getting the same problem. I believe that I have
narrowed the problem down to using JNDIRealm to authenticate users, in the
past I used Apache to authenticate a user against LDAP but now I am running
Tomcat stand alone and it authenticates against LDAP. This is the only thing
I can think of because I have never had this problem before with earlier
versions of Tomcat, and the Manager app also fails and that is using
JNDIRealm to authenticate.

If anyone has any ideas about this it would be great.

Thanks.

Jim.

> -----Original Message-----
> From: Collins, Jim [mailto:jim.collins@uk.nomura.com]
> Sent: 13 August 2002 08:57
> To: 'Tomcat Users List'
> Subject: Application running on Tomcat 4.1.3 stops resonding when
> installe d with the Manager app
> 
> 
> Hi,
> 
> I have a an application running on Tomcat 4.1.3 that frequently stops
> responding for approximately 8 minutes. Tomcat itself is 
> still running OK
> and I can access the example servlets and JSP's with no problem. My
> application is deployed as a WAR file using the Manager 
> servlets install
> command, and I don't know if it could be something to do with 
> this. Below is
> a stack trace from catalina.out that I get when the app stops 
> responding: 
> 
> java.net.SocketException: Software caused connection abort
>         at java.net.PlainSocketImpl.socketAccept(Native Method)
>         at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:343)
>         at java.net.ServerSocket.implAccept(ServerSocket.java:438)
>         at java.net.ServerSocket.accept(ServerSocket.java:409)
>         at
> org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSo
> cket(DefaultSe
> rverSocketFactory.java:107)
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTc
> pEndpoint.java
> :335)
>         at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi
> nt.java:483)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.jav
> a:518)
>         at java.lang.Thread.run(Thread.java:536)
> 
> If anyone has any idea why this is happening it would be appreciated.
> 
> Thanks
> 
> Jim.
> 
> PS I am still working on the app and installing it and 
> removing it quiet a
> lot as develop and at times the install and remove commands 
> don't respond
> for about 8 minutes.
> 
> 
> PLEASE READ: The information contained in this email is confidential
> and intended for the named recipient(s) only. If you are not 
> an intended
> recipient of this email you must not copy, distribute or take any 
> further action in reliance on it and you should delete it and 
> notify the
> sender immediately. Email is not a secure method of communication and 
> Nomura International plc cannot accept responsibility for the accuracy
> or completeness of this message or any attachment(s). Please 
> examine this
> email for virus infection, for which Nomura International plc accepts
> no responsibility. If verification of this email is sought then please
> request a hard copy. Unless otherwise stated any views or opinions
> presented are solely those of the author and do not represent those of
> Nomura International plc. This email is intended for informational
> purposes only and is not a solicitation or offer to buy or sell
> securities or related financial instruments. Nomura 
> International plc is
> regulated by the Financial Services Authority and is a member of the
> London Stock Exchange.
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 


PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any 
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and 
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How to keep track of sessions

Posted by Ben Walding <be...@walding.com>.
You could use an application context listener to write out the sessions 
when the context is shutdown and reread them when it starts up.

I tried to work out how the manager application (part of  the 
distribution) worked (as it knows about sessions), but gave up as it 
looked like to much work and too much poking about inside tomcat.

for my tastes (which didn't include
Mark O'Driscoll wrote:

>I am trying to keep track of the current sessions that are active in my web
>application.
>
>I have a HttpSessionListener that is correctly called on
>sessionCreated/sessionDeleted. I keep a reference to each session in the
>servletContext as a Vector.
>
>If tomcat is restarted then the sessions are persisted fine. However my
>vector of sessions is lost so I have no record of sessions that were created
>during a previous tomcat run.
>
>Any idea how I could find or keep the list of previously created sessions?
>
>Is there any way I can find a list of the current sessions without keeping a
>list (that would be my preference)
>
>TIA
>
>- Mark
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How to keep track of sessions

Posted by Luminous Heart <lu...@yahoo.com>.
Is this a bug in tomcat 4.0.4? Notice that these two
errors that am posting are from two different
applications in the same context.

Please help.

Thanks.


Apache Tomcat/4.0.4 - HTTP Status 500 - Internal
Server Error

--------------------------------------------------------------------------------

type Exception report

message Internal Server Error

description The server encountered an internal error
(Internal Server Error) that prevented it from
fulfilling this request.

exception 

javax.servlet.ServletException:
java.lang.NullPointerException
	at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
	at
org.apache.jsp.inbox$jsp._jspService(inbox$jsp.java:1043)
	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
	at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:368)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
	at
org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
	at java.lang.Thread.run(Thread.java:536)


root cause 

java.lang.Exception: java.lang.NullPointerException
	at
org.apache.jsp.inbox$jsp._jspService(inbox$jsp.java:1032)
	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
	at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:368)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
	at
org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
	at java.lang.Thread.run(Thread.java:536)



--------------------------------------------------------------------------------

The same 


Apache Tomcat/4.0.4 - HTTP Status 500 - Internal
Server Error

--------------------------------------------------------------------------------

type Exception report

message Internal Server Error

description The server encountered an internal error
(Internal Server Error) that prevented it from
fulfilling this request.

exception 

java.lang.NullPointerException
	at
org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:61)
	at
org.postgresql.Connection.ExecSQL(Connection.java:398)
	at
org.postgresql.jdbc2.Statement.execute(Statement.java:130)
	at
org.postgresql.jdbc2.Statement.executeQuery(Statement.java:54)
	at
org.postgresql.jdbc2.PreparedStatement.executeQuery(PreparedStatement.java:99)
	at
com.codestudio.sql.PoolManPreparedStatement.executeQuery(Unknown
Source)
	at
org.apache.jsp.AccountAccess$jsp._jspService(AccountAccess$jsp.java:207)
	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
	at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:368)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
	at
org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
	at java.lang.Thread.run(Thread.java:536)



--------------------------------------------------------------------------------




__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How to keep track of sessions

Posted by Ashish Kulkarni <ku...@yahoo.com>.
Hi 
Can some one provide with some java code where in they
have used HttpSessionListener, and then stored the
sessions in a vector when a new session is created,
and remove it when it is invalidated.
i m developing a webapplication where in the database
is as400, so when ever a user logs in a job is run on
as/400, but if the user just closes the browser
without signing out, then this job runs on as/400
untill i restart tomcat,  so i would like to know when
the user closes the browser, but there is no way i 
can find it out, so i think i will store all the
sessions created in a vector, and when the user
signoff I will remove the session from vector and then
also run schedule job say after 30 min which will
check the session from the vector,to find when was it
used last time, and if it is more then some time say
30 min, invalidate that session, which will stop the
job running on as400
is there a better way of doing it..
Ashish
--- Mark O'Driscoll <ma...@eircom.net> wrote:
> I am trying to keep track of the current sessions
> that are active in my web
> application.
> 
> I have a HttpSessionListener that is correctly
> called on
> sessionCreated/sessionDeleted. I keep a reference to
> each session in the
> servletContext as a Vector.
> 
> If tomcat is restarted then the sessions are
> persisted fine. However my
> vector of sessions is lost so I have no record of
> sessions that were created
> during a previous tomcat run.
> 
> Any idea how I could find or keep the list of
> previously created sessions?
> 
> Is there any way I can find a list of the current
> sessions without keeping a
> list (that would be my preference)
> 
> TIA
> 
> - Mark
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


How to keep track of sessions

Posted by Mark O'Driscoll <ma...@eircom.net>.
I am trying to keep track of the current sessions that are active in my web
application.

I have a HttpSessionListener that is correctly called on
sessionCreated/sessionDeleted. I keep a reference to each session in the
servletContext as a Vector.

If tomcat is restarted then the sessions are persisted fine. However my
vector of sessions is lost so I have no record of sessions that were created
during a previous tomcat run.

Any idea how I could find or keep the list of previously created sessions?

Is there any way I can find a list of the current sessions without keeping a
list (that would be my preference)

TIA

- Mark


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>