Re: Tomcat 5.5 crashes after changing server IP

2011-11-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sirwiz,

On 11/25/11 10:16 PM, sir...@8host.pl wrote:
 2011-11-26 00:42:34 org.apache.catalina.core.AprLifecycleListener
 init INFO: The APR based Apache Tomcat Native library which allows
 optimal performance in production environments was not found on
 the java.library.path: 
 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server:/usr/lib/jvm/java-1$

  2011-11-26 00:42:34
 org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING:
 [SetPropertiesRule]{Server/Service/Engine/Host} Setting property
 'debug' to '0' did not find a matching property. 2011-11-26
 00:42:34 org.apache.tomcat.util.digester.SetPropertiesRule begin 
 WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context}
 Setting property 'debug' to '0' did not find a matching property.

Looks like you are using an old server.xml with a new version of
Tomcat. Don't do that. Instead, start with the stock server.xml that
comes with Tomcat 6 (or 7? It's unclear which one you are using) and
add whatever settings you need (like Connectors and Hosts) that
you need.

After you are using an appropriate configuration, we'll take another
look at the log files.

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

iEYEARECAAYFAk7RA4UACgkQ9CaO5/Lv0PB7mQCbBc2+9ssTeUArtMCjzYPKYpP9
GJUAn1bWmCqrRl1NrUwMg16Lz+07N5Dg
=Y0HZ
-END PGP SIGNATURE-

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



Re: How to get the tomcat internal log out?

2011-11-26 Thread Pid
On 26/11/2011 05:31, MiB wrote:
 
 25 nov 2011 14.37 Christopher Schultz wrote:
 


 +1

 Any webapp that runs on 5.5 that doesn't run on Tomcat 7 represents
 either a regression in Tomcat or a webapp that has been tied-into
 Tomcat's internal classes (which it shouldn't have been).
 
 Running is not the issue here, is it? Internal logs are.

The point was made to address a previous answer, in which the OP stated
that their apps were 'designed to run on tc 5 or 6'.


 Not everyone can update to Tomcat 7 midproduction.

For sure.  That hasn't been raised as an issue yet though.


 However, there are modern web applications made with certain frameworks
 that will not run on 5.5 and must use 6 or later. If so there's no
 alternative to update tomcat. But what does this fact have to do with
 logging?

Nothing, as explained above.

AFAICT the OP hasn't really explained their need to get more detailed
logging data, or why they can't configure it using the
logging.properties file (as indicated in an earlier part of the thread).


p



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat 5.5 crashes after changing server IP

