Re: Need to Specify keystorePass on Command Line

2013-02-12 Thread André Warnier

Harris, Jeffrey E. wrote:


All,

I understand that there is no good, secure solution.  However, my hands are 
tied on this matter, and I would appreciate if you would focus on providing 
technical assistance in implementing a solution within the constraints I have 
been given.


Jeffrey,

We all understand that you have been given rules, and are supposed to follow 
them.
But if these rules themselves make no logical sense, nothing in this Universe is going to 
help you overcome that.


What is the concern really, about the password remaining somewhere on that server when the 
system is shut down ?
Is it that the server, in its shut down state, could be subrepticiously broken apart, its 
disk stolen and then inspected by foreign spooks to discover that password, which could 
then be used to further nefarious ends, or what /exactly/ ?


What is wrong with the following scenario :
- a physical Windows server with a console and a keyboard
- boot Windows and login as a tomcat user (created beforehand)
- open a command window
- start Tomcat as an application (not a Service) in that command window
- tomcat will ask for the passphrase of the keystore. Type it in. (*)
- when Tomcat is running, enter CTRL-ALT-DEL and freeze the console (do not logout from 
Windows)

- walk away


(*) having made sure beforehand that there is no trojen on that machine which records your 
keystrokes and writes them to the disk


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



Re: Need to Specify keystorePass on Command Line - Update

2013-02-12 Thread Mark Thomas
On 12/02/2013 00:53, Harris, Jeffrey E. wrote:
 Current status:
 
 I replaced keystorePass=password with
 'keystorePass=${kspassword}' in server.xml, and executed the
 command tomcat7 //TS//Tomcat7 --JvmOptions=-Dkspassword=password
 and have been able to start the SSL listener as a console
 application.
 
 However, I have not been able to do the same thing with the service,
 using sc start Tomcat7 --JvmOptions=-Dkspassword=password, or
 putting the parameter into the properties of the service entry in
 Windows Services Manager.
 
 I know Charles Caldarale said it could not be done with a service,
 but it is possible to pass parameters to a service, both using the
 Windows Services Manager, and via the sc command line utility.  I am
 just not sure what syntax Tomcat is expecting for parameters; I would
 think it would match the syntax of the tomcat command above, since
 that is basically what is being called, just with different
 parameters.

http://commons.apache.org/daemon/procrun.html

Mark

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



Getting error while starting tomcat

2013-02-12 Thread dkumar
Hello All,

Tomcat Server 7.0.35
Operating System Version : HP-UX 11.31
JRE_HOME:/opt/java1.5


We are getting error in Catalina log file while starting the tomcat server

Exception in thread main java.lang.UnsupportedClassVersionError: Bad 
version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)


Please suggest us. 

Thanks and Regards
Deepak Kumar
Disclaimer and confidentiality clause -
 This message and any attachments relating to official business of CCIL OR ANY 
OF IT'S SUBSIDIARIES is proprietary to CCIL and intended for the original 
addressee only.
The message may contain information that is confidential and subject to legal 
privilege. 
Any views expressed in this message are those of the individual sender. 
If you have received this message in error, please notify the original sender 
immediately and destroy the message and copies thereof and any attachments 
contained in it .
 If you are not the intended recipient of this message, you are hereby notified 
that you must not disseminate, copy, use, distribute, or take any action in 
connection therewith. 
 CCIL cannot ensure that the integrity of this communication has been 
maintained nor that it is free of errors, viruses, interception and/or 
interference. 
CCIL is not liable whatsoever for loss or damage resulting from the opening of 
this message and/or attachments and/or the use of the information contained in 
this message and/or attachments.

Re: Getting error while starting tomcat

2013-02-12 Thread Konstantin Kolinko
2013/2/12  dku...@ccilindia.co.in:
 Hello All,

 Tomcat Server 7.0.35
 Operating System Version : HP-UX 11.31
 JRE_HOME:/opt/java1.5

As mentioned in its RUNNING.txt file, Tomcat 7 requires minimum of
Java 1.6. It cannot run on 1.5.

http://tomcat.apache.org/whichversion.html



 We are getting error in Catalina log file while starting the tomcat server

 Exception in thread main java.lang.UnsupportedClassVersionError: Bad
 version number in .class file
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
 (...)

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



Re: disable handling of expect:continue

2013-02-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Brad,

On 2/11/13 4:02 PM, Brad McEvoy wrote:
 On 12/02/13 09:53, Mark Thomas wrote:
 Can anyone suggest a way to disable this feature short of
 hacking tomcat?
 You don't want to disable sending 100 Continue responses.
 
 Ideally, you want to delay when it is sent until after any 
 authentication (so the 401 goes back to the client before they
 send the body).
 
 I'm not sure how feasible that would be.
 
 Is your servlet generating the 401? It it was a standard
 authenticator generating the 401 it might be doable. If it is a
 user servlet then that is going to be trickier. It doesn't help
 that the Servlet API has no mechanism for sending a 101.
 The milton servlet handles the acknowledgement cycle, including 
 authorisation checks and 401 response if needed.
 
 All thats needed is a container wide parameter to simply ignore
 Expect headers. I'd be happy to poke around in tomcat's innards and
 perhaps submit a patch. Would this be in the Http11Processor?
 
 Yep, sadly the servlet API seems to have completely overlooked this
 and so everyone has to figure out their own way of dealing with it

I'm speaking from a fairly ignorant position, but I'm curious: are you
asking if Tomcat could simply step out of the way in these cases and
allow the servlet to send its own response when Expect: Continue is
present in the request?

Mark, at the point in the request-processing when the 100 Continue is
sent, has the context already been chosen? If so, could we add a
configuration parameter on the context to disable auto-handling of
Expect:Continue/100-Continue, or is it not as simple as I make it out
to be? Is it even possible for a servlet to handle a 100-Continue
response entirely on its own without collusion with the container?

- -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/

iEYEAREIAAYFAlEaUG0ACgkQ9CaO5/Lv0PBujwCgrz3fI1jZHamTCa13c8QxKOAX
YNMAoJ1yqPLTBqQ0wG/qrB079dVlUF7I
=tfk4
-END PGP SIGNATURE-

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



Re: problem with context.xml for parallel deployments

2013-02-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Zippy,

On 2/11/13 12:56 PM, Zippy Zeppoli wrote:
 You're writing on tomcatexpert.com is excellent by the way. Perhaps
 a link to a clustering example on tomcatexpert would provide the
 level of verbosity that a thick-skull might require.

Come to ApacheCon in Portland, OR at the end of the month and attend
Mark's talk on clustering. Or, just read his slides afterwards (Mark
is kind enough to post all his slides here after presentations:
http://people.apache.org/~markt/presentations/).

- -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/

iEYEAREIAAYFAlEaUVgACgkQ9CaO5/Lv0PDEZACfR+UKtvRR4AYzG+CSs5fqDyjr
J/IAoIWbrGhwc+3GlTcmmZ2LZHWNClPb
=RwL+
-END PGP SIGNATURE-

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



RE: Need to Specify keystorePass on Command Line

2013-02-12 Thread Harris, Jeffrey E.


 -Original Message-
 From: André Warnier [mailto:a...@ice-sa.com]
 Sent: Tuesday, February 12, 2013 3:47 AM
 To: Tomcat Users List
 Subject: Re: Need to Specify keystorePass on Command Line

 Harris, Jeffrey E. wrote:
 
  All,
 
  I understand that there is no good, secure solution.  However, my
 hands are tied on this matter, and I would appreciate if you would
 focus on providing technical assistance in implementing a solution
 within the constraints I have been given.
 
 Jeffrey,

 We all understand that you have been given rules, and are supposed to
 follow them.
 But if these rules themselves make no logical sense, nothing in this
 Universe is going to help you overcome that.

 What is the concern really, about the password remaining somewhere on
 that server when the system is shut down ?
 Is it that the server, in its shut down state, could be subrepticiously
 broken apart, its disk stolen and then inspected by foreign spooks to
 discover that password, which could then be used to further nefarious
 ends, or what /exactly/ ?

 What is wrong with the following scenario :
 - a physical Windows server with a console and a keyboard
 - boot Windows and login as a tomcat user (created beforehand)
 - open a command window
 - start Tomcat as an application (not a Service) in that command window
 - tomcat will ask for the passphrase of the keystore. Type it in. (*)
 - when Tomcat is running, enter CTRL-ALT-DEL and freeze the console (do
 not logout from
 Windows)
 - walk away


 (*) having made sure beforehand that there is no trojen on that machine
 which records your
 keystrokes and writes them to the disk

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

Andre,

Tomcat will host a web-app that will connect as a proxy to another 
organization's system to retrieve data that we will use in our applications.  
It is the other organization that is mandating the no password requirement, 
and there is no other option than to use their data.  Our customer requires 
that the Tomcat server be up 24/7 (with minor outages), hence the need to 
design a solution that satisfies the requirements of both our customer, and the 
other organization.  Obviously, if we cannot create a way to automate the 
process, we may have to do something akin to what you do above.

However, when I run Tomcat from the console, I am never prompted for the 
password.  Instead, Tomcat just fails to start the listener on the specified 
SSL port.

This e-mail and any attachments are intended only for the use of the 
addressee(s) named herein and may contain proprietary information. If you are 
not the intended recipient of this e-mail or believe that you received this 
email in error, please take immediate action to notify the sender of the 
apparent error by reply e-mail; permanently delete the e-mail and any 
attachments from your computer; and do not disseminate, distribute, use, or 
copy this message and any attachments.

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



Tomcat upgrade -SSL handshake failure?

2013-02-12 Thread Thomas, Steve
Hi.  We have been running Tomcat 7.0.23 in our test environment until recently, 
then upgraded to 7.0.35.  After the upgrade, our tests started failing 
intermittently with

   urlopen error [Errno 1] _ssl.c:503: error:14094410:SSL 
routines:SSL3_READ_BYTES:sslv3 alert handshake failure

So some HTTPS requests would succeed and others fail, generating the above 
message.  I searched around and the following diagnosis seemed the most 
applicable among the results, but I don't think it applies, given our 
server.xml configuration:

--

SSL3_READ_BYTES:sslv3 alert handshake failure and SSL23_WRITE:ssl handshake 
failure Errors
These errors are caused by a directive in the configuration file that requires 
mutual authentication. For example, if an SSL Certificate is sent from the 
server and then a separate SSL Certificate is sent back from the client during 
the SSL handshake, this error will occur. 
In our experience, this directive is usually included by accident. To remove 
the directive and thus fix the error, open your conf file. Change 
SSLVerifyClient or SSLVerifyClient optional_no_ca to SSLVerifyClient none, then 
restart Apache. This change will tell the Apache server to stop looking for a 
client certificate when completing the SSL handshake with a client computer. 

Another possible cause of these errors is including the line SSLVerifyDepth 1 
in the conf file. Comment out the line by adding a # to the beginning (ex. 
#SSLVerifyDepth 1). 

