Tomcat + APR non-root on linux: Socket bind failed: [98] Address already in use

2009-10-15 Thread Ken Johanson

Hi everyone,

Trying to run Tomcat Tomcat/6.0.18 + apr-1.3.8.tar.gz, I get a:

Oct 15, 2009 12:11:20 AM org.apache.coyote.http11.Http11AprProtocol start
SEVERE: Error starting endpoint
java.lang.Exception: Socket bind failed: [98] Address already in use
at 
org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:612)

..
(no listener is actually running on 98; this is just generic Sun msg 
when not allowed to bind to prv'd port)


I am also running Tomcat as a non-root user, e.g:
daemon --user www $CATALINA_HOME/bin/startup.sh
and also tried jsvc...

same problem.

Is there a configuration to change the port that APR uses from 98 to a 
non-privileged (1024) one?


TIA,
Ken

PS - Connector.xml excerpts:
Connector
   protocol=org.apache.coyote.http11.Http11AprProtocol
   port=8443
   enableLookups=false
   SSLEnabled=true
   scheme=https
   secure=true
   SSLCertificateFile=${catalina.base}/conf/cert.crt
   SSLCertificateKeyFile=${catalina.base}/conf/cert.key
   disableUploadTimeout=true
/
Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on /




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



Re: Tomcat + APR non-root on linux: Socket bind failed: [98] Address already in use

2009-10-15 Thread Jan Pernica
You cannot use port  1024 as non-root. Use apache and AJP to connect 
tomcat running on eg. 8080. Regards


Jan

On 15.10.2009 8:18, Ken Johanson wrote:

Hi everyone,

Trying to run Tomcat Tomcat/6.0.18 + apr-1.3.8.tar.gz, I get a:

Oct 15, 2009 12:11:20 AM org.apache.coyote.http11.Http11AprProtocol start
SEVERE: Error starting endpoint
java.lang.Exception: Socket bind failed: [98] Address already in use
at 
org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:612)

..
(no listener is actually running on 98; this is just generic Sun msg 
when not allowed to bind to prv'd port)


I am also running Tomcat as a non-root user, e.g:
daemon --user www $CATALINA_HOME/bin/startup.sh
and also tried jsvc...

same problem.

Is there a configuration to change the port that APR uses from 98 to a 
non-privileged (1024) one?


TIA,
Ken

PS - Connector.xml excerpts:
Connector
   protocol=org.apache.coyote.http11.Http11AprProtocol
   port=8443
   enableLookups=false
   SSLEnabled=true
   scheme=https
   secure=true
   SSLCertificateFile=${catalina.base}/conf/cert.crt
   SSLCertificateKeyFile=${catalina.base}/conf/cert.key
   disableUploadTimeout=true
/
Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on /




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





--
Děkuji a s pozdravem

Jan Pernica
===
Pernica IT Solutions
Masarykovo náměstí 8
664 51 Šlapanice
Czech Republic
tel,fax: +420 544 245 068
mobile: +420 777 634 665
mailto:jan.pern...@pernica.org
http://www.pernica.org




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



Re: Tomcat + APR non-root on linux: Socket bind failed: [98] Address already in use

2009-10-15 Thread Ken Johanson

Jan Pernica wrote:
You cannot use port  1024 as non-root. Use apache and AJP to connect 
tomcat running on eg. 8080. Regards


Jan

On 15.10.2009 8:18, Ken Johanson wrote:

Hi everyone,

Trying to run Tomcat Tomcat/6.0.18 + apr-1.3.8.tar.gz, I get a:

Oct 15, 2009 12:11:20 AM org.apache.coyote.http11.Http11AprProtocol start
SEVERE: Error starting endpoint
java.lang.Exception: Socket bind failed: [98] Address already in use
at 
org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:612)

..
(no listener is actually running on 98; this is just generic Sun msg 
when not allowed to bind to prv'd port)


I am also running Tomcat as a non-root user, e.g:
daemon --user www $CATALINA_HOME/bin/startup.sh
and also tried jsvc...

same problem.

Is there a configuration to change the port that APR uses from 98 to a 
non-privileged (1024) one?


TIA,
Ken

PS - Connector.xml excerpts:
Connector
   protocol=org.apache.coyote.http11.Http11AprProtocol
   port=8443
   enableLookups=false
   SSLEnabled=true
   scheme=https
   secure=true
   SSLCertificateFile=${catalina.base}/conf/cert.crt
   SSLCertificateKeyFile=${catalina.base}/conf/cert.key
   disableUploadTimeout=true
/
Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on /





Thank you Jan. Actually I tried to show that I already knew that 1024 
wont bind, if you noticed. That is the crux of the problem. I need a way 
to config APR to *not* use the tcp/98 default. And the whole point of 
using APR is to *not* use httpd and ajp...


Thanks again,
Ken



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



Re: Tomcat is not getting shutdown

2009-10-15 Thread Mark Thomas
Suneel Saguturu wrote:
 Hi Mark,
 
   Thanks for replying, I don't know how to take the thread dump 
 how to look for non-daemon threads?

Google is your friend.

Mark


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



Re: Tomcat 5.5.26 hangs

2009-10-15 Thread Tsirkin Evgeny
On Wed, Oct 14, 2009 at 6:15 PM, Mark Thomas ma...@apache.org wrote:


 Have you tried
 JkOptions +DisableReuse


And if that solves the problem setup connection timeout .
http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html
Evgeny


Re: Tomcat + APR non-root on linux: Socket bind failed: [98] Address already in use

2009-10-15 Thread Peter Crowther
2009/10/15 Ken Johanson tomcat-u...@kensystem.com

 SEVERE: Error starting endpoint
 java.lang.Exception: Socket bind failed: [98] Address already in use
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:612)
 ..
 (no listener is actually running on 98; this is just generic Sun msg when
 not allowed to bind to prv'd port)


98 is the errno (EADDRINUSE), not the port.  The error message doesn't list
which port failed.


 Is there a configuration to change the port that APR uses from 98 to a
 non-privileged (1024) one?


APR doesn't use any ports other than the ones you configure in your
connectors.  Something is holding onto one of the ports you want.  Check
what ports Tomcat wants, and check there isn't another process running on
the box that is using one of them - it might even be an old Tomcat.  Don't
forget to check the shutdown port (8005 by default), although from the stack
trace it looks like the problem port is a connector, not the shutdown port.


 PS - Connector.xml excerpts:
Connector
   protocol=org.apache.coyote.http11.Http11AprProtocol
   port=8443
   enableLookups=false
   SSLEnabled=true
   scheme=https
   secure=true
   SSLCertificateFile=${catalina.base}/conf/cert.crt
   SSLCertificateKeyFile=${catalina.base}/conf/cert.key
   disableUploadTimeout=true
/
Listener className=org.apache.catalina.core.AprLifecycleListener
 SSLEngine=on /


Any other connectors defined?

- Peter


Re: How to install Tomcat 5.5.28 32-bit version on Windows 64-bit version?

2009-10-15 Thread Vadim Volkov
Hi Christopher. Thanks for replying.

On Wed, Oct 14, 2009 at 10:04 PM, Christopher Schultz
ch...@christopherschultz.net wrote:
 Are you using 32-bit JVM? If so, then you must use the 32-bit service
 loader.

I'm using 32-bit JVM (JDK 1.5.0_21) on 64-bit Windows.

Form Tomcat 5.5.28 changelog: Add the 64-bit windows service binaries
to the distribution and get the Windows installer to automatically
select the correct one for the current platform. (markt/kkolinko), so
I cannot find different service installer for 32-bit - there is only
one Windows installer
(http://tomcat.apache.org/download-55.cgi#5.5.28)

When I install Tomcat 5.5.28 on 64-bit Windows + 32-bit JVM I get
64-bit service version of Tomcat. There is a note that if I have a
64-bit operation system, I must specify 64-bit JRE during Tomcat
installation, but I strongly needs in 32-bit JRE and 32-bit Tomcat
service on 64-bit Windows.

Is it feasible to install 32-bit version of Tomcat on 64-bit Windows +
32-bit JVM?

Thanks.

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



Re: Problem in configuring tomcat for PKCS 11 for HSM

2009-10-15 Thread Israr Ahmed

Hi,

I've successfully configured apache-tomcat-6.0.18 with JRE 1.6.0_13 for
PKCS11 with keystore on smart card token but failed to use keystore on HSM
which is in my case Eracom PSO:PL50

I've statically add a provider in java.security file 

security.provider.10=sun.security.pkcs11.SunPKCS11
${java.home}/lib/security/pkcs11.cfg

pkcs11.cfg contains the following entries:

name = tokenName e.g. Token1
library = mypkcs11.dll
slot = 0

and my connector settings are:

Connector port=4445 
   minSpareThreads=25 
   maxThreads=150 
   maxSpareThreads=75
   maxHttpHeaderSize=8192
   enableLookups=false 
   disableUploadTimeout=true
   acceptCount=100 
   connectionTimeout=6
   SSLEnabled=true   
   scheme=https 
   secure=true
   clientAuth=true 
   sslProtocol=TLS
   keystoreType=PKCS11
   keystorePass=password  
   ciphers=SSL_RSA_WITH_RC4_128_SHA/

These settings work fine with PKCS11 smart card token but when i try to use
these settings for network HSM which is Eracom PSO:PL50, i'm unable to
communicate with network HSM, I applied the changes against library and name
properties in pkcs11.cfg for HSM.

I've also configured my connector like:

Connector port=443 protocol=HTTP/1.1 SSLEnabled=true
   maxThreads=150 scheme=https secure=true
   clientAuth=false sslProtocol=TLS
protocols=TLSv1 
   algorithm=SunX509  
   keystore=NONE keystoreType=PKCS11
keystoreProvider=SunPKCS11-HSMName keystorePass=X
/

but still no progress.

I'm unable to find out the solution. I'll be thankful to you if you figure
out me the problematic area or suggest any solution to resolve this problem.

Thanks in advance.

Regards,

Israr Ahmed



Tk, Pramod (NSN - IN/Bangalore) wrote:
 
 Hello,
 
 I have configured apache-tomcat-6.0.20 for PKCS11 to use the keystore
 present on HSM(Hardware security Module) which is SCA6000 in my case. 
 
 My Connector looks like this 
 
 Connector port=443 protocol=HTTP/1.1 SSLEnabled=true
maxThreads=150 scheme=https secure=true
  clientAuth=false sslProtocol=TLS
 protocols=TLSv1 
  algorithm=SunX509  
  keystore=NONE keystoreType=PKCS11
 keystoreProvider=SunPKCS11-SCA6000 keystorePass=X
 /
 
 This works fine by taking the a random certificate from the keystore.
 
 But,
 
 If I specify the keyAlias = SpecificCerificate , in the Connector I am
 getting the folling Exception
 
 java.security.KeyManagementException: FIPS mode: only SunJSSE
 KeyManagers may be used
   at
 com.sun.net.ssl.internal.ssl.SSLContextImpl.chooseKeyManager(Unknown
 Source)
   at
 com.sun.net.ssl.internal.ssl.SSLContextImpl.engineInit(Unknown Source)
   at javax.net.ssl.SSLContext.init(Unknown Source)
   at
 org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory
 .java:416)
   at
 org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocke
 tFactory.java:131)
   at
 org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:503)
   at
 org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
   at
 org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
   at
 org.apache.catalina.core.StandardService.initialize(StandardService.java
 :677)
   at
 org.apache.catalina.core.StandardServer.initialize(StandardServer.java:7
 95)
   at org.apache.catalina.startup.Catalina.load(Catalina.java:535)
   at org.apache.catalina.startup.Catalina.load(Catalina.java:555)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
 Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at
 org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
   at
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
 
 --
 Aug 11, 2009 11:33:12 PM org.apache.coyote.http11.Http11Protocol init
 SEVERE: Error initializing endpoint
 java.io.IOException: FIPS mode: only SunJSSE KeyManagers may be used
   at
 org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory
 .java:462)
   at
 org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocke
 tFactory.java:131)
   at
 org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:503)
   at
 org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
   at
 org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
   at
 

