Re: Aw: Re: tomcat hangs

2021-09-13 Thread Christopher Schultz

Peter,

On 9/13/21 04:12, Peter Rader wrote:

Chris,


Gesendet: Donnerstag, 09. September 2021 um 22:15 Uhr
Von: "Christopher Schultz" 
An: users@tomcat.apache.org
Betreff: Re: Aw: tomcat hangs
Peter,

On 9/9/21 08:21, Peter Rader wrote:

I might noticed a simmilar issue: I ran the JVM in a linux OS on a VM
(in virtualbox btw). The jdk for some reason request a random number.
The JDK asks the LinuxOS for a new random number (maybe in the hope
to use a hardware-based TRNG). Since this linux in virtualbox is
not-so low-level the random number is generated due to RAM
squarenumbers, because no memory is changed - no new random number
has been generated and we get a OS-based softlock.


WHAT?

-chris


YES, id reported this many years ago 
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4952383

There is a workaround (from comments): set java.security.egd=file:/dev/urandom


That is a very very very old hack which shouldn't be required under any 
modern installation.


My "WHAT?" question was more about the string of words before that, only 
some of which coalesced into a coherent idea.


-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Aw: Re: tomcat hangs

2021-09-13 Thread Peter Rader
Chris,

> Gesendet: Donnerstag, 09. September 2021 um 22:15 Uhr
> Von: "Christopher Schultz" 
> An: users@tomcat.apache.org
> Betreff: Re: Aw: tomcat hangs
> Peter,
>
> On 9/9/21 08:21, Peter Rader wrote:
> > I might noticed a simmilar issue: I ran the JVM in a linux OS on a VM
> > (in virtualbox btw). The jdk for some reason request a random number.
> > The JDK asks the LinuxOS for a new random number (maybe in the hope
> > to use a hardware-based TRNG). Since this linux in virtualbox is
> > not-so low-level the random number is generated due to RAM
> > squarenumbers, because no memory is changed - no new random number
> > has been generated and we get a OS-based softlock.
>
> WHAT?
>
> -chris

YES, id reported this many years ago 
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4952383

There is a workaround (from comments): set java.security.egd=file:/dev/urandom

Regards

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Aw: tomcat hangs

2021-09-09 Thread Christopher Schultz

Peter,

On 9/9/21 08:21, Peter Rader wrote:

I might noticed a simmilar issue: I ran the JVM in a linux OS on a VM
(in virtualbox btw). The jdk for some reason request a random number.
The JDK asks the LinuxOS for a new random number (maybe in the hope
to use a hardware-based TRNG). Since this linux in virtualbox is
not-so low-level the random number is generated due to RAM
squarenumbers, because no memory is changed - no new random number
has been generated and we get a OS-based softlock.


WHAT?

-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat hangs

2021-09-09 Thread Mark Thomas

On 09/09/2021 11:50, Mehrdad Taagholi wrote:

HiI use apache tomcat 8.0.32 and oracle-jdk-8u66 and redhat 6.After working 
with the system for a few hours and the load on the system increases, suddenly 
the tomcat hangs and no logs are printed and it is not possible to connect via 
jvisualvm and I can not get any dump and I have to reload Tomcat.I have 
increased maxthreads and use the HttpProtocol protocol.Please suggest a way to 
fix the my tomact.


Take three thread dumps ~5 seconds apart when it hangs. Post the 
complete thread dumps somewhere we can see them.


Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Aw: tomcat hangs

2021-09-09 Thread Peter Rader
I might noticed a simmilar issue: I ran the JVM in a linux OS on a VM (in 
virtualbox btw). The jdk for some reason request a random number. The JDK asks 
the LinuxOS for a new random number (maybe in the hope to use a hardware-based 
TRNG). Since this linux in virtualbox is not-so low-level the random number is 
generated due to RAM squarenumbers, because no memory is changed - no new 
random number has been generated and we get a OS-based softlock.

Regards


> HiI use apache tomcat 8.0.32 and oracle-jdk-8u66 and redhat 6.After working 
> with the system for a few hours
> and the load on the system increases, suddenly the tomcat hangs and no logs 
> are printed and it is not possible
> to connect via jvisualvm and I can not get any dump and I have to reload 
> Tomcat.I have increased maxthreads
> and use the HttpProtocol protocol.Please suggest a way to fix the my tomact.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



AW: tomcat hangs

2021-09-09 Thread Thomas Hoffmann (Speed4Trade GmbH)
Just some hints or ideas:
- Is it a busy hang? CPU load high?
- Can you use jstack at console to get a stack trace?
- Does it also happen with current version of tomcat 8.0.52?
- Does is alto happen with a current version of JDK?


-Ursprüngliche Nachricht-
Von: Mehrdad Taagholi  
Gesendet: Donnerstag, 9. September 2021 12:51
An: users@tomcat.apache.org
Betreff: tomcat hangs

HiI use apache tomcat 8.0.32 and oracle-jdk-8u66 and redhat 6.After working 
with the system for a few hours and the load on the system increases, suddenly 
the tomcat hangs and no logs are printed and it is not possible to connect via 
jvisualvm and I can not get any dump and I have to reload Tomcat.I have 
increased maxthreads and use the HttpProtocol protocol.Please suggest a way to 
fix the my tomact.


Re: tomcat hangs

2021-09-09 Thread Olaf Kock


On 09.09.21 12:50, Mehrdad Taagholi wrote:
> HiI use apache tomcat 8.0.32 and oracle-jdk-8u66 and redhat 6.After working 
> with the system for a few hours and the load on the system increases, 
> suddenly the tomcat hangs and no logs are printed and it is not possible to 
> connect via jvisualvm and I can not get any dump and I have to reload 
> Tomcat.I have increased maxthreads and use the HttpProtocol protocol.Please 
> suggest a way to fix the my tomact.

Seconding Jason's suggestion to look at your webapps.