[http://www.digicert.com/ssl-support/apache-fix-common-ssl-errors.htm]
--

This article was specifically addressing httpd, but the recommendation would 
seem to apply for Tomcat if using an APR connector-but we are not, as far as I 
can tell.  Here is our stripped-down server.xml configuration:

?xml version='1.0' encoding='utf-8'?
Server port=9006 shutdown=SHUTDOWN
  Listener className=org.apache.catalina.core.JasperListener /
  !-- Prevent memory leaks due to use of particular java/javax APIs--
  Listener 
className=org.apache.catalina.core.JreMemoryLeakPreventionListener /
  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
  Listener 
className=org.apache.catalina.core.ThreadLocalLeakPreventionListener /

  GlobalNamingResources
    Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
  /GlobalNamingResources

  Service name=Catalina
      
Connector 
    port=9090 maxHttpHeaderSize=8192
    maxThreads=150 minSpareThreads=25 
maxSpareThreads=75
    enableLookups=false redirectPort=9444 
acceptCount=100
    connectionTimeout=2 
disableUploadTimeout=true URIEncoding=UTF-8
    compression=on compressionMinSize=1024 
noCompressionUserAgents=gozilla, traviata
    
compressableMimeType=text/html,text/xml,text/css,text/javascript,application/x-javascript,application/javascript
 /
      
Connector 
    port=9444 maxHttpHeaderSize=8192 
maxThreads=150 minSpareThreads=25 
    maxSpareThreads=75 enableLookups=false 
disableUploadTimeout=true 
    acceptCount=100 scheme=https secure=true 
SSLEnabled=true 
    clientAuth=false sslProtocol=TLS 
keystoreFile=webapps/OurProgram/.keystore 
    compression=on compressionMinSize=1024 
noCompressionUserAgents=gozilla, traviata 
    
compressableMimeType=text/html,text/xml,text/css,text/javascript,application/x-javascript,application/javascript/

    Connector port=9010 enableLookups=false redirectPort=9444 
protocol=AJP/1.3 /  
    
    Connector 
    port=9091 
protocol=org.apache.coyote.http11.Http11NioProtocol 
    connectionTimeout=1 
tomcatAuthentication=false keepaliveTimeout=5000 
    backlog=50 maxThreads=10 scheme=https 
secure=true SSLEnabled=true 
    clientAuth=false sslProtocol=TLS 
keystoreFile=webapps/OurProgram/.keystore /
    
    Engine name=Catalina defaultHost=localhost

  Realm className=org.apache.catalina.realm.LockOutRealm
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/
  /Realm

  Host name=localhost  appBase=webapps
    unpackWARs=true autoDeploy=true
  /Host
    /Engine
   /Service
/Server

Again, this is identical to our previous configuration, and as far as I know 
the only variable introduced was the upgrade 

Re: disable handling of expect:continue

2013-02-12 Thread Konstantin Kolinko
2013/2/12 Brad McEvoy b...@fuselms.com:
 On 12/02/13 09:53, Mark Thomas wrote:

 Can anyone suggest a way to
 disable this feature short of hacking tomcat?

 You don't want to disable sending 100 Continue responses.

 Ideally, you want to delay when it is sent until after any
 authentication (so the 401 goes back to the client before they send the
 body).

 I'm not sure how feasible that would be.

 Is your servlet generating the 401? It it was a standard authenticator
 generating the 401 it might be doable. If it is a user servlet then that
 is going to be trickier. It doesn't help that the Servlet API has no
 mechanism for sending a 101.

 The milton servlet handles the acknowledgement cycle, including
 authorisation checks and 401 response if needed.

 All thats needed is a container wide parameter to simply ignore Expect
 headers. I'd be happy to poke around in tomcat's innards and perhaps submit
 a patch. Would this be in the Http11Processor?

Certainly not. Have you read the source code, or only that old thread?
The processor is

The method that sends acknowledgment is
o.a.catalina.connector.Response.sendAcknowledgement().

1) Acknowledgment happens is StandardContextValve or in FormAuthenticator.

2) Looking at stacktraces in Bugzilla reports, authentication happens
before StandardContextValve is involved.  Doesn't it already works for
you?

How your authentication is configured?

3) It probably would not work if Tomcat is behind HTTPD, as AJP
processors do not have this feature (ActionCode.ACK).


 Yep, sadly the servlet API seems to have completely overlooked this and so
 everyone has to figure out their own way of dealing with it


Best regards,
Konstantin Kolinko

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



Build vs. buy (Was: [Seriously OT] Help in diagnosing server unresponsiveness)

2013-02-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

 On 2/11/13 4:30 PM, Terence M. Bandoian wrote:
 
 I understand the considerations above and they are a part of the 
 prevailing thinking. However, one underlying assumption of the 
 supporting argument appears to be that today's programmers are not 
 capable of developing maintainable code which I don't believe is 
 true. As I understand it, programmer productivity is one of the
 most significant factors in the decision making process and it is a
 valid concern. IF (that's a big if) an application can be developed
 in half the time using a generalized solution, then that approach
 has to be considered along with a host of other concerns including
 the end product and the effect on the organization. I say reliance
 on generalized solutions is short-sighted because knowledge of the 
 underlying technologies is lost, or never gained, along with the 
 skills to work in those spheres.

Are you suggesting that people who program using Java are oblivious to
the innards of hardware architecture and are remain ignorant of these
important details? That's the logical conclusion to your argument.

I'm not saying you're wrong, but you have to admit that a Java
programmer (of which I'm one) saying that using a generalized solution
makes you ignorant is a bit like the pot calling the kettle black.

 Efficiency, flexibility, repairability, extensibility and 
 reliability are all components of software quality and all are 
 affected by complexity. Less complex systems are easier to
 maintain.
 
 To continue the aside, wasted energy is wasted energy and it may 
 become a factor in software development at some point. I think 
 decision makers should be taught that there is more to the bottom 
 line than dollars and cents.

In my experience, by far the biggest time waster is trying to deal
with code that is (or has become) unmaintainable. Re-writing just
because a piece of code has become out-of-touch with current standards
or because nobody understands how it works is entirely wasted effort.
We have lots of places in our code where we have been spending -
literally - years recording from bad decisions in the past.

- -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/

iEYEAREIAAYFAlEaYWUACgkQ9CaO5/Lv0PC0CQCfX91lU8Tbik1CDe3g8ASV6pxQ
rOkAn2PPdBNrP4rVPRJ6GWzXqFx/8HyQ
=hcps
-END PGP SIGNATURE-

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



Re: Build vs. buy (Was: [Seriously OT] Help in diagnosing server unresponsiveness)

2013-02-12 Thread Edson Richter

Em 12/02/2013 13:36, Christopher Schultz escreveu:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256


On 2/11/13 4:30 PM, Terence M. Bandoian wrote:

I understand the considerations above and they are a part of the
prevailing thinking. However, one underlying assumption of the
supporting argument appears to be that today's programmers are not
capable of developing maintainable code which I don't believe is
true. As I understand it, programmer productivity is one of the
most significant factors in the decision making process and it is a
valid concern. IF (that's a big if) an application can be developed
in half the time using a generalized solution, then that approach
has to be considered along with a host of other concerns including
the end product and the effect on the organization. I say reliance
on generalized solutions is short-sighted because knowledge of the
underlying technologies is lost, or never gained, along with the
skills to work in those spheres.

Are you suggesting that people who program using Java are oblivious to
the innards of hardware architecture and are remain ignorant of these
important details? That's the logical conclusion to your argument.

I'm not saying you're wrong, but you have to admit that a Java
programmer (of which I'm one) saying that using a generalized solution
makes you ignorant is a bit like the pot calling the kettle black.


Efficiency, flexibility, repairability, extensibility and
reliability are all components of software quality and all are
affected by complexity. Less complex systems are easier to
maintain.

To continue the aside, wasted energy is wasted energy and it may
become a factor in software development at some point. I think
decision makers should be taught that there is more to the bottom
line than dollars and cents.

In my experience, by far the biggest time waster is trying to deal
with code that is (or has become) unmaintainable. Re-writing just
because a piece of code has become out-of-touch with current standards
or because nobody understands how it works is entirely wasted effort.
We have lots of places in our code where we have been spending -
literally - years recording from bad decisions in the past.


Most companies are based on believes of the past: development is costly 
and non profitable. While this is true for small companies (where each 
employee salary present a risk for the profitability), for medium to big 
companies this is not true anymore.
The cost for constraining the company to software produced by big 
players (I wont cite names) is much bigger than having a (well 
organized) development team capable of integrating standards (like 
accounting and taxes) to the wild (sales, production, research).
Using libraries like JPA cannot be considered a danger unless used 
without proper analysis. This is true for everything in life (even water 
consumed in excess cause damage to health).
I do use JPA in the development of high performance applications, and I 
do sacrifice some nanoseconds in prol of well maintainable code - for 
the user, anything below 200ms will look instantaneous.
This makes my company profitable where my customers failed when working 
in house.
I hope they never learn how to do that, because this guarantees my money 
at the end of each month.


Edson Richter




- -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/

iEYEAREIAAYFAlEaYWUACgkQ9CaO5/Lv0PC0CQCfX91lU8Tbik1CDe3g8ASV6pxQ
rOkAn2PPdBNrP4rVPRJ6GWzXqFx/8HyQ
=hcps
-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: Strange compilation dates for JSPS

2013-02-12 Thread Konstantin Kolinko
2013/2/12 Ray Holme rayho...@yahoo.com:
 While debugging a problem in Tomcat 7.0.35 (just upgraded), I noted OLD files 
 in the work/Catalina/localhost/APP/org/apache/jsp directory.

 I thought I had cleaned things out to make sure all was rebuilt. So I 
 manually stopped tomcat; manually cleaned the directory (rm -rf *); and 
 restarted.

 Lo and behold things were regenerated again (as expected) but the dates were 
 MOST peculiar.

 My system date is 2/12/2013 (today) but all the .java and .class files 
 generated show 2/28/2012.

 I have two questions:

WHY is this back-dated? (this seems counter productive and not helpful to 
 the user trying to figure things out)

HOW is this back-dated? (I don't even know how to back date a file myself 
 - I know tar does this but have never figured out how to do it)
(and yes I have been using Unix and Linux a long time)

https://issues.apache.org/bugzilla/show_bug.cgi?id=33453
Implemented in 7.0.17

You may read a comment at the top of generated *.java files there.

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



RE: Build vs. buy (Was: [Seriously OT] Help in diagnosing server unresponsiveness)

2013-02-12 Thread Leo Donahue - RDSA IT
-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Subject: Build vs. buy (Was: [Seriously OT] Help in diagnosing server
unresponsiveness)

Re-writing just because a piece of code has become out-of-touch with current 
standards or because nobody understands how it works is entirely wasted effort.

- -chris

And, not to mention the technology an application uses eventually reaches EOL, 
then what?  It's easier to keep it limping along until the point at which 
someone decides it's worth spending money to update it.

It has been my observation that the trend where I work is buy and try to 
configure or enhance the product to make it do something it didn't do before, 
because I believe some people think building solutions are too complex or too 
costly.  

Buying and maintaining in my opinion is harder when the vendor product changes. 
 You end up building additional  complex functionality around a product that 
did not do 100% of what you wanted when you bought it, now the vendor changes 
something and you're faced with nearly redoing everything you did before to 
keep maintenance on the current vendor product version.


Re: Strange compilation dates for JSPS

2013-02-12 Thread Ray Holme
OK, now it all makes sense. Thanks for opening my eyes. The comments in the 
.java file say it ALL.




 From: Konstantin Kolinko knst.koli...@gmail.com
To: Tomcat Users List users@tomcat.apache.org 
Sent: Tuesday, February 12, 2013 10:57 AM
Subject: Re: Strange compilation dates for JSPS
 
2013/2/12 Ray Holme rayho...@yahoo.com:
 While debugging a problem in Tomcat 7.0.35 (just upgraded), I noted OLD files 
 in the work/Catalina/localhost/APP/org/apache/jsp directory.

 I thought I had cleaned things out to make sure all was rebuilt. So I 
 manually stopped tomcat; manually cleaned the directory (rm -rf *); and 
 restarted.

 Lo and behold things were regenerated again (as expected) but the dates were 
 MOST peculiar.

 My system date is 2/12/2013 (today) but all the .java and .class files 
 generated show 2/28/2012.

 I have two questions:

    WHY is this back-dated? (this seems counter productive and not helpful to 
the user trying to figure things out)

    HOW is this back-dated? (I don't even know how to back date a file myself 
- I know tar does this but have never figured out how to do it)
                (and yes I have been using Unix and Linux a long time)

https://issues.apache.org/bugzilla/show_bug.cgi?id=33453
Implemented in 7.0.17

You may read a comment at the top of generated *.java files there.

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

Re: Need to Specify keystorePass on Command Line

2013-02-12 Thread André Warnier

Harris, Jeffrey E. wrote:



-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Tuesday, February 12, 2013 3:47 AM
To: Tomcat Users List
Subject: Re: Need to Specify keystorePass on Command Line

Harris, Jeffrey E. wrote:

All,

I understand that there is no good, secure solution.  However, my

hands are tied on this matter, and I would appreciate if you would
focus on providing technical assistance in implementing a solution
within the constraints I have been given.
Jeffrey,

We all understand that you have been given rules, and are supposed to
follow them.
But if these rules themselves make no logical sense, nothing in this
Universe is going to help you overcome that.

What is the concern really, about the password remaining somewhere on
that server when the system is shut down ?
Is it that the server, in its shut down state, could be subrepticiously
broken apart, its disk stolen and then inspected by foreign spooks to
discover that password, which could then be used to further nefarious
ends, or what /exactly/ ?

What is wrong with the following scenario :
- a physical Windows server with a console and a keyboard
- boot Windows and login as a tomcat user (created beforehand)
- open a command window
- start Tomcat as an application (not a Service) in that command window
- tomcat will ask for the passphrase of the keystore. Type it in. (*)
- when Tomcat is running, enter CTRL-ALT-DEL and freeze the console (do
not logout from
Windows)
- walk away


(*) having made sure beforehand that there is no trojen on that machine
which records your
keystrokes and writes them to the disk

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


Andre,

Tomcat will host a web-app that will connect as a proxy to another organization's system 
to retrieve data that we will use in our applications.  It is the other organization that 
is mandating the no password requirement, and there is no other option than 
to use their data.  Our customer requires that the Tomcat server be up 24/7 (with minor 
outages), hence the need to design a solution that satisfies the requirements of both our 
customer, and the other organization.  Obviously, if we cannot create a way to automate 
the process, we may have to do something akin to what you do above.

However, when I run Tomcat from the console, I am never prompted for the 
password.  Instead, Tomcat just fails to start the listener on the specified 
SSL port.


Ah, ok. I must confess that I never tried this with Tomcat.
Apache httpd prompts, in similar circumstances.

I suppose that this prompt/not prompt is really a feature of the underlying SSL stack, not 
of Tomcat itself.  So depending on whether you use the Java SSL stack or the OpenSSL 
stack, the behaviour may be different.


That, or else I can imagine another way : instead of connecting to the other system 
directly from your Tomcat webapp, you could set up your own intermediate Apache httpd 
proxy between Tomcat and that other system. The communication between your webapp and this 
httpd proxy could be in clear (if the Apache httpd is on the same host). Then it would be 
that Apache httpd which would run the SSL conversation with the other system, and /it/ 
would prompt.

A bit more complicated, but if that makes it work to everyone's satisfaction..


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



tomcat-users.xml: name or username as attribute of user element ?

2013-02-12 Thread Sabrina Lautier
Hi,

[Tomcat version: 7.0, OS: Windows 7 en]

I wrote a java prg that gets the name and password of a user who has
manager-script as role in file tomcat-users.xml.
The current entry found in that file is:
user name=test password=xxx roles=admin-gui,manager-gui /
, it was created during the tomcat installation process and I haven't
edited it since then.

But comments in this file indicate username and not name:
-
!--
  role rolename=tomcat/
  role rolename=role1/
  user username=tomcat password=tomcat roles=tomcat/
  user username=both password=tomcat roles=tomcat,role1/
  user username=role1 password=tomcat roles=role1/
--
-

Can someone please say which attribute is the proper one for elt user:
name or username ?
The documentation is unclear to me on that specific point.

Regards,
Sabrina


Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Cool Techi
Hi,

We are using tomcat 6.0.26 on windows 2008 web server, with Jdk 1.6.32 
installed on the server.

The
 server seems to be running smoothly most of the time, but suddenly the 
memory used goes very high and tomcat stops responding, the logs don't 
show any out of memory or thread exceptions.

What could be causing this?

Regards,
Ayush 

Re: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Edson Richter

There is a similar thread published a week ago.
It can be caused by almost anything, and my last suspect would be Tomcat 
it self.

Most of time, the cause is some programming error, like:
- missing step out of recursive loop
- loading too many objects is memory (for example, when using JPA where 
graph of objects are all connected - so, when you load one object, all 
database is read into memory)

- some deadlock in multi-threaded application...

How to discover:

1) Try to get a memory dump and check how your memory is being used
2) Get a heap dump (stack trace, as well) or currently running 
application when it is hang, and check for deadlocks

3) Use VisualVM to get a big picture of what the virtual machine is doing
4) Put the application running under profiler (like JRockit Mission 
Control, or NetBeans profiler)