RE: How to install Tomcat 5.5.28 32-bit version on Windows 64-bit version?

2009-10-15 Thread Caldarale, Charles R
 From: Vadim Volkov [mailto:chain@gmail.com]
 Subject: Re: How to install Tomcat 5.5.28 32-bit version on Windows 64-
 bit version?
 
 I strongly needs in 32-bit JRE and 32-bit Tomcat
 service on 64-bit Windows.

Could you please tell us why?  I can't imagine any reason one would want a 
32-bit JVM these days, except for JNI compatibility, which is not an issue with 
Tomcat.  Note that you can have both 32- and 64-bit JVMs installed at the same 
time.

 Is it feasible to install 32-bit version of Tomcat on 64-bit Windows +
 32-bit JVM?

Tomcat itself is pure Java, so it's only the service wrapper that has to be the 
same mode as the JVM being used.  You can get the 32-bit version here:
http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/res/procrun/

 - Chuck


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


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



RE: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable in server.xml

2009-10-15 Thread Imad Hachem
Dear Caldarale,

 

I have installed the latest Tomcat version Tomcat-6.0.20 and I am
still getting the same Error.

 

Is there anything to do on the IBM AIX level or at the level of Tomcat
Settings or Startup scripts?

 

Thanks for your help.

 

 

Error faced:

 

SEVERE: Unable to start cluster.

org.apache.catalina.tribes.ChannelException: java.net.SocketException:
The socket name is not available on this system.; No faulty members
identified.

at
org.apache.catalina.tribes.group.ChannelCoordinator.internalStart(Channe
lCoordinator.java:169)

at
org.apache.catalina.tribes.group.ChannelCoordinator.start(ChannelCoordin
ator.java:97)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInt
erceptorBase.java:149)

at
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor
.start(MessageDispatchInterceptor.java:147)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInt
erceptorBase.java:149)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInt
erceptorBase.java:149)

at
org.apache.catalina.tribes.group.GroupChannel.start(GroupChannel.java:40
7)

at
org.apache.catalina.ha.tcp.SimpleTcpCluster.start(SimpleTcpCluster.java:
671)

at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1035)

at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

at
org.apache.catalina.core.StandardService.start(StandardService.java:516)

at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at
org.apache.catalina.startup.Catalina.start(Catalina.java:583)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:79)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:43)

at java.lang.reflect.Method.invoke(Method.java:618)

at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Caused by: java.net.SocketException: The socket name is not available on
this system.

at java.net.PlainDatagramSocketImpl.join(Native Method)

at
java.net.PlainDatagramSocketImpl.join(PlainDatagramSocketImpl.java:280)

at
java.net.MulticastSocket.joinGroup(MulticastSocket.java:299)

at
org.apache.catalina.tribes.membership.McastServiceImpl.start(McastServic
eImpl.java:233)

at
org.apache.catalina.tribes.membership.McastService.start(McastService.ja
va:373)

at org.apache




Imad Hachem | Asst.Product Development Manager
e-Banking Department
Path Solutions
Tel: +961 1 697444 ext. 222
Fax: +961 1 696744
www.path-solutions.com



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]
 
 
 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, October 14, 2009 7:54 PM
To: Tomcat Users List
Subject: RE: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable
in server.xml 

 From: Imad Hachem [mailto:ihac...@lb.path-solutions.com]
 Subject: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable in
 server.xml
 
 I am getting the below error during Tomcat-5.5.12 Startup on IBM AIX
 5.3 after enabling the Cluster configuration in server.xml :

You might want to try with a version of Tomcat that's a bit newer than
your four-year-old one.

Is multicasting enabled on your platform?  (I have no idea how that's
done on AIX.)

 - Chuck


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


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


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



Re: Tomcat 5.5.26 hangs

2009-10-15 Thread conrad-tomcat . users . 2009
Hi,

Am Mittwoch, 14. Oktober 2009 schrieb Christopher Schultz:

 Although those threads say runnable, they're really blocked at the OS
 level waiting to receive data from the mod_jk connector. These threads
 are actually idle, waiting for requests from httpd to come through the
 pipe.

 You can probably confirm this by checking with 'top' to see that Tomcat
 isn't using any CPU time, because it's just waiting.

exactly. That's what I meant with waiting for input from the Apache servers.
Thanks for confirming this.

 Is it feasible to remove httpd from the equation? Tomcat 5.5 can easily
 compete with httpd for static file delivery if that's all your using it
 for.

Not really. We're relying on mod_jk for load-balancing with sticky
sessions, and for SSL termination. Getting rid of the Apaches would be
a major PITA.

 If you could post your httpd configuration for your worker/prefork stuff
 AND your mod_jk configuration, it might be helpful.

===workers.properties===
worker.list=lb,jkstatus

worker.jkstatus.type=status

worker.lb.type=lb

worker.lb.balance_workers=xx01E1, xx02E1, [...]

worker.xx01E1.port=31011
worker.xx01E1.host=appsrv01
worker.xx01E1.type=ajp13
worker.xx01E1.lbfactor=5
worker.xx01E1.activation=A
worker.xx01E1.domain=d01
worker.xx01E1.connect_timeout=15000
worker.xx01E1.prepost_timeout=15000

[...more workers with identical config except host and domain...]
===/workers.properties===

===httpd.conf===
IfModule mod_jk.c
        JkWorkersFile /...path.../conf/workers.properties
        JkShmFile /...path.../logs/apache_2_2/jk-shm.file
        JkLogFile /...path.../logs/apache_2_2/jk.log
        JkLogLevel info
#       JkLogLevel Fatal
#       JkLogLevel info
#       JkLogLevel trace
#       JkLogLevel debug
/IfModule

# Manager config:
 Location /jkmanager/
                JkMount jkstatus
                Order deny,allow
                Deny from all
                Allow from 10.207.69 10.64 192.168.7
        /Location