However, as you explicitly ask for suggestions to fix your tomcat:
You're running a release from more than 5 years ago, where the general
version 8.0 has reached its end of life 3 years ago
(https://tomcat.apache.org/tomcat-80-eol.html), and are also running on
a JDK that has seen 200 more patch releases.

It's a good idea to keep your installations reasonably current -
specifically when you're looking for bugs in the infrastructure.

Try to reproduce on a current version (of Tomcat and JDK) - and look at
your webapps. As you can reproduce within a few hours, it's also a good
idea to connect a profiler early and check for the applications'
behaviour in the time running up to the problem.

More likely than not, your problem is in your application's code. Or, if
it's in Tomcat, there's a high likelyhood that it has been fixed in the
past 5 years.

Olaf

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat hangs

2021-09-09 Thread Jason Wee
must be the problem of your webapp... show all webapp codes?

On Thu, Sep 9, 2021 at 6:51 PM Mehrdad Taagholi
 wrote:
>
> HiI use apache tomcat 8.0.32 and oracle-jdk-8u66 and redhat 6.After working 
> with the system for a few hours and the load on the system increases, 
> suddenly the tomcat hangs and no logs are printed and it is not possible to 
> connect via jvisualvm and I can not get any dump and I have to reload 
> Tomcat.I have increased maxthreads and use the HttpProtocol protocol.Please 
> suggest a way to fix the my tomact.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



tomcat hangs

2021-09-09 Thread Mehrdad Taagholi
HiI use apache tomcat 8.0.32 and oracle-jdk-8u66 and redhat 6.After working 
with the system for a few hours and the load on the system increases, suddenly 
the tomcat hangs and no logs are printed and it is not possible to connect via 
jvisualvm and I can not get any dump and I have to reload Tomcat.I have 
increased maxthreads and use the HttpProtocol protocol.Please suggest a way to 
fix the my tomact.


Re: Tomcat Hangs up and doesn't start

2017-03-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mahmoud,

On 3/20/17 6:36 AM, Mahmoud Ramadan wrote:
> Thanks for the reply , i solved my issue by disabling the Centos
> firewall

Don't do that!

Instead, open the single port that you need (port 8080) and leave the
firewall running.

> now i can browse the server remotely , thanks

And all your services are exposed to the rest of the network. Enjoy
all of the SSH login attempts.

- -chris

> On Sun, Mar 19, 2017 at 6:45 PM, Felix Schumacher < 
> felix.schumac...@internetallee.de> wrote:
> 
>> Am 19.03.2017 um 14:09 schrieb Mahmoud Ramadan:
>> 
>>> But whenever i use the command [root@localhost ~]# service
>>> tomcat status tomcat dead but subsys locked
>>> 
>>> I see the service dead , i tried to remove the
>>> /var/lock/subsys/tomcat and restarting the service again or
>>> rebooting the system but still get " tomcat dead but subsys
>>> locked " and can not get anything when browsing 
>>> http://10.1.1.25:8080
>>> 
>> You showed us, that you were running tomcat as a normal console
>> app (which seemed to work, as Andre pointed out). Now you are
>> expecting it to have been somehow magically transformed into a
>> unix service?
>> 
>> That will probably not work.
>> 
>> What happens, when you stop the console app (the catalina.sh run)
>> and start tomcat as a service alone (with service tomcat start)?
>> 
>> Note, that I haven't used CentOS before and don't know, what init
>> system it uses. I always found it easier, to download an
>> unmodified version of tomcat from the apache tomcat homepage and
>> start from there.
>> 
>> Felix
>> 
>>> 
>>> Best Regards,
>>> 
>>> Mahmoud Ramadan Ali
>>> 
>>> Network and VOIP Specialist.
>>> 
>>> Mobil: (+2) 01276877112
>>> 
>>> Blog | Website 
>>> | LinkedIn 
>>> 
>>> 
>>> On Sun, Mar 19, 2017 at 3:30 PM, André Warnier (tomcat)
>>>  wrote:
>>> 
>>> On 19.03.2017 12:59, Mahmoud Ramadan wrote:
 
 Hi all,
> I've installed Tomcat on Centos 6.2 and when i try to start
> the service it hangs up at " INFO: Server startup in 6935
> ms " and stays forever , below the debugs , thanks
> 
> What do you expect it to "do" after starting up ?
 It's a HTTP server, so when it's done with starting up, it
 waits for HTTP requests, to process them. The logfile (or the
 console, if that is where you are running it) won't show
 anything else, unless there are errors processing requests
 (or until you stop tomcat).
 
 In other words : there is nothing abnormal in the log which
 you show below. To me, it looks like a perfectly healthy
 tomcat, just waiting for something to do.
 
 
 [root@localhost ~]# sh /opt/tomcat7/bin/catalina.sh run
> Using CATALINA_BASE:   /opt/tomcat7 Using CATALINA_HOME:
> /opt/tomcat7 Using CATALINA_TMPDIR: /opt/tomcat7/temp Using
> JRE_HOME:/opt/java/jre1.7.0_04 Using CLASSPATH: 
> /opt/tomcat7/bin/bootstrap.jar:/opt/tomcat7/bin/tomcat-juli.jar
>
> 
Mar 19, 2017 11:22:15 AM org.apache.catalina.core.AprLifecycleListener
> init INFO: The APR based Apache Tomcat Native library which
> allows optimal performance in production environments was
> not found on the java.library.path: 
> /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
>
> 
Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol init
> INFO: Initializing ProtocolHandler ["http-bio-8080"] Mar
> 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol
> init INFO: Initializing ProtocolHandler ["http-bio-8443"] 
> Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol
> init INFO: Initializing ProtocolHandler ["ajp-bio-8009"] 
> Mar 19, 2017 11:22:15 AM
> org.apache.catalina.startup.Catalina load INFO:
> Initialization processed in 1234 ms Mar 19, 2017 11:22:15
> AM org.apache.catalina.core.StandardService startInternal 
> INFO: Starting service Catalina Mar 19, 2017 11:22:15 AM
> org.apache.catalina.core.StandardEngine startInternal INFO:
> Starting Servlet Engine: Apache Tomcat/7.0.23 Mar 19, 2017
> 11:22:19 AM org.apache.catalina.startup.HostConfig 
> deployDirectory INFO: Deploying web application directory
> /opt/tomcat7/webapps/examples Mar 19, 2017 11:22:19 AM
> org.apache.catalina.startup.HostConfig deployDirectory 
> INFO: Deploying web application directory
> /opt/tomcat7/webapps/orktrack 0 [pool-2-thread-1] INFO
> context  - OrkTrack ContextInitialized() log4jConfigFile is
> logging.properties 0 [pool-2-thread-1] INFO context  -
> OrkTrack ContextInitialized() configFile is
> orktrack.config.xml 1 [pool-2-thread-1] INFO context  -
> OrkTrack ContextInitialized() HibernateConfigFile is
> database.hbm.xml 2 [pool-2-thread-1] INFO context  -
> OrkTrack 

Re: Tomcat Hangs up and doesn't start

2017-03-20 Thread Mahmoud Ramadan
Hi ,
Thanks for the reply , i solved my issue by disabling the Centos firewall ,
now i can browse the server remotely , thanks

Best Regards,

Mahmoud Ramadan Ali

Network and VOIP Specialist.

Mobil: (+2) 01276877112

Blog | Website
| LinkedIn


On Sun, Mar 19, 2017 at 6:45 PM, Felix Schumacher <
felix.schumac...@internetallee.de> wrote:

> Am 19.03.2017 um 14:09 schrieb Mahmoud Ramadan:
>
>> But whenever i use the command
>>   [root@localhost ~]# service tomcat status
>> tomcat dead but subsys locked
>>
>> I see the service dead , i tried to remove the /var/lock/subsys/tomcat and
>> restarting the service again or rebooting the system but still get "
>> tomcat
>> dead but subsys locked " and can not get anything when browsing
>> http://10.1.1.25:8080
>>
> You showed us, that you were running tomcat as a normal console app (which
> seemed to work, as Andre pointed out). Now you are expecting it to have
> been somehow magically transformed into a unix service?
>
> That will probably not work.
>
> What happens, when you stop the console app (the catalina.sh run) and
> start tomcat as a service alone (with service tomcat start)?
>
> Note, that I haven't used CentOS before and don't know, what init system
> it uses. I always found it easier, to download an unmodified version of
> tomcat from the apache tomcat homepage and start from there.
>
> Felix
>
>>
>> Best Regards,
>>
>> Mahmoud Ramadan Ali
>>
>> Network and VOIP Specialist.
>>
>> Mobil: (+2) 01276877112
>>
>> Blog | Website
>> | LinkedIn
>> 
>>
>> On Sun, Mar 19, 2017 at 3:30 PM, André Warnier (tomcat) 
>> wrote:
>>
>> On 19.03.2017 12:59, Mahmoud Ramadan wrote:
>>>
>>> Hi all,
 I've installed Tomcat on Centos 6.2 and when i try to start the service
 it
 hangs up at " INFO: Server startup in 6935 ms " and stays forever ,
 below
 the debugs , thanks

 What do you expect it to "do" after starting up ?
>>> It's a HTTP server, so when it's done with starting up, it waits for HTTP
>>> requests, to process them. The logfile (or the console, if that is where
>>> you are running it) won't show anything else, unless there are errors
>>> processing requests (or until you stop tomcat).
>>>
>>> In other words : there is nothing abnormal in the log which you show
>>> below. To me, it looks like a perfectly healthy tomcat, just waiting for
>>> something to do.
>>>
>>>
>>> [root@localhost ~]# sh /opt/tomcat7/bin/catalina.sh run
 Using CATALINA_BASE:   /opt/tomcat7
 Using CATALINA_HOME:   /opt/tomcat7
 Using CATALINA_TMPDIR: /opt/tomcat7/temp
 Using JRE_HOME:/opt/java/jre1.7.0_04
 Using CLASSPATH:
 /opt/tomcat7/bin/bootstrap.jar:/opt/tomcat7/bin/tomcat-juli.jar
 Mar 19, 2017 11:22:15 AM org.apache.catalina.core.AprLifecycleListener
 init
 INFO: The APR based Apache Tomcat Native library which allows optimal
 performance in production environments was not found on the
 java.library.path:
 /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
 Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol init
 INFO: Initializing ProtocolHandler ["http-bio-8080"]
 Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol init
 INFO: Initializing ProtocolHandler ["http-bio-8443"]
 Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol init
 INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
 Mar 19, 2017 11:22:15 AM org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 1234 ms
 Mar 19, 2017 11:22:15 AM org.apache.catalina.core.StandardService
 startInternal
 INFO: Starting service Catalina
 Mar 19, 2017 11:22:15 AM org.apache.catalina.core.StandardEngine
 startInternal
 INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
 Mar 19, 2017 11:22:19 AM org.apache.catalina.startup.HostConfig
 deployDirectory
 INFO: Deploying web application directory /opt/tomcat7/webapps/examples
 Mar 19, 2017 11:22:19 AM org.apache.catalina.startup.HostConfig
 deployDirectory
 INFO: Deploying web application directory /opt/tomcat7/webapps/orktrack
 0 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized()
 log4jConfigFile is logging.properties
 0 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized()
 configFile is orktrack.config.xml
 1 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized()
 HibernateConfigFile is database.hbm.xml
 2 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized():
 TomcatHome is set to /opt/tomcat7
 2017-03-19 11:22:19,440 net.sf.oreka.orktrack.OrkTrack  INFO -
 
 2017-03-19 11:22:19,453 

Re: Tomcat Hangs up and doesn't start

2017-03-19 Thread Felix Schumacher

Am 19.03.2017 um 14:09 schrieb Mahmoud Ramadan:

But whenever i use the command
  [root@localhost ~]# service tomcat status
tomcat dead but subsys locked

I see the service dead , i tried to remove the /var/lock/subsys/tomcat and
restarting the service again or rebooting the system but still get " tomcat
dead but subsys locked " and can not get anything when browsing
http://10.1.1.25:8080
You showed us, that you were running tomcat as a normal console app 
(which seemed to work, as Andre pointed out). Now you are expecting it 
to have been somehow magically transformed into a unix service?


That will probably not work.

What happens, when you stop the console app (the catalina.sh run) and 
start tomcat as a service alone (with service tomcat start)?


Note, that I haven't used CentOS before and don't know, what init system 
it uses. I always found it easier, to download an unmodified version of 
tomcat from the apache tomcat homepage and start from there.


Felix


Best Regards,

Mahmoud Ramadan Ali

Network and VOIP Specialist.

Mobil: (+2) 01276877112

Blog | Website
| LinkedIn


On Sun, Mar 19, 2017 at 3:30 PM, André Warnier (tomcat) 
wrote:


On 19.03.2017 12:59, Mahmoud Ramadan wrote:


Hi all,
I've installed Tomcat on Centos 6.2 and when i try to start the service it
hangs up at " INFO: Server startup in 6935 ms " and stays forever , below
the debugs , thanks


What do you expect it to "do" after starting up ?
It's a HTTP server, so when it's done with starting up, it waits for HTTP
requests, to process them. The logfile (or the console, if that is where
you are running it) won't show anything else, unless there are errors
processing requests (or until you stop tomcat).

In other words : there is nothing abnormal in the log which you show
below. To me, it looks like a perfectly healthy tomcat, just waiting for
something to do.



[root@localhost ~]# sh /opt/tomcat7/bin/catalina.sh run
Using CATALINA_BASE:   /opt/tomcat7
Using CATALINA_HOME:   /opt/tomcat7
Using CATALINA_TMPDIR: /opt/tomcat7/temp
Using JRE_HOME:/opt/java/jre1.7.0_04
Using CLASSPATH:
/opt/tomcat7/bin/bootstrap.jar:/opt/tomcat7/bin/tomcat-juli.jar
Mar 19, 2017 11:22:15 AM org.apache.catalina.core.AprLifecycleListener
init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8443"]
Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Mar 19, 2017 11:22:15 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1234 ms
Mar 19, 2017 11:22:15 AM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Catalina
Mar 19, 2017 11:22:15 AM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
Mar 19, 2017 11:22:19 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/examples
Mar 19, 2017 11:22:19 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/orktrack
0 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized()
log4jConfigFile is logging.properties
0 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized()
configFile is orktrack.config.xml
1 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized()
HibernateConfigFile is database.hbm.xml
2 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized():
TomcatHome is set to /opt/tomcat7
2017-03-19 11:22:19,440 net.sf.oreka.orktrack.OrkTrack  INFO -

2017-03-19 11:22:19,453 net.sf.oreka.orktrack.OrkTrack  INFO - OrkTrack
starting ...
2017-03-19 11:22:19,472 config  WARN - ConfigManager.load: config file
/etc/orkweb//orktrack.config.xml is empty or does not exist.
2017-03-19 11:22:20,956 net.sf.oreka.orktrack.OrkTrack  INFO - OrkTrack
started successfully.
2017-03-19 11:22:20,956 net.sf.oreka.orktrack.OrkTrack  INFO -

Mar 19, 2017 11:22:20 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/manager
Mar 19, 2017 11:22:21 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/host-mana
ger
Mar 19, 2017 11:22:21 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/orkweb
2017-03-19 

Re: Tomcat Hangs up and doesn't start

2017-03-19 Thread Mahmoud Ramadan
But whenever i use the command
 [root@localhost ~]# service tomcat status
tomcat dead but subsys locked

I see the service dead , i tried to remove the /var/lock/subsys/tomcat and
restarting the service again or rebooting the system but still get " tomcat
dead but subsys locked " and can not get anything when browsing
http://10.1.1.25:8080


Best Regards,

Mahmoud Ramadan Ali

Network and VOIP Specialist.

Mobil: (+2) 01276877112

Blog | Website
| LinkedIn


On Sun, Mar 19, 2017 at 3:30 PM, André Warnier (tomcat) 
wrote:

> On 19.03.2017 12:59, Mahmoud Ramadan wrote:
>
>> Hi all,
>> I've installed Tomcat on Centos 6.2 and when i try to start the service it
>> hangs up at " INFO: Server startup in 6935 ms " and stays forever , below
>> the debugs , thanks
>>
>
> What do you expect it to "do" after starting up ?
> It's a HTTP server, so when it's done with starting up, it waits for HTTP
> requests, to process them. The logfile (or the console, if that is where
> you are running it) won't show anything else, unless there are errors
> processing requests (or until you stop tomcat).
>
> In other words : there is nothing abnormal in the log which you show
> below. To me, it looks like a perfectly healthy tomcat, just waiting for
> something to do.
>
>
>> [root@localhost ~]# sh /opt/tomcat7/bin/catalina.sh run
>> Using CATALINA_BASE:   /opt/tomcat7
>> Using CATALINA_HOME:   /opt/tomcat7
>> Using CATALINA_TMPDIR: /opt/tomcat7/temp
>> Using JRE_HOME:/opt/java/jre1.7.0_04
>> Using CLASSPATH:
>> /opt/tomcat7/bin/bootstrap.jar:/opt/tomcat7/bin/tomcat-juli.jar
>> Mar 19, 2017 11:22:15 AM org.apache.catalina.core.AprLifecycleListener
>> init
>> INFO: The APR based Apache Tomcat Native library which allows optimal
>> performance in production environments was not found on the
>> java.library.path:
>> /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
>> Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol init
>> INFO: Initializing ProtocolHandler ["http-bio-8080"]
>> Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol init
>> INFO: Initializing ProtocolHandler ["http-bio-8443"]
>> Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol init
>> INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
>> Mar 19, 2017 11:22:15 AM org.apache.catalina.startup.Catalina load
>> INFO: Initialization processed in 1234 ms
>> Mar 19, 2017 11:22:15 AM org.apache.catalina.core.StandardService
>> startInternal
>> INFO: Starting service Catalina
>> Mar 19, 2017 11:22:15 AM org.apache.catalina.core.StandardEngine
>> startInternal
>> INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
>> Mar 19, 2017 11:22:19 AM org.apache.catalina.startup.HostConfig
>> deployDirectory
>> INFO: Deploying web application directory /opt/tomcat7/webapps/examples
>> Mar 19, 2017 11:22:19 AM org.apache.catalina.startup.HostConfig
>> deployDirectory
>> INFO: Deploying web application directory /opt/tomcat7/webapps/orktrack
>> 0 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized()
>> log4jConfigFile is logging.properties
>> 0 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized()
>> configFile is orktrack.config.xml
>> 1 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized()
>> HibernateConfigFile is database.hbm.xml
>> 2 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized():
>> TomcatHome is set to /opt/tomcat7
>> 2017-03-19 11:22:19,440 net.sf.oreka.orktrack.OrkTrack  INFO -
>> 
>> 2017-03-19 11:22:19,453 net.sf.oreka.orktrack.OrkTrack  INFO - OrkTrack
>> starting ...
>> 2017-03-19 11:22:19,472 config  WARN - ConfigManager.load: config file
>> /etc/orkweb//orktrack.config.xml is empty or does not exist.
>> 2017-03-19 11:22:20,956 net.sf.oreka.orktrack.OrkTrack  INFO - OrkTrack
>> started successfully.
>> 2017-03-19 11:22:20,956 net.sf.oreka.orktrack.OrkTrack  INFO -
>> 
>> Mar 19, 2017 11:22:20 AM org.apache.catalina.startup.HostConfig
>> deployDirectory
>> INFO: Deploying web application directory /opt/tomcat7/webapps/manager
>> Mar 19, 2017 11:22:21 AM org.apache.catalina.startup.HostConfig
>> deployDirectory
>> INFO: Deploying web application directory /opt/tomcat7/webapps/host-mana
>> ger
>> Mar 19, 2017 11:22:21 AM org.apache.catalina.startup.HostConfig
>> deployDirectory
>> INFO: Deploying web application directory /opt/tomcat7/webapps/orkweb
>> 2017-03-19 11:22:21,201 root  INFO - OrkWeb ContextInitialized():
>> log4jConfigFile is /etc/orkweb//logging.properties
>> 2017-03-19 11:22:21,201 root  INFO -
>> 
>> 2017-03-19 11:22:21,201 root  INFO - OrkWeb starting ...
>> 2017-03-19 11:22:21,201 root  INFO - OrkWeb ContextInitialized():
>> HibernateConfigFile is database.hbm.xml
>> 2017-03-19 11:22:21,652 root  INFO - OrkWeb 

Re: Tomcat Hangs up and doesn't start

2017-03-19 Thread tomcat

On 19.03.2017 12:59, Mahmoud Ramadan wrote:

Hi all,
I've installed Tomcat on Centos 6.2 and when i try to start the service it
hangs up at " INFO: Server startup in 6935 ms " and stays forever , below
the debugs , thanks


What do you expect it to "do" after starting up ?
It's a HTTP server, so when it's done with starting up, it waits for HTTP requests, to 
process them. The logfile (or the console, if that is where you are running it) won't show 
anything else, unless there are errors processing requests (or until you stop tomcat).


In other words : there is nothing abnormal in the log which you show below. To me, it 
looks like a perfectly healthy tomcat, just waiting for something to do.




[root@localhost ~]# sh /opt/tomcat7/bin/catalina.sh run
Using CATALINA_BASE:   /opt/tomcat7
Using CATALINA_HOME:   /opt/tomcat7
Using CATALINA_TMPDIR: /opt/tomcat7/temp
Using JRE_HOME:/opt/java/jre1.7.0_04
Using CLASSPATH:
/opt/tomcat7/bin/bootstrap.jar:/opt/tomcat7/bin/tomcat-juli.jar
Mar 19, 2017 11:22:15 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8443"]
Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Mar 19, 2017 11:22:15 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1234 ms
Mar 19, 2017 11:22:15 AM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Catalina
Mar 19, 2017 11:22:15 AM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
Mar 19, 2017 11:22:19 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/examples
Mar 19, 2017 11:22:19 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/orktrack
0 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized()
log4jConfigFile is logging.properties
0 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized()
configFile is orktrack.config.xml
1 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized()
HibernateConfigFile is database.hbm.xml
2 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized():
TomcatHome is set to /opt/tomcat7
2017-03-19 11:22:19,440 net.sf.oreka.orktrack.OrkTrack  INFO -

2017-03-19 11:22:19,453 net.sf.oreka.orktrack.OrkTrack  INFO - OrkTrack
starting ...
2017-03-19 11:22:19,472 config  WARN - ConfigManager.load: config file
/etc/orkweb//orktrack.config.xml is empty or does not exist.
2017-03-19 11:22:20,956 net.sf.oreka.orktrack.OrkTrack  INFO - OrkTrack
started successfully.
2017-03-19 11:22:20,956 net.sf.oreka.orktrack.OrkTrack  INFO -

Mar 19, 2017 11:22:20 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/manager
Mar 19, 2017 11:22:21 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/host-manager
Mar 19, 2017 11:22:21 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/orkweb
2017-03-19 11:22:21,201 root  INFO - OrkWeb ContextInitialized():
log4jConfigFile is /etc/orkweb//logging.properties
2017-03-19 11:22:21,201 root  INFO -

2017-03-19 11:22:21,201 root  INFO - OrkWeb starting ...
2017-03-19 11:22:21,201 root  INFO - OrkWeb ContextInitialized():
HibernateConfigFile is database.hbm.xml
2017-03-19 11:22:21,652 root  INFO - OrkWeb ContextInitialized():
TomcatHome is set to /opt/tomcat7
2017-03-19 11:22:21,663 root  INFO - OrkWeb started successfully.
2017-03-19 11:22:21,663 root  INFO -

2017-03-19 11:22:22,736 org.apache.tapestry.ApplicationServlet  INFO -
Initialized application servlet 'orkweb': 457 millis to create HiveMind
Registry, 1,060 millis overall.
Mar 19, 2017 11:22:22 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/ROOT
Mar 19, 2017 11:22:22 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/docs
Mar 19, 2017 11:22:22 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Mar 19, 2017 11:22:22 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8443"]
Mar 19, 

Tomcat Hangs up and doesn't start

2017-03-19 Thread Mahmoud Ramadan
Hi all,
I've installed Tomcat on Centos 6.2 and when i try to start the service it
hangs up at " INFO: Server startup in 6935 ms " and stays forever , below
the debugs , thanks

[root@localhost ~]# sh /opt/tomcat7/bin/catalina.sh run
Using CATALINA_BASE:   /opt/tomcat7
Using CATALINA_HOME:   /opt/tomcat7
Using CATALINA_TMPDIR: /opt/tomcat7/temp
Using JRE_HOME:/opt/java/jre1.7.0_04
Using CLASSPATH:
/opt/tomcat7/bin/bootstrap.jar:/opt/tomcat7/bin/tomcat-juli.jar
Mar 19, 2017 11:22:15 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8443"]
Mar 19, 2017 11:22:15 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Mar 19, 2017 11:22:15 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1234 ms
Mar 19, 2017 11:22:15 AM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Catalina
Mar 19, 2017 11:22:15 AM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
Mar 19, 2017 11:22:19 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/examples
Mar 19, 2017 11:22:19 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/orktrack
0 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized()
log4jConfigFile is logging.properties
0 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized()
configFile is orktrack.config.xml
1 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized()
HibernateConfigFile is database.hbm.xml
2 [pool-2-thread-1] INFO context  - OrkTrack ContextInitialized():
TomcatHome is set to /opt/tomcat7
2017-03-19 11:22:19,440 net.sf.oreka.orktrack.OrkTrack  INFO -

2017-03-19 11:22:19,453 net.sf.oreka.orktrack.OrkTrack  INFO - OrkTrack
starting ...
2017-03-19 11:22:19,472 config  WARN - ConfigManager.load: config file
/etc/orkweb//orktrack.config.xml is empty or does not exist.
2017-03-19 11:22:20,956 net.sf.oreka.orktrack.OrkTrack  INFO - OrkTrack
started successfully.
2017-03-19 11:22:20,956 net.sf.oreka.orktrack.OrkTrack  INFO -

Mar 19, 2017 11:22:20 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/manager
Mar 19, 2017 11:22:21 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/host-manager
Mar 19, 2017 11:22:21 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/orkweb
2017-03-19 11:22:21,201 root  INFO - OrkWeb ContextInitialized():
log4jConfigFile is /etc/orkweb//logging.properties
2017-03-19 11:22:21,201 root  INFO -

2017-03-19 11:22:21,201 root  INFO - OrkWeb starting ...
2017-03-19 11:22:21,201 root  INFO - OrkWeb ContextInitialized():
HibernateConfigFile is database.hbm.xml
2017-03-19 11:22:21,652 root  INFO - OrkWeb ContextInitialized():
TomcatHome is set to /opt/tomcat7
2017-03-19 11:22:21,663 root  INFO - OrkWeb started successfully.
2017-03-19 11:22:21,663 root  INFO -

2017-03-19 11:22:22,736 org.apache.tapestry.ApplicationServlet  INFO -
Initialized application servlet 'orkweb': 457 millis to create HiveMind
Registry, 1,060 millis overall.
Mar 19, 2017 11:22:22 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/ROOT
Mar 19, 2017 11:22:22 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/docs
Mar 19, 2017 11:22:22 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Mar 19, 2017 11:22:22 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8443"]
Mar 19, 2017 11:22:22 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Mar 19, 2017 11:22:22 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 6935 ms


Best Regards,

Mahmoud Ramadan Ali

Network and VOIP Specialist.

Mobil: (+2) 01276877112

Blog | Website
| LinkedIn



Re: Tomcat hangs every day

2013-05-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Sascha,

On 5/17/13 7:22 AM, Sascha Troll wrote:
 Can you give me a hint. I am just the server guy, so I can tell the
  developer.

Tell the developers to set connection- and read-timeouts when using
HttpClient (or whatever uses HttpClient). They should know what you
are talking about. If they don't know what you are talking about, you
need some new developers.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRmmtgAAoJEBzwKT+lPKRYJ4AP/1/kqMQcaZdUwPKtHV0j7MFN
GqoF89slZTPDnfaBm1jxVH24GfMALGicZB4Zc/SwAlC/LeWO4Y4Ct8CNFEreZ8XA
fBL5niR2PuTGBYtPGY8+kRYuQTeglxlIvNWOMcm3/9sPf1EFH81vV1etAxuaswqb
OKfqnlP2ekzNPKD8GOylnG8mcXt4jLlFHVhRx03rHW1rlvNRifKPpDbCyZNWN1h7
ABneJ/RhylDuPDcDbIQIwSaKXRRMDXAq05Yjf9o+lz879JOi+eAxib9L5pmMO7RS
AB/rU7d2dfRYyfC3aLfYtC1eOXgORS2El6JYqekhZX7L6KSglWdHC28W8D0TQmgK
OWilDMrox0pTvQQkzIEepM+RbUzm6XgzEA6CUOz+NBUGHEv7s1RPXr4Br+K2Za8d
1FPj//5PmdhZ3NqE+HJ18O0hK/2Si+eQ2SDnWNiSY9UFw7/wsArWWWuFurb5TQet
d5fcnv4jw4WwmoQ3UH4iUGtV/k/HrSnkLHFLrORgVnn8l9GJS2kBo5Tq1Ffl6FRK
bggqEHmEb4O+JrOtcqJKjU7O00uqV5rXP1hdhw4r3ytQ+qHtWrTCUiVEgN/qxAmz
r+6/KTvWomIsqkdwmzhTWXtuHay4PmwP2Yl4nM6aIGfREKo0TwacR93+9FSvPYQc
+j3tTY6t5n0BKzTWK1Vs
=8v5P
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs every day

2013-05-17 Thread Christian Kaltepoth
Seems like you have a class called SearchClientRemoteClient which uses
HTTPClient. Many threads seems to wait for remote responses. I guess you
don't set any timeouts for the HTTPClient and therefore many threads hang
in HttpClient.executeMethod() forever. You should ALWAYS set timeouts when
using HTTPClient. :)

I hope this helps :)

Christian


2013/5/17 Sascha Troll sascha.tr...@geberit.com

 Hi !

 I have problem with our Tomcat 7.0.40 (upgrade already done from 7.0.39
 and 7.0.37 and still the same issue).

 Its still running, but not longer accepting any connection on port 8080.

 Attached are the thread dumps which were created this morning when the
 server was not longer available.
 I cannot find any deadlocks and need some help to find the cause.



 Thanks
 Sascha



 --
 Disclaimer:
 The content of this e-mail (including attachments) is confidential and
 intended for the use of the addressee only. If you are not the intended
 recipient please delete the e-mail; dissemination or disclosure of its
 content to anyone is strictly prohibited!
 Before opening an attachment please check it for viruses. We accept no
 liability for any damage caused by viruses.

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 
Christian Kaltepoth
Blog: http://blog.kaltepoth.de/
Twitter: http://twitter.com/chkal
GitHub: https://github.com/chkal


Re: Tomcat hangs every day

2013-05-17 Thread Sascha Troll
Christian,

thanks for this.

Can you give me a hint. I am just the server guy, so I can tell the 
developer.

Thanks a lot !

Sascha



From:   Christian Kaltepoth christ...@kaltepoth.de
To: Tomcat Users List users@tomcat.apache.org
Date:   17.05.2013 11:24
Subject:Re: Tomcat hangs every day
Sent by:chk...@gmail.com



Seems like you have a class called SearchClientRemoteClient which uses
HTTPClient. Many threads seems to wait for remote responses. I guess you
don't set any timeouts for the HTTPClient and therefore many threads hang
in HttpClient.executeMethod() forever. You should ALWAYS set timeouts when
using HTTPClient. :)

I hope this helps :)

Christian


2013/5/17 Sascha Troll sascha.tr...@geberit.com

 Hi !

 I have problem with our Tomcat 7.0.40 (upgrade already done from 7.0.39
 and 7.0.37 and still the same issue).

 Its still running, but not longer accepting any connection on port 8080.

 Attached are the thread dumps which were created this morning when the
 server was not longer available.
 I cannot find any deadlocks and need some help to find the cause.



 Thanks
 Sascha



 
--
 Disclaimer:
 The content of this e-mail (including attachments) is confidential and
 intended for the use of the addressee only. If you are not the intended
 recipient please delete the e-mail; dissemination or disclosure of its
 content to anyone is strictly prohibited!
 Before opening an attachment please check it for viruses. We accept no
 liability for any damage caused by viruses.

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 
Christian Kaltepoth
Blog: http://blog.kaltepoth.de/
Twitter: http://twitter.com/chkal
GitHub: https://github.com/chkal





--
Disclaimer:
The content of this e-mail (including attachments) is confidential and intended 
for the use of the addressee only. If you are not the intended recipient please 
delete the e-mail; dissemination or disclosure of its content to anyone is 
strictly prohibited!
Before opening an attachment please check it for viruses. We accept no 
liability for any damage caused by viruses.

Re: Tomcat hangs every day

2013-05-17 Thread Christian Kaltepoth
Hey,

I'm also not an expert for HttpClient, but when creating connections to
remote services it is usually a good idea to set connection timeouts and
socket timeouts so that the client doesn't block forever if there are
problems with the connection. Exactly this seems to be the problem in your
case.

Best regards

Christian Kaltepoth




2013/5/17 Sascha Troll sascha.tr...@geberit.com

 Christian,

 thanks for this.

 Can you give me a hint. I am just the server guy, so I can tell the
 developer.

 Thanks a lot !

 Sascha



 From:   Christian Kaltepoth christ...@kaltepoth.de
 To: Tomcat Users List users@tomcat.apache.org
 Date:   17.05.2013 11:24
 Subject:Re: Tomcat hangs every day
 Sent by:chk...@gmail.com



 Seems like you have a class called SearchClientRemoteClient which uses
 HTTPClient. Many threads seems to wait for remote responses. I guess you
 don't set any timeouts for the HTTPClient and therefore many threads hang
 in HttpClient.executeMethod() forever. You should ALWAYS set timeouts when
 using HTTPClient. :)

 I hope this helps :)

 Christian


 2013/5/17 Sascha Troll sascha.tr...@geberit.com

  Hi !
 
  I have problem with our Tomcat 7.0.40 (upgrade already done from 7.0.39
  and 7.0.37 and still the same issue).
 
  Its still running, but not longer accepting any connection on port 8080.
 
  Attached are the thread dumps which were created this morning when the
  server was not longer available.
  I cannot find any deadlocks and need some help to find the cause.
 
 
 
  Thanks
  Sascha
 
 
 
 

 --
  Disclaimer:
  The content of this e-mail (including attachments) is confidential and
  intended for the use of the addressee only. If you are not the intended
  recipient please delete the e-mail; dissemination or disclosure of its
  content to anyone is strictly prohibited!
  Before opening an attachment please check it for viruses. We accept no
  liability for any damage caused by viruses.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 



 --
 Christian Kaltepoth
 Blog: http://blog.kaltepoth.de/
 Twitter: http://twitter.com/chkal
 GitHub: https://github.com/chkal






 --
 Disclaimer:
 The content of this e-mail (including attachments) is confidential and
 intended for the use of the addressee only. If you are not the intended
 recipient please delete the e-mail; dissemination or disclosure of its
 content to anyone is strictly prohibited!
 Before opening an attachment please check it for viruses. We accept no
 liability for any damage caused by viruses.