These are some ideas...

Regards,

Edson


Em 12/02/2013 15:27, Cool Techi escreveu:

Hi,

We are using tomcat 6.0.26 on windows 2008 web server, with Jdk 1.6.32 
installed on the server.

The
  server seems to be running smoothly most of the time, but suddenly the
memory used goes very high and tomcat stops responding, the logs don't
show any out of memory or thread exceptions.

What could be causing this?

Regards,
Ayush   



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



RE: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Cool Techi



I am new to this, I have just installed YourKit and see a lot of threads 
blocked,but currently my response are fine, the blocked thread are showing the 
following

Blocker Thread QuartzSchedular_Worker-6 native ID ..

On clicking on the Blocker thread it shows me the following,


  
org.apache.log4j.Category.callAppenderscom.mysql.jdbc.SingleByteCharsetConverter.getInstanceorg.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle
Does any of these sound like  reason. It would be great to get pointed in the 
right direction.
Regards,Ayush

 Date: Tue, 12 Feb 2013 15:35:40 -0200
 From: edsonrich...@hotmail.com
 To: users@tomcat.apache.org
 Subject: Re: Tomcat hanging unexpectedly [URGENT]
 
 There is a similar thread published a week ago.
 It can be caused by almost anything, and my last suspect would be Tomcat 
 it self.
 Most of time, the cause is some programming error, like:
 - missing step out of recursive loop
 - loading too many objects is memory (for example, when using JPA where 
 graph of objects are all connected - so, when you load one object, all 
 database is read into memory)
 - some deadlock in multi-threaded application...
 
 How to discover:
 
 1) Try to get a memory dump and check how your memory is being used
 2) Get a heap dump (stack trace, as well) or currently running 
 application when it is hang, and check for deadlocks
 3) Use VisualVM to get a big picture of what the virtual machine is doing
 4) Put the application running under profiler (like JRockit Mission 
 Control, or NetBeans profiler)
 
 These are some ideas...
 
 Regards,
 
 Edson
 
 
 Em 12/02/2013 15:27, Cool Techi escreveu:
  Hi,
 
  We are using tomcat 6.0.26 on windows 2008 web server, with Jdk 1.6.32 
  installed on the server.
 
  The
server seems to be running smoothly most of the time, but suddenly the
  memory used goes very high and tomcat stops responding, the logs don't
  show any out of memory or thread exceptions.
 
  What could be causing this?
 
  Regards,
  Ayush   
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

  

Re: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Edson Richter

Em 12/02/2013 15:53, Cool Techi escreveu:



I am new to this, I have just installed YourKit and see a lot of threads 
blocked,but currently my response are fine, the blocked thread are showing the 
following

Blocker Thread QuartzSchedular_Worker-6 native ID ..

On clicking on the Blocker thread it shows me the following,


   
org.apache.log4j.Category.callAppenderscom.mysql.jdbc.SingleByteCharsetConverter.getInstanceorg.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle


Would it have exhausted database connections limit?

Edson


Does any of these sound like  reason. It would be great to get pointed in the 
right direction.
Regards,Ayush


Date: Tue, 12 Feb 2013 15:35:40 -0200
From: edsonrich...@hotmail.com
To: users@tomcat.apache.org
Subject: Re: Tomcat hanging unexpectedly [URGENT]

There is a similar thread published a week ago.
It can be caused by almost anything, and my last suspect would be Tomcat
it self.
Most of time, the cause is some programming error, like:
- missing step out of recursive loop
- loading too many objects is memory (for example, when using JPA where
graph of objects are all connected - so, when you load one object, all
database is read into memory)
- some deadlock in multi-threaded application...

How to discover:

1) Try to get a memory dump and check how your memory is being used
2) Get a heap dump (stack trace, as well) or currently running
application when it is hang, and check for deadlocks
3) Use VisualVM to get a big picture of what the virtual machine is doing
4) Put the application running under profiler (like JRockit Mission
Control, or NetBeans profiler)

These are some ideas...

Regards,

Edson


Em 12/02/2013 15:27, Cool Techi escreveu:

Hi,

We are using tomcat 6.0.26 on windows 2008 web server, with Jdk 1.6.32 
installed on the server.

The
   server seems to be running smoothly most of the time, but suddenly the
memory used goes very high and tomcat stops responding, the logs don't
show any out of memory or thread exceptions.

What could be causing this?

Regards,
Ayush   


-
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-users.xml: name or username as attribute of user element ?

2013-02-12 Thread Daniel Mikusa
On Feb 12, 2013, at 12:11 PM, Sabrina Lautier wrote:

 Hi,
 
 [Tomcat version: 7.0, OS: Windows 7 en]
 
 I wrote a java prg that gets the name and password of a user who has
 manager-script as role in file tomcat-users.xml.
 The current entry found in that file is:
 user name=test password=xxx roles=admin-gui,manager-gui /
 , it was created during the tomcat installation process and I haven't
 edited it since then.

The documentation would seem to agree with this format.

  https://tomcat.apache.org/tomcat-7.0-doc/realm-howto.html#UserDatabaseRealm

 
 But comments in this file indicate username and not name:
 -
 !--
  role rolename=tomcat/
  role rolename=role1/
  user username=tomcat password=tomcat roles=tomcat/
  user username=both password=tomcat roles=tomcat,role1/
  user username=role1 password=tomcat roles=role1/
 --
 -
 

If you're curious, you could simply uncomment this and see what happens.  You 
can explore the user database by connecting with jconsole and looking at the 
Mbeans.  Look for the Users node.

Dan

 Can someone please say which attribute is the proper one for elt user:
 name or username ?
 The documentation is unclear to me on that specific point.
 
 Regards,
 Sabrina

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



RE: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Cool Techi
I am guessing it would when more users come into the system, but why would this 
cause a jump in memory utilization in tomcat and then hanging. If you could 
throw more light at this?

Also, I am not sure if these are pointing to the problem.

-Ayush

 Date: Tue, 12 Feb 2013 16:00:12 -0200
 From: edsonrich...@hotmail.com
 To: users@tomcat.apache.org
 Subject: Re: Tomcat hanging unexpectedly [URGENT]
 
 Em 12/02/2013 15:53, Cool Techi escreveu:
 
 
  I am new to this, I have just installed YourKit and see a lot of threads 
  blocked,but currently my response are fine, the blocked thread are showing 
  the following
 
  Blocker Thread QuartzSchedular_Worker-6 native ID ..
 
  On clicking on the Blocker thread it shows me the following,
 
 
 
  org.apache.log4j.Category.callAppenderscom.mysql.jdbc.SingleByteCharsetConverter.getInstanceorg.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle
 
 Would it have exhausted database connections limit?
 
 Edson
 
  Does any of these sound like  reason. It would be great to get pointed in 
  the right direction.
  Regards,Ayush
 
  Date: Tue, 12 Feb 2013 15:35:40 -0200
  From: edsonrich...@hotmail.com
  To: users@tomcat.apache.org
  Subject: Re: Tomcat hanging unexpectedly [URGENT]
 
  There is a similar thread published a week ago.
  It can be caused by almost anything, and my last suspect would be Tomcat
  it self.
  Most of time, the cause is some programming error, like:
  - missing step out of recursive loop
  - loading too many objects is memory (for example, when using JPA where
  graph of objects are all connected - so, when you load one object, all
  database is read into memory)
  - some deadlock in multi-threaded application...
 
  How to discover:
 
  1) Try to get a memory dump and check how your memory is being used
  2) Get a heap dump (stack trace, as well) or currently running
  application when it is hang, and check for deadlocks
  3) Use VisualVM to get a big picture of what the virtual machine is doing
  4) Put the application running under profiler (like JRockit Mission
  Control, or NetBeans profiler)
 
  These are some ideas...
 
  Regards,
 
  Edson
 
 
  Em 12/02/2013 15:27, Cool Techi escreveu:
  Hi,
 
  We are using tomcat 6.0.26 on windows 2008 web server, with Jdk 1.6.32 
  installed on the server.
 
  The
 server seems to be running smoothly most of the time, but suddenly the
  memory used goes very high and tomcat stops responding, the logs don't
  show any out of memory or thread exceptions.
 
  What could be causing this?
 
  Regards,
  Ayush 
 
  -
  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 hanging unexpectedly [URGENT]