# Virtual Host config:
 JkMount /app/* lb
 JkMount jkstatus
===/httpd.conf===

Thanks,
Peter
-- 
Peter Conrad
Tivano Software GmbH
Bahnhofstr. 18
63263 Neu-Isenburg
Tel: 06102 / 8099070
Fax: 06102 / 8099071
HRB 11680, AG Offenbach/Main
Geschäftsführer: Martin Apel


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



Tomcat restart not killing session

2009-10-15 Thread sharda k
I was under the impression that restarting webserver would kill all user
sessions. But with my tomcat install, restarting Tomcat does not kill user
sessions. I am still able to continue with the initially started sessions.
Is this a typical tomcat behaviour or a bug?

I have Tomcat 5.5 running on Windows Vista.

Can anyone please help?

Thanks,
Sharda


Shared email resource

2009-10-15 Thread Ken T.
I'm having some difficulty setting up a shared email resource under 
Tomcat and I can't seem to find the answer anywhere online.  Everything 
seems to be working under Tomcat, but for some reason my application 
can't find the JNDI name..  

In server.xml I have:


Snip--
  GlobalNamingResources
!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users
--
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 /


Resource name=mail/Session
  type=javax.mail.Session
  auth=Container
  mail.smtp.host=myserver.com
  mail.smtp.auth=true
  username=myuser
  password=mypassword
  mail.user=myuser
  mail.password=mypassword
  mail.port=25
  mail.transport.protocol=smtp
  mail.debug=true/

  /GlobalNamingResources
--Snip--

In /etc/tomcat6/web.xml, I have:

-Snip---
ResourceLink
namemail/Session/name
globalmail/Session/global
typejavax.mail.Session/type
/ResourceLink
-Snip---


All I want is for any application to be able to use the JNDI mechanism to 
lookup the mail session and use it.  The error I'm getting when an 
application actually tries to use the mail session is as follows:

-Snip-- 
Oct 15, 2009 9:58:21 AM org.apache.catalina.core.StandardContext 
listenerStart
SEVERE: Exception sending context initialized event to listener instance 
of class org.codehaus.groovy.grails.web.context.GrailsContextLoade
rListener
org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'mailSession': Invocation of init method failed; nes
ted exception is javax.naming.NameNotFoundException: Name mail is not 
bound in this Context
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardContext.listenerStart
(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start
(StandardContext.java:4338)
at org.apache.catalina.core.ContainerBase.addChildInternal
(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild
(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild
(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployWAR
(HostConfig.java:830)
at org.apache.catalina.startup.HostConfig.deployWARs
(HostConfig.java:719)
at org.apache.catalina.startup.HostConfig.deployApps
(HostConfig.java:490)
at org.apache.catalina.startup.HostConfig.start
(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent
(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start
(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start
(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start
(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start
(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start
(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start
(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.commons.daemon.support.DaemonLoader.start
(DaemonLoader.java:177)
Caused by: javax.naming.NameNotFoundException: Name mail is not bound in 
this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup
(SelectorContext.java:137)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
Snip-

When I look at the resources that Tomcat recognizes through the manager 
app, I see the following:

OK - Listed global resources of all types
mail/Session:javax.mail.Session
UserDatabase:org.apache.catalina.users.MemoryUserDatabase



So it looks like its there.  How do I expose this to my application?  I'm 
sure I'm missing something obvious, but I can't seem to figure it out.  

Thank you!

-- 
Ken T. ktectr...@gmail.com


-
To unsubscribe, e-mail: 

Re: Tomcat restart not killing session

2009-10-15 Thread conrad-tomcat . users . 2009
Hi,

On Thu, Oct 15, 2009 at 08:53:03AM -0500, sharda k wrote:
 I was under the impression that restarting webserver would kill all user
 sessions. But with my tomcat install, restarting Tomcat does not kill user
 sessions. I am still able to continue with the initially started sessions.
 Is this a typical tomcat behaviour or a bug?
 
 I have Tomcat 5.5 running on Windows Vista.

it's a feature. :-)
See http://tomcat.apache.org/tomcat-5.5-doc/config/manager.html#Restart 
Persistence

Bye,
Peter
-- 
Peter Conrad
Tivano Software GmbH
Bahnhofstr. 18
63263 Neu-Isenburg
Tel: 06102 / 8099070
Fax: 06102 / 8099071
HRB 11680, AG Offenbach/Main
Geschäftsführer: Martin Apel

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



Re: Shared email resource

2009-10-15 Thread Mikolaj Rydzewski

Ken T. wrote:
I'm having some difficulty setting up a shared email resource under 
Tomcat and I can't seem to find the answer anywhere online.  Everything 
seems to be working under Tomcat, but for some reason my application 
can't find the JNDI name..  
  


You have to include mapping in Context as well:

META-INF/context.xml:

Context
ResourceLink 
	global=mail/Session 
	name=mail/Session 
	type=javax.mail.Session

/


--
Mikolaj Rydzewski m...@ceti.pl


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



Re: Tomcat restart not killing session

2009-10-15 Thread sharda k
Thats a cool feature... thanks Peter!!!

Sharda


On Thu, Oct 15, 2009 at 9:11 AM, conrad-tomcat.users.2...@tivano.de wrote:

 Hi,

 On Thu, Oct 15, 2009 at 08:53:03AM -0500, sharda k wrote:
  I was under the impression that restarting webserver would kill all user
  sessions. But with my tomcat install, restarting Tomcat does not kill
 user
  sessions. I am still able to continue with the initially started
 sessions.
  Is this a typical tomcat behaviour or a bug?
 
  I have Tomcat 5.5 running on Windows Vista.

 it's a feature. :-)
 See 
 http://tomcat.apache.org/tomcat-5.5-doc/config/manager.html#RestartPersistence

 Bye,
Peter
 --
 Peter Conrad
 Tivano Software GmbH
 Bahnhofstr. 18
 63263 Neu-Isenburg
 Tel: 06102 / 8099070
 Fax: 06102 / 8099071
 HRB 11680, AG Offenbach/Main
 Geschäftsführer: Martin Apel

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




RE: Shared email resource

2009-10-15 Thread Caldarale, Charles R
 From: news [mailto:n...@ger.gmane.org] On Behalf Of Ken T.
 Subject: Shared email resource
 
 In /etc/tomcat6/web.xml, I have:

Shouldn't that be /etc/tomcat6/conf/web.xml?  Are you running a real Tomcat, or 
a 3rd-party repackaged one?  If the latter, it's difficult to tell where the 
proper spot is for configuration statements.

 - Chuck


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



Re: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable in server.xml

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

Imad,

On 10/15/2009 9:43 AM, Imad Hachem wrote:
 I have installed the latest Tomcat version Tomcat-6.0.20 and I am
 still getting the same Error.
 
 Is there anything to do on the IBM AIX level or at the level of Tomcat
 Settings or Startup scripts?

Did you try Chuck's second suggestion of looking for multicasting
support in your OS's TCP/IP stack?

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

iEYEARECAAYFAkrXMOIACgkQ9CaO5/Lv0PDwvgCgkng5QUmy9rtOpY76LjmXi5nr
LAEAnRu+pdRXna7vimdIa1m6ZNzwkGUn
=gTyL
-END PGP SIGNATURE-

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



Re: Tomcat 5.5.26 hangs

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

Conrad,

On 10/15/2009 9:44 AM, conrad-tomcat.users.2...@tivano.de wrote:
 If you could post your httpd configuration for your worker/prefork stuff
 AND your mod_jk configuration, it might be helpful.
 
 ===workers.properties===

All that looks okay to me, though as Mark and Tsirkin suggest, you might
want to try using JkOptions +DisablResuse and if that works, set up a
connection timeout (which forces mod_jk connections to be destroyed
after a certain amount of time, just to clean things up).

 [...more workers with identical config except host and domain...]

Check out the template capabilities of later mod_jks. You might save
yourself a lot of typing if something changes in your worker configuration.

  Location /jkmanager/
 JkMount jkstatus
 Order deny,allow
 Deny from all
 Allow from 10.207.69 10.64 192.168.7
 /Location

What does the jkstatus thing say when one of your app servers stops
responding? Anything in the mod_jk log file?

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

iEYEARECAAYFAkrXMboACgkQ9CaO5/Lv0PCbTACgj0fYf7l/sRjknzNcoAhq1EpI
NJkAn1KbbJ2IPbcARNyo1NNLf9XjVYcM
=pGnX
-END PGP SIGNATURE-

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



Re: Shared email resource

2009-10-15 Thread Curtis Garman
I've only every declared in in META-INF/context.xml ...but I've also
experienced another problem before that you may be having and that is
truncating the resource name...it will take your valid name and chop
off part of it (seems to truncate at / ) and then complain that it
couldn't find the resource. The reason you may be having this issue is
I noticed in your log error it says

javax.naming.NameNotFoundException: Name mail is not bound in this Context

Based on my experience using it I would expected to see ResourceLink

javax.naming.NameNotFoundException: Name mail/Session is not bound in
this Context

If you are still having the problem after moving your to the
context.xml file, you may want to try a name without slashes to see.
We are running tomcat 5.5.25 and this version seems to recognize names
with slashes but we upgraded from a version (don't know the number)
that I never could get resource links with slashes in them to work.

Curtis

On Thu, Oct 15, 2009 at 9:19 AM, Mikolaj Rydzewski m...@ceti.pl wrote:
 Ken T. wrote:

 I'm having some difficulty setting up a shared email resource under Tomcat
 and I can't seem to find the answer anywhere online.  Everything seems to be
 working under Tomcat, but for some reason my application can't find the JNDI
 name..

 You have to include mapping in Context as well:

 META-INF/context.xml:

 Context
 ResourceLink        global=mail/Session        name=mail/Session
  type=javax.mail.Session
 /


 --
 Mikolaj Rydzewski m...@ceti.pl


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





-- 
Curtis Garman
Web Programmer
Heartland Community College

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



Re: Tomcat + APR non-root on linux: Socket bind failed: [98] Address already in use

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

Jan,

On 10/15/2009 2:42 AM, Jan Pernica wrote:
 You cannot use port  1024 as non-root. Use apache and AJP to connect
 tomcat running on eg. 8080.

The previous statement is *totally incorrect*. There are multiple ways
to run on privileged ports without running as root:

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

Somehow, jsvc is not mentioned in this article for some reason.

 On 15.10.2009 8:18, Ken Johanson wrote:
 (no listener is actually running on 98; this is just generic Sun msg
 when not allowed to bind to prv'd port)

[snip]

 PS - Connector.xml excerpts:
 Connector
protocol=org.apache.coyote.http11.Http11AprProtocol
port=8443

That's port 8443, not port 98. Where's your real Connector defined?

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

iEYEARECAAYFAkrXNBoACgkQ9CaO5/Lv0PAwWgCffPa3Z8fIr+eFcmfL9L2XJAAA
MBsAoIlCBV0NGbOvU+vebA8D0abY94nH
=hT6o
-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 replace apache's mod_alias

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

Dennis,

On 10/13/2009 11:30 AM, Dennis Christopher wrote:
 Is there any documentation
 on how to replace the alias elements in httpd.conf with corresponding
 elements in Tomcat's configuration?

Not directly. But if you describe what you want to do, maybe we can help.

I recommend looking at http://tuckey.org/urlrewrite/ which is likely to
be the tool that provides a solution for you.

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

iEYEARECAAYFAkrXNLsACgkQ9CaO5/Lv0PAaZQCbBt9PQEJS/NAK9gz7y//XSp57
MNYAoL9/iIyVb1KHqRV66SACmEui7siY
=R0vG
-END PGP SIGNATURE-

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



RE: Windows 2008 Server (x64) IIS7 to Tomcat 6.0 32-bit with Java 32-bit isapi_redirect 1.2.28 connector problem

2009-10-15 Thread George Sexton
Why would you use the 32 bit ISAPI filter? You should use the 64bit ISAPI
filter.

If you're running IIS7 in 32 bit mode, THEN you should use 32 bit filter. If
you do that, make sure the registry entries for configuration are in the
WOW64 registry node.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
 

 -Original Message-
 From: Terekhov Artyom (ADV) [mailto:artyom.terek...@advgroup.ru]
 Sent: Wednesday, October 14, 2009 1:07 AM
 To: users@tomcat.apache.org
 Subject: Windows 2008 Server (x64) IIS7 to Tomcat 6.0 32-bit with Java
 32-bit isapi_redirect 1.2.28 connector problem
 
 
 
 Hello,
 
 I have a problem with Windows 2008 server x64 IIS7 to Tomcat 6.0 (*32)
 ( Java (*32)) connection.
 
 Previously we used IIS6 and everything was fine. But now I got errors:
 
 0x80070001 - if I use properties files for isapi_redirect.dll (32 bit
 version)
 
 or 0x80070002 - if I use registry entry.
 
 
 
 Regards,
 
 Artem Terekhov
 
 
 
 



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



Re: Tomcat + APR non-root on linux: Socket bind failed: [98] Address already in use

2009-10-15 Thread Len Popp
On Thu, Oct 15, 2009 at 10:39, Christopher Schultz
ch...@christopherschultz.net wrote:
 That's port 8443, not port 98. Where's your real Connector defined?

98 isn't a port number, it's an error code. It stands for Address
already in use.
-- 
Len

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



Re: how to replace apache's mod_alias

2009-10-15 Thread Dennis Christopher

Thanks for the reply Chris.

what I want to do:

I am running Tomcat as a standalone server on OSX. My application had  
been previously set up with apache serving in front of Tomcat.


My application is a context element '/myapp' accessed via server  
address/myapp.


Within the app's jsps are references to files in a folder 'myapp-web'  
whose real location on the server file system

is outside the tomcat tree.

I am unclear whether these references are actually supported in the  
previous version via mod_alias or a symbolic link
created for /library/webserver/documents. Tomcat the definitive guide  
says that if allowLinking
in the myapp context is true that it should work, but so far it has  
not worked for me.


Dennis

On Oct 15, 2009, at 10:42 AM, Christopher Schultz wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dennis,

On 10/13/2009 11:30 AM, Dennis Christopher wrote:

Is there any documentation
on how to replace the alias elements in httpd.conf with corresponding
elements in Tomcat's configuration?


Not directly. But if you describe what you want to do, maybe we can  
help.


I recommend looking at http://tuckey.org/urlrewrite/ which is likely  
to

be the tool that provides a solution for you.

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

iEYEARECAAYFAkrXNLsACgkQ9CaO5/Lv0PAaZQCbBt9PQEJS/NAK9gz7y//XSp57
MNYAoL9/iIyVb1KHqRV66SACmEui7siY
=R0vG
-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: how to replace apache's mod_alias

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

Dennis,

On 10/15/2009 11:15 AM, Dennis Christopher wrote:
 My application is a context element '/myapp' accessed via server
 address/myapp.
 
 Within the app's jsps are references to files in a folder 'myapp-web'
 whose real location on the server file system
 is outside the tomcat tree.

So, the URLs for these resources are something like
http://host/myapp-web/path/to/file? Are they all rooted in the same place?

If so, you can basically create a dummy webapp that contains nothing but
your files, served out of the location of your choice.

Create a file under CATALINA_BASE/conf/[service]/[host]/myapp-web.xml
that contains the following:

Context appBase=/library/webserver/documents /

This will deploy a new web application (into /myapp-web) that serves
static documents from /library/webserver/documents. This is the
equivalent of Apache httpd's:

Alias /myapp-web /library/webserver/documents

It probably seems a little heavy-handed, but it's because app servers
are app-centric, not file/directory centric.

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

iEYEARECAAYFAkrXPw0ACgkQ9CaO5/Lv0PCE4wCfcZdrk0+0iolmGauFLZDiT5TX
xdAAnA6+SyfnqfYirdcIaMWYy8Hrm12s
=c97v
-END PGP SIGNATURE-

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



Re: JkMount for status working not getting triggered

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

Neil,

On 10/14/2009 10:43 PM, Neil Aggarwal wrote:
 I then added this to my httpd.conf file in the global directives:
 
 # Mount the jk status application
 Location /jkstatus
   JkMount jkstatus
   Order allow,deny
   Allow from all
 /Location

Try replacing the above with:

JkMount /jkstatus jkstatus

What you have is documented to work, but it's apparently not working.

Another think you might need to do is move either your or my
configuration into the VirtualHost being used when the request is
serviced: JkMounts are not automatically copied into virtual hosts.

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

iEYEARECAAYFAkrXQh8ACgkQ9CaO5/Lv0PBmGQCcCxWa2hhtsmgOczCyYTNpUcYX
lzQAnR3DNMQC6RZDHNL6B3Mj0G2iXKHm
=u15T
-END PGP SIGNATURE-

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



Re: Shared email resource

2009-10-15 Thread Ken T.
On Thu, 15 Oct 2009 09:24:13 -0500, Caldarale, Charles R wrote:

 From: news [mailto:n...@ger.gmane.org] On Behalf Of Ken T. Subject:
 Shared email resource
 
 In /etc/tomcat6/web.xml, I have:
 
 Shouldn't that be /etc/tomcat6/conf/web.xml?  Are you running a real
 Tomcat, or a 3rd-party repackaged one?  If the latter, it's difficult to
 tell where the proper spot is for configuration statements.

This is Ubuntu 9.04.  I got tomcat6 from the package system.  That is the 
correct location of the web.xml file.   There is a link from /var/lib/
tomcat6/conf to /etc/tomcat6.  


-- 
Ken T. ktectr...@gmail.com


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



RE: JkMount for status working not getting triggered

2009-10-15 Thread Neil Aggarwal
Chris:

That worked.  

Thanks for the help,
Neil

--
Neil Aggarwal, (281)846-8957, www.JAMMConsulting.com
Will your e-commerce site go offline if you have
a DB server failure, fiber cut, flood, fire, or other disaster?
If so, ask about our geographically redundant database system. 

 Try replacing the above with:
 JkMount /jkstatus jkstatus


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



RE: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable in server.xml

2009-10-15 Thread Imad Hachem
Dear Caldarale,

As per the ifconfig command, it seems BROADCAST and MULTICAST are
enabled on my AIX 5.3 Network interface:

bash-3.00# ifconfig -a
en0:
flags=5e080863,c0UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROU
PRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN
inet 192.168.12.103 netmask 0xfe00 broadcast 192.168.13.255
 tcp_sendspace 131072 tcp_recvspace 65536
en1:
flags=5e080862,c0BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT
,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN
inet 192.168.12.8 netmask 0xfe00 broadcast 192.168.13.255
 tcp_sendspace 131072 tcp_recvspace 65536
et0:
flags=5e080862,80BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT
,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,CHAIN
inet 192.168.12.103 netmask 0xfe00 broadcast 192.168.13.255
lo0:
flags=e08084bUP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64
BIT
inet 127.0.0.1 netmask 0xff00 broadcast 127.255.255.255
inet6 ::1/0
 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1


Is there another place to check if MULTICAST is enabled or to be
configured somewhere ?



Imad Hachem | Asst.Product Development Manager
e-Banking Department
Path Solutions
Tel: +961 1 697444 ext. 222
Fax: +961 1 696744
www.path-solutions.com



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]
 
 
 
-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, October 14, 2009 7:54 PM
To: Tomcat Users List
Subject: RE: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable
in server.xml 

 From: Imad Hachem [mailto:ihac...@lb.path-solutions.com]
 Subject: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable in
 server.xml
 
 I am getting the below error during Tomcat-5.5.12 Startup on IBM AIX
 5.3 after enabling the Cluster configuration in server.xml :

You might want to try with a version of Tomcat that's a bit newer than
your four-year-old one.

Is multicasting enabled on your platform?  (I have no idea how that's
done on AIX.)

 - Chuck


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


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


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



Re: how to replace apache's mod_alias

2009-10-15 Thread Dennis Christopher

Chris,

the user accesses my jsps via http://host/my-app.

The jsps include references of the form below, as request dumper valve  
tells me:


/myapp-web/styles/images/mylogo.jsp

where myapp-web is a directory elsewhere on the system.

so the full path reference style is never done as such.

Dennis
On Oct 15, 2009, at 11:26 AM, Christopher Schultz wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dennis,

On 10/15/2009 11:15 AM, Dennis Christopher wrote:

My application is a context element '/myapp' accessed via server
address/myapp.

Within the app's jsps are references to files in a folder 'myapp-web'
whose real location on the server file system
is outside the tomcat tree.


So, the URLs for these resources are something like
http://host/myapp-web/path/to/file? Are they all rooted in the same  
place?


If so, you can basically create a dummy webapp that contains nothing  
but

your files, served out of the location of your choice.

Create a file under CATALINA_BASE/conf/[service]/[host]/myapp-web.xml
that contains the following:

Context appBase=/library/webserver/documents /

This will deploy a new web application (into /myapp-web) that serves
static documents from /library/webserver/documents. This is the
equivalent of Apache httpd's:

Alias /myapp-web /library/webserver/documents

It probably seems a little heavy-handed, but it's because app servers
are app-centric, not file/directory centric.

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

iEYEARECAAYFAkrXPw0ACgkQ9CaO5/Lv0PCE4wCfcZdrk0+0iolmGauFLZDiT5TX
xdAAnA6+SyfnqfYirdcIaMWYy8Hrm12s
=c97v
-END PGP SIGNATURE-

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




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



Re: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable in server.xml

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

Imad,

On 10/15/2009 12:03 PM, Imad Hachem wrote:
 As per the ifconfig command, it seems BROADCAST and MULTICAST are
 enabled on my AIX 5.3 Network interface:

Yes, it appears that all of your interfaces have MULTICAST enabled.

 Is there another place to check if MULTICAST is enabled or to be
 configured somewhere ?

You'd have to ask an AIX admin about that; I have no such experience.

You should post your cluster configuration, too. Have you permanently
moved-up to Tomcat 6.0.20, or are you still trying to get Tomcat 5.5.12
working?

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

iEYEARECAAYFAkrXS7UACgkQ9CaO5/Lv0PALMgCfaTq4sZjwosF3KorZR2T68npQ
f+4AoKpKSspH90rn96mGj9IVipHSatAc
=KaCy
-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 replace apache's mod_alias

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

Dennis,

(No need to CC me directly at all; I get all the messages through the
mailing list).

On 10/15/2009 12:03 PM, Dennis Christopher wrote:
 the user accesses my jsps via http://host/my-app.
 
 The jsps include references of the form below, as request dumper valve
 tells me:
 
 /myapp-web/styles/images/mylogo.jsp
 
 where myapp-web is a directory elsewhere on the system.
 
 so the full path reference style is never done as such.

No problem: the technique I mentioned will work exactly the same way.

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

iEYEARECAAYFAkrXTAoACgkQ9CaO5/Lv0PC3VgCfQB1QumOe6Zjh9XcV1KOFK6D5
5R4AoICn/Ox7ES83wRyotVSbBRhfu4Ue
=eNN3
-END PGP SIGNATURE-

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



Re: tomcat 5.5.25 and loosing spaces between printing jstl variables

2009-10-15 Thread Markus Stauffer

My suggestion: set trimSpace to true on both servers.

Then use ${firstName}{' '}${lastName}

regards


Am 13.10.2009 um 23:08 schrieb Curtis Garman:


Has anyone else experienced loosing spaces between printing jstl
variables. I've got something that is printing

${firstName} ${lastName}  -- Curtis Garman

but instead the space in between the two names is getting lost so it  
prints as


CurtisGarman

The wierd thing is that it displays just fine on a mirrored server but
messes up on our production server? My thought is that it has to be a
combination of tomcat/jstl. I've had this problem before but it has
never mattered. Any ideas or fixes? I do have set in the default
web.xml...anyone know if this is a problem?

init-param
   param-nametrimSpace/param-name
   param-valuetrue/param-value
/init-param

...I set it because apache recommends this
http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html#Production%20Configuration

--
Curtis Garman
Web Programmer
Heartland Community College

-
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 Startup Error on IBM AIX 5.3 after Cluster enable in server.xml

2009-10-15 Thread Imad Hachem
I solved the issue Christopher,

It was a configuration on IBM AIX to bind the multicast address
(228.0.0.4) to the IP of network interface using smitty Admin Console.

Thanks for your reply.





Imad Hachem | Asst.Product Development Manager
e-Banking Department
Path Solutions
Tel: +961 1 697444 ext. 222
Fax: +961 1 696744
www.path-solutions.com



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]
 
 
 

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Thursday, October 15, 2009 7:20 PM
To: Tomcat Users List
Subject: Re: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable
in server.xml

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Imad,

On 10/15/2009 12:03 PM, Imad Hachem wrote:
 As per the ifconfig command, it seems BROADCAST and MULTICAST are
 enabled on my AIX 5.3 Network interface:

Yes, it appears that all of your interfaces have MULTICAST enabled.

 Is there another place to check if MULTICAST is enabled or to be
 configured somewhere ?

You'd have to ask an AIX admin about that; I have no such experience.

You should post your cluster configuration, too. Have you permanently
moved-up to Tomcat 6.0.20, or are you still trying to get Tomcat 5.5.12
working?

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

iEYEARECAAYFAkrXS7UACgkQ9CaO5/Lv0PALMgCfaTq4sZjwosF3KorZR2T68npQ
f+4AoKpKSspH90rn96mGj9IVipHSatAc
=KaCy
-END PGP SIGNATURE-

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


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



Re: tomcat 5.5.25 and loosing spaces between printing jstl variables

2009-10-15 Thread Curtis Garman
Hmm...yeah or I could do ${firstName}nbsp;${lastName} or something
but the problem is the solution is only treating the symptom and not
the cause...and therefore I don't know how to determine when and where
it might happen in the future...I just happened to spot it this time
and would be able to hack it but I won't always necessarily know that
it is happening.

Curtis

On Thu, Oct 15, 2009 at 11:42 AM, Markus Stauffer
markus.stauf...@gmail.com wrote:
 My suggestion: set trimSpace to true on both servers.

 Then use ${firstName}{' '}${lastName}

 regards


 Am 13.10.2009 um 23:08 schrieb Curtis Garman:

 Has anyone else experienced loosing spaces between printing jstl
 variables. I've got something that is printing

 ${firstName} ${lastName}  -- Curtis Garman

 but instead the space in between the two names is getting lost so it
 prints as

 CurtisGarman

 The wierd thing is that it displays just fine on a mirrored server but
 messes up on our production server? My thought is that it has to be a
 combination of tomcat/jstl. I've had this problem before but it has
 never mattered. Any ideas or fixes? I do have set in the default
 web.xml...anyone know if this is a problem?

 init-param
   param-nametrimSpace/param-name
   param-valuetrue/param-value
 /init-param

 ...I set it because apache recommends this

 http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html#Production%20Configuration

 --
 Curtis Garman
 Web Programmer
 Heartland Community College

 -
 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





-- 
Curtis Garman
Web Programmer
Heartland Community College

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



RE: how to replace apache's mod_alias

2009-10-15 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: how to replace apache's mod_alias
 
 Create a file under CATALINA_BASE/conf/[service]/[host]/myapp-web.xml
 that contains the following:
 
 Context appBase=/library/webserver/documents /

That should be docBase, not appBase.

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



catalina - when to use start and run

2009-10-15 Thread Anand HS
Hi, I use tomcat 6.0.16 and when evaluating different start up options , I
came across the fact that you can start tomcat by either catalina start or
catalina run.
using start spawned the server start up in a new console where as run
started in the same console.

Other than this is there any obvious difference in using one or the other. ?
Primarily, I want to know when to go for which one.

thanks,
Anand


Re: Shared email resource

2009-10-15 Thread Mikolaj Rydzewski

Curtis Garman wrote:

I've only every declared in in META-INF/context.xml

It's fine to define Resource completely in context.xml.
But if one uses GlobalNamingResources (as OP does) he has to declare 
mapping in context.xml as I described.

Anyway, it works for me all the times :-)

Of course, in Java code one has to lookup using full path, not just 
mail/Session, so:


new InitialContext().lookup(java:comp/env/mail/Session);

So, I have on my Tomcat 6.0:

conf/server.xml:

GlobalNamingResources
 Resource name=jdbc/db auth=Container
   type=javax.sql.DataSource
   driverClassName=org.postgresql.Driver
   ...
   /

application's META-INF/context.xml:

Context
   ResourceLink name=jdbc/db
   global=jdbc/db
   type=javax.sql.DataSource /
/Context

application's WEB-INF/web.xml:

   resource-ref
   res-ref-namejdbc/db/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
   /resource-ref


And I use new InitialContext().lookup(java:comp/env/jdbc/db); to 
retrieve DataSource.


Hope that helps.

--
Mikolaj Rydzewski m...@ceti.pl


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



Re: how to replace apache's mod_alias

2009-10-15 Thread Dennis Christopher

Hmm. I thought that correction would make it work, but still no go.

I don't have any structure under conf, and usually add contexts in  
server.xml . I tried this first, giving path=/myapp-web.
But this didnt work. It seems by the logic of what we are trying, i.e.  
making the docBase = /library/webserver/documents', that my images,  
e.g won't be reachable unless the symbolic link in the docBase is  
valid as well. It looks like it is, but just in case, I tried putting  
the absolute path into the docBase as well. No go either.


Next, and maybe I didnt follow directions properly,  I added the  
directory conf/localhost

which then contained myapp-web.xml with the (pathless) context below.

Tried this also with the absolute path and still no joy.

Dennis
On Oct 15, 2009, at 1:07 PM, Caldarale, Charles R wrote:


From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Subject: Re: how to replace apache's mod_alias

Create a file under CATALINA_BASE/conf/[service]/[host]/myapp-web.xml
that contains the following:

Context appBase=/library/webserver/documents /


That should be docBase, not appBase.

- Chuck


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





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



RE: how to replace apache's mod_alias

2009-10-15 Thread Caldarale, Charles R
 From: Dennis Christopher [mailto:dchristop...@pixion.com]
 Subject: Re: how to replace apache's mod_alias
 
 Next, and maybe I didnt follow directions properly,  I added the
 directory conf/localhost which then contained myapp-web.xml with
 the (pathless) context below.

Close, but that needs to be conf/Catalina/localhost/myapp-web.xml.

 - Chuck


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


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



Re: Tomcat 6.0.20 always works in GMT timezone even after forcing it to use Asia/Calcutta by multiple methods.

2009-10-15 Thread Timothy J Schumacher

Then how come Tomcat alone can respect the UTC enablement in
/etc/sysconfig/clock?


That is a good question, and not the same as what I observed on my system.  


I guess maybe try removing the timezone line from that file and restart Tomcat 
to see if the clock file is even a player here.  This could just be a wild 
goose chase ;)

-Tim





raghu gs wrote:

Hi Tim

Your suggestion seems interesting to some extent.
One clue i got now is UTC is enabled in /etc/sysconfig/clock file.
Being UTC is enabled is naturally equals to setting GMT as timezone.
Please correct me if i am wrong.

My question is, when i put a normal java code to display the time and
timezone of the system, it just displays the timezone in IST without any
problem.
clock command's output returns the time in IST timezone it self.
Then how come Tomcat alone can respect the UTC enablement in
/etc/sysconfig/clock?

Regards


On Wed, Oct 14, 2009 at 9:37 PM, Timothy J Schumacher 
tim.schumac...@colorado.edu wrote:

  

I'm not sure if it will help with your particular version of java/linux but
I had a similar problem with my java/linux and found that in my case the
file /etc/sysconfig/clock was one of the places the JVM looked for a
timezone.  Setting environment variables and options had no effect, the
thing that worked for me was changing the clock file.  Check
/etc/sysconfig/clock and see what it says, if there is a timezone set in
there try removing it.  It took me quite a while to figure this out, going
to the extreme of writing a play java program and running it with strace and
then I saw that it opened the clock file...
Good luck,
-Tim


raghu gs wrote:



Tomcat is not running under a security manager.
So that policy entry may need to be exists, i understood now.

I have tried stopping our web applications via tomcat-manager and
restarted
important web applications alone.
But still timezone didn't reset to system timezone.

Wouldn't stopping offending web applications enough for the timezone to
use
system configuration?

Is it possible to restrict just timezone over-riding permission from web
application instead of first listing what are all permissions that should
be
granted for a web application?



On Mon, Oct 12, 2009 at 8:32 PM, George Sexton geor...@mhsoftware.com
  

wrote:



  


-Original Message-
From: raghu gs [mailto:iamra...@gmail.com]
Sent: Monday, October 12, 2009 5:18 AM
To: Tomcat Users List
Subject: Re: Tomcat 6.0.20 always works in GMT timezone even after
forcing it to use Asia/Calcutta by multiple methods.

java.util.PropertyPermission user.timezone, write; line not there
in
catalina.policy file.
Should this line not need to be present for granting the pernission?


  

The reference to catalina.policy only applies if you are running under a
security manager. Are you running under a security manager?





What is the code for restricting the timezone overide permission in
catalina.policy file?
Moreover it was misundstanding between our developers,
Nobody said that kernel tomcat mismatch might be the cause of the
problem.
TZData is also up-to-date.

Regards



  

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585


-
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 6.0.20 always works in GMT timezone even after forcing it to use Asia/Calcutta by multiple methods.

2009-10-15 Thread Timothy J Schumacher
Also, there was some enlightening information about how the JVM decides 
which timezone to use here:


http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6456628

I did not read the java source to verify the description there is 
accurate, but none the less, the description was helpful to me.


Hope this helps,
Tim


Timothy J Schumacher wrote:

Then how come Tomcat alone can respect the UTC enablement in
/etc/sysconfig/clock?


That is a good question, and not the same as what I observed on my 
system. 
I guess maybe try removing the timezone line from that file and 
restart Tomcat to see if the clock file is even a player here.  This 
could just be a wild goose chase ;)


-Tim





raghu gs wrote:

Hi Tim

Your suggestion seems interesting to some extent.
One clue i got now is UTC is enabled in /etc/sysconfig/clock file.
Being UTC is enabled is naturally equals to setting GMT as timezone.
Please correct me if i am wrong.

My question is, when i put a normal java code to display the time and
timezone of the system, it just displays the timezone in IST without any
problem.
clock command's output returns the time in IST timezone it self.
Then how come Tomcat alone can respect the UTC enablement in
/etc/sysconfig/clock?

Regards


On Wed, Oct 14, 2009 at 9:37 PM, Timothy J Schumacher 
tim.schumac...@colorado.edu wrote:

 
I'm not sure if it will help with your particular version of 
java/linux but
I had a similar problem with my java/linux and found that in my case 
the

file /etc/sysconfig/clock was one of the places the JVM looked for a
timezone.  Setting environment variables and options had no effect, the
thing that worked for me was changing the clock file.  Check
/etc/sysconfig/clock and see what it says, if there is a timezone 
set in
there try removing it.  It took me quite a while to figure this out, 
going
to the extreme of writing a play java program and running it with 
strace and

then I saw that it opened the clock file...
Good luck,
-Tim


raghu gs wrote:

   

Tomcat is not running under a security manager.
So that policy entry may need to be exists, i understood now.

I have tried stopping our web applications via tomcat-manager and
restarted
important web applications alone.
But still timezone didn't reset to system timezone.

Wouldn't stopping offending web applications enough for the 
timezone to

use
system configuration?

Is it possible to restrict just timezone over-riding permission 
from web
application instead of first listing what are all permissions that 
should

be
granted for a web application?



On Mon, Oct 12, 2009 at 8:32 PM, George Sexton geor...@mhsoftware.com
 

wrote:



 
   

-Original Message-
From: raghu gs [mailto:iamra...@gmail.com]
Sent: Monday, October 12, 2009 5:18 AM
To: Tomcat Users List
Subject: Re: Tomcat 6.0.20 always works in GMT timezone even after
forcing it to use Asia/Calcutta by multiple methods.

java.util.PropertyPermission user.timezone, write; line not 
there

in
catalina.policy file.
Should this line not need to be present for granting the pernission?


  
The reference to catalina.policy only applies if you are running 
under a

security manager. Are you running under a security manager?



   

What is the code for restricting the timezone overide permission in
catalina.policy file?
Moreover it was misundstanding between our developers,
Nobody said that kernel tomcat mismatch might be the cause of the
problem.
TZData is also up-to-date.

Regards



  

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585


-
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




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



Re: DBCP woes (running out of cursors).

2009-10-15 Thread Bill Davidson

Christopher Schultz wrote:
Is it possible that your server just doesn't want to allocate 245 * 4
cursors, and that you are just hitting that barrier?

cursor != connection

Oracle is set up to allow up to 300 cursors per session (connection).
I could up that limit, but it probably won't fix the problem, as these
things seem to just keep accumulating.

I though you said that after a connection was checked-out for 120
seconds, it was forcibly closed by the connection pool.

Only when it is sent back to the pool by the servlet.  The pool manager
doesn't have a background thread looking for old connections to kill.
It's not a work around for connection leaks.  Apparently it's a work
around for cursor leaks.

Oh, so this query is intended to find out what is happening on the
server side, so you can see what cursors are open and what their queries
are. I thought you meant that a query such as this was being executed
from your webapp.

Correct.  Sorry if I didn't make that clear.  Those queries are not in
my webapp.  They are only used to help track down lingering cursors.
For people not familiar with Oracle, special characters like '$' in FROM
clauses are usually an indication of something being in Oracle's data
dictionary which keeps track of everything in Oracle.  The other one
in that query was v$session which keeps track of session information.
A session, in this context, is a connection.

Do some of those methods have multiple queries being executed? If so,
it's possible that one statement remains open while the second one is
closed. For example:

A very small number do, but the vast overwhelming majority do not.
I'm finding these lingering cursors on all sorts of things.  On the ones
that do, they are all still closed.

This is perfect. I noticed that I don't see a conn.close in there (which
is probably appropriate, given that the Connection object is a parameter
to the method). I assume you have similar finally blocks in calling
methods, right?

Correct.  I'm not seeing anything resembling a connection leak problem.
This is strictly a cursor problem.

The eviction run will only to remove connections from the pool: it won't
fix any resource allocation problems. Your webapp and server ought to be
able to tolerate all connections being open and active at once (so, a
full 245 connections in each webapp instance, and 980 connections on the
server).

The Oracle instance is set up to handle 1000 connections.  Tomcat has
maxThreads=240, just because I'm paranoid and want to leave a little slop
factor.  I shouldn't ever see more than 240 actual connections per server.

The only thing the eviction will really help with is reducing the memory
being used on both the client and server. I suppose that calling a
true close() on the connection might clean-up any sloppiness going on
in the client OR the server, and thus might solve your problem, but I
believe it will be merely hiding the symptom, not actually solving the
underlying problem.

I suspect that you are correct.  I'm baffled as to why I have old cursors
lying around.  The close call on the statements has to happen.

Do you have access to an Oracle DBA? They may be able to help uncover
the implications of some of the queries being run... it's possible that
cursors are being allocated that you didn't expect, or that aren't being
closed for /other/ reasons.

The Oracle DBA that I have access to doesn't know much about Java/JDBC
which is why I was hoping I could find some Oracle expertise in the
commons or tomcat lists.



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



Re: DBCP woes (running out of cursors).

2009-10-15 Thread Bill Davidson

Martin Gainty wrote:
are you running as a Transaction?

In some cases, but a lot of these lingering cursors are on very simple
queries, with no insert/update/delete involved.  As I said before,
I'm finding lingering cursors on things as simple as SELECT * FROM
some_table WHERE id = ?.

That does make me wonder though if there are Connection's getting sent
back to the pool that had a pending transaction without a commit/rollback
and if that could be making any cursors on that connection after that
linger?  It might explain the randomness of the queries showing up in
the list.  It also gives me a question I can send to my Java-challenged
Oracle DBA.  Thanks for the idea.


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



Re: how to replace apache's mod_alias

2009-10-15 Thread Dennis Christopher

Thanks Charles and Chris -- that works!

Dennis
On Oct 15, 2009, at 2:06 PM, Caldarale, Charles R wrote:


From: Dennis Christopher [mailto:dchristop...@pixion.com]
Subject: Re: how to replace apache's mod_alias

Next, and maybe I didnt follow directions properly,  I added the
directory conf/localhost which then contained myapp-web.xml with
the (pathless) context below.


Close, but that needs to be conf/Catalina/localhost/myapp-web.xml.

- Chuck


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



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




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



Fw: Re: Metro/JAXWS and network packets...

2009-10-15 Thread Tony Anecito
Hi Wireshark group.

I narrowed down the redundant packets last night/this morning. I have notified 
the Sun group about the issue and am still looking at it closer.

Thanks for the help this has been a huge issue for me and now for Sun perhaps.

Best Regards,
-Tony

--- On Thu, 10/15/09, Tony Anecito adanec...@yahoo.com wrote:

 From: Tony Anecito adanec...@yahoo.com
 Subject: Re: Metro/JAXWS and network packets...
 To: us...@metro.dev.java.net
 Cc: JWSDP Dev d...@jax-ws.dev.java.net
 Date: Thursday, October 15, 2009, 11:18 AM
 Hi All,
 
 I created a simple java program that created a URL object
 and sent a http request to a Tomcat server for a small less
 than 1500 byte file and two packets were set to/from the
 Tomcat Server.
 When I send the same request via FireFox only one packet is
 sent/recieved.
 So this is not a Metro issue but a core issue with the jre
 and TCP.
 
 This issue may only be with data less than 1500 bytes and
 TCP.
 
 Regards,
 -Tony
 
 --- On Thu, 10/15/09, Tony Anecito adanec...@yahoo.com
 wrote:
 
  From: Tony Anecito adanec...@yahoo.com
  Subject: Metro/JAXWS and network packets...
  To: Metro us...@metro.dev.java.net
  Cc: JWSDP Dev d...@jax-ws.dev.java.net
  Date: Thursday, October 15, 2009, 1:36 AM
  I noticed if I send a request via
  Metro using a small object that is less than 1460
 bytes
  (Maximm Segment Size or MTU Maximum Transport Unit
 size) the
  data gets sent/received in two packets. If I use
 Firefox and
  request a small html file I only get one packet.
  
  Any idea why this is happening? It seems to double
 the
  number of packets for communication. The data is not
  duplicated in the two packets but instead is
 fragmented.
  
  I am using a Java Client using jre 1.6.0_16 and the
 Tomcat
  Server hosting the web service is also using jdk
 1.6.0_16.
  All are Windows based OS.
  
  Regards,
  -Tony
  
  
        
  
 
 -
  To unsubscribe, e-mail: users-unsubscr...@metro.dev.java.net
  For additional commands, e-mail: users-h...@metro.dev.java.net
  
  
 
 
 
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@jax-ws.dev.java.net
 For additional commands, e-mail: dev-h...@jax-ws.dev.java.net
 
 




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



Can a JNDI resource be in a webapp's lib folder

2009-10-15 Thread Ziggy
I am trying to set up a JNDI resource of an Oracle database connection. I
have set the connection details in my application's context file in
$CATALINA_BASE/webapps/myapp/META-INF/context.xml

I put the jdbc driver in $CATALINA_BASE/common/lib and everything works
fine. The problem is i dont want to put the jdbc driver in that directory. I
would like to put it in $CATALINA_BASE/webapps/myapp/WEB-INF/lib

I have read about this a bit and i think that all JNDI resources must be in
$CATALINA_HOME/common/lib which explains why If i put the driver in the
application's lib folder it cant access it because the common class loader
wouldnt konw of the libraries in the applicatoins lib folders..

The tomcat installation only runs this one application. I  would like to be
able to move the application's war file (which will include all libraries in
the WEB-INF/lib folder) around to other tomcat instances if i need to
without having to worry about moving libraries as well.

Its a bit weird that i configure the JNDI resource in the application's
context file but the library that the context file is refering to is to be
kept outside of the application.
is there a way i can use the JNDI resource but have the jdbc driver in the
application's WEB-INF/lib directory?


Thanks in advance.


Redeploy problem in 6.0.20

2009-10-15 Thread Andrew Morgan
I recently upgraded from Tomcat 6.0.18 to 6.0.20 (using jdk1.6.0_14 on 
Solaris 10).  I have a webapp that stores its database configuration in 
the context xml file (/private/tomcat/conf/Catalina/localhost/devl.xml). 
Periodically, I must update the context xml file when the database 
password has been changed.


When I was running 6.0.18 and earlier, a few seconds after I modified the 
context xml file, Tomcat would redeploy the webapp and log the following:


Oct 15, 2009 12:27:08 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/devl]

and the webapp would continue running.

After I upgraded to 6.0.20, modifying the context xml file triggers a 
redeploy that fails with the following logs:


Oct 15, 2009 1:10:50 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/devl]
Oct 15, 2009 1:10:50 PM org.apache.catalina.startup.HostConfig deployDescriptor
WARNING: A docBase /private/apache-tomcat-6.0.20/webapps/NolijDocServer inside 
the host appBase has been specified, and will be ignored
Oct 15, 2009 1:10:50 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base 
/private/apache-tomcat-6.0.20/webapps/devl does not exist or is not a readable 
directory
at 
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
at 
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4048)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at 
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
at 
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1274)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:296)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at 
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:619)
Oct 15, 2009 1:10:50 PM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
Oct 15, 2009 1:10:50 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Oct 15, 2009 1:10:50 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/devl] startup failed due to previous errors
Oct 15, 2009 1:10:50 PM org.apache.catalina.core.StandardContext stop
INFO: Container 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/devl] has not 
been started

and the /devl directory and devl.war file are gone.

I'm not an experienced Tomcat user, so maybe I have something 
misconfigured and a recent change is exposing it?


Please let me know if I can provide any additional information.

Thanks!

Andy

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



Re: how to replace apache's mod_alias

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

Chuck,

On 10/15/2009 1:07 PM, Caldarale, Charles R wrote:
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: how to replace apache's mod_alias

 Create a file under CATALINA_BASE/conf/[service]/[host]/myapp-web.xml
 that contains the following:

 Context appBase=/library/webserver/documents /
 
 That should be docBase, not appBase.

Crap, I even checked the docs just to be sure, and then typed the wrong
one. Auto-pilot hands have irreparably ruined my reputation again :(

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

iEYEARECAAYFAkrXh1MACgkQ9CaO5/Lv0PDyIACbBp5kX8gJpGG+T7WfCwy9mSgv
OycAn2/vqYCzlgXRdhIy/GqZmA5qXBUQ
=4jlV
-END PGP SIGNATURE-

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



Re: DBCP woes (running out of cursors).

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

Bill,

On 10/15/2009 2:15 PM, Bill Davidson wrote:
 Christopher Schultz wrote:
Is it possible that your server just doesn't want to allocate 245 * 4
cursors, and that you are just hitting that barrier?
 
 cursor != connection

Right... but presumably your code is doing something useful with that
connection, rather than simply fetching it from the pool and then
discarding it. IIRC, all SELECT queries allocate a cursor. Others may as
well.

 Oracle is set up to allow up to 300 cursors per session (connection).
 I could up that limit, but it probably won't fix the problem, as these
 things seem to just keep accumulating.

Agreed. But, I wonder if there's a max cursors globally or something
like that, so that when you have all those connections going at once,
their sum total cursors exceeds that limit?

When this happens, does Tomcat continue running otherwise unscathed? Or,
do you get an avalanche of exceptions after the first one occurs. What
about on the other members of the cluster (just a descriptive term, not
a technical one)?

I though you said that after a connection was checked-out for 120
seconds, it was forcibly closed by the connection pool.
 
 Only when it is sent back to the pool by the servlet.  The pool manager
 doesn't have a background thread looking for old connections to kill.
 It's not a work around for connection leaks.  Apparently it's a work
 around for cursor leaks.

Hah, okay. Well, it doesn't look like commons-dbcp has a similar
configuration option; you can only evict connections that have been
sitting idle, not those that have simply lived too long. Perhaps the
commons-dbcp folks have some ideas.

Oh, so this query is intended to find out what is happening on the
server side, so you can see what cursors are open and what their queries
are. I thought you meant that a query such as this was being executed
from your webapp.
 
 Correct.  Sorry if I didn't make that clear.  Those queries are not in
 my webapp.  They are only used to help track down lingering cursors.
 For people not familiar with Oracle, special characters like '$' in FROM
 clauses are usually an indication of something being in Oracle's data
 dictionary which keeps track of everything in Oracle.  The other one
 in that query was v$session which keeps track of session information.
 A session, in this context, is a connection.

Gotcha. I wonder if somehow your app-based queries are allocating
cursors and never freeing them. Simple SELECT queries (or even complex
ones) shouldn't really be allocating cursors that aren't freed when you
call ResultSet.close or Statement.close (whichever actually kills them,
I'm not sure). Also, closing a pooled connection should call
setAutoCommit(true) (this is the default setting for autocommit) which
will commit any in-progress transactions lingering, which I would
imagine results in all cursors being closed as well. I must admit, I'm
at the limit of my (quite limited) Oracle knowledge at this point. Got a
DBA handy?

The eviction run will only to remove connections from the pool: it won't
fix any resource allocation problems. Your webapp and server ought to be
able to tolerate all connections being open and active at once (so, a
full 245 connections in each webapp instance, and 980 connections on the
server).
 
 The Oracle instance is set up to handle 1000 connections.  Tomcat has
 maxThreads=240, just because I'm paranoid and want to leave a little slop
 factor.  I shouldn't ever see more than 240 actual connections per server.

Agreed.

 I suspect that you are correct.  I'm baffled as to why I have old cursors
 lying around.  The close call on the statements has to happen.

Yeah, I agree. The only thing I can think of is that you are pooling
prepared statements. If you have more than 300 different queries in your
webapp (not at all a stretch IMO), and they are all being pooled, it's
possible that each one of those cached prepared statements consumes a
cursor. In that case, you'll easily consume your cursor allocation per
request. I'm just grasping at straws, now.

What happens, other than an awful slowdown, if you disable statement
pooling?

Do you have access to an Oracle DBA? They may be able to help uncover
the implications of some of the queries being run... it's possible that
cursors are being allocated that you didn't expect, or that aren't being
closed for /other/ reasons.
 
 The Oracle DBA that I have access to doesn't know much about Java/JDBC
 which is why I was hoping I could find some Oracle expertise in the
 commons or tomcat lists.

Yeah, see what the commons-dbcp list has to say. Things are ... pretty
slow on the commons-user list, so you may have to wait a bit for a
reply. You could also ask on some Java-oriented Oracle forums.
Definitely post back if you find a satisfactory explanation so everyone
can ready about your new-found sage advice ;)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: 

Re: DBCP woes (running out of cursors).

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

Bill,

On 10/15/2009 2:24 PM, Bill Davidson wrote:
 That does make me wonder though if there are Connection's getting sent
 back to the pool that had a pending transaction without a commit/rollback
 and if that could be making any cursors on that connection after that
 linger?

Probably not. DBCP calls setAutoCommit(true) by default in order to
reset the connection as it goes back into the pool. Any pending
transaction is committed (!) when that happens, so there shouldn't be
any in-progress transactions lingering around.

If you set autoCommit=false in your DBCP configuration, that might
change things. Are your transaction finally blocks and commit/rollback
logic blocks sane? You can refer to my previously-mentioned blog post
for my thoughts on how to do it properly.

 It might explain the randomness of the queries showing up in
 the list.

But what is the likelihood of SELECT * FROM foo WHERE foo.id=?
appearing in a transaction?

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

iEYEARECAAYFAkrXiuYACgkQ9CaO5/Lv0PDX1QCfUhGfjpNnU6mnff8g6WqRb7MN
vxMAoK3xes9KEfE5V8J/ZSGKCY2SqMRp
=6lz1
-END PGP SIGNATURE-

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



Re: Tomcat 6.0.20 always works in GMT timezone even after forcing it to use Asia/Calcutta by multiple methods.

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

Raghu,

On 10/15/2009 1:33 AM, raghu gs wrote:
 My question is, when i put a normal java code to display the time and
 timezone of the system, it just displays the timezone in IST without any
 problem.

So, you still won't actually try to figure out which webapp is (almost
certainly) changing the default TimeZone on you?

I definitely can't help you anymore if you only ask questions and don't
try any of the solutions being suggested.

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

iEYEARECAAYFAkrXiz8ACgkQ9CaO5/Lv0PBFSwCaA4GB+mn9FpvKDLGUF6Xzfntf
e2wAoJoj2CZIgGN4KSNHUhDE7Z8OIwW1
=JgV6
-END PGP SIGNATURE-

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



Re: tomcat 5.5.25 and loosing spaces between printing jstl variables

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

Curtis,

On 10/13/2009 5:08 PM, Curtis Garman wrote:
 Has anyone else experienced loosing spaces between printing jstl
 variables. I've got something that is printing
 
 ${firstName} ${lastName}  -- Curtis Garman
 
 but instead the space in between the two names is getting lost so it prints as
 
 CurtisGarman

[snip]

 ...I set it because apache recommends this
 http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html#Production%20Configuration

If you don't care what the setting is, then set it to false and be done
with it. It's not much of a space optimization IMO, and it breaks untold
numbers of your templates. So, just turn it off.

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

iEYEARECAAYFAkrXjAoACgkQ9CaO5/Lv0PAZLwCfYrp66lGVGIoC1kgW88hvWpub
OqUAn1+IClMMTQlg9WdMatFCghT4phzs
=hv8l
-END PGP SIGNATURE-

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



Re: Can a JNDI resource be in a webapp's lib folder

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

Ziggy,

On 10/15/2009 3:31 PM, Ziggy wrote:
 I have read about this a bit and i think that all JNDI resources must be in
 $CATALINA_HOME/common/lib which explains why If i put the driver in the
 application's lib folder it cant access it because the common class loader
 wouldn't know of the libraries in the applications lib folders..

I believe this is correct: the JNDI resources for a webapp are
initialized using the server's ClassLoader, not the webapp's
ClassLoader. I'm not entirely sure why this is the case, but it is. For
this reason, you must place your JDBC drivers (and anything else
required for JNDI resources) in CATALINA_BASE/common/lib (on TC 5.5) or
CATALINA_BASE/lib (on TC 6.0), or, define some other ClassLoader that is
available /before/ the webapp's ClassLoader becomes useful.

 The tomcat installation only runs this one application. I  would like to be
 able to move the application's war file (which will include all libraries in
 the WEB-INF/lib folder) around to other tomcat instances if i need to
 without having to worry about moving libraries as well.

I think this is a reasonable desire, and I'm not sure why Tomcat's
architecture does not allow this. Honestly, using the webapp's
ClassLoader to create JNDI resources would make a lot of sense and fix
at least one long-standing bug/resource leak when restarting webapps.

 Its a bit weird that i configure the JNDI resource in the application's
 context file but the library that the context file is refering to is to be
 kept outside of the application.

Agreed.

 is there a way i can use the JNDI resource but have the jdbc driver in the
 application's WEB-INF/lib directory?

This is a bug/feature which must be changed at the Tomcat source level.
There is no configuration that can get you what you want. Sorry.

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

iEYEARECAAYFAkrXjQcACgkQ9CaO5/Lv0PC6WQCgkoCIVPBxIRTPvdIBv31B7tkv
l6AAoJZ/Aq47i49SrUzatu5/K9DSqnvO
=kbXg
-END PGP SIGNATURE-

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



Re: DBCP woes (running out of cursors).

2009-10-15 Thread Hassan Schroeder
On Thu, Oct 15, 2009 at 1:46 PM, Christopher Schultz
ch...@christopherschultz.net wrote:

  You could also ask on some Java-oriented Oracle forums.

Oracle has a user community called Mix -- https://mix.oracle.com/ --
where you could post your issue (requires registration but otherwise
free).

/* It's JRuby on Rails but not, unfortunately, running on Tomcat :-) */