-- 
Christian Kaltepoth
Blog: http://blog.kaltepoth.de/
Twitter: http://twitter.com/chkal
GitHub: https://github.com/chkal


R: Tomcat hangs every day

2013-05-17 Thread Paolo Botta
Sorry for the question, but if I set the timeout on the HttpClient I force
the client to close the connection after the timeout, but have I informed
the server that there is a timeout, so the server close the connection after
the timeout? I mean HttpClient tells to the server about the timeout?

Thx
Paolo

-Messaggio originale-
Da: chk...@gmail.com [mailto:chk...@gmail.com] Per conto di Christian
Kaltepoth
Inviato: venerdì 17 maggio 2013 13:30
A: Tomcat Users List
Oggetto: Re: Tomcat hangs every day

Hey,

I'm also not an expert for HttpClient, but when creating connections to
remote services it is usually a good idea to set connection timeouts and
socket timeouts so that the client doesn't block forever if there are
problems with the connection. Exactly this seems to be the problem in your
case.

Best regards

Christian Kaltepoth




2013/5/17 Sascha Troll sascha.tr...@geberit.com

 Christian,

 thanks for this.

 Can you give me a hint. I am just the server guy, so I can tell the 
 developer.

 Thanks a lot !

 Sascha



 From:   Christian Kaltepoth christ...@kaltepoth.de
 To: Tomcat Users List users@tomcat.apache.org
 Date:   17.05.2013 11:24
 Subject:Re: Tomcat hangs every day
 Sent by:chk...@gmail.com



 Seems like you have a class called SearchClientRemoteClient which uses 
 HTTPClient. Many threads seems to wait for remote responses. I guess 
 you don't set any timeouts for the HTTPClient and therefore many 
 threads hang in HttpClient.executeMethod() forever. You should ALWAYS 
 set timeouts when using HTTPClient. :)

 I hope this helps :)

 Christian


 2013/5/17 Sascha Troll sascha.tr...@geberit.com

  Hi !
 
  I have problem with our Tomcat 7.0.40 (upgrade already done from 
  7.0.39 and 7.0.37 and still the same issue).
 
  Its still running, but not longer accepting any connection on port 8080.
 
  Attached are the thread dumps which were created this morning when 
  the server was not longer available.
  I cannot find any deadlocks and need some help to find the cause.
 
 
 
  Thanks
  Sascha
 
 
 
 

 --
 
  Disclaimer:
  The content of this e-mail (including attachments) is confidential 
  and intended for the use of the addressee only. If you are not the 
  intended recipient please delete the e-mail; dissemination or 
  disclosure of its content to anyone is strictly prohibited!
  Before opening an attachment please check it for viruses. We accept 
  no liability for any damage caused by viruses.
 
  
  - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 



 --
 Christian Kaltepoth
 Blog: http://blog.kaltepoth.de/
 Twitter: http://twitter.com/chkal
 GitHub: https://github.com/chkal






 --
 
 Disclaimer:
 The content of this e-mail (including attachments) is confidential and 
 intended for the use of the addressee only. If you are not the 
 intended recipient please delete the e-mail; dissemination or 
 disclosure of its content to anyone is strictly prohibited!
 Before opening an attachment please check it for viruses. We accept no 
 liability for any damage caused by viruses.




--
Christian Kaltepoth
Blog: http://blog.kaltepoth.de/
Twitter: http://twitter.com/chkal
GitHub: https://github.com/chkal


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs every day

2013-05-17 Thread Howard W. Smith, Jr.
I don't use HttpClient, directly, but if I'm not mistaking, javax.mail.jar
(JavaMail) and Google Calendar API uses HttpClient, and I use JavaMail and
Google Calendar API, directly, in my app.

Google Calendar API seemed to always close their connections and I have
even experienced downtime (host unknown and/or server error responses from
Google Calendar API service), and I have experienced downtime (unknown host
exceptions) when using JavaMail to connect to GMAIL (via IMAP connection)
to check-for-and-download emails.

Some months ago, I recognized that I had many unclosed connections on my
Windows Server 2008 production server, where Tomcat was running my app.
Instead of blame Tomcat, I listened in on Tomcat user list and I searched
the internet, and learned that the unclosed connections were due to my
inexperience (using JavaMail), so I refactored my code and closed my
JavaMail IMAP connection when checking-and-downloading emails from GMAIL
(google) servers.

I just searched google,

stackoverflow tomcat httpclient timeout[1]

and found the following:

Best Practice to Use HttpClient in Multithreaded Environment[2]

Using Apache HttpClient how to set the TIMEOUT on a request and response[3]

and many more search results (and related links) that you can read.


[1] http://lmgtfy.com/?q=stackoverflow+tomcat+httpclient+timeout

[2]
http://stackoverflow.com/questions/1281219/best-practice-to-use-httpclient-in-multithreaded-environment

[3]
http://stackoverflow.com/questions/9873810/using-apache-httpclient-how-to-set-the-timeout-on-a-request-and-response





On Fri, May 17, 2013 at 8:02 AM, Paolo Botta paolo.bo...@cabril.it wrote:

 Sorry for the question, but if I set the timeout on the HttpClient I force
 the client to close the connection after the timeout, but have I informed
 the server that there is a timeout, so the server close the connection
 after
 the timeout? I mean HttpClient tells to the server about the timeout?

 Thx
 Paolo

 -Messaggio originale-
 Da: chk...@gmail.com [mailto:chk...@gmail.com] Per conto di Christian
 Kaltepoth
 Inviato: venerdì 17 maggio 2013 13:30
 A: Tomcat Users List
 Oggetto: Re: Tomcat hangs every day

 Hey,

 I'm also not an expert for HttpClient, but when creating connections to
 remote services it is usually a good idea to set connection timeouts and
 socket timeouts so that the client doesn't block forever if there are
 problems with the connection. Exactly this seems to be the problem in your
 case.

 Best regards

 Christian Kaltepoth




 2013/5/17 Sascha Troll sascha.tr...@geberit.com

  Christian,
 
  thanks for this.
 
  Can you give me a hint. I am just the server guy, so I can tell the
  developer.
 
  Thanks a lot !
 
  Sascha
 
 
 
  From:   Christian Kaltepoth christ...@kaltepoth.de
  To: Tomcat Users List users@tomcat.apache.org
  Date:   17.05.2013 11:24
  Subject:Re: Tomcat hangs every day
  Sent by:chk...@gmail.com
 
 
 
  Seems like you have a class called SearchClientRemoteClient which uses
  HTTPClient. Many threads seems to wait for remote responses. I guess
  you don't set any timeouts for the HTTPClient and therefore many
  threads hang in HttpClient.executeMethod() forever. You should ALWAYS
  set timeouts when using HTTPClient. :)
 
  I hope this helps :)
 
  Christian
 
 
  2013/5/17 Sascha Troll sascha.tr...@geberit.com
 
   Hi !
  
   I have problem with our Tomcat 7.0.40 (upgrade already done from
   7.0.39 and 7.0.37 and still the same issue).
  
   Its still running, but not longer accepting any connection on port
 8080.
  
   Attached are the thread dumps which were created this morning when
   the server was not longer available.
   I cannot find any deadlocks and need some help to find the cause.
  
  
  
   Thanks
   Sascha
  
  
  
  
 
  --
  
   Disclaimer:
   The content of this e-mail (including attachments) is confidential
   and intended for the use of the addressee only. If you are not the
   intended recipient please delete the e-mail; dissemination or
   disclosure of its content to anyone is strictly prohibited!
   Before opening an attachment please check it for viruses. We accept
   no liability for any damage caused by viruses.
  
   
   - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
   For additional commands, e-mail: users-h...@tomcat.apache.org
  
 
 
 
  --
  Christian Kaltepoth
  Blog: http://blog.kaltepoth.de/
  Twitter: http://twitter.com/chkal
  GitHub: https://github.com/chkal
 
 
 
 
 
 
  --
  
  Disclaimer:
  The content of this e-mail (including attachments) is confidential and
  intended for the use of the addressee only. If you are not the
  intended recipient please delete the e-mail; dissemination

Tomcat Hangs with variable frequency

2010-12-22 Thread Rhonny David
Hi ALL,



We are using tomcat 6.0 in production environment and facing a critical problem 
that tomcat hangs with variable frequency in a week. We have tried to figure 
out 
the problem but couldn't reach the root cause. To investigate the cause we used 
the lambda probe tool. Lamba probe shows multiple threads are blocked when 
tomcat hangs. Normally i have seen a similar type of stack trace for the thread 
which lambda probe shows as blocked, I am pasting it as follows:

net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket ( SharedSocket.java:693 ) 
net.sourceforge.jtds.jdbc.ResponseStream.getPacket ( ResponseStream.java:466 ) 
net.sourceforge.jtds.jdbc.ResponseStream.read ( ResponseStream.java:103 ) 
net.sourceforge.jtds.jdbc.TdsCore.nextToken ( TdsCore.java:2202 ) 
net.sourceforge.jtds.jdbc.TdsCore.getNextRow ( TdsCore.java:764 ) 
net.sourceforge.jtds.jdbc.JtdsResultSet.next ( JtdsResultSet.java:593 ) 
net.sourceforge.jtds.jdbc.JtdsResultSet.close ( JtdsResultSet.java:486 ) 
org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.close ( 
DelegatingResultSet.java:187 ) 
org.apache.tomcat.dbcp.dbcp.DelegatingStatement.close ( 
DelegatingStatement.java:163 ) 
org.apache.tomcat.dbcp.dbcp.DelegatingConnection.passivate ( 
DelegatingConnection.java:426 ) 
org.apache.tomcat.dbcp.dbcp.DelegatingConnection.close ( 
DelegatingConnection.java:246 ) 
org.apache.tomcat.dbcp.dbcp.PoolableConnection.reallyClose ( 
PoolableConnection.java:122 ) 
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.destroyObject ( 
PoolableConnectionFactory.java:628 ) 
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.invalidateObject ( 
GenericObjectPool.java:1247 ) 
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.invalidateObject ( 
AbandonedObjectPool.java:125 ) 
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.removeAbandoned ( 
AbandonedObjectPool.java:158 ) 
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject ( 
AbandonedObjectPool.java:77 ) 
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection ( 
PoolingDataSource.java:106 ) 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection ( 
BasicDataSource.java:1044 ) 
com.avanza.contactcenter.dbutil.DBConnection.getConnection ( 
DBConnection.java:154 ) 
com.avanza.contactcenter.db.TableFieldsMappingProcessor.getDynamicColumnsReportList
 ( TableFieldsMappingProcessor.java:696 ) 
com.avanza.contactcenter.processor.CustomerDetailActionProcessor.CustomerDetailInfoSearch
 ( CustomerDetailActionProcessor.java:187 ) 
com.avanza.contactcenter.processor.RdvInboundActionProcessor.responseCustomerDetailInfo
 ( RdvInboundActionProcessor.java:817 ) 
com.avanza.contactcenter.integration.RendezvousMessageSource.processIncomingMessage
 ( RendezvousMessageSource.java:431 ) 
com.avanza.contactcenter.integration.RendezvousMessageSource.run ( 
RendezvousMessageSource.java:136 )


As we have been investigating the issue from a month, so i would like to share 
it with you though you can understand the scenario in depth. Initially we 
thought that there are connection leak problems in our application because the 
lambda probe showed us that db connections are continuously busy. We scanned 
 twice the DAO layer of our application to search any connection leaks, but we 
didn't find any. At that time our application's Context.xml  file didn't 
contain 
the removeAbandoned property. After DAO layer scan, we decide to set 
the removeAbandoned = true, so that connection pool refreshes at run time. But 
this also didn't work for us. Lambda probe still showed us blocked threads when 
tomcat hanged, but yes by setting the removeAbandoned = true connection pool 
continued to refresh.

When tomcat hanged today we noticed following statistics on lambda probe, 
(along 
with blocked threads for which stack trace is already provided above):



System OVerView

Memory utilization
 -- Free: 469.95 MB Total: 595.5 MB Max: 1,016.12 MB 


OS information
JVM:  Java(TM) 2 Runtime Environment, Standard Edition  1.5.0_10-b03  Java 
HotSpot(TM) Client VM) 
OS: Windows 2003 (Service Pack 2) x86 5.2
Processors: 8
Current time: Wed Dec 22 13:00:48 GMT+05:00 2010
Working dir: C:\Program Files\Apache Software Foundation\Tomcat 6.0


Current memory usage

 Used Committed   MaximumInitial  Group
 
Survivor Space:   1.26Mb   4.63Mb  7.88Mb 4.56MbHEAP 

Perm Gen:   34.28Mb  34.50Mb 64.00Mb8.00Mb   NON_HEAP 
  
Tenured Gen:  115.20Mb  553.88Mb  945.25Mb  553.88Mb   HEAP 


Eden Space: 2.08Mb   37.00Mb63.00Mb37.00Mb   HEAP 


Code Cache12.37Mb  12.47Mb  32.00Mb  192.00Kb  NON_HEAP 


Total165.65Mb  642.47Mb  1.09Gb  603.63Mb  TOTAL 


OS information
OS Name: Windows 2003 OS Version: 5.2 Total RAM: 2.00Gb Free 
RAM: 2.00Gb Committed JVM memory: 681.23Mb Total swap: 4.00Gb Free swap: 4.00Gb 

(In above line,Free RAM is 2GB, it might be due to that operating

Re: Tomcat Hangs with variable frequency

2010-12-22 Thread Mark Thomas
On 22/12/2010 11:48, Rhonny David wrote:
 Hi ALL,
 
 
 
 We are using tomcat 6.0 in production environment

Exactly which version? Also exact versions for JDK and OS please.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Hangs with variable frequency

2010-12-22 Thread Rhonny David


I think i have already provided these except tomcat. Anyways we are using 
Tomcat 
6.0.29, which is pointed to jre 1.5.0_10. And the OS is Microsoft Windows 
Server 
2003, R2 , Standard Edition, Service Pack2.

Regards,
David




From: Mark Thomas ma...@apache.org
To: Tomcat Users List users@tomcat.apache.org
Sent: Wed, December 22, 2010 4:52:52 PM
Subject: Re: Tomcat Hangs with variable frequency

On 22/12/2010 11:48, Rhonny David wrote:
 Hi ALL,
 
 
 
 We are using tomcat 6.0 in production environment

Exactly which version? Also exact versions for JDK and OS please.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


  

Re: Tomcat Hangs with variable frequency

2010-12-22 Thread Konstantin Kolinko
 net.sourceforge.jtds.jdbc.JtdsResultSet.close ( JtdsResultSet.java:486 )

I think it is an issue with implementation of JtdsResultSet.close(), [1]

0485:if (!getConnection().isClosed()) {
0486:// Skip to end of result set
0487:// Could send cancel but this is safer as
0488:// cancel could kill other statements
in a batch.
0489:while (next())
0490:;
0491:}

[1] 
http://www.java2s.com/Open-Source/Java-Document/Database-JDBC-Connection-Pool/jTDS/net/sourceforge/jtds/jdbc/JtdsResultSet.java.htm

[2] 
http://jtds.svn.sourceforge.net/viewvc/jtds/branches/jTDS%201.2%20%28stable%29/src/main/net/sourceforge/jtds/jdbc/JtdsResultSet.java?revision=1107view=markup#l467

It tries to dispose the resultset by reading through it and hangs in
the process (or maybe the resultset is too big and reading it takes a
while).

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Hangs with variable frequency

2010-12-22 Thread Rhonny David
I won't support your reasoning, because the same JTDS driver version we are 
using for our other site and there the number of concurrent users of the 
application is more than 800 and therefore the volume of concurrent requests is 
very high, but we never faced the issue of this nature. Secondly, we have 
recently started using JTD driver and tomcat jndi connection pooling for our 
current site and earlier we used microsoft driver and our own connection 
pooling 
mechaninsm, but the same issue of tomcat hanging was occurring at that time.


Regards,
David




From: Konstantin Kolinko knst.koli...@gmail.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Wed, December 22, 2010 6:53:46 PM
Subject: Re: Tomcat Hangs with variable frequency

 net.sourceforge.jtds.jdbc.JtdsResultSet.close ( JtdsResultSet.java:486 )

I think it is an issue with implementation of JtdsResultSet.close(), [1]

0485:if (!getConnection().isClosed()) {
0486:// Skip to end of result set
0487:// Could send cancel but this is safer as
0488:// cancel could kill other statements
in a batch.
0489:while (next())
0490:;
0491:}

[1] 
http://www.java2s.com/Open-Source/Java-Document/Database-JDBC-Connection-Pool/jTDS/net/sourceforge/jtds/jdbc/JtdsResultSet.java.htm


[2] 
http://jtds.svn.sourceforge.net/viewvc/jtds/branches/jTDS%201.2%20%28stable%29/src/main/net/sourceforge/jtds/jdbc/JtdsResultSet.java?revision=1107view=markup#l467


It tries to dispose the resultset by reading through it and hangs in
the process (or maybe the resultset is too big and reading it takes a
while).

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


  

Re: Tomcat Hangs with variable frequency

2010-12-22 Thread Konstantin Kolinko
If closing the result set requires reading it in full (as JTDS does),
it can take significant time.

You should take thread dumps to see what the threads are doing and
what they are waiting for. (Three thread dumps taken several seconds
apart).

Post them inline, or somewhere else (like pastebin site). Attachments
are usually stripped off by the mailing list software.

2010/12/22 Rhonny David rhonnyda...@yahoo.com:
 I won't support your reasoning, because the same JTDS driver version we are
 using for our other site and there the number of concurrent users of the
 application is more than 800 and therefore the volume of concurrent requests 
 is
 very high, but we never faced the issue of this nature. Secondly, we have
 recently started using JTD driver and tomcat jndi connection pooling for our
 current site and earlier we used microsoft driver and our own connection 
 pooling
 mechaninsm, but the same issue of tomcat hanging was occurring at that time.


 Regards,
 David



 
 From: Konstantin Kolinko knst.koli...@gmail.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Wed, December 22, 2010 6:53:46 PM
 Subject: Re: Tomcat Hangs with variable frequency

 net.sourceforge.jtds.jdbc.JtdsResultSet.close ( JtdsResultSet.java:486 )

 I think it is an issue with implementation of JtdsResultSet.close(), [1]

 0485:                        if (!getConnection().isClosed()) {
 0486:                            // Skip to end of result set
 0487:                            // Could send cancel but this is safer as
 0488:                            // cancel could kill other statements
 in a batch.
 0489:                            while (next())
 0490:                                ;
 0491:                        }

 [1]
 http://www.java2s.com/Open-Source/Java-Document/Database-JDBC-Connection-Pool/jTDS/net/sourceforge/jtds/jdbc/JtdsResultSet.java.htm


 [2]
 http://jtds.svn.sourceforge.net/viewvc/jtds/branches/jTDS%201.2%20%28stable%29/src/main/net/sourceforge/jtds/jdbc/JtdsResultSet.java?revision=1107view=markup#l467


 It tries to dispose the resultset by reading through it and hangs in
 the process (or maybe the resultset is too big and reading it takes a
 while).

 Best regards,
 Konstantin Kolinko



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Hangs with variable frequency

2010-12-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Konstantin,

On 12/22/2010 11:56 AM, Konstantin Kolinko wrote:
 If closing the result set requires reading it in full (as JTDS does),
 it can take significant time.

Especially if the queries are something like

SELECT * FROM huge_table

 You should take thread dumps to see what the threads are doing and
 what they are waiting for. (Three thread dumps taken several seconds
 apart).

I would also inspect the queries that are in progress when these
connections appear to hang.

We had a problem with Oracle long ago where the table indexes had just
become horribly fragmented and performance slowed to a crawl. In an act
of desperation, someone ran OPTIMIZE TABLE on one of the tables
involved in particularly slow queries and basically everything got
better. From then on out, we called that turning off the 'suck' bit on
Oracle. :)

I would definitely like to see what queries are running on the server
and what their status is.

The problem is certainly /not/ Tomcat, here: threads are stuck in a
3rd-party library connecting to a 3rd-party database. Tomcat just
happens to be in the stack trace because that's the DBCP in use: the
driver appears to be hanging, not Tomcat's DBCP.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0SNXUACgkQ9CaO5/Lv0PDAUQCfWgdgZY61qly2Z0xDP4vhZcbX
OyYAn14lv4chUAmiD4h4z3jqgDPxOGda
=Fqs8
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat hangs every few hours