2013-02-12 Thread Edson Richter
As I said, everything said before getting more details would be mere 
speculation.

I'm just brainstorming based on information you gave so far.
I would recommend to check a heap dump and profiling using VisualJVM of 
application while running. It would give a better idea.


Regards,

Edson


Em 12/02/2013 16:18, Cool Techi escreveu:

I am guessing it would when more users come into the system, but why would this 
cause a jump in memory utilization in tomcat and then hanging. If you could 
throw more light at this?

Also, I am not sure if these are pointing to the problem.

-Ayush


Date: Tue, 12 Feb 2013 16:00:12 -0200
From: edsonrich...@hotmail.com
To: users@tomcat.apache.org
Subject: Re: Tomcat hanging unexpectedly [URGENT]

Em 12/02/2013 15:53, Cool Techi escreveu:


I am new to this, I have just installed YourKit and see a lot of threads 
blocked,but currently my response are fine, the blocked thread are showing the 
following

Blocker Thread QuartzSchedular_Worker-6 native ID ..

On clicking on the Blocker thread it shows me the following,



org.apache.log4j.Category.callAppenderscom.mysql.jdbc.SingleByteCharsetConverter.getInstanceorg.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle

Would it have exhausted database connections limit?

Edson


Does any of these sound like  reason. It would be great to get pointed in the 
right direction.
Regards,Ayush


Date: Tue, 12 Feb 2013 15:35:40 -0200
From: edsonrich...@hotmail.com
To: users@tomcat.apache.org
Subject: Re: Tomcat hanging unexpectedly [URGENT]

There is a similar thread published a week ago.
It can be caused by almost anything, and my last suspect would be Tomcat
it self.
Most of time, the cause is some programming error, like:
- missing step out of recursive loop
- loading too many objects is memory (for example, when using JPA where
graph of objects are all connected - so, when you load one object, all
database is read into memory)
- some deadlock in multi-threaded application...

How to discover:

1) Try to get a memory dump and check how your memory is being used
2) Get a heap dump (stack trace, as well) or currently running
application when it is hang, and check for deadlocks
3) Use VisualVM to get a big picture of what the virtual machine is doing
4) Put the application running under profiler (like JRockit Mission
Control, or NetBeans profiler)

These are some ideas...

Regards,

Edson


Em 12/02/2013 15:27, Cool Techi escreveu:

Hi,

We are using tomcat 6.0.26 on windows 2008 web server, with Jdk 1.6.32 
installed on the server.

The
server seems to be running smoothly most of the time, but suddenly the
memory used goes very high and tomcat stops responding, the logs don't
show any out of memory or thread exceptions.

What could be causing this?

Regards,
Ayush   

-
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 hanging unexpectedly [URGENT]

2013-02-12 Thread Pid
On 12/02/2013 17:53, Cool Techi wrote:
 
 
 
 I am new to this, I have just installed YourKit and see a lot of threads 
 blocked,but currently my response are fine, the blocked thread are showing 
 the following
 
 Blocker Thread QuartzSchedular_Worker-6 native ID ..
 
 On clicking on the Blocker thread it shows me the following,
 
 
   
 org.apache.log4j.Category.callAppenderscom.mysql.jdbc.SingleByteCharsetConverter.getInstanceorg.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle
 Does any of these sound like  reason. It would be great to get pointed in the 
 right direction.
 Regards,Ayush


Oh dear.

Are you doing your app logging to a database?

Is it the same database that your app uses?

Is it the same connection pool that your app uses?


p


 Date: Tue, 12 Feb 2013 15:35:40 -0200
 From: edsonrich...@hotmail.com
 To: users@tomcat.apache.org
 Subject: Re: Tomcat hanging unexpectedly [URGENT]

 There is a similar thread published a week ago.
 It can be caused by almost anything, and my last suspect would be Tomcat 
 it self.
 Most of time, the cause is some programming error, like:
 - missing step out of recursive loop
 - loading too many objects is memory (for example, when using JPA where 
 graph of objects are all connected - so, when you load one object, all 
 database is read into memory)
 - some deadlock in multi-threaded application...

 How to discover:

 1) Try to get a memory dump and check how your memory is being used
 2) Get a heap dump (stack trace, as well) or currently running 
 application when it is hang, and check for deadlocks
 3) Use VisualVM to get a big picture of what the virtual machine is doing
 4) Put the application running under profiler (like JRockit Mission 
 Control, or NetBeans profiler)

 These are some ideas...

 Regards,

 Edson


 Em 12/02/2013 15:27, Cool Techi escreveu:
 Hi,

 We are using tomcat 6.0.26 on windows 2008 web server, with Jdk 1.6.32 
 installed on the server.

 The
   server seems to be running smoothly most of the time, but suddenly the
 memory used goes very high and tomcat stops responding, the logs don't
 show any out of memory or thread exceptions.

 What could be causing this?

 Regards,
 Ayush   


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

 
 
 


-- 

[key:62590808]

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



RE: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Cool Techi
I am not logging to database, these are my appenders,


appender name=errorfile class=org.apache.log4j.DailyRollingFileAppender
param name=File value=D:/Logs/errorVer.log /
param name=threshold value=error /
layout class=org.apache.log4j.PatternLayout
param name=ConversionPattern value=%d{-MMM-dd HH:mm:ss,SSS} 
%5p %c{1}:%L - %m%n /
/layout
/appender

appender name=debugfile 
class=org.apache.log4j.DailyRollingFileAppender
param name=File value=D:/Logs/debugVer.log /
layout class=org.apache.log4j.PatternLayout
param name=ConversionPattern value=%d{-MMM-dd HH:mm:ss,SSS} 
%5p %c{1}:%L - %m%n /
/layout
filter class=org.apache.log4j.varia.LevelRangeFilter
param name=LevelMin value=debug /
param name=LevelMax value=debug /
/filter
/appender  

regards,
Ayush

 Date: Tue, 12 Feb 2013 18:38:24 +
 From: p...@pidster.com
 To: users@tomcat.apache.org
 Subject: Re: Tomcat hanging unexpectedly [URGENT]
 
 On 12/02/2013 17:53, Cool Techi wrote:
  
  
  
  I am new to this, I have just installed YourKit and see a lot of threads 
  blocked,but currently my response are fine, the blocked thread are showing 
  the following
  
  Blocker Thread QuartzSchedular_Worker-6 native ID ..
  
  On clicking on the Blocker thread it shows me the following,
  
  

  org.apache.log4j.Category.callAppenderscom.mysql.jdbc.SingleByteCharsetConverter.getInstanceorg.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle
  Does any of these sound like  reason. It would be great to get pointed in 
  the right direction.
  Regards,Ayush
 
 
 Oh dear.
 
 Are you doing your app logging to a database?
 
 Is it the same database that your app uses?
 
 Is it the same connection pool that your app uses?
 
 
 p
 
 
  Date: Tue, 12 Feb 2013 15:35:40 -0200
  From: edsonrich...@hotmail.com
  To: users@tomcat.apache.org
  Subject: Re: Tomcat hanging unexpectedly [URGENT]
 
  There is a similar thread published a week ago.
  It can be caused by almost anything, and my last suspect would be Tomcat 
  it self.
  Most of time, the cause is some programming error, like:
  - missing step out of recursive loop
  - loading too many objects is memory (for example, when using JPA where 
  graph of objects are all connected - so, when you load one object, all 
  database is read into memory)
  - some deadlock in multi-threaded application...
 
  How to discover:
 
  1) Try to get a memory dump and check how your memory is being used
  2) Get a heap dump (stack trace, as well) or currently running 
  application when it is hang, and check for deadlocks
  3) Use VisualVM to get a big picture of what the virtual machine is doing
  4) Put the application running under profiler (like JRockit Mission 
  Control, or NetBeans profiler)
 
  These are some ideas...
 
  Regards,
 
  Edson
 
 
  Em 12/02/2013 15:27, Cool Techi escreveu:
  Hi,
 
  We are using tomcat 6.0.26 on windows 2008 web server, with Jdk 1.6.32 
  installed on the server.
 
  The
server seems to be running smoothly most of the time, but suddenly the
  memory used goes very high and tomcat stops responding, the logs don't
  show any out of memory or thread exceptions.
 
  What could be causing this?
 
  Regards,
  Ayush 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
  

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

Re: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Pid
On 12/02/2013 18:42, Cool Techi wrote:
 I am not logging to database, these are my appenders,

You posted the below in a previous message. It was in a single
unintelligible line.  Perhaps you could clarify what you intended to
post and try again?

 org.apache.log4j.Category.callAppenders
 com.mysql.jdbc.SingleByteCharsetConverter.getInstance
 org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()
 org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()
 ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle


p


 appender name=errorfile class=org.apache.log4j.DailyRollingFileAppender
 param name=File value=D:/Logs/errorVer.log /
 param name=threshold value=error /
 layout class=org.apache.log4j.PatternLayout
 param name=ConversionPattern value=%d{-MMM-dd 
 HH:mm:ss,SSS} %5p %c{1}:%L - %m%n /
 /layout
 /appender
 
 appender name=debugfile 
 class=org.apache.log4j.DailyRollingFileAppender
 param name=File value=D:/Logs/debugVer.log /
 layout class=org.apache.log4j.PatternLayout
 param name=ConversionPattern value=%d{-MMM-dd 
 HH:mm:ss,SSS} %5p %c{1}:%L - %m%n /
 /layout
 filter class=org.apache.log4j.varia.LevelRangeFilter
 param name=LevelMin value=debug /
 param name=LevelMax value=debug /
 /filter
 /appender  
 
 regards,
 Ayush
 
 Date: Tue, 12 Feb 2013 18:38:24 +
 From: p...@pidster.com
 To: users@tomcat.apache.org
 Subject: Re: Tomcat hanging unexpectedly [URGENT]

 On 12/02/2013 17:53, Cool Techi wrote:



 I am new to this, I have just installed YourKit and see a lot of threads 
 blocked,but currently my response are fine, the blocked thread are showing 
 the following

 Blocker Thread QuartzSchedular_Worker-6 native ID ..

 On clicking on the Blocker thread it shows me the following,


   
 org.apache.log4j.Category.callAppenderscom.mysql.jdbc.SingleByteCharsetConverter.getInstanceorg.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle
 Does any of these sound like  reason. It would be great to get pointed in 
 the right direction.
 Regards,Ayush


 Oh dear.

 Are you doing your app logging to a database?

 Is it the same database that your app uses?

 Is it the same connection pool that your app uses?


 p


 Date: Tue, 12 Feb 2013 15:35:40 -0200
 From: edsonrich...@hotmail.com
 To: users@tomcat.apache.org
 Subject: Re: Tomcat hanging unexpectedly [URGENT]

 There is a similar thread published a week ago.
 It can be caused by almost anything, and my last suspect would be Tomcat 
 it self.
 Most of time, the cause is some programming error, like:
 - missing step out of recursive loop
 - loading too many objects is memory (for example, when using JPA where 
 graph of objects are all connected - so, when you load one object, all 
 database is read into memory)
 - some deadlock in multi-threaded application...

 How to discover:

 1) Try to get a memory dump and check how your memory is being used
 2) Get a heap dump (stack trace, as well) or currently running 
 application when it is hang, and check for deadlocks
 3) Use VisualVM to get a big picture of what the virtual machine is doing
 4) Put the application running under profiler (like JRockit Mission 
 Control, or NetBeans profiler)

 These are some ideas...

 Regards,

 Edson


 Em 12/02/2013 15:27, Cool Techi escreveu:
 Hi,

 We are using tomcat 6.0.26 on windows 2008 web server, with Jdk 1.6.32 
 installed on the server.

 The
   server seems to be running smoothly most of the time, but suddenly the
 memory used goes very high and tomcat stops responding, the logs don't
 show any out of memory or thread exceptions.

 What could be causing this?

 Regards,
 Ayush 


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


   



 -- 

 [key:62590808]

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


-- 

[key:62590808]

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



RE: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Cool Techi
Sorry if what I wrote was confusing, actually I have installed YourKit profiler 
and am profiling my tomcat. On checking or blocking threads I get to see the 
following,
Blocker Thread QuartzSchedular_Worker-6 native ID ..
 