FWIW,
-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



Re: DBCP woes (running out of cursors).

2009-10-15 Thread Bill Davidson

Christopher Schultz wrote:
Probably not. DBCP calls setAutoCommit(true) by default in order to
reset the connection as it goes back into the pool. Any pending
transaction is committed (!) when that happens, so there shouldn't be
any in-progress transactions lingering around.

If you set autoCommit=false in your DBCP configuration, that might
change things. Are your transaction finally blocks and commit/rollback
logic blocks sane? You can refer to my previously-mentioned blog post
for my thoughts on how to do it properly.

I'm a little confused about auto-commit.  I don't want my transactions
auto-committed.  Sometimes there's a need for a rollback of an entire
transaction.  To my thinking, auto-commit implies that you don't have
true transactions.

The transactions in the app are a lot more complex, and a transaction
can hold onto a connection for quite a while as a user is editing things.
The queries themselves have the same try-catch-finally situation but
there can be quite a few different calls on that connection for one
transaction.

But what is the likelihood of SELECT * FROM foo WHERE foo.id=?
appearing in a transaction?

Very low.  The scenario I was describing was:

1. Thread 1 returns a connection with an uncommitted transaction to the 
pool.

2. Thread 2 gets the same connection from the pool and does a query on it
3. The query from Thread 2, unrelated Thread 1, ends up in cursor limbo
  because of the uncommitted transaction on the connection.