2010-08-17 Thread sasidhar prabhakar
Tomcat hangs ever few hours.
In server.xml maxThreads are 300.

In thread dump I observed every thread doing the same thing.
In my code I sends sms to users by using HttpURLConnection.
I am using this code for months I didn't get the problem earlier.
For few days I am getting this problem consistently. Whenever tomcat hangs I
takes the thread dump,
every time it shows the same results.

Here is my one of threads dump. this is common for all remaining threads.

Somebody guide me to solve this problem. I am trying but unable to do this

http-80-300 daemon prio=1 tid=0x76890ef0 nid=0x6bb6 runnable
[0x6def..0x6def0db0]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
- locked 0xb1332658 (a java.io.BufferedInputStream)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:681)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:626)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:983)
- locked 0xb1332690 (a sun.net.www.protocol.http.HttpURLConnection)
at SendSms.sendToSingleRecipientNoNpri(SendSms.java:89)
at CreateAccountAction.execute(CreateAccountAction.java:86)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.amulyam.servlet.RedirectFilter.doFilter(RedirectFilter.java:56)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:595)


[OT] Re: Tomcat hangs every few hours

2010-08-17 Thread Peter Crowther
On 17 August 2010 10:48, sasidhar prabhakar sasidhar1...@gmail.com wrote:

 In thread dump I observed every thread doing the same thing.
 In my code I sends sms to users by using HttpURLConnection.
 I am using this code for months I didn't get the problem earlier.
 For few days I am getting this problem consistently. Whenever tomcat hangs
 I
 takes the thread dump,
 every time it shows the same results.

 Here is my one of threads dump. this is common for all remaining threads.

 Somebody guide me to solve this problem. I am trying but unable to do this

 http-80-300 daemon prio=1 tid=0x76890ef0 nid=0x6bb6 runnable
 [0x6def..0x6def0db0]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
 [...]



   at SendSms.sendToSingleRecipientNoNpri(SendSms.java:89)

[...]

The socket is hanging trying to read the response.  Your SMS provider
probably isn't responding to you on occasion.  I assume you've written test
code to do a SMS send; if not, write it and test the SMS send outside of
Tomcat.

This is not a Tomcat issue, so I've marked it [OT].

- Peter


Re: Tomcat hangs every few hours

2010-08-17 Thread Brett Delle Grazie
Hi,

One obvious possibility is that your SMS gateway (or your connection to
it) is down - thus all threads are being 'blocked' waiting for a
response from the gateway. This is supported by the fact that the
threads are all blcoked in the socketRead0 call.

Can I suggest, if you haven't already, to ensure you set a connect
timeout and a 'wait' timeout (i.e. only wait x ms or secs before
terminating the request and signalling a failure).

I'm not sure what the default socket connect and read/write timeouts in
Java are (they may be forever) but if they default to the OS level
timeouts then they can be as much as 15 minutes (5 minutes + 3x retry).

Hope this helps

On Tue, 2010-08-17 at 15:18 +0530, sasidhar prabhakar wrote:
 Tomcat hangs ever few hours.
 In server.xml maxThreads are 300.
 
 In thread dump I observed every thread doing the same thing.
 In my code I sends sms to users by using HttpURLConnection.
 I am using this code for months I didn't get the problem earlier.
 For few days I am getting this problem consistently. Whenever tomcat hangs I
 takes the thread dump,
 every time it shows the same results.
 
 Here is my one of threads dump. this is common for all remaining threads.
 
 Somebody guide me to solve this problem. I am trying but unable to do this
 
 http-80-300 daemon prio=1 tid=0x76890ef0 nid=0x6bb6 runnable
 [0x6def..0x6def0db0]
 at java.net.SocketInputStream.socketRead0(Native Method)
 at java.net.SocketInputStream.read(SocketInputStream.java:129)
 at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
 at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
 at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
 - locked 0xb1332658 (a java.io.BufferedInputStream)
 at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:681)
 at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:626)
 at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:983)
 - locked 0xb1332690 (a sun.net.www.protocol.http.HttpURLConnection)
 at SendSms.sendToSingleRecipientNoNpri(SendSms.java:89)
 at CreateAccountAction.execute(CreateAccountAction.java:86)
 at
 org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
 at
 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
 at
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at com.amulyam.servlet.RedirectFilter.doFilter(RedirectFilter.java:56)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
 at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
 at java.lang.Thread.run(Thread.java:595)

-- 
Best Regards,

Brett Delle Grazie

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs every few hours

2010-08-17 Thread Pid
On 17/08/2010 10:48, sasidhar prabhakar wrote:
 Tomcat hangs ever few hours.

*Exact* Tomcat, JVM and OS versions?

 In server.xml maxThreads are 300.
 
 In thread dump I observed every thread doing the same thing.
 In my code I sends sms to users by using HttpURLConnection.
 I am using this code for months I didn't get the problem earlier.
 For few days I am getting this problem consistently. Whenever tomcat hangs I
 takes the thread dump,
 every time it shows the same results.
 
 Here is my one of threads dump. this is common for all remaining threads.
 
 Somebody guide me to solve this problem. I am trying but unable to do this

If each request processor thread is dependent on an inline request to an
external resource, and that resource is unavailable or otherwise slow to
respond then your app will inevitably run out of threads.

You should consider offloading the request to a thread pool (see the
Java Concurrency API in recent JVMs) with appropriate timeouts.


p

 http-80-300 daemon prio=1 tid=0x76890ef0 nid=0x6bb6 runnable
 [0x6def..0x6def0db0]
 at java.net.SocketInputStream.socketRead0(Native Method)
 at java.net.SocketInputStream.read(SocketInputStream.java:129)
 at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
 at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
 at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
 - locked 0xb1332658 (a java.io.BufferedInputStream)
 at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:681)
 at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:626)
 at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:983)
 - locked 0xb1332690 (a sun.net.www.protocol.http.HttpURLConnection)
 at SendSms.sendToSingleRecipientNoNpri(SendSms.java:89)
 at CreateAccountAction.execute(CreateAccountAction.java:86)
 at
 org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
 at
 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
 at
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at com.amulyam.servlet.RedirectFilter.doFilter(RedirectFilter.java:56)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
 at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
 at java.lang.Thread.run(Thread.java:595)
 



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: [OT] Re: Tomcat hangs every few hours

2010-08-17 Thread sasidhar prabhakar
For months it is working properly. I tried that one also. Immediately after
hangs I accessed the url directly several times it is working.
Is that the only reason, I thought that but when accessed it is working. Is
there any other reasons.

On Tue, Aug 17, 2010 at 5:33 PM, Peter Crowther peter.crowt...@melandra.com
 wrote:

 On 17 August 2010 10:48, sasidhar prabhakar sasidhar1...@gmail.com
 wrote:

  In thread dump I observed every thread doing the same thing.
  In my code I sends sms to users by using HttpURLConnection.
  I am using this code for months I didn't get the problem earlier.
  For few days I am getting this problem consistently. Whenever tomcat
 hangs
  I
  takes the thread dump,
  every time it shows the same results.
 
  Here is my one of threads dump. this is common for all remaining threads.
 
  Somebody guide me to solve this problem. I am trying but unable to do
 this
 
  http-80-300 daemon prio=1 tid=0x76890ef0 nid=0x6bb6 runnable
  [0x6def..0x6def0db0]
 at java.net.SocketInputStream.socketRead0(Native Method)
 at java.net.SocketInputStream.read(SocketInputStream.java:129)
  [...]



at SendSms.sendToSingleRecipientNoNpri(SendSms.java:89)
 
 [...]

 The socket is hanging trying to read the response.  Your SMS provider
 probably isn't responding to you on occasion.  I assume you've written test
 code to do a SMS send; if not, write it and test the SMS send outside of
 Tomcat.

 This is not a Tomcat issue, so I've marked it [OT].

 - Peter



Re: Tomcat hangs every few hours

2010-08-17 Thread sasidhar prabhakar
Thanks I will follow that

On Tue, Aug 17, 2010 at 6:12 PM, Pid p...@pidster.com wrote:

 On 17/08/2010 10:48, sasidhar prabhakar wrote:
  Tomcat hangs ever few hours.

 *Exact* Tomcat, JVM and OS versions?

  In server.xml maxThreads are 300.
 
  In thread dump I observed every thread doing the same thing.
  In my code I sends sms to users by using HttpURLConnection.
  I am using this code for months I didn't get the problem earlier.
  For few days I am getting this problem consistently. Whenever tomcat
 hangs I
  takes the thread dump,
  every time it shows the same results.
 
  Here is my one of threads dump. this is common for all remaining threads.
 
  Somebody guide me to solve this problem. I am trying but unable to do
 this

 If each request processor thread is dependent on an inline request to an
 external resource, and that resource is unavailable or otherwise slow to
 respond then your app will inevitably run out of threads.

 You should consider offloading the request to a thread pool (see the
 Java Concurrency API in recent JVMs) with appropriate timeouts.


 p

  http-80-300 daemon prio=1 tid=0x76890ef0 nid=0x6bb6 runnable
  [0x6def..0x6def0db0]
  at java.net.SocketInputStream.socketRead0(Native Method)
  at java.net.SocketInputStream.read(SocketInputStream.java:129)
  at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
  at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
  at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
  - locked 0xb1332658 (a java.io.BufferedInputStream)
  at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:681)
  at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:626)
  at
 
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:983)
  - locked 0xb1332690 (a sun.net.www.protocol.http.HttpURLConnection)
  at SendSms.sendToSingleRecipientNoNpri(SendSms.java:89)
  at CreateAccountAction.execute(CreateAccountAction.java:86)
  at
 
 org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
  at
 
 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
  at
  org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
  at
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  at
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  at
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at
 com.amulyam.servlet.RedirectFilter.doFilter(RedirectFilter.java:56)
  at
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at
 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  at
 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  at
 
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
  at
 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  at
 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  at
 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  at
 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
  at
 
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
  at
 
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
  at
  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
  at java.lang.Thread.run(Thread.java:595)
 




RE: [OT] Re: Tomcat hangs every few hours

2010-08-17 Thread Caldarale, Charles R
 From: sasidhar prabhakar [mailto:sasidhar1...@gmail.com]
 Subject: Re: [OT] Re: Tomcat hangs every few hours
 
 For months it is working properly.

Then something must have changed, either on the Tomcat system, or the server 
your webapp is trying to communicate with.  Try to find out what was altered.

 Is there any other reasons.

Possible that the code in your webapp is not handling the responses it's 
getting from the mail server.  Get Wireshark traces of the traffic between your 
webapp and the mail server and compare that with what the webapp is expecting.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] Re: Tomcat hangs every few hours

2010-08-17 Thread sasidhar prabhakar
I don't know what wireshark is can we install it in production servers. If
my webapp is not handling the responses what can I do.
Could you please suggest that.

On Tue, Aug 17, 2010 at 9:22 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: sasidhar prabhakar [mailto:sasidhar1...@gmail.com]
  Subject: Re: [OT] Re: Tomcat hangs every few hours
 
  For months it is working properly.

 Then something must have changed, either on the Tomcat system, or the
 server your webapp is trying to communicate with.  Try to find out what was
 altered.

  Is there any other reasons.

 Possible that the code in your webapp is not handling the responses it's
 getting from the mail server.  Get Wireshark traces of the traffic between
 your webapp and the mail server and compare that with what the webapp is
 expecting.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.



 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




RE: [OT] Re: Tomcat hangs every few hours

2010-08-17 Thread Caldarale, Charles R
 From: sasidhar prabhakar [mailto:sasidhar1...@gmail.com]
 Subject: Re: [OT] Re: Tomcat hangs every few hours
 
 I don't know what wireshark is

www.wireshark.org

Equivalents are available for whatever platform you're running on.

 If my webapp is not handling the responses what can I do.

Fix your webapp.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



tomcat hangs without anything

2010-03-11 Thread Maurice Mengel
Hi!

I am new to tomcat. It try to use it with some servlet (oaicat). It seems to
run well on my pc at work, but I cannot run it on my laptop on which I would
like to develop.

I start it, it looks fine. And after a few seconds or minutes, I doesn't
answer any response.

I uninstalled already all unnecessary versions of java, tried with different
version. Installed a new tomcat.


   - windows xp
   - I start tomcat with bin\startup.bat
   - jdk 1.6.0_14
   - tomcat 6.0.24
   - nothing in log files that looks like an error
   - tomcat freezes with or without that servlet

I have been trying to solve this for days. I am sure it is stupid beginner's
thing. I appreciate every help!

thanks
Maurice


Re: tomcat hangs without anything

2010-03-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Maurice,

On 3/11/2010 3:42 PM, Maurice Mengel wrote:
 Hi!
 
 I am new to tomcat. It try to use it with some servlet (oaicat). It seems to
 run well on my pc at work, but I cannot run it on my laptop on which I would
 like to develop.
 
 I start it, it looks fine. And after a few seconds or minutes, I doesn't
 answer any response.

Do you mean that it refuses HTTP requests, or you get a connection but
nothing ever displays?

 I uninstalled already all unnecessary versions of java, tried with different
 version. Installed a new tomcat.
 
 
- windows xp
- I start tomcat with bin\startup.bat

Can you post everything that shows up on the console during Tomcat
startup? IIRC, bin\startup.bat leaves the window open and stdout just
goes to the terminal.

- jdk 1.6.0_14

Since you have the JDK, you should have a program called jstack.exe:
you can run that with the pid of the running JVM to see what all the JVM
threads are doing. Post the output of jstack.exe and we'll take a look.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuZV/QACgkQ9CaO5/Lv0PD4lwCeL4GM/6fSmNkbjrnOQ4ZocZgn
X1wAoKHRhGsPaZg9+TfZWdWY9jBxYY3A
=xuug
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat hangs without anything

2010-03-11 Thread Maurice Mengel
1) thanks for the very quick response!

2) I get the static page, because it is still in the brower cache, browser
is loading, but never actually displays anything; after a very long time, a
timeout. How do you describe that?

3) yes stout goes to console, see attachment

4) here is the output of jstack.

It doesn't tell me much. Thanks in advance!
Maurice

2010-03-11 22:24:34
Full thread dump Java HotSpot(TM) Client VM (14.3-b01 mixed mode, sharing):

http-8080-1 daemon prio=6 tid=0x0344b000 nid=0x180c in Object.wait()
[0x03adf000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x077d0068 (a
org.apache.tomcat.util.net.JIoEndpoint$Worker)
at java.lang.Object.wait(Object.java:485)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:458)
- locked 0x077d0068 (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:484)
at java.lang.Thread.run(Thread.java:619)

TP-Monitor daemon prio=6 tid=0x03449800 nid=0x1e40 in Object.wait()
[0x03a7f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x077d00e8 (a
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
at
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.java:565)
- locked 0x077d00e8 (a
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
at java.lang.Thread.run(Thread.java:619)

TP-Processor4 daemon prio=6 tid=0x031afc00 nid=0x13b0 runnable
[0x03a2f000]
   java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
- locked 0x077d01c8 (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:307)
at
org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:661)
at
org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:872)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)

TP-Processor3 daemon prio=6 tid=0x03441400 nid=0x1dec in Object.wait()
[0x039df000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x077d0470 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:485)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:662)
- locked 0x077d0470 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:619)

TP-Processor2 daemon prio=6 tid=0x03466400 nid=0x1db8 in Object.wait()
[0x0398f000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x077d0510 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:485)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:662)
- locked 0x077d0510 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:619)

TP-Processor1 daemon prio=6 tid=0x03448400 nid=0x1f60 in Object.wait()
[0x0393f000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x077d05b0 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:485)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:662)
- locked 0x077d05b0 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:619)

http-8080-Acceptor-0 daemon prio=6 tid=0x031b4c00 nid=0x173c runnable
[0x038ef000]
   java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
- locked 0x092697e0 (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at
org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)
at
org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:352)
at java.lang.Thread.run(Thread.java:619)

ContainerBackgroundProcessor[StandardEngine[Catalina]] daemon prio=6
tid=0x0345d400 nid=0x18dc waiting on condition [0x0389f000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1579)
at java.lang.Thread.run(Thread.java:619)

GC Daemon 

Re: tomcat hangs without anything

2010-03-11 Thread André Warnier

Christopher Schultz wrote:


   - windows xp
   - I start tomcat with bin\startup.bat


Can you post everything that shows up on the console during Tomcat
startup? IIRC, bin\startup.bat leaves the window open and stdout just
goes to the terminal.


Not exactly.

When you start it via startup.bat, it opens another window inside of 
which Tomcat is running.  There, you do see Tomcat's stdout.
The problem is that if Tomcat stops or crashes, this window instantly 
closes, so you may miss the last messages.


If you start Tomcat with the command catalina.bat run however, then 
Tomcat runs in the same command window where you issued this command 
(iow it does not open a second window).
In that case, if Tomcat stops or crashes, the window does not close and 
you still see the messages if any.

You can stop Tomcat by entering CTRL-C once in the same window.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat hangs without anything

2010-03-11 Thread Maurice Mengel
As far as I can tell, it tells essentially the same. Now I am using
different jdk and the catalina.bat run command.

I didn't know I could copy from this windows at all. Usually, I use cygwin,
but this seems not to make anything easier.


C:\Apache\apache-tomcat-6.0.24bin\catalina.bat run
Using CATALINA_BASE:   C:\Apache\apache-tomcat-6.0.24
Using CATALINA_HOME:   C:\Apache\apache-tomcat-6.0.24
Using CATALINA_TMPDIR: C:\Apache\apache-tomcat-6.0.24\temp
Using JRE_HOME:C:\Java\jdk1.6.0_17
Using CLASSPATH:   C:\Apache\apache-tomcat-6.0.24\bin\bootstrap.jar
Mar 11, 2010 10:30:12 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performanc
e in production environments was not found on the java.library.path:
C:\Java\jdk
1.6.0_17\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\mingw\b
in;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Inte
l\Wireless\Bin\;C:\Program Files\Diskeeper Corporation\Diskeeper\;C:\Program
Fil
es\ThinkPad\ConnectUtilities;C:\Program Files\Common Files\Lenovo;C:\Program
Fil
es\Lenovo\Client Security
Solution;;C:\strawberry\c\bin;C:\strawberry\perl\bin;C
:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program
Files\QuickTime\QTSystem\;C
:\cygwin\bin;C:\Apache\ant\bin;C:\Apache\maven\bin;C:\Program
Files\Nmap;C:\Prog
ram Files\gs\gs8.70\bin
Mar 11, 2010 10:30:13 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Mar 11, 2010 10:30:13 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1152 ms
Mar 11, 2010 10:30:13 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 11, 2010 10:30:13 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.24
Mar 11, 2010 10:30:13 PM org.apache.catalina.startup.HostConfig
deployDescriptor

INFO: Deploying configuration descriptor host-manager.xml
Mar 11, 2010 10:30:14 PM org.apache.catalina.startup.HostConfig
deployDescriptor

INFO: Deploying configuration descriptor manager.xml
Mar 11, 2010 10:30:14 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory docs
Mar 11, 2010 10:30:14 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory examples
Mar 11, 2010 10:30:15 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory oaicat
Mar 11, 2010 10:30:15 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory ROOT
Mar 11, 2010 10:30:15 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 11, 2010 10:30:16 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Mar 11, 2010 10:30:16 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/63  config=null
Mar 11, 2010 10:30:16 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2628 ms



On Thu, Mar 11, 2010 at 10:32 PM, André Warnier a...@ice-sa.com wrote:

 Maurice Mengel wrote:


 3) yes stout goes to console, see attachment

  The list strips most attachments, and we did not get this one.
 You may need to paste the screen messages directly here, like you did with
 the jstack output.





 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: tomcat hangs without anything

2010-03-11 Thread Maurice Mengel
4) no other server. I uninstalled apache-http and didn't do anything to
tomcat config.

I hope this is what you ask me for:

  !-- A Connector represents an endpoint by which requests are received
 and responses are returned. Documentation at :
 Java HTTP Connector: /docs/config/http.html (blocking 
non-blocking)
 Java AJP  Connector: /docs/config/ajp.html
 APR (HTTP/AJP) Connector: /docs/apr.html
 Define a non-SSL HTTP/1.1 Connector on port 8080
--
Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /
!-- A Connector using the shared thread pool--
!--
Connector executor=tomcatThreadPool
   port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /
--
!-- Define a SSL HTTP/1.1 Connector on port 8443
 This connector uses the JSSE configuration, when using APR, the
 connector should be using the OpenSSL style configuration
 described in the APR documentation --
!--
Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true
   maxThreads=150 scheme=https secure=true
   clientAuth=false sslProtocol=TLS /
--

I am not sure if Tomcat starts to refuse after about 1 min or after a
certain no of requests. I would guess it usually takes about 1 min. Not
always the same time, though. Not always the same no of requests either.
Example: This time I was able to click 10 times on manager/status and list
applications before it froze. The next time it froze not even after 50
times. I wrote a line in this email and then it didn't work anymore.




On Thu, Mar 11, 2010 at 10:36 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Maurice,

 On 3/11/2010 4:26 PM, Maurice Mengel wrote:
  2) I get the static page, because it is still in the brower cache,
  browser is loading, but never actually displays anything; after a very
  long time, a timeout. How do you describe that?

 That sounds like a connection timeout, rather than a refusal. Basically,
 the OS accepts the connection to the socket, but then the server
 (Tomcat) never picks up the phone, and eventually a timeout occurs.

  3) yes stout goes to console, see attachment

 Your attachment was stripped: please just paste it into your next reply.

  4) here is the output of jstack.

 Everything looks okay in there to me. Can you post your Connector
 configuration(s) from conf/server.xml? Are you using any web server in
 front of Tomcat? You didn't mention it, but it's always good to check.

 The Tomcat's refusal to answer requests come after a certain number of
 requests are issued (say, the 10th request always fails), or a certain
 period of time (after 30 seconds, all failures)? Once you get yourself
 into this state, does Tomcat ever recover?

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkuZYmAACgkQ9CaO5/Lv0PCtjACgpAzueLh7RoH2/6HoFKyIrMst
 FJcAn1Mhd68UoDYR30aEiANDa6lRCPdM
 =QHOo
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




RE: tomcat hangs without anything

2010-03-11 Thread Caldarale, Charles R
 From: Maurice Mengel [mailto:mauricemen...@gmail.com]
 Subject: Re: tomcat hangs without anything
 
 4) here is the output of jstack.

Everything looks pretty normal here.

 http-8080-1 daemon prio=6 tid=0x0344b000 nid=0x180c in Object.wait()
 [0x03adf000]
    java.lang.Thread.State: WAITING (on object monitor)
     at java.lang.Object.wait(Native Method)
     - waiting on 0x077d0068 (a
 org.apache.tomcat.util.net.JIoEndpoint$Worker)
     at java.lang.Object.wait(Object.java:485)

The one above is waiting for a socket from the next connection attempt by the 
client.

 TP-Monitor daemon prio=6 tid=0x03449800 nid=0x1e40 in Object.wait()

The thread pool monitor, doing nothing, as usual.

 TP-Processor4 daemon prio=6 tid=0x031afc00 nid=0x13b0 runnable

This one is waiting for a connection over the AJP port (8009), which you likely 
aren't using.

 TP-Processor3 daemon prio=6 tid=0x03441400 nid=0x1dec
 TP-Processor2 daemon prio=6 tid=0x03466400 nid=0x1db8
 TP-Processor1 daemon prio=6 tid=0x03448400 nid=0x1f60

Idle worker threads, waiting for requests to show up.

 http-8080-Acceptor-0 daemon prio=6 tid=0x031b4c00 nid=0x173c runnable

This one is waiting for a connection over the HTTP port (8080).

 ContainerBackgroundProcessor[StandardEngine[Catalina]] daemon prio=6
 tid=0x0345d400 nid=0x18dc

A normal Tomcat background thread.

 GC Daemon daemon prio=2 tid=0x03194c00 nid=0x18f4 
 Low Memory Detector daemon prio=6 tid=0x02ca6800 nid=0x1e00 runnable
 CompilerThread0 daemon prio=10 tid=0x02ca3800 nid=0x1c6c
 Attach Listener daemon prio=10 tid=0x02ca2000 nid=0x1774 
 Signal Dispatcher daemon prio=10 tid=0x02ca0c00 nid=0x1a34 runnable
 Finalizer daemon prio=8 tid=0x02c62000 nid=0x1ea0 
 Reference Handler daemon prio=10 tid=0x02c5d400 nid=0x19c0

Standard JVM internal threads.
 
 main prio=6 tid=0x002a7400 nid=0x1528 runnable [0x0038f000]

The initial Tomcat thread, waiting for a shutdown command.

 VM Thread prio=10 tid=0x02c5bc00 nid=0x1c2c runnable
 VM Periodic Task Thread prio=10 tid=0x02cab800 nid=0x1db4

More internal JVM threads.

All looks perfectly normal for an idle Tomcat, waiting for clients to make 
requests.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



RE: tomcat hangs without anything

2010-03-11 Thread Caldarale, Charles R
 From: Maurice Mengel [mailto:mauricemen...@gmail.com]
 Subject: Re: tomcat hangs without anything
 
 I hope this is what you ask me for:

It is, and it shows nothing unusual - all pretty standard settings.

 Example: This time I was able to click 10 times on manager/status and
 list applications before it froze.

What happens if you start another browser to connect to Tomcat with?

 I wrote a line in this email and then it didn't work anymore.

How much memory do you have on the system?  Is it oversubscribed?

Can you run JConsole and display what's going on inside the JVM Tomcat is 
using?  Might show heap exhaustion, although that would seem very unlikely 
based on the previously posted stack trace.  (Which was taken /after/ Tomcat 
became unresponsive, correct?)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



Re: tomcat hangs without anything

2010-03-11 Thread Maurice Mengel
I have changed server.xml to a ridiculous connectionTimeout value and now it
seems to run better. Since I did this for no good reason at all, it is
probably not the reason it runs better.
  Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /

Jconsole seems not to be able to connect, although servlet is responsive.

I think I probably need to read more about jconsole, but I guess I need to
sleep first.

For the time being it works now!

Thanks for the great help!

Your help makes tomcat a lot more sympathetic to me!

Maurice


On Thu, Mar 11, 2010 at 11:06 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Maurice Mengel [mailto:mauricemen...@gmail.com]
  Subject: Re: tomcat hangs without anything
 
  I hope this is what you ask me for:

 It is, and it shows nothing unusual - all pretty standard settings.

  Example: This time I was able to click 10 times on manager/status and
  list applications before it froze.

 What happens if you start another browser to connect to Tomcat with?

  I wrote a line in this email and then it didn't work anymore.

 How much memory do you have on the system?  Is it oversubscribed?

 Can you run JConsole and display what's going on inside the JVM Tomcat is
 using?  Might show heap exhaustion, although that would seem very unlikely
 based on the previously posted stack trace.  (Which was taken /after/ Tomcat
 became unresponsive, correct?)

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.




RE: tomcat hangs without anything

2010-03-11 Thread Caldarale, Charles R
 From: Maurice Mengel [mailto:mauricemen...@gmail.com]
 Subject: Re: tomcat hangs without anything
 
   Connector port=8080 protocol=HTTP/1.1
connectionTimeout=2
redirectPort=8443 /

That time value only controls how long Tomcat will wait after a connection 
request to receive the first byte of data.  If raising it beyond the default of 
20 seconds helps, this is indicative of a client, not server, problem.  Are you 
perhaps running out of memory on the laptop, causing processes to get swapped 
out?

 Jconsole seems not to be able to connect

Odd; there are sometimes problems using JConsole with Tomcat running as a 
service, but I've not heard of any with Tomcat started with the scripts on XP.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



Tomcat hangs up - Timeout

2010-02-04 Thread Alexander Diedler
Hello,
Our cluster (Apache 2.2.14 + mod_jk 1.2.27 + Tomcat 6.0.20) with two nodes 
sometimes hung up and doesn´t deliver anything. Just a rotating earth in IE 
=;o) So I think the connector lost communication to the node or other reasons.

Worker.properties:

# List the workers name

worker.list= worker3,loadbalancer,jkstatus worker.maintain= 120 # 
 # First worker #  worker.worker1.port=8010 
worker.worker1.host=k0.domain.local

#worker.worker1.host=xxx.xx.5.78

worker.worker1.type=ajp13

worker.worker1.lbfactor=75

worker.worker1.route=worker1

worker.worker1.activation=active





# 

# Second worker

# 

worker.worker2.port=8010

worker.worker2.host=k1.domain.local

#worker.worker2.host=xxx.xx.5.77

worker.worker2.type=ajp13

worker.worker2.lbfactor=100

worker.worker2.route=worker2

worker.worker2.activation=active



# 

# qas worker

# 

worker.worker3.port=8011

worker.worker3.host=k0.domain.local

#worker.worker3.host=xxx.xx.5.78

worker.worker3.type=ajp13

worker.worker3.lbfactor=1

worker.worker3.activation=active





# --

# Load Balancer worker

# --

worker.loadbalancer.type=lb

worker.loadbalancer.balance_workers=worker1,worker2

worker.loadbalancer.sticky_session=true

worker.loadbalancer.sticky_session_force=false

worker.loadbalancer.method=Busyness

worker.loadbalancer.retries=4

worker.loadbalancer.secret=X





# Define a 'jkstatus' worker using status worker.jkstatus.type=status





=

Httpd.conf:

LoadModule jk_module modules/mod_jk.so



JkWorkersFile conf/worker.properties

JkLogFile |D:/X/software/Apache/bin/rotatelogs.exe 
D:/X/logs/software/Apache/mod_jk.log 3600



# LEvel error|warn|debug

JkLogLevel warn



ThreadLimit 1920

ThreadsPerChild 1920

MaxRequestsPerChild 0



Include conf/extra/httpd-vhosts.conf



==

Httpd-vhosts.conf

NameVirtualHost *:80



### Default vHost ###



VirtualHost *:80

ServerAdmin i...@xxx.demailto:i...@xxx.de

DocumentRoot D:\XX\software\Apache\htdocs

 #ServerName k0.domain.local

  ServerName xxx.xx.5.78



# Add the jkstatus mount point