On clicking on the Blocker thread it shows me the following,
 
--org.apache.log4j.Category.callAppenders
--com.mysql.jdbc.SingleByteCharsetConverter.getInstance
--org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()
--org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()
--ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle


As I am new to this I am not sure what might be causing this, is it log4j 
or something else like dbcp pool.

Help appreciated.

Ayush.


 Date: Tue, 12 Feb 2013 18:45:03 +
 From: p...@pidster.com
 To: users@tomcat.apache.org
 Subject: Re: Tomcat hanging unexpectedly [URGENT]
 
 On 12/02/2013 18:42, Cool Techi wrote:
  I am not logging to database, these are my appenders,
 
 You posted the below in a previous message. It was in a single
 unintelligible line.  Perhaps you could clarify what you intended to
 post and try again?
 
  org.apache.log4j.Category.callAppenders
  com.mysql.jdbc.SingleByteCharsetConverter.getInstance
  org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()
  org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()
  ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle
 
 
 p
 
 
  appender name=errorfile 
  class=org.apache.log4j.DailyRollingFileAppender
  param name=File value=D:/Logs/errorVer.log /
  param name=threshold value=error /
  layout class=org.apache.log4j.PatternLayout
  param name=ConversionPattern value=%d{-MMM-dd 
  HH:mm:ss,SSS} %5p %c{1}:%L - %m%n /
  /layout
  /appender
  
  appender name=debugfile 
  class=org.apache.log4j.DailyRollingFileAppender
  param name=File value=D:/Logs/debugVer.log /
  layout class=org.apache.log4j.PatternLayout
  param name=ConversionPattern value=%d{-MMM-dd 
  HH:mm:ss,SSS} %5p %c{1}:%L - %m%n /
  /layout
  filter class=org.apache.log4j.varia.LevelRangeFilter
  param name=LevelMin value=debug /
  param name=LevelMax value=debug /
  /filter
  /appender  
  
  regards,
  Ayush
  
  Date: Tue, 12 Feb 2013 18:38:24 +
  From: p...@pidster.com
  To: users@tomcat.apache.org
  Subject: Re: Tomcat hanging unexpectedly [URGENT]
 
  On 12/02/2013 17:53, Cool Techi wrote:
 
 
 
  I am new to this, I have just installed YourKit and see a lot of threads 
  blocked,but currently my response are fine, the blocked thread are 
  showing the following
 
  Blocker Thread QuartzSchedular_Worker-6 native ID ..
 
  On clicking on the Blocker thread it shows me the following,
 
 

  org.apache.log4j.Category.callAppenderscom.mysql.jdbc.SingleByteCharsetConverter.getInstanceorg.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle
  Does any of these sound like  reason. It would be great to get pointed in 
  the right direction.
  Regards,Ayush
 
 
  Oh dear.
 
  Are you doing your app logging to a database?
 
  Is it the same database that your app uses?
 
  Is it the same connection pool that your app uses?
 
 
  p
 
 
  Date: Tue, 12 Feb 2013 15:35:40 -0200
  From: edsonrich...@hotmail.com
  To: users@tomcat.apache.org
  Subject: Re: Tomcat hanging unexpectedly [URGENT]
 
  There is a similar thread published a week ago.
  It can be caused by almost anything, and my last suspect would be Tomcat 
  it self.
  Most of time, the cause is some programming error, like:
  - missing step out of recursive loop
  - loading too many objects is memory (for example, when using JPA where 
  graph of objects are all connected - so, when you load one object, all 
  database is read into memory)
  - some deadlock in multi-threaded application...
 
  How to discover:
 
  1) Try to get a memory dump and check how your memory is being used
  2) Get a heap dump (stack trace, as well) or currently running 
  application when it is hang, and check for deadlocks
  3) Use VisualVM to get a big picture of what the virtual machine is doing
  4) Put the application running under profiler (like JRockit Mission 
  Control, or NetBeans profiler)
 
  These are some ideas...
 
  Regards,
 
  Edson
 
 
  Em 12/02/2013 15:27, Cool Techi escreveu:
  Hi,
 
  We are using tomcat 6.0.26 on windows 2008 web server, with Jdk 1.6.32 
  installed on the server.
 
  The
server seems to be running smoothly most of the time, but suddenly the
  memory used goes very high and tomcat stops responding, the logs don't
  show any out of memory or thread exceptions.
 
  What could be causing this?
 
  Regards,
  Ayush   
 
 
  

Re: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Edson Richter

Em 12/02/2013 16:50, Cool Techi escreveu:

Sorry if what I wrote was confusing, actually I have installed YourKit profiler 
and am profiling my tomcat. On checking or blocking threads I get to see the 
following,
Blocker Thread QuartzSchedular_Worker-6 native ID ..
  
On clicking on the Blocker thread it shows me the following,
  
--org.apache.log4j.Category.callAppenders

--com.mysql.jdbc.SingleByteCharsetConverter.getInstance
--org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()
--org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()
--ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle


As I am new to this I am not sure what might be causing this, is it log4j
or something else like dbcp pool.


The cause is unlikely to be log4j or dbcp pool it self (they may be 
involved as a bridge between the code causing the problem and the thread 
that has been stuck).
QuartzScheduler would be blocked by your application (for instance, 
opening a transaction that would lock one or more tables, and then 
forget to properly release by correctly closing the resources).
As I already said, having more information, like a heap dump or a stack 
trace would help to identify the cause.


Seems too little information to deal with such big problem.

Regards,

Edson




Help appreciated.

Ayush.



Date: Tue, 12 Feb 2013 18:45:03 +
From: p...@pidster.com
To: users@tomcat.apache.org
Subject: Re: Tomcat hanging unexpectedly [URGENT]

On 12/02/2013 18:42, Cool Techi wrote:

I am not logging to database, these are my appenders,

You posted the below in a previous message. It was in a single
unintelligible line.  Perhaps you could clarify what you intended to
post and try again?

  org.apache.log4j.Category.callAppenders
  com.mysql.jdbc.SingleByteCharsetConverter.getInstance
  org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()
  org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()
  ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle


p



appender name=errorfile class=org.apache.log4j.DailyRollingFileAppender
 param name=File value=D:/Logs/errorVer.log /
 param name=threshold value=error /
 layout class=org.apache.log4j.PatternLayout
 param name=ConversionPattern value=%d{-MMM-dd HH:mm:ss,SSS} %5p 
%c{1}:%L - %m%n /
 /layout
 /appender
 
 appender name=debugfile class=org.apache.log4j.DailyRollingFileAppender

 param name=File value=D:/Logs/debugVer.log /
 layout class=org.apache.log4j.PatternLayout
 param name=ConversionPattern value=%d{-MMM-dd HH:mm:ss,SSS} %5p 
%c{1}:%L - %m%n /
 /layout
 filter class=org.apache.log4j.varia.LevelRangeFilter
 param name=LevelMin value=debug /
 param name=LevelMax value=debug /
 /filter
/appender

regards,
Ayush


Date: Tue, 12 Feb 2013 18:38:24 +
From: p...@pidster.com
To: users@tomcat.apache.org
Subject: Re: Tomcat hanging unexpectedly [URGENT]

On 12/02/2013 17:53, Cool Techi wrote:



I am new to this, I have just installed YourKit and see a lot of threads 
blocked,but currently my response are fine, the blocked thread are showing the 
following

Blocker Thread QuartzSchedular_Worker-6 native ID ..

On clicking on the Blocker thread it shows me the following,


   
org.apache.log4j.Category.callAppenderscom.mysql.jdbc.SingleByteCharsetConverter.getInstanceorg.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle
Does any of these sound like  reason. It would be great to get pointed in the 
right direction.
Regards,Ayush


Oh dear.

Are you doing your app logging to a database?

Is it the same database that your app uses?

Is it the same connection pool that your app uses?


p



Date: Tue, 12 Feb 2013 15:35:40 -0200
From: edsonrich...@hotmail.com
To: users@tomcat.apache.org
Subject: Re: Tomcat hanging unexpectedly [URGENT]

There is a similar thread published a week ago.
It can be caused by almost anything, and my last suspect would be Tomcat
it self.
Most of time, the cause is some programming error, like:
- missing step out of recursive loop
- loading too many objects is memory (for example, when using JPA where
graph of objects are all connected - so, when you load one object, all
database is read into memory)
- some deadlock in multi-threaded application...

How to discover:

1) Try to get a memory dump and check how your memory is being used
2) Get a heap dump (stack trace, as well) or currently running
application when it is hang, and check for deadlocks
3) Use VisualVM to get a big picture of what the virtual machine is doing
4) Put the application running under profiler (like JRockit Mission
Control, or NetBeans profiler)

These are some ideas...

Regards,

Edson


Em 12/02/2013 15:27, Cool Techi escreveu:

Hi,

We are 

Re: disable handling of expect:continue

2013-02-12 Thread Brad McEvoy

Hi Christopher,

Yes, we need Tomcat to let let the servlet send the 100 response

Apparently weblogic doesnt (or didnt) handle Expects so I added it to 
milton, and it seems to work ok:

http://lists.justthe.net/pipermail/milton-users/2010-October/000791.html

What would be required from the server side is that when the client 
sends the body of the request this appears to the servlet as a second 
request but with the same headers as the original request, minus the 
Expects header. Eg


Request1
1. Client sends headers to server, including Expect: Continue
2. Server invokes servlet
3. Servlet sees request and responds with status 100
Request2
4. Client sends body to server (ie no headers)
5. Server invokes servlet with original headers (Request2 is on same TCP 
connection as Request1)

6. Servlet now has headers and body so executes the request as normal

If its too hard to carry over the headers from Request1 to Request2 then 
thats not necessarily a problem, as long as there's some way for the 
servlet to connect the two requests. Eg if there's some identifier for 
the TCP connection, for example, that would be sufficient.


Thanks,
Brad


On 13/02/13 03:23, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Brad,

On 2/11/13 4:02 PM, Brad McEvoy wrote:

On 12/02/13 09:53, Mark Thomas wrote:

Can anyone suggest a way to disable this feature short of
hacking tomcat?

You don't want to disable sending 100 Continue responses.

Ideally, you want to delay when it is sent until after any
authentication (so the 401 goes back to the client before they
send the body).

I'm not sure how feasible that would be.

Is your servlet generating the 401? It it was a standard
authenticator generating the 401 it might be doable. If it is a
user servlet then that is going to be trickier. It doesn't help
that the Servlet API has no mechanism for sending a 101.

The milton servlet handles the acknowledgement cycle, including
authorisation checks and 401 response if needed.

All thats needed is a container wide parameter to simply ignore
Expect headers. I'd be happy to poke around in tomcat's innards and
perhaps submit a patch. Would this be in the Http11Processor?

Yep, sadly the servlet API seems to have completely overlooked this
and so everyone has to figure out their own way of dealing with it

I'm speaking from a fairly ignorant position, but I'm curious: are you
asking if Tomcat could simply step out of the way in these cases and
allow the servlet to send its own response when Expect: Continue is
present in the request?

Mark, at the point in the request-processing when the 100 Continue is
sent, has the context already been chosen? If so, could we add a
configuration parameter on the context to disable auto-handling of
Expect:Continue/100-Continue, or is it not as simple as I make it out
to be? Is it even possible for a servlet to handle a 100-Continue
response entirely on its own without collusion with the container?

- -chris




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



Re: disable handling of expect:continue

2013-02-12 Thread Brad McEvoy

On 13/02/13 03:56, Konstantin Kolinko wrote:

Certainly not. Have you read the source code, or only that old thread?
No, was just looking at the old thread. Its been a while since i dug 
around in tomcat.

The processor is

The method that sends acknowledgment is
o.a.catalina.connector.Response.sendAcknowledgement().

1) Acknowledgment happens is StandardContextValve or in FormAuthenticator.

2) Looking at stacktraces in Bugzilla reports, authentication happens
before StandardContextValve is involved.  Doesn't it already works for
you?

Milton users normally dont use container managed authentication


How your authentication is configured?
Milton delegates authentication to Resource implementations, and 
authorisation is a second step


3) It probably would not work if Tomcat is behind HTTPD, as AJP
processors do not have this feature (ActionCode.ACK).
Just to confirm, so are you saying that HTTPD will always send a 100 
response?