I don't know that this is happening in the app, and it's going to be very
difficult to find it if it is.  I don't even know that this scenario 
could cause this

cursor limbo.  It's just a hypothesis which is hard to test.


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



RE: Can a JNDI resource be in a webapp's lib folder

2009-10-15 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: Can a JNDI resource be in a webapp's lib folder
 
 I think this is a reasonable desire, and I'm not sure why Tomcat's
 architecture does not allow this. Honestly, using the webapp's
 ClassLoader to create JNDI resources would make a lot of sense and fix
 at least one long-standing bug/resource leak when restarting webapps.

Not sure if that's feasible without spec changes.  The JNDI registry is for the 
entire JVM; if resources reachable through it were under control of a webapp 
classloader, they would be visible to but not usable by other webapps.  There 
may be ways to construct local (per-webapp) JNDI domains, but I don't think 
there's anything like that in the spec.

 - 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: ClassNotFoundException when deserializing persisted sessions

2009-10-15 Thread Manlio Malaidini
On Wed, Oct 14, 2009 at 5:09 PM, Manlio Malaidini mmalaid...@gmail.com wrote:
 I'll check bugzilla and eventually file a bug, thanks.

Bug filed as 48007

https://issues.apache.org/bugzilla/show_bug.cgi?id=48007

MM

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