JkMount /jkmanager/* jkstatus

JkMount /probe/* loadbalancer



#Enable the JK manager access from localhost only

Location /jkmanager/

  JkMount jkstatus

  Order deny,allow

  Deny from all

  Allow from 127.0.0.1

  Allow from xxx.xxx.214.132

/Location

/VirtualHost





VirtualHost *:80

ServerAdmin i...@x.demailto:i...@x.de

DocumentRoot D:\x\apps\extranet

#ServerName k0.domain.local

ServerName xxx.xx.5.78



ServerAlias k0.xxx-extra.net







  Directory D:\x\apps\extranet

  Options Indexes FollowSymLinks

  AllowOverride None

  Order allow,deny

  Allow from all

/Directory



  ## Tomcatanbindung

JkMount /* loadbalancer

  JkUnMount /*.gif loadbalancer

  JkUnMount /*.jpg loadbalancer

  JkUnMount /*.jpeg loadbalancer

  JkUnMount /*.png loadbalancer

  JkUnMount /*.css loadbalancer

  JkUnMount /*.js loadbalancer

/VirtualHost



VirtualHost *:80

ServerAdmin i...@.demailto:i...@.de

DocumentRoot D:\\apps\akademie

#ServerName k0.domain.local

  ServerName xxx.xx.5.78

ServerAlias dev.xxx.de

ServerAlias staging.xxx.de





Directory D:\x\apps\akademie

  Options Indexes FollowSymLinks

  AllowOverride None

  Order allow,deny

  Allow from all

/Directory



  ## Tomcatanbindung

JkMount /* loadbalancer

  JkUnMount /*.gif loadbalancer

  JkUnMount /*.jpg loadbalancer

  JkUnMount /*.jpeg loadbalancer

  JkUnMount /*.png loadbalancer

  JkUnMount /*.css loadbalancer

  JkUnMount /*.js loadbalancer

/VirtualHost





# Extra Instanz für QAS

VirtualHost *:80

ServerAdmin i...@x.demailto:i...@x.de

DocumentRoot D:\Tomcat_Apps\articlefinder_qas

#ServerName k0.domain.local

  ServerName xxx.xx.5.78



ServerAlias qas..de



## Tomcatanbindung

JkMount /* worker3

/VirtualHost





# Articlefinder

VirtualHost *:80

ServerAdmin i...@.demailto:i...@.de

DocumentRoot D:\Tomcat_Apps\articlefinder

#ServerName k0.domain.local

  ServerName xxx.xx.5.78



ServerAlias -.de

ServerAlias xxx.xx.de

ServerAlias gk0.xxx.de

  ## Tomcatanbindung

JkMount /* loadbalancer

/VirtualHost





Server.xml



Connectorport=8010

  protocol=AJP/1.3

  

Re: Tomcat hangs when reloading context if user is logged in

2009-11-04 Thread James Murphy

Chris,

Thanks for all you help :) . We tried commenting out that method (just 
to see if it was the root of the problem) and Tomcat behaved like it is 
supposed to! Now we can work on implementing a work-around for the 
functionality.


Thanks!

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs when reloading context if user is logged in

2009-11-02 Thread James Murphy

Chris,

Thanks for the response. I went ahead and got the info you requested.

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

James,

On 10/30/2009 9:05 AM, James Murphy wrote:
  

Some background info:
OS: Windows Server 2003
Tomcat Version: 5.5
JDK Version: 1.6.0

I've run into a very annoying problem while trying to enable
automatic context reload on our development server. It works well
when there is not a user logged on to the system (I guess that means
while there is session info on the server), but if someone is logged
in, then Tomcat fails to reload the context.



I can confirm that Tomcat 5.5.26 both reloads and stops properly when
multiple sessions are active. Persist-to-disk works as expected, and
sessions are retained across the restart/reload.

I suspect there is a problem with your specific webapp and/or setup.
  

My thoughts too, I'm just not sure where to look.
  

Another issue that may be related to this is that Tomcat will not
shutdown cleanly when someone is logged in (Tomcat hangs at INFO:
Stopping service Catalina). Rather, we must close the console window
forcefully, then start the server back up to an error (IOException
while loading persisted sessions: java.io.EOFException)



That's interesting: your session (de)serialization is failing because
the file is incomplete. I suspect this is because the sessions are not
correctly written to the file before application stop. Perhaps session
serialization is the actual problem.

Can you attempt to shut down Tomcat and then check:
1. A few thread dumps
(http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F)
  

I put them at the bottom of the message.

2. The CPU usage of your webapp and/or threads
  
The CPU usage jumped to about 05% right before it hung, and then fell to 
00% and stayed there. Memory usage held steady at 37K.

I'm wondering if serialization is either running-away (infinite loop,
etc.) or stalling (waiting for access to a locked object) and it's never
completing.

  
Looks to me like it's waiting for a locked object, like you said, rather 
than hitting an infinite loop.

I used jstack to get a stack trace on the Tomcat process when it hung
on context reload. I won't post the details unless someone thinks
they might be helpful (Don't want to fill the email with too much
stuff).



I think they might be. Go ahead and post the thread dump.
  

See the bottom of the message.
  

However, I know I read somewhere that Tomcat will hang on shutdown
if there is a non-daemon thread still running.



While this is true, it shouldn't block a webapp from reloading (it will
leave the old webapp in memory, so the old webapp won't really go away
completely, but the new webapp should load in its place and handle
requests).

  

jstack reports three non-daemon threads: main, VM Thread, and VM
Periodic Task Thread. I don't think that's causing the problem, but
figured I'd better let you know anyway.



Nope, those are normal.
  


Here are a couple of thread dumps of tomcat, the first taken about 5 
seconds after the hang, and the second a couple of minutes later, while 
still hung.
Note that in the main methods, there is one stack frame with some XX's 
in it. I put those there to cover the name of a method which could 
identify our company. Nothing personal, I'm just not allowed to let that 
information leak out.
After seeing that stack frame, however, I looked into the method which 
it referenced. It appears to be sending a HTTP POST message to a servlet 
which we have running, which is supposed to log the user out when it 
recieves said message. Could the problem be that the servlet is shut 
down before the message reaches it?


--
--
--

2009-11-02 13:10:11
Full thread dump Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, 
sharing):


http-80-6 daemon prio=6 tid=0x0322a400 nid=0xb10 in Object.wait() 
[0x03d5f000..0x03d5fb18]

  java.lang.Thread.State: WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   - waiting on 0x181530c0 (a 
org.apache.tomcat.util.net.JIoEndpoint$Worker)

   at java.lang.Object.wait(Object.java:485)
   at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:423)

   - locked 0x181530c0 (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
   at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:449)

   at java.lang.Thread.run(Thread.java:619)

http-80-5 daemon prio=6 tid=0x02f89400 nid=0xe2c in Object.wait() 
[0x03cbf000..0x03cbfc18]

  java.lang.Thread.State: WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   - waiting on 0x18153148 (a 
org.apache.tomcat.util.net.JIoEndpoint$Worker

Re: Tomcat hangs when reloading context if user is logged in

2009-11-02 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

James,

On 11/2/2009 1:32 PM, James Murphy wrote:
 Here are a couple of thread dumps of tomcat, the first taken about 5
 seconds after the hang, and the second a couple of minutes later, while
 still hung.

Okay.

 Note that in the main methods, there is one stack frame with some XX's
 in it. I put those there to cover the name of a method which could
 identify our company. Nothing personal, I'm just not allowed to let that
 information leak out.

No problem: this is always good practice. Thanks for mentioning it,
though :)

 After seeing that stack frame, however, I looked into the method which
 it referenced. It appears to be sending a HTTP POST message to a servlet
 which we have running, which is supposed to log the user out when it
 recieves said message. Could the problem be that the servlet is shut
 down before the message reaches it?


Most of these all look the same. That is, they are just waiting for
requests to come in:

 http-80-6 daemon prio=6 tid=0x0322a400 nid=0xb10 in Object.wait()
 [0x03d5f000..0x03d5fb18]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x181530c0 (a

[snip]

 main prio=6 tid=0x00297000 nid=0xb18 runnable [0x0088f000..0x0088fe58]
   java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
- locked 0x1698bc98 (a java.io.BufferedInputStream)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:632)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:577)
at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1004)
 
- locked 0x16981bd0 (a sun.net.www.protocol.http.HttpURLConnection)
at com.oreilly.servlet.HttpMessage.sendPostMessage(HttpMessage.java:141)
at
 com.XXX.bean.SessionListener.valueUnbound(SessionListener.java:44)
 
at
 org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1654)
 
at
 org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1507)
 
at
 org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:959)
 
at
 org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:517)

It looks like the StandardManager is trying to persist your sessions,
which is proper behavior (unless you have disabled it). You have a
listener that, as you mentioned, is making an outgoing HTTP connection.

Is it connecting to another webapp, or to the same webapp? If you're
trying to connect to the same webapp, then it's possible that Tomcat has
paused all your Connectors, and they aren't accepting any connections.
In that case, you'll wait for a long time (and possibly repeatedly
attempt connections) before your POST fails.

If the above describes your situation, may I recommend that, instead of
making an HTTP POST back to your own webapp, you instead make a regular
Java method call to process this logout stuff? It shouldn't be that
tough to refactor your code to allow your logout logic to be called
either from an HTTP request or from an explicit method call.

Your second thread dump shows the main thread stuck in the same place:

 main prio=6 tid=0x00297000 nid=0xb18 runnable [0x0088f000..0x0088fe58]
   java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
- locked 0x1698bc98 (a java.io.BufferedInputStream)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:632)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:577)
at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1004)
 
- locked 0x16981bd0 (a sun.net.www.protocol.http.HttpURLConnection)
at com.oreilly.servlet.HttpMessage.sendPostMessage(HttpMessage.java:141)
at
 com.XXX.bean.SessionListener.valueUnbound(SessionListener.java:44)

Yup: still waiting.

Try calling your logout logic without using an HTTP POST and I think
you'll find that things start working more reasonably for you.

Good luck,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrvLKAACgkQ9CaO5/Lv0PCuZwCgrpXZFpDQKvWcHXqy3eqw/Ra2
sAIAnjnhp5a8eeK/vf3sBsTtCeJg3hCZ
=dILD
-END PGP SIGNATURE-


Tomcat hangs when reloading context if user is logged in

2009-10-30 Thread James Murphy

Hi all,

Some background info:
OS: Windows Server 2003
Tomcat Version: 5.5
JDK Version: 1.6.0

I've run into a very annoying problem while trying to enable automatic 
context reload on our development server. It works well when there is 
not a user logged on to the system (I guess that means while there is 
session info on the server), but if someone is logged in, then Tomcat 
fails to reload the context. Another issue that may be related to this 
is that Tomcat will not shutdown cleanly when someone is logged in 
(Tomcat hangs at INFO: Stopping service Catalina). Rather, we must 
close the console window forcefully, then start the server back up to an 
error (IOException while loading persisted sessions: 
java.io.EOFException), shut it back down, and restart it. This has 
become very tedious to do whenever we have to cycle the server, and has 
made context reloading impossible. After all the information I tried 
piecing together on the I guess it has something to with not being able 
to reload/shutdown if there is an open session, but I'm not sure


I tried upgrading Tomcat to 6.0.20, but the same issue occurs. If 
possible, I'd like to try fixing this on Tomcat 5.5, because I'm not 
100% sure that the migration went cleanly.


I used jstack to get a stack trace on the Tomcat process when it hung on 
context reload. I won't post the details unless someone thinks they 
might be helpful (Don't want to fill the email with too much stuff). 
However, I know I read somewhere that Tomcat will hang on shutdown if 
there is a non-daemon thread still running. jstack reports three 
non-daemon threads: main, VM Thread, and VM Periodic Task Thread. I 
don't think that's causing the problem, but figured I'd better let you 
know anyway.


I appreciate your help, as it has been very frustrating trying to 
resolve this issue.

-James Murphy


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs when reloading context if user is logged in

2009-10-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

James,

On 10/30/2009 9:05 AM, James Murphy wrote:
 Some background info:
 OS: Windows Server 2003
 Tomcat Version: 5.5
 JDK Version: 1.6.0
 
 I've run into a very annoying problem while trying to enable
 automatic context reload on our development server. It works well
 when there is not a user logged on to the system (I guess that means
 while there is session info on the server), but if someone is logged
 in, then Tomcat fails to reload the context.

I can confirm that Tomcat 5.5.26 both reloads and stops properly when
multiple sessions are active. Persist-to-disk works as expected, and
sessions are retained across the restart/reload.

I suspect there is a problem with your specific webapp and/or setup.

 Another issue that may be related to this is that Tomcat will not
 shutdown cleanly when someone is logged in (Tomcat hangs at INFO:
 Stopping service Catalina). Rather, we must close the console window
 forcefully, then start the server back up to an error (IOException
 while loading persisted sessions: java.io.EOFException)

That's interesting: your session (de)serialization is failing because
the file is incomplete. I suspect this is because the sessions are not
correctly written to the file before application stop. Perhaps session
serialization is the actual problem.

Can you attempt to shut down Tomcat and then check:
1. A few thread dumps
(http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F)

2. The CPU usage of your webapp and/or threads

I'm wondering if serialization is either running-away (infinite loop,
etc.) or stalling (waiting for access to a locked object) and it's never
completing.

 I used jstack to get a stack trace on the Tomcat process when it hung
 on context reload. I won't post the details unless someone thinks
 they might be helpful (Don't want to fill the email with too much
 stuff).

I think they might be. Go ahead and post the thread dump.

 However, I know I read somewhere that Tomcat will hang on shutdown
 if there is a non-daemon thread still running.

While this is true, it shouldn't block a webapp from reloading (it will
leave the old webapp in memory, so the old webapp won't really go away
completely, but the new webapp should load in its place and handle
requests).

 jstack reports three non-daemon threads: main, VM Thread, and VM
 Periodic Task Thread. I don't think that's causing the problem, but
 figured I'd better let you know anyway.

Nope, those are normal.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrrE6IACgkQ9CaO5/Lv0PCseACgvojWegC03QeaM0Twjd4Ai/Wo
dxQAn0rqHwMGpu7rYj0Ihqsgndr854D4
=aj9o
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs when cmd window fills up

2009-10-13 Thread Konstantin Kolinko
2009/10/13 Ron McNulty rmcnu...@xtra.co.nz:
 Hi all

 This is possibly a little OT, but maybe someone has come across this.

 We are running Tomcat 5 (Actually Jetspeed-2.1.3) on a Windows 2K box. We 
 start it from a cmd window, using startup.bat. All runs fine until a large 
 amount of text gets output to the log (redirected to the Tomcat window). 
 Tomcat then locks up. Pressing ctrl C produces another burst of data, and 
 makes things run again for a while.

 I suspect this is not a Tomcat problem, but I can't find anything on google 
 that helps.


If it is not garbage collection, then maybe some synchronization.

Writing out a large amount of text to a console may take some time, if
console draws slowly.
If the writing thread owns some synchronized resource, other threads
can wait to obtain it.

The output stream itself can be such resource (for example,
PrintWriter.write() has a synchronized block), but you won't notice
congestion with writing unless some other threads are also trying to
write. It might be as well some other valuable resource somewhere up
the call chain.  Your thread dumps might help you to spot it.

http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-13 Thread Law, Christopher
, and passes
them
 on to the appropriate Host (virtual host).
 Documentation at /docs/config/engine.html --

!-- You should set jvmRoute to support load-balancing via AJP ie :
Engine name=Catalina defaultHost=localhost jvmRoute=jvm1

-- 
Engine name=Catalina defaultHost=localhost

  !--For clustering, please take a look at documentation at:
  /docs/cluster-howto.html  (simple how to)
  /docs/config/cluster.html (reference documentation) --
  !--
  Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster/
  --

  !-- The request dumper valve dumps useful debugging information
about
   the request and response data received and sent by Tomcat.
   Documentation at: /docs/config/valve.html --
  !--
  Valve className=org.apache.catalina.valves.RequestDumperValve/
  --

  !-- This Realm uses the UserDatabase configured in the global
JNDI
   resources under the key UserDatabase.  Any edits
   that are performed against this UserDatabase are immediately
   available for use by the Realm.  --
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/

  !-- Define the default virtual host
   Note: XML Schema validation will not work with Xerces 2.2.
   --
  Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

!-- SingleSignOn valve, share authentication between web
applications
 Documentation at: /docs/config/valve.html --
!--
Valve
className=org.apache.catalina.authenticator.SingleSignOn /
--

!-- Access log processes all example.
 Documentation at: /docs/config/valve.html --
Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs  
   prefix=localhost_access_log. suffix=.txt
pattern=common resolveHosts=false/

  /Host
/Engine
  /Service
/Server
8--
---

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Monday, October 12, 2009 9:45 PM
To: Tomcat Users List
Subject: RE: Tomcat hangs for minutes between ContextConfig and
StandardContext (Starting the app)

 From: Law, Christopher [mailto:chris@snapon.com]
 Subject: RE: Tomcat hangs for minutes between ContextConfig and 
 StandardContext (Starting the app)
 
 ${CATALINA_HOME}/conf/context.xml
 Which contains (comments removed):
 Context
 WatchedResourceWEB-INF/web.xml/WatchedResource
 Manager pathname= /
 /Context

That looks o.k.

 ${CATALINA_HOME}/conf/Catalina/localhost/Spc.xml
 Context antiJARLocking=true antiResourceLocking=true
 Manager pathname= /
 /Context

The additional Manager element isn't needed (but it won't hurt); the
global one will suffice.

 2009-10-12 18:06:13,973 DEBUG main
 org.apache.catalina.startup.ContextConfig - Successfully processed 
 context [/Spc] configuration file 
 E:\apache-tomcat-6.0.18\conf\Catalina\localhost\Spc.xml null
 
 I notice that the null is still being displayed, which, according to

 an earlier reply indicated the file has no recognizable content.

Having now looked through the code, I think I was mistaken.  Looks like
there's a normal path that will produce that message even when a valid
Context element is present.

 Can you tell me what I'm doing wrong?

At this point, I'm reduced to guessing.  By any chance, is there a case
mismatch - is your webapp properly deployed in [appBase]/Spc.xml or
perhaps incorrectly in [appBase]/spc.xml?  Can you post your entire
server.xml?  (Grasping for straws here.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-13 Thread Caldarale, Charles R
 From: Law, Christopher [mailto:chris@snapon.com]
 Subject: RE: Tomcat hangs for minutes between ContextConfig and
 StandardContext (Starting the app)
 
  By any chance, is there a case mismatch - is your webapp properly
  deployed in [appBase]/Spc.xml or perhaps incorrectly in
  [appBase]/spc.xml?

Sorry - shouldn't have been responding when it was so late after a really, 
really long day.  The above should have been referring to Spc.war and spc.war, 
not any .xml files.  Just looking for possible casing issues, since Java and 
Tomcat are case-sensitive, whereas Windows is not.

 My server.xml (it should be the distribution copy with SSL and access
 log enabled):

That all looks fine.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-12 Thread Law, Christopher
Well, I guess I was wrong.  The delay is still there.

I installed a new copy of Tomcat and still have the same problem.  I
have the following context files:

${CATALINA_HOME}/conf/context.xml
Which contains (comments removed):
Context
WatchedResourceWEB-INF/web.xml/WatchedResource
Manager pathname= /
/Context

${CATALINA_HOME}/conf/Catalina/localhost/Spc.xml
Context antiJARLocking=true antiResourceLocking=true
Manager pathname= /
/Context

I uncommented the Manager element because I don't want to persist
sessions between startups.

I am still getting the four minute delay.  The tomcat log messages show
(similar to before):

2009-10-12 18:06:13,973 DEBUG main
org.apache.catalina.startup.ContextConfig - Successfully processed
context [/Spc] configuration file
E:\apache-tomcat-6.0.18\conf\Catalina\localhost\Spc.xml null

2009-10-12 18:10:12,987 DEBUG main
org.apache.catalina.core.StandardContext - Starting /Spc  

I notice that the null is still being displayed, which, according to
an earlier reply indicated the file has no recognizable content.

Can you tell me what I'm doing wrong?

Thank you for any help.

-Original Message-
From: Law, Christopher [mailto:chris@snapon.com] 
Sent: Saturday, October 10, 2009 10:02 AM
To: Tomcat Users List
Subject: RE: Tomcat hangs for minutes between ContextConfig and
StandardContext (Starting the app)

Yup, guess I missed the keyword Attributes in the doc.  Anyway, I
added the attributes and it has significantly improved the deploy and
startup.  There are minor delays as indicated in the Tomcat doc, but
these are delays of seconds - much better than four minutes!

Thank you!

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Friday, October 09, 2009 8:40 PM
To: Tomcat Users List
Subject: RE: Tomcat hangs for minutes between ContextConfig and
StandardContext (Starting the app)

 From: Law, Christopher [mailto:chris@snapon.com]
 Subject: RE: Tomcat hangs for minutes between ContextConfig and 
 StandardContext (Starting the app)
 
 The Tomcat logs show:
  2009-10-09 16:03:11,093 DEBUG main
 org.apache.catalina.startup.ContextConfig - Successfully processed 
 context [/Spc] configuration file 
 D:\apache-tomcat-6.0.18\conf\Catalina\localhost\Spc.xml null

The null says your Spc.xml file had no recognizable content; looks
like you have it formatted incorrectly.  It should look like this:

Context antiJARLocking=true antiResourceLocking=true /

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-12 Thread Caldarale, Charles R
 From: Law, Christopher [mailto:chris@snapon.com]
 Subject: RE: Tomcat hangs for minutes between ContextConfig and
 StandardContext (Starting the app)
 
 ${CATALINA_HOME}/conf/context.xml
 Which contains (comments removed):
 Context
 WatchedResourceWEB-INF/web.xml/WatchedResource
 Manager pathname= /
 /Context

That looks o.k.

 ${CATALINA_HOME}/conf/Catalina/localhost/Spc.xml
 Context antiJARLocking=true antiResourceLocking=true
 Manager pathname= /
 /Context

The additional Manager element isn't needed (but it won't hurt); the global 
one will suffice.

 2009-10-12 18:06:13,973 DEBUG main
 org.apache.catalina.startup.ContextConfig - Successfully processed
 context [/Spc] configuration file
 E:\apache-tomcat-6.0.18\conf\Catalina\localhost\Spc.xml null
 
 I notice that the null is still being displayed, which, according to
 an earlier reply indicated the file has no recognizable content.

Having now looked through the code, I think I was mistaken.  Looks like there's 
a normal path that will produce that message even when a valid Context 
element is present.

 Can you tell me what I'm doing wrong?

At this point, I'm reduced to guessing.  By any chance, is there a case 
mismatch - is your webapp properly deployed in [appBase]/Spc.xml or perhaps 
incorrectly in [appBase]/spc.xml?  Can you post your entire server.xml?  
(Grasping for straws here.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat hangs when cmd window fills up

2009-10-12 Thread Ron McNulty
Hi all

This is possibly a little OT, but maybe someone has come across this.

We are running Tomcat 5 (Actually Jetspeed-2.1.3) on a Windows 2K box. We start 
it from a cmd window, using startup.bat. All runs fine until a large amount of 
text gets output to the log (redirected to the Tomcat window). Tomcat then 
locks up. Pressing ctrl C produces another burst of data, and makes things 
run again for a while.

I suspect this is not a Tomcat problem, but I can't find anything on google 
that helps.

Regards

Ron





RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-10 Thread Law, Christopher
Yup, guess I missed the keyword Attributes in the doc.  Anyway, I
added the attributes and it has significantly improved the deploy and
startup.  There are minor delays as indicated in the Tomcat doc, but
these are delays of seconds - much better than four minutes!

Thank you!

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, October 09, 2009 8:40 PM
To: Tomcat Users List
Subject: RE: Tomcat hangs for minutes between ContextConfig and
StandardContext (Starting the app)

 From: Law, Christopher [mailto:chris@snapon.com]
 Subject: RE: Tomcat hangs for minutes between ContextConfig and 
 StandardContext (Starting the app)
 
 The Tomcat logs show:
  2009-10-09 16:03:11,093 DEBUG main
 org.apache.catalina.startup.ContextConfig - Successfully processed 
 context [/Spc] configuration file 
 D:\apache-tomcat-6.0.18\conf\Catalina\localhost\Spc.xml null

The null says your Spc.xml file had no recognizable content; looks
like you have it formatted incorrectly.  It should look like this:

Context antiJARLocking=true antiResourceLocking=true /

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-09 Thread Law, Christopher
Well, I created a context file named for my app (Spc.xml) and placed it
in ${CATALINA_HOME}/conf/Catalina/localhost/.  I set the two entries:

antiJARLockingtrue/antiJARLocking
antiResourceLockingtrue/antiResourceLocking

The Tomcat logs show:

 2009-10-09 16:03:11,093 DEBUG main
org.apache.catalina.startup.ContextConfig - Successfully processed
context [/Spc] configuration file
D:\apache-tomcat-6.0.18\conf\Catalina\localhost\Spc.xml null 
[Almost a four minute delay]

 2009-10-09 16:07:04,984 DEBUG main
org.apache.catalina.core.StandardContext - Starting /Spc  

and the thread dumps still show a similar state, with the:
at java.io.FileOutputStream.close0(Native Method)
at the top of the main thread.  

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, October 07, 2009 5:46 PM
To: Tomcat Users List
Subject: RE: Tomcat hangs for minutes between ContextConfig and
StandardContext (Starting the app)

 From: Law, Christopher [mailto:chris@snapon.com]
 Subject: RE: Tomcat hangs for minutes between ContextConfig and 
 StandardContext (Starting the app)
 
 I'm afraid I don't know what a blocking entropy is.

/dev/random is the system-provided random byte stream for UNIX/Linux and
some other platforms.  In order to generate a reasonably random
sequence, it needs sources of randomness, such as keyboard interrupts,
mouse movements, radioactive decay; than randomness is termed entropy,
and until there's enough of it, the stream will block when requests are
made to it.

 main prio=6 tid=0x002a7000 nid=0xd5c runnable 
 [0x0090f000..0x0090fe54]
java.lang.Thread.State: RUNNABLE
   at java.io.FileOutputStream.close0(Native Method)
   at java.io.FileOutputStream.close(FileOutputStream.java:279)
   at java.io.FilterOutputStream.close(FilterOutputStream.java:143)

The above is the interesting one: it's stuck in close(), waiting for
something in the underlying file system.  Since you're on Windows, you
may need to set the antiJARLocking and antiResourceLocking attributes in
the Context element for your webapp.
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-09 Thread Caldarale, Charles R
 From: Law, Christopher [mailto:chris@snapon.com]
 Subject: RE: Tomcat hangs for minutes between ContextConfig and
 StandardContext (Starting the app)
 
 The Tomcat logs show:
  2009-10-09 16:03:11,093 DEBUG main
 org.apache.catalina.startup.ContextConfig - Successfully processed
 context [/Spc] configuration file
 D:\apache-tomcat-6.0.18\conf\Catalina\localhost\Spc.xml null

The null says your Spc.xml file had no recognizable content; looks like you 
have it formatted incorrectly.  It should look like this:

Context antiJARLocking=true antiResourceLocking=true /

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rainer,

On 10/6/2009 2:00 PM, Rainer Jung wrote:
 On 06.10.2009 17:41, Christopher Schultz wrote:
 
 Another possibility is that SecureRandom is taking forever to
 initialize: if your JVM is configured to use a blocking source of
 entropy, that may be the problem. This often happens in *NIX
 environments, but it appears that you are running on Microsoft Windows,
 so that's unlikely to be the problem.
 
 ... and should only be a problem if SSL is involved.

Doesn't Tomcat use SecureRandom for session id generation, at least
under certain configurations? This would trip over a blocking entropy
source regardless of SSL configuration, right?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrNBQMACgkQ9CaO5/Lv0PC5igCgjVbDsu74+cKSGW4geTCezF9r
fE0An2X4LgJg8/jpkSV+Vgn+yjqdTpF/
=+3Ms
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-07 Thread Law, Christopher
 (a org.apache.catalina.core.StandardHost)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
- locked 0x088f0a08 (a
org.apache.catalina.core.StandardEngine)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:516)
- locked 0x088f0a08 (a
org.apache.catalina.core.StandardEngine)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
- locked 0x088f0ae0 (a [Lorg.apache.catalina.Service;)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.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)

   Locked ownable synchronizers:
- None

VM Thread prio=10 tid=0x02c2e000 nid=0xfa8 runnable 

VM Periodic Task Thread prio=10 tid=0x02c4bc00 nid=0x5cc waiting on
condition 

JNI global references: 921
---8---
--

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Wednesday, October 07, 2009 5:16 PM
To: Tomcat Users List
Subject: Re: Tomcat hangs for minutes between ContextConfig and
StandardContext (Starting the app)

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rainer,

On 10/6/2009 2:00 PM, Rainer Jung wrote:
 On 06.10.2009 17:41, Christopher Schultz wrote:
 
 Another possibility is that SecureRandom is taking forever to
 initialize: if your JVM is configured to use a blocking source of 
 entropy, that may be the problem. This often happens in *NIX 
 environments, but it appears that you are running on Microsoft 
 Windows, so that's unlikely to be the problem.
 
 ... and should only be a problem if SSL is involved.

Doesn't Tomcat use SecureRandom for session id generation, at least
under certain configurations? This would trip over a blocking entropy
source regardless of SSL configuration, right?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrNBQMACgkQ9CaO5/Lv0PC5igCgjVbDsu74+cKSGW4geTCezF9r
fE0An2X4LgJg8/jpkSV+Vgn+yjqdTpF/
=+3Ms
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-07 Thread Caldarale, Charles R
 From: Law, Christopher [mailto:chris@snapon.com]
 Subject: RE: Tomcat hangs for minutes between ContextConfig and
 StandardContext (Starting the app)
 
 I'm afraid I don't know what a blocking entropy is.

/dev/random is the system-provided random byte stream for UNIX/Linux and some 
other platforms.  In order to generate a reasonably random sequence, it needs 
sources of randomness, such as keyboard interrupts, mouse movements, 
radioactive decay; than randomness is termed entropy, and until there's enough 
of it, the stream will block when requests are made to it.

 main prio=6 tid=0x002a7000 nid=0xd5c runnable
 [0x0090f000..0x0090fe54]
java.lang.Thread.State: RUNNABLE
   at java.io.FileOutputStream.close0(Native Method)
   at java.io.FileOutputStream.close(FileOutputStream.java:279)
   at java.io.FilterOutputStream.close(FilterOutputStream.java:143)

The above is the interesting one: it's stuck in close(), waiting for something 
in the underlying file system.  Since you're on Windows, you may need to set 
the antiJARLocking and antiResourceLocking attributes in the Context element 
for your webapp.
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-07 Thread Law, Christopher
Thanks, Chuck, I'll take a look into this.

Appreciate it.

Chris 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, October 07, 2009 5:46 PM
To: Tomcat Users List
Subject: RE: Tomcat hangs for minutes between ContextConfig and
StandardContext (Starting the app)

 From: Law, Christopher [mailto:chris@snapon.com]
 Subject: RE: Tomcat hangs for minutes between ContextConfig and 
 StandardContext (Starting the app)
 
 I'm afraid I don't know what a blocking entropy is.

/dev/random is the system-provided random byte stream for UNIX/Linux and
some other platforms.  In order to generate a reasonably random
sequence, it needs sources of randomness, such as keyboard interrupts,
mouse movements, radioactive decay; than randomness is termed entropy,
and until there's enough of it, the stream will block when requests are
made to it.

 main prio=6 tid=0x002a7000 nid=0xd5c runnable 
 [0x0090f000..0x0090fe54]
java.lang.Thread.State: RUNNABLE
   at java.io.FileOutputStream.close0(Native Method)
   at java.io.FileOutputStream.close(FileOutputStream.java:279)
   at java.io.FilterOutputStream.close(FilterOutputStream.java:143)

The above is the interesting one: it's stuck in close(), waiting for
something in the underlying file system.  Since you're on Windows, you
may need to set the antiJARLocking and antiResourceLocking attributes in
the Context element for your webapp.
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-06 Thread Law, Christopher
Hello, I'm running Tomcat 6.0.18 using Java 1.6.0_12 on Windows XP
professional.

 I have a problem that occurs during startup deploying a WAR file.
 Tomcat deploys the WAR file but then there is a delay of minutes
 before it tries to start the application.
 
 During the delay, there is no CPU usage and there is no abnormal
 activity that I can detect.  When Tomcat decides to start the
 application, it fires right up.
 
 It almost seems like Tomcat is blocked waiting for a reply from some
 request.
 
 My typical workflow consists of the following:
 Open a command shell.
   Edit code
   Build WAR
   Remove ${CATALINA_HOME}/webapps/*
   Remove ${CATALINA_HOME}/work/Catalina/localhost
   Remove ${CATALINA_HOME}/logs/*
   Copy the WAR file to ${CATALINA_HOME}/webapps
   From the command shell:  startup
   Test application
   From the command shell: shutdown
   
   repeat
 
 I set the log level for Tomcat to debug and this is the output, early
 on:
 
  2009-10-04 16:04:23,327 DEBUG main
 org.apache.catalina.startup.HostConfig - Watching WatchedResource
 'D:\apache-tomcat-6.0.18\conf\web.xml'
  2009-10-04 16:04:23,327 INFO main
 org.apache.catalina.startup.HostConfig - Deploying web application
 archive Spc.war
  2009-10-04 16:04:23,327 DEBUG main
 org.apache.catalina.core.ContainerBase - Add child
 StandardContext[/Spc] StandardEngine[Catalina].StandardHost[localhost]
  2009-10-04 16:04:23,327 DEBUG main
 org.apache.catalina.startup.ContextConfig - ContextConfig:
 Initializing
  2009-10-04 16:04:23,327 DEBUG main
 org.apache.catalina.startup.ContextConfig - Processing context [/Spc]
 configuration file D:\apache-tomcat-6.0.18 conf/context.xml
  2009-10-04 16:04:23,327 DEBUG main
 org.apache.catalina.startup.ContextConfig - Processing context [/Spc]
 configuration file D:\apache-tomcat-6.0.18\conf
 Catalina/localhost/context.xml.default
 
 [ This is almost a 4 minute delay ]
 
  2009-10-04 16:08:19,481 DEBUG main
 org.apache.catalina.core.StandardContext - Starting /Spc
  2009-10-04 16:08:19,481 DEBUG main
 org.apache.catalina.core.StandardContext - Registering
 j2eeType=WebModule,name=//localhost/Spc,J2EEApplication=none,J2EEServe
 r=none for null
 
 I'm at a loss since I startup and shutdown Tomcat during each
 iteration.  There is no context file in conf or
 conf/Catalina/localhost.  I don't delete to the RecycleBin.
 
 If anyone can tell me what I'm doing wrong or what may be causing the
 delay, I'd appreciate it.
 


RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-06 Thread Caldarale, Charles R
 From: Law, Christopher [mailto:chris@snapon.com]
 Subject: Tomcat hangs for minutes between ContextConfig and
 StandardContext (Starting the app)
 
 It almost seems like Tomcat is blocked waiting for a reply 
 from some request.

Quite possible.  Could be DNS resolution, or references in .xml files to 
external DTDs, among others.  You might want to run Wireshark while Tomcat is 
starting and just see what requests are being made.

Also, try taking a thread dump or three during the delay and see what's going 
on inside Tomcat.

 There is no context file in conf or conf/Catalina/localhost.

So you removed the standard conf/context.xml file that's distributed with 
Tomcat?

Are there any remote (CIFS/SMB) file references involved?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Christopher,

On 10/6/2009 10:50 AM, Law, Christopher wrote:
 Hello, I'm running Tomcat 6.0.18 using Java 1.6.0_12 on Windows XP
 professional.
 
 I have a problem that occurs during startup deploying a WAR file.
 Tomcat deploys the WAR file but then there is a delay of minutes
 before it tries to start the application.

 During the delay, there is no CPU usage and there is no abnormal
 activity that I can detect.  When Tomcat decides to start the
 application, it fires right up.

 It almost seems like Tomcat is blocked waiting for a reply from some
 request.

It might be. Can you take a thread dump during this delay to see what is
happening?

http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F

My guess is that you are using XML validation and you have a firewall
that is preventing the JVM from contacting a remote server to fetch a DTD.

Another possibility is that SecureRandom is taking forever to
initialize: if your JVM is configured to use a blocking source of
entropy, that may be the problem. This often happens in *NIX
environments, but it appears that you are running on Microsoft Windows,
so that's unlikely to be the problem.

Any more information you can provide will certainly be helpful.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrLZSQACgkQ9CaO5/Lv0PBTXgCfeVocP4clX5dBblkIKaBwrHkG
rHAAn1klDppfjMEU+vA4wDQQqLsNryJP
=Sfu+
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-06 Thread Pid Ster
Does the app perform normally when it does start up?

I recently experienced this when I inadvertently placed the same jar
in two places - the app displayed other errors when it finally loaded.

p

--

On 6 Oct 2009, at 15:52, Law, Christopher chris@snapon.com
wrote:

 Hello, I'm running Tomcat 6.0.18 using Java 1.6.0_12 on Windows XP
 professional.

 I have a problem that occurs during startup deploying a WAR file.
 Tomcat deploys the WAR file but then there is a delay of minutes
 before it tries to start the application.

 During the delay, there is no CPU usage and there is no abnormal
 activity that I can detect.  When Tomcat decides to start the
 application, it fires right up.

 It almost seems like Tomcat is blocked waiting for a reply from some
 request.

 My typical workflow consists of the following:
Open a command shell.
Edit code
Build WAR
Remove ${CATALINA_HOME}/webapps/*
Remove ${CATALINA_HOME}/work/Catalina/localhost
Remove ${CATALINA_HOME}/logs/*
Copy the WAR file to ${CATALINA_HOME}/webapps
From the command shell:  startup
Test application
From the command shell: shutdown

repeat

 I set the log level for Tomcat to debug and this is the output, early
 on:

 2009-10-04 16:04:23,327 DEBUG main
 org.apache.catalina.startup.HostConfig - Watching WatchedResource
 'D:\apache-tomcat-6.0.18\conf\web.xml'
 2009-10-04 16:04:23,327 INFO main
 org.apache.catalina.startup.HostConfig - Deploying web application
 archive Spc.war
 2009-10-04 16:04:23,327 DEBUG main
 org.apache.catalina.core.ContainerBase - Add child
 StandardContext[/Spc] StandardEngine[Catalina].StandardHost
 [localhost]
 2009-10-04 16:04:23,327 DEBUG main
 org.apache.catalina.startup.ContextConfig - ContextConfig:
 Initializing
 2009-10-04 16:04:23,327 DEBUG main
 org.apache.catalina.startup.ContextConfig - Processing context [/Spc]
 configuration file D:\apache-tomcat-6.0.18 conf/context.xml
 2009-10-04 16:04:23,327 DEBUG main
 org.apache.catalina.startup.ContextConfig - Processing context [/Spc]
 configuration file D:\apache-tomcat-6.0.18\conf
 Catalina/localhost/context.xml.default

 [ This is almost a 4 minute delay ]

 2009-10-04 16:08:19,481 DEBUG main
 org.apache.catalina.core.StandardContext - Starting /Spc
 2009-10-04 16:08:19,481 DEBUG main
 org.apache.catalina.core.StandardContext - Registering
 j2eeType=WebModule,name=//localhost/
 Spc,J2EEApplication=none,J2EEServe
 r=none for null

 I'm at a loss since I startup and shutdown Tomcat during each
 iteration.  There is no context file in conf or
 conf/Catalina/localhost.  I don't delete to the RecycleBin.

 If anyone can tell me what I'm doing wrong or what may be causing the
 delay, I'd appreciate it.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-06 Thread Rainer Jung
On 06.10.2009 17:41, Christopher Schultz wrote:
 Christopher,
 
 On 10/6/2009 10:50 AM, Law, Christopher wrote:
 Hello, I'm running Tomcat 6.0.18 using Java 1.6.0_12 on Windows XP
 professional.
 
 I have a problem that occurs during startup deploying a WAR file.
 Tomcat deploys the WAR file but then there is a delay of minutes
 before it tries to start the application.

 During the delay, there is no CPU usage and there is no abnormal
 activity that I can detect.  When Tomcat decides to start the
 application, it fires right up.

 It almost seems like Tomcat is blocked waiting for a reply from some
 request.
 
 It might be. Can you take a thread dump during this delay to see what is
 happening?
 
 http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F

+1

 My guess is that you are using XML validation and you have a firewall
 that is preventing the JVM from contacting a remote server to fetch a DTD.

You can also google for xml entity resolution.

 Another possibility is that SecureRandom is taking forever to
 initialize: if your JVM is configured to use a blocking source of
 entropy, that may be the problem. This often happens in *NIX
 environments, but it appears that you are running on Microsoft Windows,
 so that's unlikely to be the problem.

... and should only be a problem if SSL is involved.

Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)

2009-10-06 Thread Law, Christopher
Thanks for the reply.  A little more information:

1. The app always works after it starts up (assuming I didn't introduce
any errors).

2. If, after the app starts up (whether I exercise it or not), I
shutdown Tomcat, remove the exact same stuff from Tomcat (WAR, exploded
WAR, work/Catalina/localhost and logs), copy the WAR to webapps and
startup Tomcat, there is NO (appreciable) delay, the app starts right up
and runs.

3. The delay only occurs when the WAR file has changed.

4. If I reboot my machine, the first time I deploy a WAR, there is a
minor delay (~15 seconds) between the deploy and the startup.

Thanks for the tips on the thread dump.  I will try to gather some info
and post it.


-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Tuesday, October 06, 2009 11:41 AM
To: Tomcat Users List
Subject: Re: Tomcat hangs for minutes between ContextConfig and
StandardContext (Starting the app)

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Christopher,

On 10/6/2009 10:50 AM, Law, Christopher wrote:
 Hello, I'm running Tomcat 6.0.18 using Java 1.6.0_12 on Windows XP 
 professional.
 
 I have a problem that occurs during startup deploying a WAR file.
 Tomcat deploys the WAR file but then there is a delay of minutes 
 before it tries to start the application.

 During the delay, there is no CPU usage and there is no abnormal 
 activity that I can detect.  When Tomcat decides to start the 
 application, it fires right up.

 It almost seems like Tomcat is blocked waiting for a reply from some 
 request.

It might be. Can you take a thread dump during this delay to see what is
happening?

http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_
running_webapp_.3F

My guess is that you are using XML validation and you have a firewall
that is preventing the JVM from contacting a remote server to fetch a
DTD.

Another possibility is that SecureRandom is taking forever to
initialize: if your JVM is configured to use a blocking source of
entropy, that may be the problem. This often happens in *NIX
environments, but it appears that you are running on Microsoft Windows,
so that's unlikely to be the problem.

Any more information you can provide will certainly be helpful.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrLZSQACgkQ9CaO5/Lv0PBTXgCfeVocP4clX5dBblkIKaBwrHkG
rHAAn1klDppfjMEU+vA4wDQQqLsNryJP
=Sfu+
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs on Startup

2009-09-25 Thread RogerV



bluezman wrote:
 
 Path perhaps ?
 What's defined for java_home ?
 

JAVA_HOME is set. Mind you, if it was a path error, I would expect either
Tomcat to not start at all or a ClassNotFoundException to be thrown at the
very least.

Sorry about the duplicate message, I'd been having problems with Nabble
blocking messages and as things sorted themselves out, duplicates have been
arriving in other lists as well :( Apologies

Regards 
-- 
View this message in context: 
http://www.nabble.com/Tomcat-hangs-on-Startup-tp25530995p25607109.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat hangs on Startup

2009-09-23 Thread RogerV

I'm running Tomcat 6.0.18 on Debian Linux (Lenny). Tomcat is configured to
start automatically through the init process, but it hangs using 95+% of the
CPU and won't respond to /etc/init.d/tomcat stop. I have to kill the
process. I've tried manually starting it as root with /etc/init.d/tomcat
start and with /opt/tomcat/bin/startup.sh but the same thing happens. The
last entry in catalina.date.log in all cases is INFO: Overriding property
struts.configuration.xml.reload old value false new value:true

However, if I cd to the directory /op/tomcat/bin and run ./startup.sh from
there Tomcat starts normally. Has anyone got an idea as to what might be
going on?

Regards
-- 
View this message in context: 
http://www.nabble.com/Tomcat-hangs-on-Startup-tp25530995p25530995.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs on Startup

2009-09-23 Thread lists
Path perhaps ?
What's defined for java_home ?
Sent via BlackBerry from T-Mobile

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs on Startup

2009-09-23 Thread Mark Thomas
RogerV wrote:
 I'm running Tomcat 6.0.18 on Debian Linux (Lenny). Tomcat is configured to
 start automatically through the init process, but it hangs using 95+% of the
 CPU and won't respond to /etc/init.d/tomcat stop. I have to kill the
 process. I've tried manually starting it as root with /etc/init.d/tomcat
 start and with /opt/tomcat/bin/startup.sh but the same thing happens. The
 last entry in catalina.date.log in all cases is INFO: Overriding property
 struts.configuration.xml.reload old value false new value:true
 
 However, if I cd to the directory /op/tomcat/bin and run ./startup.sh from
 there Tomcat starts normally. Has anyone got an idea as to what might be
 going on?

How about reading the responses you received when you sent the same
question yesterday?

Mark




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat hangs on startup

2009-09-22 Thread RogerV

I'm running Tomcat 6.0.18 on Debian Linux (Lenny). Tomcat is configured to
start automatically through the init process, but it hangs using 95+% of the
CPU and won't respond to /etc/init.d/tomcat stop. I have to kill the
process. I've tried manually starting it as root with /etc/init.d/tomcat
start and with /opt/tomcat/bin/startup.sh but the same thing happens. The
last entry in catalina.date.log in all cases is INFO: Overriding property
struts.configuration.xml.reload old value false new value:true

However, if I cd to the directory /op/tomcat/bin and run ./startup.sh from
there Tomcat starts normally. Has anyone got an idea as to what might be
going on?

Regards
-- 
View this message in context: 
http://www.nabble.com/Tomcat-hangs-on-startup-tp25530597p25530597.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs on startup

2009-09-22 Thread Mark Thomas
RogerV wrote:
 I'm running Tomcat 6.0.18 on Debian Linux (Lenny). Tomcat is configured to
 start automatically through the init process, but it hangs using 95+% of the
 CPU and won't respond to /etc/init.d/tomcat stop. I have to kill the
 process. I've tried manually starting it as root with /etc/init.d/tomcat
 start and with /opt/tomcat/bin/startup.sh but the same thing happens. The
 last entry in catalina.date.log in all cases is INFO: Overriding property
 struts.configuration.xml.reload old value false new value:true
 
 However, if I cd to the directory /op/tomcat/bin and run ./startup.sh from
 there Tomcat starts normally. Has anyone got an idea as to what might be
 going on?

Use kill -3 to take a couple of thread dumps ~15s apart when it hangs.
Compare the thread dumps to see which thread(s) is(are) stuck.

Mark




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs on startup

2009-09-22 Thread Rainer Jung
On 22.09.2009 10:29, Mark Thomas wrote:
 RogerV wrote:
 I'm running Tomcat 6.0.18 on Debian Linux (Lenny). Tomcat is configured to
 start automatically through the init process, but it hangs using 95+% of the
 CPU and won't respond to /etc/init.d/tomcat stop. I have to kill the
 process. I've tried manually starting it as root with /etc/init.d/tomcat
 start and with /opt/tomcat/bin/startup.sh but the same thing happens. The
 last entry in catalina.date.log in all cases is INFO: Overriding property
 struts.configuration.xml.reload old value false new value:true

 However, if I cd to the directory /op/tomcat/bin and run ./startup.sh from
 there Tomcat starts normally. Has anyone got an idea as to what might be
 going on?
 
 Use kill -3 to take a couple of thread dumps ~15s apart when it hangs.
 Compare the thread dumps to see which thread(s) is(are) stuck.

And if you use something like ps -L you can identify the thread number
of the thread using the CPU time. That number on most OSes corresponds
either to the tid or the nid value shown in the header lines before each
thread stack of the dump. The tid and id are in hex though.

Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache Tomcat hangs

2009-08-23 Thread fps

I got this kind of exception with a jsp defined with session=false (in the
%@ page... % section at the top of the file) including another jsp which
was not including that session=false directive

-- 
View this message in context: 
http://www.nabble.com/Apache-Tomcat-hangs-tp23777681p25101940.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache Tomcat hangs

2009-08-23 Thread Pid

On 23/08/2009 11:08, fps wrote:


I got this kind of exception with a jsp defined with session=false (in the
%@ page... %  section at the top of the file) including another jsp which
was not including that session=false directive



Which kind of exception?
Which version of Tomcat?
Which version of the JVM?
OS?
What do the logs say?


Please read the following, before replying:

 http://catb.org/~esr/faqs/smart-questions.html

OK?


p

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache Tomcat hangs

2009-08-23 Thread Len Popp
2009/8/23 Pid p...@pidster.com:
 On 23/08/2009 11:08, fps wrote:

 I got this kind of exception with a jsp defined with session=false (in the
 %@ page... %  section at the top of the file) including another jsp which
 was not including that session=false directive


 Which kind of exception?
 Which version of Tomcat?
 Which version of the JVM?
 OS?
 What do the logs say?

fps was answering, not asking. The entire thread can be seen here:
http://www.nabble.com/Apache-Tomcat-hangs-td23777681.html
-- 
Len

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache Tomcat hangs

2009-08-23 Thread Pid

On 23/08/2009 15:11, Len Popp wrote:

2009/8/23 Pidp...@pidster.com:

On 23/08/2009 11:08, fps wrote:


I got this kind of exception with a jsp defined with session=false (in the
%@ page... %section at the top of the file) including another jsp which
was not including that session=false directive



Which kind of exception?
Which version of Tomcat?
Which version of the JVM?
OS?
What do the logs say?


fps was answering, not asking. The entire thread can be seen here:
http://www.nabble.com/Apache-Tomcat-hangs-td23777681.html


My apologies - my mail server must be dropping messages...

p

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache Tomcat hangs

2009-06-01 Thread Raquel Hernández Martinez


Hi Christopher,

my jsp invoke to the servlet and it writes a
pdf into a file ant send it by email. I need this functionality 
because it´s the user who decides to generate or not this report. My
version of jasper report it´s 2.0, I don´t know if it´s
can be a bug for this version, because my tomcat hangs when it´s
generate a pdf and after one hour appears this
error. Do you think that this can be hang the tomcat?

I´ll try set session=true and test it.

Many
thanks for your help Chris.

Raquel

 -BEGIN
PGP SIGNED MESSAGE- 
 Hash: SHA1 
 

Raquel, 
 
 On 5/29/2009 6:35 AM, Raquel
Hernández Martinez wrote: 
 I am using apache
Tomcat 5.5 which is set up on a hp-ux machine. 
 my
application uses jaspert-reports 
 At times during we use
jaspert-rerpot for generate to a pdf, get an 
 error 
 as shown below, and this causes the servers hangs and can not
log on the 
 tomcat console and application. 
 
 Ugh... are you really using JSP to generate a PDF through jasper

 reports? Does the JSP actually generate a PDF to the output
stream, or 
 do you write the PDF to a file and then redirect to
it or something like 
 that? 
 
 JSP wasn't
designed to generate binary content, although it /can/ be 

beaten into submission in order to do so. 
 

SEVERE: Exception initializing page context 

java.lang.IllegalStateException: Cannot create a session after the 
 response has been committed 
 at
org.apache.catalina.connector.Request.doGetSession(Unknown 

Source) 
 
 [snip] 
 
 at 
 org.apache.catalina.core.ApplicationDispatcher.include(Unknown

 Source) 
 at
org.apache.jasper.runtime.JspRuntimeLibrary.include(Unknown 

Source) 
 at 

org.apache.jsp.jsp.Alarma_Detalle_Service_jsp._jspService(Alarma_Detalle_Service_jsp.java:122)

 
 The problem is that you are including
one page from another, and the 
 page you are calling requires a
session. The including page apparently 
 does /not/ need a
session, and so the included page tries to create one. 
 
 In spite of the fact that the servlet spec specifically forbids
this, 
 Tomcat is trying it, anyway, and when the session is
created, a 
 Set-Cookie header needs to be sent to the browser.
If the headers have 
 already been sent, you get this error. 
 
 Solutions? 
 
 I'd set
session=true in Alarma 
Detalle Service.jsp
and see if that 
 helps. 
 
 I'd also try not
to generate PDF output from a JSP ;) 
 
 - -chris 
 -BEGIN PGP SIGNATURE- 
 Version: GnuPG v1.4.9
(MingW32) 
 Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org/ 
 

iEYEARECAAYFAkogrMEACgkQ9CaO5/Lv0PD7zwCfcsAPP4svbeje8grUXb/bhtMA 
 CZwAoK/kH6NgoELp7VDwXT5CIxkHUiC0 
 =VxRQ 

-END PGP SIGNATURE- 
 

- 
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org 
 For additional commands, e-mail: users-h...@tomcat.apache.org 
 
 



Apache Tomcat hangs

2009-05-29 Thread Raquel Hernández Martinez
Hello

I am using apache Tomcat 5.5 which is set up on a hp-ux machine.
my application uses jaspert-reports
At times during we use jaspert-rerpot for generate to a pdf, get an error
as shown below, and this causes the servers hangs and can not log on the
tomcat console and application .
After restart of the server then the tomcat runs fine.
Can anybody please tell me why does this happen?

Many thanks in advance,

Raquel


This is my error :

INFO: Server startup in 3207 ms
May 29, 2009 9:27:53 AM org.apache.jasper.runtime.JspFactoryImpl
internalGetPageContext
SEVERE: Exception initializing page context
java.lang.IllegalStateException: Cannot create a session after the
response has been committed
at org.apache.catalina.connector.Request.doGetSession(Unknown Source)
at org.apache.catalina.connector.Request.getSession(Unknown Source)
at org.apache.catalina.connector.RequestFacade.getSession(Unknown
Source)
at
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
at
org.apache.catalina.core.ApplicationHttpRequest.getSession(Unknown
Source)
at
org.apache.catalina.core.ApplicationHttpRequest.getSession(Unknown
Source)
at org.apache.jasper.runtime.PageContextImpl._initialize(Unknown
Source)
at org.apache.jasper.runtime.PageContextImpl.initialize(Unknown
Source)
at
org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(Unknown
Source)
at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(Unknown
Source)
at
org.apache.jsp.jsp.Alarma_Detalle_jsp._jspService(Alarma_Detalle_jsp.java:37)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(Unknown
Source)
at org.apache.catalina.core.ApplicationDispatcher.include(Unknown
Source)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(Unknown
Source)
at
org.apache.jsp.jsp.Alarma_Detalle_Service_jsp._jspService(Alarma_Detalle_Service_jsp.java:122)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(Unknown
Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown
Source)
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Unknown
Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown
Source)
at org.apache.catalina.connector.CoyoteAdapter.service(Unknown
Source)
at org.apache.coyote.http11.Http11Processor.process(Unknown Source)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Unknown
Source)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Unknown
Source)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Unknown
Source)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:595)





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Apache Tomcat hangs

2009-05-29 Thread Martin Gainty

unwinding the stack
org.apache.jasper.runtime.PageContextImpl private void _initialize(Servlet 
servlet, ServletRequest request,
  127   ServletResponse response, String errorPageURL,
  128   boolean needsSession, int bufferSize, boolean 
autoFlush)
  129   throws IOException {
...
 143if (request instanceof HttpServletRequest  needsSession)
  144   this.session = ((HttpServletRequest) 
request).getSession();
  145   if (needsSession  session == null)
  146   throw new IllegalStateException(
  147   Page needs a session and none 
is available);
which is called by org.apache.jasper.runtime.JspFactoryImpl 
internalGetPageContext
  89   private PageContext internalGetPageContext(Servlet servlet, 
ServletRequest request,
   90   ServletResponse response, String errorPageURL, boolean 
needsSession,
   91   int bufferSize, boolean autoflush) {
   92   try {
   93   PageContext pc;
   94   if (USE_POOL) {
   95   PageContextPool pool = localPool.get();
   96   if (pool == null) {
   97   pool = new PageContextPool();
   98   localPool.set(pool);
   99   }
  100   pc = pool.get();
  101   if (pc == null) {
  102   pc = new PageContextImpl();
  103   }
  104   } else {
  105   pc = new PageContextImpl();
  106   }
  107   pc.initialize(servlet, request, response, errorPageURL, 
  108   needsSession, bufferSize, autoflush);
internalGetPageContext is referenced in the run method as shown 
148   public Object run() {
  149   return factory.internalGetPageContext(servlet, request, 
response,
  150   errorPageURL, needsSession, bufferSize, autoflush);
  151   }
but none of this *should happen if the jsp execution did'nt double submit* 
relevant bits of your jsp code located at

 at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(Unknown
 Source)
 at
 org.apache.jsp.jsp.Alarma_Detalle_jsp._jspService(Alarma_Detalle_jsp.java:37)
//Why is this code (re)referencing getPageContext

 at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at org.apache.jasper.servlet.JspServletWrapper.service(Unknown
 Source)
 at org.apache.catalina.core.ApplicationDispatcher.include(Unknown
 Source)
 at org.apache.jasper.runtime.JspRuntimeLibrary.include(Unknown
 Source)
 at
 org.apache.jsp.jsp.Alarma_Detalle_Service_jsp._jspService(Alarma_Detalle_Service_jsp.java:122)

please display entire contents of
 
$CATALINA_HOME/work/Catalina/localhost/WebAppName/org/apache/jsp/jsp/Alrama_Detallet_Service.jsp
Alarma_Detalle_jsp.java

Saludos Cordiales desde EEUU!
Martin Gainty 
GMT+5(esta semana)
__ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 Date: Fri, 29 May 2009 12:35:14 +0200
 Subject: Apache Tomcat hangs
 From: rhernan...@evendor.es
 To: users@tomcat.apache.org
 
 Hello
 
 I am using apache Tomcat 5.5 which is set up on a hp-ux machine.
 my application uses jaspert-reports
 At times during we use jaspert-rerpot for generate to a pdf, get an error
 as shown below, and this causes

Re: Apache Tomcat hangs

2009-05-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Raquel,

On 5/29/2009 6:35 AM, Raquel Hernández Martinez wrote:
 I am using apache Tomcat 5.5 which is set up on a hp-ux machine.
 my application uses jaspert-reports
 At times during we use jaspert-rerpot for generate to a pdf, get an error
 as shown below, and this causes the servers hangs and can not log on the
 tomcat console and application.

Ugh... are you really using JSP to generate a PDF through jasper
reports? Does the JSP actually generate a PDF to the output stream, or
do you write the PDF to a file and then redirect to it or something like
that?

JSP wasn't designed to generate binary content, although it /can/ be
beaten into submission in order to do so.

 SEVERE: Exception initializing page context
 java.lang.IllegalStateException: Cannot create a session after the
 response has been committed
 at org.apache.catalina.connector.Request.doGetSession(Unknown Source)

[snip]

 at org.apache.catalina.core.ApplicationDispatcher.include(Unknown
 Source)
 at org.apache.jasper.runtime.JspRuntimeLibrary.include(Unknown
 Source)
 at
 org.apache.jsp.jsp.Alarma_Detalle_Service_jsp._jspService(Alarma_Detalle_Service_jsp.java:122)

The problem is that you are including one page from another, and the
page you are calling requires a session. The including page apparently
does /not/ need a session, and so the included page tries to create one.

In spite of the fact that the servlet spec specifically forbids this,
Tomcat is trying it, anyway, and when the session is created, a
Set-Cookie header needs to be sent to the browser. If the headers have
already been sent, you get this error.

Solutions?

I'd set session=true in Alarma Detalle Service.jsp and see if that
helps.

I'd also try not to generate PDF output from a JSP ;)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkogrMEACgkQ9CaO5/Lv0PD7zwCfcsAPP4svbeje8grUXb/bhtMA
CZwAoK/kH6NgoELp7VDwXT5CIxkHUiC0
=VxRQ
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache Tomcat hangs

2009-05-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Martin,

Wow, you did a lot of work!

On 5/29/2009 8:47 AM, Martin Gainty wrote:
 but none of this *should happen if the jsp execution did'nt double submit* 
 relevant bits of your jsp code located at

What does this mean?

 at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(Unknown
 Source)
 at
 org.apache.jsp.jsp.Alarma_Detalle_jsp._jspService(Alarma_Detalle_jsp.java:37)

 //Why is this code (re)referencing getPageContext

It's not. _initialize() is simply calling getSession() because the page
declared session=true (or failed to declare session=false, since
it's the default).

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkogrXYACgkQ9CaO5/Lv0PDJRQCdG26EbqAvtIVaisXpqAbUPdMI
JeoAoJ+xrQFQYp+TszfKwS9AAOk4l73z
=rXL9
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Apache Tomcat hangs

2009-05-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Raquel,

On 5/29/2009 6:35 AM, Raquel Hernández Martinez wrote:
 I am using apache Tomcat 5.5 which is set up on a hp-ux machine.
 my application uses jaspert-reports
 At times during we use jaspert-rerpot for generate to a pdf, get an error
 as shown below, and this causes the servers hangs and can not log on the
 tomcat console and application.

Ugh... are you really using JSP to generate a PDF through jasper
reports? Does the JSP actually generate a PDF to the output stream, or
do you write the PDF to a file and then redirect to it or something like
that?

JSP wasn't designed to generate binary content, although it /can/ be
beaten into submission in order to do so.

 SEVERE: Exception initializing page context
 java.lang.IllegalStateException: Cannot create a session after the
 response has been committed
 at org.apache.catalina.connector.Request.doGetSession(Unknown Source)

[snip]

 at org.apache.catalina.core.ApplicationDispatcher.include(Unknown
 Source)
 at org.apache.jasper.runtime.JspRuntimeLibrary.include(Unknown
 Source)
 at
 org.apache.jsp.jsp.Alarma_Detalle_Service_jsp._jspService(Alarma_Detalle_Service_jsp.java:122)

The problem is that you are including one page from another, and the
page you are calling requires a session. The including page apparently
does /not/ need a session, and so the included page tries to create one.

In spite of the fact that the servlet spec specifically forbids this,
Tomcat is trying it, anyway, and when the session is created, a
Set-Cookie header needs to be sent to the browser. If the headers have
already been sent, you get this error.

Solutions?

I'd set session=true in Alarma Detalle Service.jsp and see if that
helps.

I'd also try not to generate PDF output from a JSP ;)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkogrMEACgkQ9CaO5/Lv0PD7zwCfcsAPP4svbeje8grUXb/bhtMA
CZwAoK/kH6NgoELp7VDwXT5CIxkHUiC0
=VxRQ
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



tomcat hangs on shutdown

2009-04-16 Thread shaharV

Hi everybody,

I am using tomcat 6.0.18 from eclipse 3.4, on windows xp 32 bit. I am
experiencing a server hung whenever i try to gracefully shutdown the
server. i am attaching the tomcat log and the stack trace taken at the
hanging.

i would appreciate any help!
thanks you!
shahar

http://www.nabble.com/file/p23073238/tomcat.log tomcat.log 
http://www.nabble.com/file/p23073238/stack.log stack.log 
-- 
View this message in context: 
http://www.nabble.com/tomcat-hangs-on-shutdown-tp23073238p23073238.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat hangs on shutdown

2009-04-16 Thread Mark Thomas
shaharV wrote:
 Hi everybody,
 
 I am using tomcat 6.0.18 from eclipse 3.4, on windows xp 32 bit. I am
 experiencing a server hung whenever i try to gracefully shutdown the
 server. i am attaching the tomcat log and the stack trace taken at the
 hanging.
 
 i would appreciate any help!

You have started a non-daemon thread (pool-7-thread-1) which you must
shutdown when your application stops. A context listener is the usual
approach.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat hangs due to socket reads?

2009-03-18 Thread Diego Manilla Suárez
Hi everyone. I'm running Tomcat 5.0.30 + Apache 2.2.3 on a SuSE EL 10. 
After a few days running, the CPU load increases, until Tomcat is eating 
99% of it, and I need to restart. The last time this happened, I 
executed jstack on the Tomcat VM, and I saw most of threads stacks are 
like this:


##
Thread 26701: (state = IN_NATIVE)
- java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, 
byte[], int, int, int) @bci=0 (Compiled frame; information may be imprecise)
- java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129 
(Compiled frame)

- java.io.BufferedInputStream.fill() @bci=175, line=218 (Compiled frame)
- java.io.BufferedInputStream.read1(byte[], int, int) @bci=44, line=256 
(Compiled frame)
- java.io.BufferedInputStream.read(byte[], int, int) @bci=49, line=313 
(Compiled frame)
- 
org.apache.jk.common.ChannelSocket.read(org.apache.jk.core.MsgContext, 
byte[], int, int) @bci=32, line=598 (Compiled frame)
- org.apache.jk.common.ChannelSocket.receive(org.apache.jk.core.Msg, 
org.apache.jk.core.MsgContext) @bci=38, line=535 (Compiled frame)
- 
org.apache.jk.common.ChannelSocket.processConnection(org.apache.jk.core.MsgContext) 
@bci=28, line=663 (Compiled frame)
- org.apache.jk.common.SocketConnection.runIt(java.lang.Object[]) 
@bci=8, line=866 (Interpreted frame)
- org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() 
@bci=167, line=684 (Interpreted frame)

- java.lang.Thread.run() @bci=11, line=595 (Interpreted frame)
##

This makes me think there is some issues with Apache - Tomcat connection 
or maybe some SO configuration, because the number of requests is not 
that high.


This is the configuration of the AJP connector on server.xml:

##
Connector port=8080
  maxThreads=10 minSpareThreads=1 maxSpareThreads=1
  enableLookups=false acceptCount=100
  debug=0
  disableUploadTimeout=true /
##

And the forwarding in Apache is done through mod_proxy_ajp, like this:

##
ProxyPass /frontdipuleon ajp://localhost:8009/myapp
ProxyPassReverse  /frontdipuleon ajp://localhost:8009/myapp
##

Any idea on what can be wrong? The only thing I tried now is setting a 
connectionTimeout on the AJP connector, but I think this wouldn't tell 
me the real cause of these problems. What else should I check?


Thanks in advance.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs due to socket reads?

2009-03-18 Thread André Warnier

Diego Manilla Suárez wrote:
[...]
Hi.
No idea about your problem, but in the information you provide, you are 
showing the Apache connecting to port 8009 of Tomcat, but for Tomcat you 
are showing the Connector that listens on port 8080.

That's probably not very helpful.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs due to socket reads?

2009-03-18 Thread Diego Manilla Suárez
Hi André. That was just an error when copying and pasting, I picked up 
the wrong connector. This is the right one:


##
Connector port=8009
   minProcessors=5 maxProcessors=150
   enableLookups=false redirectPort=443 debug=0
   protocol=AJP/1.3 /
##

Thanks for pointing that out.


André Warnier escribió:

Diego Manilla Suárez wrote:
[...]
Hi.
No idea about your problem, but in the information you provide, you 
are showing the Apache connecting to port 8009 of Tomcat, but for 
Tomcat you are showing the Connector that listens on port 8080.

That's probably not very helpful.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org










Re: Tomcat hangs on SATA Linux server

2008-03-20 Thread Sameer Acharya
Is this just with Tomcat or does it happen with other
apps too ? 

Chances are that your device driver may be having
issues and hence slowing down the system in between.

-Sameer
--- Rick Fincher [EMAIL PROTECTED] wrote:

 Hi All,
 
 We have a web app running on Tomcat that accesses
 Oracle via JDBC on a 
 Linux server (Centos 4.5) .  The web app runs fine
 on one server but but 
 locks up or hangs for 20-30 second periods on a Dell
 sever running with 
 SATA storage.
 
 I only mention SATA because that is the only
 significant difference 
 between the two servers.
 
 Anyone have a clue what is causing this?
 
 
 Thanks!
 
 Rick
 
 
 

-
 To start a new topic, e-mail:
 users@tomcat.apache.org
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 



  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat hangs on SATA Linux server

2008-03-20 Thread Mark Deneen
How much memory is on the server?  Your file buffer may be too large and 
your disks can not keep up.  I think the default is 10% of memory, so if 
you can fill that up faster than the disks can write it it will hang 
until the buffer is emptied.  I doubt you are doing that much file i/o 
through a webapp though!


Mark

Rick Fincher wrote:

Hi All,

We have a web app running on Tomcat that accesses Oracle via JDBC on a 
Linux server (Centos 4.5) .  The web app runs fine on one server but 
but locks up or hangs for 20-30 second periods on a Dell sever running 
with SATA storage.


I only mention SATA because that is the only significant difference 
between the two servers.


Anyone have a clue what is causing this?


Thanks!

Rick



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat hangs on SATA Linux server

2008-03-19 Thread Rick Fincher

Hi All,

We have a web app running on Tomcat that accesses Oracle via JDBC on a 
Linux server (Centos 4.5) .  The web app runs fine on one server but but 
locks up or hangs for 20-30 second periods on a Dell sever running with 
SATA storage.


I only mention SATA because that is the only significant difference 
between the two servers.


Anyone have a clue what is causing this?


Thanks!

Rick



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat hangs on SATA Linux server

2008-03-19 Thread Caldarale, Charles R
 From: Rick Fincher [mailto:[EMAIL PROTECTED] 
 Subject: Tomcat hangs on SATA Linux server
 
 Anyone have a clue what is causing this?

Must be the day for people to leave out most relevant information.

1) What Tomcat level?

2) What JVM version?

3) What Java heap size have you specified?

4) What does JConsole show is going on during the hiccups?  (Hangs are
permanent, your situation recovers, so it's not a hang.)

5) What kind of GC activity is going on?

6) Are you experiencing page swapping during the hiccups?

7) What does a thread dump show during the hiccups?

That's just for starters.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tomcat hangs when connetion pooling used

2008-03-16 Thread Mahesh Viraktamath
Hi,
I am using connection pooling for all the database transactions. I am using
the following:
MySql: 5.0.22
tomcat : 5.5.X

Now the problem is when I run the application, it can't get the connnection
from the connection pool. I tried everything like dumping all the waiting
threads, killing all the tomcat processes but nothing seems to work. I can't
revert back the results. I want to run the application as I was before.

Any suggestions for closing all the connections (if open at all) or anything
else so that I can run mu application as earlier.

Thanks in advance,
Mahesh


Re: tomcat hangs when connetion pooling used

2008-03-16 Thread ib solution
hai,

is there any an error page that you can share ?, i am using Mysql
5.0.22 and tomcat 5.5.17 and i am always get a connection

-- 
Salam,

Andy Susanto,S.Kom
==
for better search
http://www.slashmysearch.com/earn/id/24828
HP : 081513039998


On Sun, Mar 16, 2008 at 4:54 PM, Mahesh Viraktamath [EMAIL PROTECTED] wrote:
 Hi,
  I am using connection pooling for all the database transactions. I am using
  the following:
  MySql: 5.0.22
  tomcat : 5.5.X

  Now the problem is when I run the application, it can't get the connnection
  from the connection pool. I tried everything like dumping all the waiting
  threads, killing all the tomcat processes but nothing seems to work. I can't
  revert back the results. I want to run the application as I was before.

  Any suggestions for closing all the connections (if open at all) or anything
  else so that I can run mu application as earlier.

  Thanks in advance,
  Mahesh


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   >