Thanks!

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



Re: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Mark Eggers

On 2/12/2013 10:50 AM, Cool Techi wrote:

Sorry if what I wrote was confusing, actually I have installed YourKit profiler 
and am profiling my tomcat. On checking or blocking threads I get to see the 
following,
Blocker Thread QuartzSchedular_Worker-6 native ID ..

On clicking on the Blocker thread it shows me the following,

--org.apache.log4j.Category.callAppenders
--com.mysql.jdbc.SingleByteCharsetConverter.getInstance
--org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()
--org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()
--ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle


As I am new to this I am not sure what might be causing this, is it log4j
or something else like dbcp pool.

Help appreciated.

Ayush.



It's most likely your application.

Post a complete thread dump of at least one of the blocked threads. See 
the following on how to do this:


http://wiki.apache.org/tomcat/HowTo#If_you_are_running_on_Microsoft_Windows

I'm guessing the following:

1. Quartz scheduler writes to a database
2. Some exception happens
3. The exception is logged
4. The connection isn't cleaned up with a finally block
5. Bad things happen . . . .

Or

1. Quartz scheduler writes to a database
2. A log4j entry is written
3. The connection isn't cleaned up
4. Bad things happen . . .

Or

Make up your scenario here . . .

See my previous post on setting up logAbandoned, etc. in a test environment.

Also, first things first, post a complete thread dump of the blocked thread.

. . . . just my two cents.
/mde/




Date: Tue, 12 Feb 2013 18:45:03 +
From: p...@pidster.com
To: users@tomcat.apache.org
Subject: Re: Tomcat hanging unexpectedly [URGENT]

On 12/02/2013 18:42, Cool Techi wrote:

I am not logging to database, these are my appenders,


You posted the below in a previous message. It was in a single
unintelligible line.  Perhaps you could clarify what you intended to
post and try again?

  org.apache.log4j.Category.callAppenders
  com.mysql.jdbc.SingleByteCharsetConverter.getInstance
  org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()
  org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()
  ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle


p



appender name=errorfile class=org.apache.log4j.DailyRollingFileAppender
 param name=File value=D:/Logs/errorVer.log /
 param name=threshold value=error /
 layout class=org.apache.log4j.PatternLayout
 param name=ConversionPattern value=%d{-MMM-dd HH:mm:ss,SSS} %5p 
%c{1}:%L - %m%n /
 /layout
 /appender

 appender name=debugfile 
class=org.apache.log4j.DailyRollingFileAppender
 param name=File value=D:/Logs/debugVer.log /
 layout class=org.apache.log4j.PatternLayout
 param name=ConversionPattern value=%d{-MMM-dd HH:mm:ss,SSS} %5p 
%c{1}:%L - %m%n /
 /layout
 filter class=org.apache.log4j.varia.LevelRangeFilter
 param name=LevelMin value=debug /
 param name=LevelMax value=debug /
 /filter
/appender

regards,
Ayush


Date: Tue, 12 Feb 2013 18:38:24 +
From: p...@pidster.com
To: users@tomcat.apache.org
Subject: Re: Tomcat hanging unexpectedly [URGENT]

On 12/02/2013 17:53, Cool Techi wrote:




I am new to this, I have just installed YourKit and see a lot of threads 
blocked,but currently my response are fine, the blocked thread are showing the 
following

Blocker Thread QuartzSchedular_Worker-6 native ID ..

On clicking on the Blocker thread it shows me the following,


   
org.apache.log4j.Category.callAppenderscom.mysql.jdbc.SingleByteCharsetConverter.getInstanceorg.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle
Does any of these sound like  reason. It would be great to get pointed in the 
right direction.
Regards,Ayush



Oh dear.

Are you doing your app logging to a database?

Is it the same database that your app uses?

Is it the same connection pool that your app uses?


p



Date: Tue, 12 Feb 2013 15:35:40 -0200
From: edsonrich...@hotmail.com
To: users@tomcat.apache.org
Subject: Re: Tomcat hanging unexpectedly [URGENT]

There is a similar thread published a week ago.
It can be caused by almost anything, and my last suspect would be Tomcat
it self.
Most of time, the cause is some programming error, like:
- missing step out of recursive loop
- loading too many objects is memory (for example, when using JPA where
graph of objects are all connected - so, when you load one object, all
database is read into memory)
- some deadlock in multi-threaded application...

How to discover:

1) Try to get a memory dump and check how your memory is being used
2) Get a heap dump (stack trace, as well) or currently running
application when it is hang, and check for deadlocks
3) Use VisualVM to get a big picture of what 

Re: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Mark Eggers

On 2/12/2013 10:38 AM, Pid wrote:

On 12/02/2013 17:53, Cool Techi wrote:




I am new to this, I have just installed YourKit and see a lot of
threads blocked,but currently my response are fine, the blocked
thread are showing the following

Blocker Thread QuartzSchedular_Worker-6 native ID ..

On clicking on the Blocker thread it shows me the following,


org.apache.log4j.Category.callAppenders
com.mysql.jdbc.SingleByteCharsetConverter.getInstance
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle


Does any of these sound like  reason. It would be great to get
pointed in the right direction.
Regards,Ayush



Oh dear.

Are you doing your app logging to a database?

Is it the same database that your app uses?

Is it the same connection pool that your app uses?


p




This sounds like a lot of things. However, without borrowing your
crystal ball, I can't tell anything about the Quartz scheduler.

A couple of things:

1. Upgrade your Java to at least the latest 1.6.0_xx version

The one you are using has known server (and client) security issues.

2. Upgrade your Tomcat to at least the latest 6.xx version

There are many improvements and bug fixes.

3. [URGENT]

I understand that this problem is urgent for you. However, the people
here contribute time on a volunteer basis (I'm taking a break from
writing documentation for a new system). We'll try to help as time
allows, but if you need an SLA then you should purchase commercial support.

4. Possible root cause

I'm guessing (based on your partial listing of classes in a thread dump) 
is that you either have a logging problem, a database connectivity 
problem, or a Quartz scheduler problem.


Or all of the above.

If there was one problem, then I (guessing) would look to see if you're 
logging via a Quartz scheduler job through log4j to a MySQL database.


Now that I've got my guess out of the way, here are some pointers.

a. Thread dumps

You said you've taken them, but have only posted snippets. Post a 
complete thread dump inline (mailing list strips attachments). For your 
own use, take several 3-10 seconds apart to see what's changing.


b. Check your database

It sounds like you have a connection leak. When this happens, how many 
active connections do you have to your MySQL database?


c. Connection leak

As noted above, you may have a connections leak. Post your Resource 
definition (hopefully it's in context.xml) with passwords and usernames 
changed.


While you're at it, read:

http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html#JDBC_Data_Sources

In particular, note removeAbandoned and logAbandoned. These will impact 
performance, so do it on a test system.



Date: Tue, 12 Feb 2013 15:35:40 -0200 From:
edsonrich...@hotmail.com To: users@tomcat.apache.org Subject: Re:
Tomcat hanging unexpectedly [URGENT]

There is a similar thread published a week ago. It can be caused
by almost anything, and my last suspect would be Tomcat it self.
Most of time, the cause is some programming error, like: -
missing step out of recursive loop - loading too many objects is
memory (for example, when using JPA where graph of objects are
all connected - so, when you load one object, all database is
read into memory) - some deadlock in multi-threaded
application...

How to discover:

1) Try to get a memory dump and check how your memory is being
used
2) Get a heap dump (stack trace, as well) or currently
running application when it is hang, and check for deadlocks
3) Use VisualVM to get a big picture of what the virtual machine is
doing


+ 1 here

Run this on a test environment, load up the system, and do heap dumps 
and thread dumps.



4) Put the application running under profiler (like JRockit
Mission Control, or NetBeans profiler)

These are some ideas...

Regards,

Edson


Em 12/02/2013 15:27, Cool Techi escreveu:

Hi,

We are using tomcat 6.0.26 on windows 2008 web server, with Jdk
1.6.32 installed on the server.

The server seems to be running smoothly most of the time, but
suddenly the memory used goes very high and tomcat stops
responding, the logs don't show any out of memory or thread
exceptions.

What could be causing this?

Regards, Ayush


Oh, and please do not top post. I had to bounce back and forth through 
the message to figure out what's been said and where to reply.


. . . just my two cents
/mde/

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



Re: tomcat-users.xml: name or username as attribute of user element ?

2013-02-12 Thread Mark Thomas
On 12/02/2013 17:11, Sabrina Lautier wrote:
 Hi,
 
 [Tomcat version: 7.0, OS: Windows 7 en]
 
 I wrote a java prg that gets the name and password of a user who has
 manager-script as role in file tomcat-users.xml.
 The current entry found in that file is:
 user name=test password=xxx roles=admin-gui,manager-gui /
 , it was created during the tomcat installation process and I haven't
 edited it since then.
 
 But comments in this file indicate username and not name:
 -
 !--
   role rolename=tomcat/
   role rolename=role1/
   user username=tomcat password=tomcat roles=tomcat/
   user username=both password=tomcat roles=tomcat,role1/
   user username=role1 password=tomcat roles=role1/
 --
 -
 
 Can someone please say which attribute is the proper one for elt user:
 name or username ?
 The documentation is unclear to me on that specific point.

username is preferred but name will work as well.

Mark


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



RE: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Cool Techi
Thanks Everyone for the help, I will enable thread dump for my Tomcat, just 
reading up on how to get that done. My database connection string is given 
below.

Resource name=jdbc/bm type=javax.sql.DataSource  
maxActive=250   maxIdle=5  username=root testWhileIdle=true  
removeAbandonedTimeout=60  maxWait=-1 removeAbandoned=true

validationQuery=select 1 driverClassName=com.mysql.jdbc.Driver 
password=xxx minEvictableIdleTimeMillis=3 
timeBetweenEvictionRunsMillis=30 
url=jdbc:mysql://localhost:3306/brandmanagement?autoReconnect=trueamp;useUnicode=trueamp;characterEncoding=utf-8/


Resource name=jdbc/s360 type=javax.sql.DataSource  
maxActive=250   maxIdle=5  username=root testWhileIdle=true  
removeAbandonedTimeout=60  maxWait=-1 removeAbandoned=true

validationQuery=select 1 driverClassName=com.mysql.jdbc.Driver 
password=xxx minEvictableIdleTimeMillis=3 
timeBetweenEvictionRunsMillis=30 
url=jdbc:mysql://localhost:3306/brandmanagement?autoReconnect=trueamp;useUnicode=trueamp;characterEncoding=utf-8/

I use quartz schedular(spring based) to perform some tasks on reqular 
intervals, Log4j is used in those methods, so will cross check those methods 
again.

Really appreciate your time and help.