Re: catalina - when to use start and run

2009-10-15 Thread Hassan Schroeder
On Thu, Oct 15, 2009 at 10:25 AM, Anand HS anan...@gmail.com wrote:
 Hi, I use tomcat 6.0.16 and when evaluating different start up options , I
 came across the fact that you can start tomcat by either catalina start or
 catalina run.
 using start spawned the server start up in a new console where as run
 started in the same console.

 Other than this is there any obvious difference in using one or the other. ?
 Primarily, I want to know when to go for which one.

You can look for yourself, you know -- it's just a shell script. :-)

But basically I use `run` while developing where I know I have to do
a lot of restarting -- ^C followed by the up arrow and away we go. If
that's not necessary then use `start` and forget about it, even if you
close that window.

HTH,
-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



Re: Redeploy problem in 6.0.20

2009-10-15 Thread Keiichi Fujino

Hi Andrew.

Check this BZ47343.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47343

Perhaps, it is the same as this BugReport.
This bug is corrected by 6.0.21.

Best Regards.


-- 
View this message in context: 
http://www.nabble.com/Redeploy-problem-in-6.0.20-tp25915514p25919112.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat + APR non-root on linux: Socket bind failed: [98] Address already in use

2009-10-15 Thread Ken Johanson

Peter Crowther wrote:

2009/10/15 Ken Johanson tomcat-u...@kensystem.com


SEVERE: Error starting endpoint
java.lang.Exception: Socket bind failed: [98] Address already in use
   at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:612)
..
(no listener is actually running on 98; this is just generic Sun msg when
not allowed to bind to prv'd port)



98 is the errno (EADDRINUSE), not the port.  The error message doesn't list
which port failed.



Is there a configuration to change the port that APR uses from 98 to a
non-privileged (1024) one?



APR doesn't use any ports other than the ones you configure in your
connectors.  Something is holding onto one of the ports you want.  Check
what ports Tomcat wants, and check there isn't another process running on
the box that is using one of them - it might even be an old Tomcat.  Don't
forget to check the shutdown port (8005 by default), although from the stack
trace it looks like the problem port is a connector, not the shutdown port.



PS - Connector.xml excerpts:
   Connector
  protocol=org.apache.coyote.http11.Http11AprProtocol
  port=8443
  enableLookups=false
  SSLEnabled=true
  scheme=https
  secure=true
  SSLCertificateFile=${catalina.base}/conf/cert.crt
  SSLCertificateKeyFile=${catalina.base}/conf/cert.key
  disableUploadTimeout=true
   /
   Listener className=org.apache.catalina.core.AprLifecycleListener
SSLEngine=on /



Any other connectors defined?

- Peter



Thank you Peter you are correct! The 98 being mentioned by itself is 
very misleading, at least for a lay person like myself :)