2011-11-26 Thread Pid
On 26/11/2011 15:19, Christopher Schultz wrote:
 Sirwiz,
 
 On 11/25/11 10:16 PM, sir...@8host.pl wrote:
 2011-11-26 00:42:34 org.apache.catalina.core.AprLifecycleListener
 init INFO: The APR based Apache Tomcat Native library which allows
 optimal performance in production environments was not found on
 the java.library.path: 
 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server:/usr/lib/jvm/java-1$
 
  2011-11-26 00:42:34
 org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING:
 [SetPropertiesRule]{Server/Service/Engine/Host} Setting property
 'debug' to '0' did not find a matching property. 2011-11-26
 00:42:34 org.apache.tomcat.util.digester.SetPropertiesRule begin 
 WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context}
 Setting property 'debug' to '0' did not find a matching property.
 
 Looks like you are using an old server.xml with a new version of
 Tomcat. Don't do that. Instead, start with the stock server.xml that
 comes with Tomcat 6 (or 7? It's unclear which one you are using) and
 add whatever settings you need (like Connectors and Hosts) that
 you need.
 
 After you are using an appropriate configuration, we'll take another
 look at the log files.

Also: defining Context in server.xml is now strongly discouraged.

Does your mod_proxy_ajp config actually forward any requests to Tomcat?
I didn't see any uncommented ProxyPass statements there.


p

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat 7 not working with javax.net.ssl.keyStorePassword property

2011-11-26 Thread Satish Mittal
On Sat, Nov 26, 2011 at 2:56 AM, Konstantin Kolinko
knst.koli...@gmail.comwrote:

 2011/11/24 Mark Thomas ma...@apache.org:
  On 22/11/2011 20:42, Satish Mittal wrote:
  Hi All,
 
  I have observed a regression between tomcat 5 and tomcat 7.
 
  That is https://issues.apache.org/bugzilla/show_bug.cgi?id=38774 that
  was fixed only in the 5.5.x branch.
 
  I'm not a huge fan of using system properties for configuration so I
  prefer the Tomcat 6+ approach that requires explicit configuration (even
  though some system properties are still used as fall back).
 
 
  In my tomcat webapp, before I spawn another tomcat webapp process, I
 pass
  on the keystore password by setting the system property
  javax.net.ssl.keyStorePassword to keystore password, instead of
 writing
  the keystore password in plain-text as an attribute in server.xml.
 

 You can always use
 keystorePass=${javax.net.ssl.keyStorePassword}

 That will work in all current Tomcat versions, including 5.5 as well.


That's a good idea... I tried that out and it worked for me with tomcat
7.0.22... Thanks Konstantin!

Best regards,
 Konstantin Kolinko

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




-- 
The happiest of people don´t necessarily have the best of everything, they
just make the most of everything that comes along their way.


xinetd port redirection for Tomcat

2011-11-26 Thread Pierre Goupil
Good evening,

I use xinetd in order to bind my Tomcat 7.0.22 instance to port 80 without
any Unix privileges, on a Debian 6.0 box. Here's the (slightly obfuscated)
configuration file:

service www
{
socket_type = stream
protocol= tcp
user= root
wait= no
bind= my IP
port= 80
redirect= localhost 8080
disable = no
flags   = REUSE
log_type= FILEmy.log
log_on_success  -= PID HOST DURATION EXIT

per_source  = UNLIMITED
instances   = UNLIMITED
}

It works generally great but there's one problem: in my logs, only the
localhost IP appears! I mean, in PsiProbe for instance, when I try and see
the IPs of my visitors, I can only find localhost. Which is bad, regarding
traffic statistics...

Does any one have a clue? Shall I use another way of binding Tomcat to port
80? Which one? This way looked good as it's really simple to set up, but if
I must use something else, I don't care. Please note, I'd prefer stick to
xinetd, though.

Regards,

Pierre


RE: xinetd port redirection for Tomcat

2011-11-26 Thread Caldarale, Charles R
 From: Pierre Goupil [mailto:goupilpie...@gmail.com] 
 Subject: xinetd port redirection for Tomcat

 Shall I use another way of binding Tomcat to port 80?

Try iptables - it's even simpler.  Something like the following should work:

/sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

Set your Tomcat Connector port to 8080; external requests coming into port 80 
will be automatically redirected to 8080.  Make sure your Linux firewall has 
8080 open.

 - Chuck


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



Re: xinetd port redirection for Tomcat

2011-11-26 Thread Pierre Goupil
Thanks Chuck! I'll try it tomorrow.



On Sat, Nov 26, 2011 at 9:40 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Pierre Goupil [mailto:goupilpie...@gmail.com]
  Subject: xinetd port redirection for Tomcat

  Shall I use another way of binding Tomcat to port 80?

 Try iptables - it's even simpler.  Something like the following should
 work:

 /sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT
 --to-port 8080

 Set your Tomcat Connector port to 8080; external requests coming into
 port 80 will be automatically redirected to 8080.  Make sure your Linux
 firewall has 8080 open.

  - Chuck


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




-- 
Si tu penses que la violence ne résout rien, c'est que tu n'as pas tapé
assez fort.


Re: xinetd port redirection for Tomcat

2011-11-26 Thread Pierre Goupil
Chuck,

I managed to give it a try and it works perfectly. Thanks!

Pierre



On Sat, Nov 26, 2011 at 9:55 PM, Pierre Goupil goupilpie...@gmail.comwrote:

 Thanks Chuck! I'll try it tomorrow.




 On Sat, Nov 26, 2011 at 9:40 PM, Caldarale, Charles R 
 chuck.caldar...@unisys.com wrote:

  From: Pierre Goupil [mailto:goupilpie...@gmail.com]
  Subject: xinetd port redirection for Tomcat

  Shall I use another way of binding Tomcat to port 80?

 Try iptables - it's even simpler.  Something like the following should
 work:

 /sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT
 --to-port 8080

 Set your Tomcat Connector port to 8080; external requests coming into
 port 80 will be automatically redirected to 8080.  Make sure your Linux
 firewall has 8080 open.

  - Chuck


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




 --
 Si tu penses que la violence ne résout rien, c'est que tu n'as pas tapé
 assez fort.




-- 
Si tu penses que la violence ne résout rien, c'est que tu n'as pas tapé
assez fort.


Re: Minimal persistent storage for a webapp

2011-11-26 Thread Konstantin Kolinko
2011/11/26 Benson Margulies bimargul...@gmail.com:
 On Fri, Nov 25, 2011 at 4:36 PM, Konstantin Kolinko
 knst.koli...@gmail.com wrote:
 2011/11/26 Benson Margulies bimargul...@gmail.com:

 In a web application, I'd like to store a bit of data without
 configuring a database, or, indeed anything that has to be edited into
 an XML file or typed into a container-level gui.

 Define store. What is proposed lifetime of that information?

 Forever. Sorry about the snide vendor remark. I have to think about
 whether redeployment is good enough. Is that ServletContext.TEMPDIR
 guaranteed to stick around across container reboots as long as the app
 isn't specifically redeployed?


If autodeployment is enabled just touching the war etc. (and since
7.0.23 just touching conf/context.xml) while Tomcat is running will
cause redeployment of a web application. The content of the
ServletContext.TEMPDIR directory will be cleared at that time. It
might be not what you want.

Best regards,
Konstantin Kolinko

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