Regards,
Ayush

 Date: Tue, 12 Feb 2013 11:36:52 -0800
 From: its_toas...@yahoo.com
 To: users@tomcat.apache.org
 Subject: Re: Tomcat hanging unexpectedly [URGENT]
 
 On 2/12/2013 10:38 AM, Pid wrote:
  On 12/02/2013 17:53, Cool Techi wrote:
 
 
 
  I am new to this, I have just installed YourKit and see a lot of
  threads blocked,but currently my response are fine, the blocked
  thread are showing the following
 
  Blocker Thread QuartzSchedular_Worker-6 native ID ..
 
  On clicking on the Blocker thread it shows me the following,
 
 
  org.apache.log4j.Category.callAppenders
  com.mysql.jdbc.SingleByteCharsetConverter.getInstance
  org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()
  org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()
  org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle
 
 
  Does any of these sound like  reason. It would be great to get
  pointed in the right direction.
  Regards,Ayush
 
 
  Oh dear.
 
  Are you doing your app logging to a database?
 
  Is it the same database that your app uses?
 
  Is it the same connection pool that your app uses?
 
 
  p
 
 
 
 This sounds like a lot of things. However, without borrowing your
 crystal ball, I can't tell anything about the Quartz scheduler.
 
 A couple of things:
 
 1. Upgrade your Java to at least the latest 1.6.0_xx version
 
 The one you are using has known server (and client) security issues.
 
 2. Upgrade your Tomcat to at least the latest 6.xx version
 
 There are many improvements and bug fixes.
 
 3. [URGENT]
 
 I understand that this problem is urgent for you. However, the people
 here contribute time on a volunteer basis (I'm taking a break from
 writing documentation for a new system). We'll try to help as time
 allows, but if you need an SLA then you should purchase commercial support.
 
 4. Possible root cause
 
 I'm guessing (based on your partial listing of classes in a thread dump) 
 is that you either have a logging problem, a database connectivity 
 problem, or a Quartz scheduler problem.
 
 Or all of the above.
 
 If there was one problem, then I (guessing) would look to see if you're 
 logging via a Quartz scheduler job through log4j to a MySQL database.
 
 Now that I've got my guess out of the way, here are some pointers.
 
 a. Thread dumps
 
 You said you've taken them, but have only posted snippets. Post a 
 complete thread dump inline (mailing list strips attachments). For your 
 own use, take several 3-10 seconds apart to see what's changing.
 
 b. Check your database
 
 It sounds like you have a connection leak. When this happens, how many 
 active connections do you have to your MySQL database?
 
 c. Connection leak
 
 As noted above, you may have a connections leak. Post your Resource 
 definition (hopefully it's in context.xml) with passwords and usernames 
 changed.
 
 While you're at it, read:
 
 http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html#JDBC_Data_Sources
 
 In particular, note removeAbandoned and logAbandoned. These will impact 
 performance, so do it on a test system.
 
  Date: Tue, 12 Feb 2013 15:35:40 -0200 From:
  edsonrich...@hotmail.com To: users@tomcat.apache.org Subject: Re:
  Tomcat hanging unexpectedly [URGENT]
 
  There is a similar thread published a week ago. It can be caused
  by almost anything, and my last suspect would be Tomcat it self.
  Most of time, the cause is some programming error, like: -
  missing step out of recursive loop - loading too many objects is
  memory (for example, when using JPA where graph of objects are
  all connected - so, when you load one object, all database is
  read into memory) - some deadlock in multi-threaded
  application...
 
  How to discover:
 
  

Re: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Mark Eggers

As is usual - long reply at the end.

On 2/12/2013 11:48 AM, Cool Techi wrote:

Thanks Everyone for the help, I will enable thread dump for my Tomcat, just 
reading up on how to get that done. My database connection string is given 
below.

Resource name=jdbc/bm type=javax.sql.DataSource
maxActive=250   maxIdle=5  username=root testWhileIdle=true
removeAbandonedTimeout=60  maxWait=-1 removeAbandoned=true

 validationQuery=select 1 driverClassName=com.mysql.jdbc.Driver password=xxx 
minEvictableIdleTimeMillis=3 timeBetweenEvictionRunsMillis=30 
url=jdbc:mysql://localhost:3306/brandmanagement?autoReconnect=trueamp;useUnicode=trueamp;characterEncoding=utf-8/


 Resource name=jdbc/s360 type=javax.sql.DataSource
maxActive=250   maxIdle=5  username=root testWhileIdle=true
removeAbandonedTimeout=60  maxWait=-1 removeAbandoned=true

 validationQuery=select 1 driverClassName=com.mysql.jdbc.Driver password=xxx 
minEvictableIdleTimeMillis=3 timeBetweenEvictionRunsMillis=30 
url=jdbc:mysql://localhost:3306/brandmanagement?autoReconnect=trueamp;useUnicode=trueamp;characterEncoding=utf-8/

I use quartz schedular(spring based) to perform some tasks on reqular 
intervals, Log4j is used in those methods, so will cross check those methods 
again.

Really appreciate your time and help.

Regards,
Ayush


Date: Tue, 12 Feb 2013 11:36:52 -0800
From: its_toas...@yahoo.com
To: users@tomcat.apache.org
Subject: Re: Tomcat hanging unexpectedly [URGENT]

On 2/12/2013 10:38 AM, Pid wrote:

On 12/02/2013 17:53, Cool Techi wrote:




I am new to this, I have just installed YourKit and see a lot of
threads blocked,but currently my response are fine, the blocked
thread are showing the following

Blocker Thread QuartzSchedular_Worker-6 native ID ..

On clicking on the Blocker thread it shows me the following,


org.apache.log4j.Category.callAppenders
com.mysql.jdbc.SingleByteCharsetConverter.getInstance
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle


Does any of these sound like  reason. It would be great to get
pointed in the right direction.
Regards,Ayush



Oh dear.

Are you doing your app logging to a database?

Is it the same database that your app uses?

Is it the same connection pool that your app uses?


p




This sounds like a lot of things. However, without borrowing your
crystal ball, I can't tell anything about the Quartz scheduler.

A couple of things:

1. Upgrade your Java to at least the latest 1.6.0_xx version

The one you are using has known server (and client) security issues.

2. Upgrade your Tomcat to at least the latest 6.xx version

There are many improvements and bug fixes.

3. [URGENT]

I understand that this problem is urgent for you. However, the people
here contribute time on a volunteer basis (I'm taking a break from
writing documentation for a new system). We'll try to help as time
allows, but if you need an SLA then you should purchase commercial support.

4. Possible root cause

I'm guessing (based on your partial listing of classes in a thread dump)
is that you either have a logging problem, a database connectivity
problem, or a Quartz scheduler problem.

Or all of the above.

If there was one problem, then I (guessing) would look to see if you're
logging via a Quartz scheduler job through log4j to a MySQL database.

Now that I've got my guess out of the way, here are some pointers.

a. Thread dumps

You said you've taken them, but have only posted snippets. Post a
complete thread dump inline (mailing list strips attachments). For your
own use, take several 3-10 seconds apart to see what's changing.

b. Check your database

It sounds like you have a connection leak. When this happens, how many
active connections do you have to your MySQL database?

c. Connection leak

As noted above, you may have a connections leak. Post your Resource
definition (hopefully it's in context.xml) with passwords and usernames
changed.

While you're at it, read:

http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html#JDBC_Data_Sources

In particular, note removeAbandoned and logAbandoned. These will impact
performance, so do it on a test system.


Date: Tue, 12 Feb 2013 15:35:40 -0200 From:
edsonrich...@hotmail.com To: users@tomcat.apache.org Subject: Re:
Tomcat hanging unexpectedly [URGENT]

There is a similar thread published a week ago. It can be caused
by almost anything, and my last suspect would be Tomcat it self.
Most of time, the cause is some programming error, like: -
missing step out of recursive loop - loading too many objects is
memory (for example, when using JPA where graph of objects are
all connected - so, when you load one object, all database is
read into memory) - some deadlock in multi-threaded
application...

How to discover:

1) Try to get a memory dump and check how your memory is being
used
2) Get a 

Re: Need to Specify keystorePass on Command Line

2013-02-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jeffrey,

On 2/12/13 9:40 AM, Harris, Jeffrey E. wrote:
 Tomcat will host a web-app that will connect as a proxy to another 
 organization's system to retrieve data that we will use in our 
 applications.  It is the other organization that is mandating the
 no password requirement, and there is no other option than to use
 their data.  Our customer requires that the Tomcat server be up
 24/7 (with minor outages), hence the need to design a solution that
 satisfies the requirements of both our customer, and the other
 organization. Obviously, if we cannot create a way to automate the
 process, we may have to do something akin to what you do above.
 
 However, when I run Tomcat from the console, I am never prompted
 for the password.  Instead, Tomcat just fails to start the listener
 on the specified SSL port.

What you describe is simply not possible: the password must be
available in order to unlock the keystore. If you need unattended
restarts, you'll need to have the password stored somewhere.

If you had read the FAQ entry Chuck posted, you would know that you
can specify passwords in an obfuscated format -- that is, the actual
password does not appear in clear-text in server.xml.

If you need to specify it on the command-line, then someone needs to
be there to type-in the command. If you want it on the command-line,
but you are going to put the command-line into the registry (as part
of the service-start definition), then you have violated your own
requirements (mentioned earlier that you can't store anything in the
registry).