It was indeed the normal listeners (8080 and 8443 in my case). I 
COMPLETELY took for granted that my init script was handing the 
shutdown... it is not. Using APR and an init-script* (or jsvc) that 
worked just fine for JIO and NIO, the server does not shutdown for APR. 
I have to `ps` for the java proc then send a kill signal to it. I'm not 
sure why but it may be related to bad cleanup code for the 
following, *newly observed problem*.


After doing a kill, then startup I now get:

java.lang.Exception: Invalid Server SSL Protocol
at org.apache.tomcat.jni.SSLContext.make(Native Method)
at 
org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:693)
at 
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:107)
at 
org.apache.catalina.connector.Connector.initialize(Connector.java:1058)

...
Oct 15, 2009 10:10:44 PM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException:  Protocol handler initialization failed: 
java.lang.Exception: Invalid Server SSL Protocol

at
..

But I can't see where I'm deviating from docs with:
Connector
port=8443
enableLookups=false
SSLEnabled=true scheme=https secure=true
SSLCertificateFile=${catalina.base}/conf/cert.pem
SSLCertificateKeyFile=${catalina.base}/conf/key.pem
disableUploadTimeout=true
SSLVerifyClient=optional
sslProtocol=TLS
/

BTW I'm now tryng recent apache-tomcat-6.0.20 and rebuilt 
tomcat-native-1.1.16.


Any insight would be immensely appreciated!

Best regards,
-Ken



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



Tomcat + APR: 'Invalid Server SSL Protocol' (was 'Tomcat + APR .. Socket bind failed')

2009-10-15 Thread Ken Johanson

Ken Johanson wrote:
snip


After doing a kill, then startup I now get:

java.lang.Exception: Invalid Server SSL Protocol
at org.apache.tomcat.jni.SSLContext.make(Native Method)
at 
org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:693)
at 
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:107)
at 
org.apache.catalina.connector.Connector.initialize(Connector.java:1058)

...
Oct 15, 2009 10:10:44 PM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException:  Protocol handler initialization failed: 
java.lang.Exception: Invalid Server SSL Protocol

at
..

But I can't see where I'm deviating from docs with:
Connector
port=8443
enableLookups=false
SSLEnabled=true scheme=https secure=true
SSLCertificateFile=${catalina.base}/conf/cert.pem
SSLCertificateKeyFile=${catalina.base}/conf/key.pem
disableUploadTimeout=true
SSLVerifyClient=optional
sslProtocol=TLS
/

BTW I'm now tryng recent apache-tomcat-6.0.20 and rebuilt 
tomcat-native-1.1.16.


Any insight would be immensely appreciated!

Best regards,
-Ken




Presumably the shutdown failure is caused by this NPE interrupting the call:

Oct 15, 2009 10:19:29 PM org.apache.coyote.http11.Http11AprProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Oct 15, 2009 10:19:29 PM org.apache.catalina.connector.MapperListener 
destroy

WARNING: Error unregistering MBeanServerDelegate
java.lang.NullPointerException
at 
org.apache.catalina.connector.MapperListener.destroy(MapperListener.java:171)
at 
org.apache.catalina.connector.Connector.stop(Connector.java:1179)
at 
org.apache.catalina.core.StandardService.stop(StandardService.java:593)




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



Tomcat works fine on deployed machine, but not on others machines in network

2009-10-15 Thread Avijit Dutta

We have installed tomcat in a linux machine, and when we invoke http://linux
machine ip:8080/ from that linux machine, it is showing properly.
But, when we try to access the same URL from another machine in the same
LAN, then nothing is coming up.
Please help.
 
The 2nd machine is able to ping the linux machine's IP.
Also. firewall is disabled.
 
~Thanks

Avijit Dutta

-- 
View this message in context: 
http://www.nabble.com/Tomcat-works-fine-on-deployed-machine%2C-but-not-on-others-machines-in-network-tp25919841p25919841.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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