If the command-line strategy will really work for you (and I really
think it won't, unless you are doing remote-scripted-restarts of your
services, which I didn't actually know you could do on Windows), then
reading the FAQ will present an answer to you (hint: it's the last
option that talks about using a PropertySource). If you still can't
figure it out, then please hire a consultant to do it for you.

- -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/

iEYEAREIAAYFAlEax9cACgkQ9CaO5/Lv0PBwMgCfQXgupsz7Fmy/9WK4eTZB+9bM
O2AAn3/2R1xj7wWbdUheBFu9x3qgdcS9
=01vv
-END PGP SIGNATURE-

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



Re: Need to Specify keystorePass on Command Line - Update

2013-02-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 2/12/13 4:27 AM, Mark Thomas wrote:
 On 12/02/2013 00:53, Harris, Jeffrey E. wrote:
 Current status:
 
 I replaced keystorePass=password with 
 'keystorePass=${kspassword}' in server.xml, and executed the 
 command tomcat7 //TS//Tomcat7
 --JvmOptions=-Dkspassword=password and have been able to start
 the SSL listener as a console application.
 
 However, I have not been able to do the same thing with the
 service, using sc start Tomcat7
 --JvmOptions=-Dkspassword=password, or putting the parameter
 into the properties of the service entry in Windows Services
 Manager.
 
 I know Charles Caldarale said it could not be done with a
 service, but it is possible to pass parameters to a service, both
 using the Windows Services Manager, and via the sc command line
 utility.  I am just not sure what syntax Tomcat is expecting for
 parameters; I would think it would match the syntax of the tomcat
 command above, since that is basically what is being called, just
 with different parameters.
 
 http://commons.apache.org/daemon/procrun.html

Since OP is using sc, there may be a problem there that you can't
specify command-line parameters to a service.

Obviously, adding the parameter to Windows Services Manager defeats
the whole must be on the command line, can't be in the registry
requirement.

- -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/

iEYEAREIAAYFAlEayWEACgkQ9CaO5/Lv0PAgAgCfWQdahPsvAhLEbphOD6um/36v
KOAAnjcY70hqZ2hA9vqo0fO1N59RjnHX
=439/
-END PGP SIGNATURE-

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



Re: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Pid,

On 2/12/13 1:38 PM, Pid wrote:
 On 12/02/2013 17:53, Cool Techi wrote:
 
 I am new to this, I have just installed YourKit and see a lot of
 threads blocked,but currently my response are fine, the blocked
 thread are showing the following
 
 Blocker Thread QuartzSchedular_Worker-6 native ID ..

Tomcat does not use Quartz for anything, so this is looking like a
problem elsewhere. We still might be able to help.

 On clicking on the Blocker thread it shows me the following,
 
 
 org.apache.log4j.Category.callAppenderscom.mysql.jdbc.SingleByteCharsetConverter.getInstanceorg.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle

Yuck,
 
I don't know what to make of that line, but this looks suspicious:

org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()

and so does this one:

ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle

Did you manually type-in all of those?

 Does any of these sound like  reason. It would be great to get 
 pointed in the right direction.
 
 Oh dear.
 
 Are you doing your app logging to a database?
 
 Is it the same database that your app uses?
 
 Is it the same connection pool that your app uses?

Yup, that sounds like a recipe for deadlock if it is indeed happening.

Ayush, can you try reducing your connection pool's maxActive to 1 in a
dev/test environment and try running your application? If it deadlocks
(which it will if you try to log to the db while holding a db
connection in the same thread), then you have a lot of work to do.

- -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/

iEYEAREIAAYFAlEay5wACgkQ9CaO5/Lv0PAxiACaA08FSybmZXG9dk+pQXZHXziq
5IsAn1jtL3XpnVArB5vXn6AmkcwB2tKc
=0/94
-END PGP SIGNATURE-

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



[FWD: Help Debugging 404 errors]

2013-02-12 Thread siegfried

I posted this on the eclipse forum last Thu and since I have received no
response, I'm cross posting here.


I have created a project as guided by
www.objectdb.com/tutorial/jpa/eclipse/spring/run. When I abandon eclipse
and use the maven command line to deploy this Spring MVC web app to
jetty and point my browser to localhost:8080/Guestbook/ it works.

However, when I use Eclipse Juno (eclipse-jee-juno-SR1-win32-x86_64),
maven 3 and Tomcat 6 (there is a documented bug with tomcat 7 at the
objectdb.com site) to create a new maven project (with a dynamic web
facet) and add Tomcat 6 as a server, it asks me if I want to move my
guestbook app with the cute little jar icon from the left side to the
tomcat side. I say yes and it appears under the that server icon in the
server. But when I point the browser to localhost:8080/Guestbook after
starting the tomcat6 it gives me the 404 error: type Status
report/message /Guestbook/ description The requested resource is not
available. Apache Tomcat/6.0.36

Can someone help me debug this 404 error in tomcat 6? It works with
Jetty! Should it not work with tomcat 6 too? (I'd like to make it work
with tomcat 7 some other day).
Also: I'm running Windows 8.
Thanks
Siegfried

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



Re: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Ayush,

On 2/12/13 2:48 PM, Cool Techi wrote:
 Thanks Everyone for the help, I will enable thread dump for my 
 Tomcat, just reading up on how to get that done. My database 
 connection string is given below.

You don't need to enable a thread dump on your system: just actively
take one when your webapp locks-up.

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

- -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/

iEYEAREIAAYFAlEazKQACgkQ9CaO5/Lv0PCDcQCggBafYfas6Ti1uZfn5veAINrN
z+cAmwdkfP9pv0aWD2U9xx3BEgCa/ZBd
=wOpn
-END PGP SIGNATURE-

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



RE: Need to Specify keystorePass on Command Line - Update

2013-02-12 Thread Harris, Jeffrey E.


 -Original Message-
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Sent: Tuesday, February 12, 2013 6:00 PM
 To: Tomcat Users List
 Subject: Re: Need to Specify keystorePass on Command Line - Update

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Mark,

 On 2/12/13 4:27 AM, Mark Thomas wrote:
  On 12/02/2013 00:53, Harris, Jeffrey E. wrote:
  Current status:
 
  I replaced keystorePass=password with
  'keystorePass=${kspassword}' in server.xml, and executed the
  command tomcat7 //TS//Tomcat7 --JvmOptions=-Dkspassword=password
  and have been able to start the SSL listener as a console
  application.
 
  However, I have not been able to do the same thing with the service,
  using sc start Tomcat7 --JvmOptions=-Dkspassword=password, or
  putting the parameter into the properties of the service entry in
  Windows Services Manager.
 
  I know Charles Caldarale said it could not be done with a service,
  but it is possible to pass parameters to a service, both using the
  Windows Services Manager, and via the sc command line utility.  I am
  just not sure what syntax Tomcat is expecting for parameters; I
 would
  think it would match the syntax of the tomcat command above, since
  that is basically what is being called, just with different
  parameters.
 
  http://commons.apache.org/daemon/procrun.html

 Since OP is using sc, there may be a problem there that you can't
 specify command-line parameters to a service.

 Obviously, adding the parameter to Windows Services Manager defeats the
 whole must be on the command line, can't be in the registry
 requirement.


Christopher,

The sc start command does allow command line parameters, but I think the syntax 
of how the parameters are passed to the service executable is not compatible 
with what Tomcat is expecting.  On my test server, I even used the SC command 
to create a service to start Tomcat by directly executing java and the boot 
class file, and I could start SSL, but only by embedding the password within a 
JvmOptions parameter before the java command, not after it (which the java 
executable syntax requires.

The reason I am focusing on sc is that I CAN store the private key on a 
different system, and set up a scheduled task on that system to check the 
status of the Tomcat service on the target system, and restart the service 
remotely (such as after a reboot).  The sc command has a server parameter so it 
can work remotely between servers (with the appropriate permissions, of course).

I am also looking at Andre's idea of using Apache as a proxy for Tomcat (I 
presume using AJP13), and avoiding the need for SSL on Tomcat.  I talked to my 
developer about it, and he thinks that the Webapp can still communicate with 
the remote service if the Apache server does the PKI authentication with the 
remote system, and handles the SSL.

Finally, I asked my developer to look at your idea of a property source.

Jeffrey Harris

This e-mail and any attachments are intended only for the use of the 
addressee(s) named herein and may contain proprietary information. If you are 
not the intended recipient of this e-mail or believe that you received this 
email in error, please take immediate action to notify the sender of the 
apparent error by reply e-mail; permanently delete the e-mail and any 
attachments from your computer; and do not disseminate, distribute, use, or 
copy this message and any attachments.

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



RE: Need to Specify keystorePass on Command Line - Update

2013-02-12 Thread Jeffrey Janner
 -Original Message-
 From: Harris, Jeffrey E. [mailto:jeffrey.har...@mantech.com]
 Sent: Tuesday, February 12, 2013 5:35 PM
 To: Tomcat Users List
 Subject: RE: Need to Specify keystorePass on Command Line - Update
 
 
 
  -Original Message-
  From: Christopher Schultz [mailto:ch...@christopherschultz.net]
  Sent: Tuesday, February 12, 2013 6:00 PM
  To: Tomcat Users List
  Subject: Re: Need to Specify keystorePass on Command Line - Update
 
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA256
 
  Mark,
 
  On 2/12/13 4:27 AM, Mark Thomas wrote:
   On 12/02/2013 00:53, Harris, Jeffrey E. wrote:
   Current status:
  
   I replaced keystorePass=password with
   'keystorePass=${kspassword}' in server.xml, and executed the
   command tomcat7 //TS//Tomcat7 --JvmOptions=-
 Dkspassword=password
   and have been able to start the SSL listener as a console
   application.
  
   However, I have not been able to do the same thing with the
   service, using sc start Tomcat7
   --JvmOptions=-Dkspassword=password, or putting the parameter
   into the properties of the service entry in Windows Services
 Manager.
  
   I know Charles Caldarale said it could not be done with a service,
   but it is possible to pass parameters to a service, both using the
   Windows Services Manager, and via the sc command line utility.  I
   am just not sure what syntax Tomcat is expecting for parameters; I
  would
   think it would match the syntax of the tomcat command above, since
   that is basically what is being called, just with different
   parameters.
  
   http://commons.apache.org/daemon/procrun.html
 
  Since OP is using sc, there may be a problem there that you can't
  specify command-line parameters to a service.
 
  Obviously, adding the parameter to Windows Services Manager defeats
  the whole must be on the command line, can't be in the registry
  requirement.
 
 
 Christopher,
 
 The sc start command does allow command line parameters, but I think
 the syntax of how the parameters are passed to the service executable
 is not compatible with what Tomcat is expecting.  On my test server, I
 even used the SC command to create a service to start Tomcat by
 directly executing java and the boot class file, and I could start SSL,
 but only by embedding the password within a JvmOptions parameter before
 the java command, not after it (which the java executable syntax
 requires.
 
 The reason I am focusing on sc is that I CAN store the private key on a
 different system, and set up a scheduled task on that system to check
 the status of the Tomcat service on the target system, and restart the
 service remotely (such as after a reboot).  The sc command has a server
 parameter so it can work remotely between servers (with the appropriate
 permissions, of course).
 
 I am also looking at Andre's idea of using Apache as a proxy for Tomcat
 (I presume using AJP13), and avoiding the need for SSL on Tomcat.  I
 talked to my developer about it, and he thinks that the Webapp can
 still communicate with the remote service if the Apache server does the
 PKI authentication with the remote system, and handles the SSL.
 
 Finally, I asked my developer to look at your idea of a property
 source.
 
 Jeffrey Harris
 

If you had read the Procrun documentation that Mark was kind enough to point 
you to above, you might have figured out that you need to modify your 
--JvmOptions=... syntax.  You need to change it to ++JvmOptions=... 
otherwise, you are overwriting all the other options that that are stored in 
the registry that the Tomcat service needs to start up.  That includes things 
like the locations of catalina.base and catalina.home, and you're never gonna 
get the service to start without those.

And one other thing, in some security circles, configuring windows to allow the 
running of remote sc commands is a pretty big no-no. If not done properly, 
anyone can stop your services from anywhere.

Jeff


RE: Need to Specify keystorePass on Command Line - Update

2013-02-12 Thread Harris, Jeffrey E.


 

 If you had read the Procrun documentation that Mark was kind enough to
 point you to above, you might have figured out that you need to modify
 your --JvmOptions=... syntax.  You need to change it to
 ++JvmOptions=... otherwise, you are overwriting all the other options
 that that are stored in the registry that the Tomcat service needs to
 start up.  That includes things like the locations of catalina.base and
 catalina.home, and you're never gonna get the service to start without
 those.

 And one other thing, in some security circles, configuring windows to
 allow the running of remote sc commands is a pretty big no-no. If not
 done properly, anyone can stop your services from anywhere.

 Jeff

I did try ++JvmOptions, and it did not work either.

This e-mail and any attachments are intended only for the use of the 
addressee(s) named herein and may contain proprietary information. If you are 
not the intended recipient of this e-mail or believe that you received this 
email in error, please take immediate action to notify the sender of the 
apparent error by reply e-mail; permanently delete the e-mail and any 
attachments from your computer; and do not disseminate, distribute, use, or 
copy this message and any attachments.

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



[ANN] Apache Tomcat Native 1.1.27 released

2013-02-12 Thread Mladen Turk

The Apache Tomcat team announces the immediate availability of Apache
Tomcat Native 1.1.27 stable.

Please refer to the change log for the list of changes:
http://tomcat.apache.org/native-doc/miscellaneous/changelog.html

Downloads:
http://tomcat.apache.org/download-native.cgi

Thank you,
--
The Apache Tomcat Team

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




RE: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Cool Techi
Thanks Everyone for all the help, it turns out that multiple instance of the 
schedular was getting fired, since I had created multiple appbases for multiple 
domains pointing to the same code base. This was causing a deadlock.

I am still monitoring the application, a few things are not happening as 
expected as tomcat still hangs once in 12 hrs, but I know where to look. 


Regards,
Ayush

 Date: Tue, 12 Feb 2013 18:13:40 -0500
 From: ch...@christopherschultz.net
 To: users@tomcat.apache.org
 Subject: Re: Tomcat hanging unexpectedly [URGENT]
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256
 
 Ayush,
 
 On 2/12/13 2:48 PM, Cool Techi wrote:
  Thanks Everyone for the help, I will enable thread dump for my 
  Tomcat, just reading up on how to get that done. My database 
  connection string is given below.
 
 You don't need to enable a thread dump on your system: just actively
 take one when your webapp locks-up.
 
 http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F
 
 - -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/
 
 iEYEAREIAAYFAlEazKQACgkQ9CaO5/Lv0PCDcQCggBafYfas6Ti1uZfn5veAINrN
 z+cAmwdkfP9pv0aWD2U9xx3BEgCa/ZBd
 =wOpn
 -END PGP SIGNATURE-
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
  

Re: [FWD: Help Debugging 404 errors]

2013-02-12 Thread Konstantin Kolinko
2013/2/13  siegfr...@heintze.com:

 I posted this on the eclipse forum last Thu and since I have received no
 response, I'm cross posting here.


 I have created a project as guided by
 www.objectdb.com/tutorial/jpa/eclipse/spring/run. When I abandon eclipse
 and use the maven command line to deploy this Spring MVC web app to
 jetty and point my browser to localhost:8080/Guestbook/ it works.

 However, when I use Eclipse Juno (eclipse-jee-juno-SR1-win32-x86_64),
 maven 3 and Tomcat 6 (there is a documented bug with tomcat 7 at the
 objectdb.com site) to create a new maven project (with a dynamic web
 facet) and add Tomcat 6 as a server, it asks me if I want to move my
 guestbook app with the cute little jar icon from the left side to the
 tomcat side. I say yes and it appears under the that server icon in the
 server. But when I point the browser to localhost:8080/Guestbook after
 starting the tomcat6 it gives me the 404 error: type Status
 report/message /Guestbook/ description The requested resource is not
 available. Apache Tomcat/6.0.36

 Can someone help me debug this 404 error in tomcat 6? It works with
 Jetty! Should it not work with tomcat 6 too? (I'd like to make it work
 with tomcat 7 some other day).
 Also: I'm running Windows 8.

Error 404 means page not found.

Possible reasons:
1) The web application failed to start
2) The web application has a different name, not Guestbook
3) You do not have welcome page in your application.

If you look into Console view in your IDE, it may provide info about
1) and 2) above.

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