Setting timeout for HTTP response in case client app stops reading

2008-03-13 Thread Gary Hirschhorn
We are using Tomcat 5.5 and have a servlet that writes the HTTP response
to a ServletOutputStream.  Occasionally, a calling application will keep
the HTTP connection alive but fail to read the complete HTTP response,
effectively blocking the thread that is doing the writing.  This in turn
blocks our application as this thread is holding on to some critical
locks.  Is there some way we can set a timeout on this OutputStream (or
configure Tomcat to do so) so that it doesn't block forever?  We are
thinking there should be something somewhat analogous to
URLConnection.setReadTimeout(int).

 

Our code is calling HttpServletResponse.getOutputStream() to get the
OutputStream to write to, and here is the a stack trace after we call
flush() on this object.

 

sys_txgc daemon prio=2 tid=0x079f5000 nid=0x1a3c runnable
[0x080df000..0x080dfc94]

   java.lang.Thread.State: RUNNABLE

at java.net.SocketOutputStream.socketWrite0(Native Method)

at java.net.SocketOutputStream.socketWrite(Unknown Source)

at java.net.SocketOutputStream.write(Unknown Source)

at
org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOut
putBuffer.java:746)

at
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:433)

at
org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer
.java:304)

at
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:991
)

at org.apache.coyote.Response.action(Response.java:182)

at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:322
)

at
org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)

at
org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStrea
m.java:97)

 

Any thoughts or help is appreciated.

 

Thanks,

Gary



Problems with JK connector and IIS (HSE_REQ_SEND_RESPONSE_HEADER failed)

2008-03-13 Thread Ari Suutari

Hi,

We are unable to get ISAPI JK connector (isapi_redirector.dll) working on
one Windows 2003 based server installation. Here are our findings so far:

- When browsing to http://localhost:8080 everything works, ie. tomcat side is 
working
- When browsing to http://localhost/some.file.txt works, if 
isapi_redirector.dll is unloaded,
  ie. IIS seems to also work.

We enabled debugging in JK and it results in following output:

- First server starts up (ok),
- redirector creates connection to tomcat (ok)
- redirector sends request to tomcat (ok)
- redirector receives response from tomcat (ok)
- redirector sends output to browser (FAILS)

The last operation fails with HSE_REQ_SEND_RESPONSE_HEADER failed with 
error=2746
There were some similar cases that I found with google, but no real solution to 
this.
In some of those cases this occurred only after heavy traffic, but in our case 
it
doesn't work at all.

The isapi_redirectory.dll version is 1.2.26.

The log contents are appended to end of this mail.

   Ari S.



[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_util.c (430): Pre-processed log time stamp format is '[%a %b %d %H:%M:%S.000 
%Y] '

[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_shm.c (169): Initialized 
shared memory size=28800 free=28672 addr=0x1aa
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c (1688): 
Using registry.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c (1691): Using log file 
C:\SyncronTech\Tomcat\log\isapi_redirect.log.

[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c (1692): 
Using log level 1.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c (1693): 
Using extension uri /jakarta/isapi_redirect.dll.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c (1694): Using worker file 
C:\SyncronTech\Tomcat\conf\workers.properties.minimal.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c (1695): Using worker mount file 
C:\SyncronTech\Tomcat\conf\uriworkermap.properties.

[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c (1697): 
Using rewrite rule file .
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c (1699): 
Using uri select 3.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): Adding 
property '/*' with value 'wlb' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): Adding 
property '/jkmanager' with value 'jkstatus' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_uri_worker_map.c (722): Loading urimaps from 
C:\SyncronTech\Tomcat\conf\uriworkermap.properties with reload check interval 60 seconds

[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_uri_worker_map.c (379): 
wildchar rule '/*=wlb' source 'uriworkermap' was added
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_uri_worker_map.c (387): exact rule '/jkmanager=jkstatus' source 'uriworkermap' 
was added

[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): Adding 
property 'worker.list' with value 'wlb,jkstatus' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): Adding 
property 'worker.ajp13w.type' with value 'ajp13' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): Adding property 'worker.ajp13w.host' with value 'localhost' to 
map.

[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): Adding 
property 'worker.ajp13w.port' with value '8009' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): Adding 
property 'worker.wlb.type' with value 'lb' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): Adding property 'worker.wlb.balance_workers' with value 'ajp13w' 
to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): Adding property 'worker.jkstatus.type' with value 'status' to 
map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (770): Checking for references with prefix worker. with wildcard 
(recursion 1)

[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (590): Dump of map: 
'worker.list' - 'wlb,jkstatus'
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (590): Dump of map: 
'worker.ajp13w.type' - 'ajp13'
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (590): Dump of map: 
'worker.ajp13w.host' - 'localhost'
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (590): Dump of map: 
'worker.ajp13w.port' - '8009'
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (590): Dump of map: 
'worker.wlb.type' - 'lb'
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (590): Dump of map: 
'worker.wlb.balance_workers' - 'ajp13w'
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (590): Dump of map: 
'worker.jkstatus.type' - 'status'
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_worker.c (241): creating 
worker wlb
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] 

64 bit questions

2008-03-13 Thread Stephen Nelson-Smith
Hi,

I have a machine with 2 x Intel(R) Xeon(R) CPU E5430 @ 2.66GHz and 8G of RAM.

If I want to make best use of this RAM, should I run this in 64 bit
(48 bit hack) mode?

If so are there any gotchas with JDKs, 64 bit Tomcat etc?  Also we use
some specific libraries - ojdbc14, bfopdf, ojdbc14 for example.  Are
there 64 bit equivalents of these?

S.

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



RE: 64 bit questions

2008-03-13 Thread Peter Crowther
 From: Stephen Nelson-Smith [mailto:[EMAIL PROTECTED]
 I have a machine with 2 x Intel(R) Xeon(R) CPU E5430 @
 2.66GHz and 8G of RAM.

 If I want to make best use of this RAM, should I run this in 64 bit
 (48 bit hack) mode?

Operating system?

 If so are there any gotchas with JDKs, 64 bit Tomcat etc?

Tomcat is pure Java, so runs in a Java Virtual Machine (JVM).  The virtual 
here is key - the VM isolates Java classes from the machine architecture.  If 
there's a Sun JVM available for your OS and architecture, Tomcat should run.  
It may or may not run on other JVMs, but avoid the rather idiosyncratic GNU one 
- we get fairly regular reports of issues with it.

 Also we use
 some specific libraries - ojdbc14, bfopdf, ojdbc14 for example.  Are
 there 64 bit equivalents of these?

If the libraries are pure Java, the architecture of the underlying system is 
irrelevant.

- Peter

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



Réf. : Re: Disabling the sessions

2008-03-13 Thread jean-louis . mateo

Hi everybody,

It seems that filtering by programming is the best solution
many thanks Len for your response.

Best Regards



Jean-Louis Matéo
Bull, Architect of an Open World TM
Bull SA - 53 r de l'Etang BP39 - 69578 LIMONEST
tél - 08 20 08 20 00
fax - 04 72 52 51 24
__
BULL TELESERVICE : Support et conseil logiciels  progiciels multi-éditeurs
GCOS - AIX - Open Source - Microsoft
__


|-+---
| |   Len Popp  |
| |   [EMAIL PROTECTED]|
| |   com|
| |   |
| |   13/03/2008 06:40|
| |   Veuillez|
| |   répondre à  |
| |   Tomcat Users   |
| |   List   |
| |   |
|-+---
  
---|
  | 
  |
  |Pour :   Tomcat Users List users@tomcat.apache.org   
  |
  |cc : 
  |
  |Objet :  Re: Disabling the sessions  
  |
  
---|



There's an article here:
http://randomcoder.com/articles/jsessionid-considered-harmful
that describes how to disable URL rewriting using a filter.
--
Len

On 3/12/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Tomcat :
 Java  :


 Hi everybody,

 is there any way to turn off the jsessionid (disabling the rewriting URL)
?

 Thank you very much


 Best Regards



 Jean-Louis Matéo



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








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



Re: 64 bit questions

2008-03-13 Thread Stephen Nelson-Smith
On Thu, Mar 13, 2008 at 9:29 AM, Peter Crowther
[EMAIL PROTECTED] wrote:
  From: Stephen Nelson-Smith [mailto:[EMAIL PROTECTED]

  I have a machine with 2 x Intel(R) Xeon(R) CPU E5430 @
   2.66GHz and 8G of RAM.
  
   If I want to make best use of this RAM, should I run this in 64 bit
   (48 bit hack) mode?

  Operating system?

RHEL 5.

S.

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



Many Java Processes

2008-03-13 Thread Stephen Nelson-Smith
Hi,

I've noticed on one machine (4.1.31 / RHEL 3) as soon as I start Java
I see many Java processes:

$  pgrep -l java
1783 java
1844 java
1848 java
1849 java
1880 java
1881 java
1882 java
1883 java
1885 java
1886 java
1887 java
1888 java
1889 java
1890 java
1891 java
1892 java
1893 java
1894 java
1895 java
1896 java
1897 java
1898 java
1899 java
1900 java
1905 java
1906 java
1973 java
1981 java
1983 java
1984 java
1985 java

I only see one java process in the process list:
# ps auxw | grep java
root  1783  0.7 30.5 333988 156532 ? SMar12   7:31
/usr/lib/jvm/java/bin/java -Dbuild.compiler.emacs=true
-Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath
/usr/lib/jvm/java/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar
-Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat

Is this to do with threading?  I can't see a setting in server.xml
that would make this happen?

I have 4 other machines running the same version on the same OS, but I
only see one java process when I do pgrep -l java.  What's happening?

S.

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



RE: 64 bit questions

2008-03-13 Thread Peter Crowther
 From: Stephen Nelson-Smith [mailto:[EMAIL PROTECTED]
   Operating system?

 RHEL 5.

http://java.sun.com/javase/6/webnotes/install/system-configurations.html - 
looks supported to me.

- Peter

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



Re: 64 bit questions

2008-03-13 Thread Stephen Nelson-Smith
On Thu, Mar 13, 2008 at 10:13 AM, Peter Crowther
[EMAIL PROTECTED] wrote:
  From: Stephen Nelson-Smith [mailto:[EMAIL PROTECTED]
 Operating system?
  
   RHEL 5.

  http://java.sun.com/javase/6/webnotes/install/system-configurations.html - 
 looks supported to me.

Aha - good lead - I'm on 1.4.2:

http://java.sun.com/j2se/1.4.2/system-configurations.html

Looks like there's no 64 bit linux option.

I really need to get onto a newer Java!

S.

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



Compiling Tomcat Native Library on Debian Etch

2008-03-13 Thread ssozonoff

Hi All,

Has anyone successfully compiled the Tomcat Native Library on Debian Etch?

Our IT guys insist on using this Distro, my experience lies with Gentoo

So I run a ./configure --with-apr=/usr/bin --disable-openssl

Any the get loads of errors which look the following:

./configure: line 4315: APR_INCLUDES: command not found
./configure: line 4316: APR_LIBS: command not found
./configure: line 4317: APR_LIB_TARGET: command not found
./configure: line 4318: APR_SO_EXT: command not found
...
...
etc .

Thanks,
Serge

-- 
View this message in context: 
http://www.nabble.com/Compiling-Tomcat-Native-Library-on-Debian-Etch-tp16024544p16024544.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: tomcat/axis not compiling java

2008-03-13 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

J.R.,

atheus wrote:
| Sorry, yes, we're running apache 2 with mod_jk. It works - jsps
compile and
| run. It's just these damn jws things.

Is it possible that you are missing:

JkMount   /*.jwsmyWorker

??

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

iEYEARECAAYFAkfZJL0ACgkQ9CaO5/Lv0PBoAACgwNVXRe5pUUQvDfwRJ1GCLzsW
ndoAn0swJJZuxh4/yInwETjvQGkQGNqm
=edTt
-END PGP SIGNATURE-

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



Re: Many Java Processes

2008-03-13 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stephen,

Stephen Nelson-Smith wrote:
| I've noticed on one machine (4.1.31 / RHEL 3) as soon as I start Java
| I see many Java processes:

These are threads, not processes. Some Linux kernel versions report them
as processes, and some don't. It also may depend on your version of ps
(or pgrep, in this case).

| I only see one java process in the process list:

That's because your version of 'ps' knows what's up.

| Is this to do with threading?

Yes.

| I can't see a setting in server.xml that would make this happen[.]

That's because server.xml has no bearing on this behavior. It's all the OS.

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

iEYEARECAAYFAkfZJdIACgkQ9CaO5/Lv0PBTvwCgtwgMRnxCiz8XNhs6trhgQ4ck
kLEAmwQ74mFrusBQ2UCz5Vxys3mqc8KP
=roA/
-END PGP SIGNATURE-

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



Re: Compiling Tomcat Native Library on Debian Etch

2008-03-13 Thread Jean Monnat
Hi

Yes, at least it worked for me tomcat6

I downloaded apr from http://apr.apache.org/
extract and compile it in /opt

then I ./configure native library --with-apr=/usr/local/apr
 then in catalina.sh
LD_LIBRARY_PATH=/usr/local/apr/lib
export LD_LIBRARY_PATH

I hope this will help you

Jean

ssozonoff a écrit :
 Hi All,
 
 Has anyone successfully compiled the Tomcat Native Library on Debian Etch?
 
 Our IT guys insist on using this Distro, my experience lies with Gentoo
 
 So I run a ./configure --with-apr=/usr/bin --disable-openssl
 
 Any the get loads of errors which look the following:
 
 ./configure: line 4315: APR_INCLUDES: command not found
 ./configure: line 4316: APR_LIBS: command not found
 ./configure: line 4317: APR_LIB_TARGET: command not found
 ./configure: line 4318: APR_SO_EXT: command not found
 ...
 ...
 etc .
 
 Thanks,
 Serge
 



signature.asc
Description: OpenPGP digital signature


Re: servlet crashing tomcat

2008-03-13 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kimberly,

Tomcat version? JVM version? Also, are you using a packaged Tomcat (from
RH) or are you using a real one from tomcat.apache.org?

Kimberly Begley wrote:
| Hi - I am doing something very wrong with a servlet I wrote - it seems
to be
| crashing tomcat5.5 - the log files are huge but I have pasted the ends
of 3
| of them - just wondering if anyone can interpret them in any way that
might
| tell me where to start...
|
| I built the program in java and tested it command line without errors
- - then
| copied it into the doPost method of a servlet but have obviously done
| something very wrong but I'm not sure where to start.

It looks like a configuration issue, not a code issue.

Note that this error message:

| Mar 12, 2008 6:58:01 AM
| org.apache.catalina.core.AprLifecycleListenerlifecycleEvent
| INFO: Failed shutdown of Apache Portable Runtime

... is no big deal: you probably don't have APR installed, so Tomcat
can't shut it down.

It looks like Tomcat is failing to shut down properly:

| Mar 12, 2008 6:57:58 AM
org.apache.catalina.mbeans.ServerLifecycleListenerproce
| ssContainerRemoveChild
| SEVERE: processContainerRemoveChild: Throwable
| javax.management.MalformedObjectNameException: Invalid character ':' in
| value part of property

[snip]

| at org.apache.catalina.startup.Catalina.stop(Catalina.java:602)
| at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run
| (Catalina.java:645)


Note the description of the exception that is being thrown, there:

Invalid character ':' in value part of property

I wonder if you have a broken server.xml or context.xml for your
application.

Have you customized Tomcat's server.xml file? If so, please post those
customizations and we'll take a look. If you have a META-INF/context.xml
file for your application, post that, too, and we'll see if we can find
anything.

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

iEYEARECAAYFAkfZJ58ACgkQ9CaO5/Lv0PAUQgCfULfiBUNYh4O7AbH2MNhAxqIf
Y4EAoLV2qZIs7U9AcK7icLixV2TuLUo/
=Y7wu
-END PGP SIGNATURE-

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



Re: context docBase UNC path support

2008-03-13 Thread Swapnil Brahmbhatt
Thanks Mark

Mark Thomas [EMAIL PROTECTED] wrote: Swapnil Brahmbhatt wrote:
 Hello,
 
 Does tomcat 5.0.30 supports UNC path for context docBase?

Yes. I've added this to the FAQ. See http://wiki.apache.org/tomcat/FAQ/Windows

Mark


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



   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Re: Multi domain certificate with keytool

2008-03-13 Thread Some user

Thanks Vamsi!

The post you mention pointed me in the right direction and I have it up and
running. Great! Wasted 3 days on this one. I needed to transform my
certificate to PKCS12, I missed that.

Here is how for further reference:

Create a new keystore with the signed certificate, the key and the
chainfile. The keystore needs to be PKCS12, the default JKS Java keystore is
not accepted if you created the certiface with OpenSSL. The chainfile is a
file with all the certificates from you to a trusted root authority.

openssl pkcs12 -export -inkey mycert.key -in mycert.pem -out mycert.pkcs12
-chain -CAfile rootchain.pem

We changed the storetype so from now on you'll always have to specify the
storetype (PKCS12) as a parameter.

keytool -v -list -keystore keystore.pkcs12 -storetype PKCS12

Check the chain length, it has to be  1 or you certainly don't have a valid
path to the root authority.

Add the right keystore to the Tomcat server.xml file. You don't need to
specify a keyAlias as there is only one certificate in the keystore.


Vamsavardhana Reddy-2 wrote:
 
 You should be able to create a PKCS12 keystore using OpenSSL with the
 private key and the certificate you have.  See if the following thread
 helps.
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg08816.html
 
 ++Vamsi
 
 On Wed, Mar 12, 2008 at 6:59 PM, Some user [EMAIL PROTECTED]
 wrote:
 

 Dear Tomcat wizards,

 I need a signed multi domain certificate for Tomcat (x.example.com,
 y.example.com, z.example.com). I do have a signed certificate but can't
 import this in the keystore with the keytool command as I generated the
 request with OpenSSL and now keytool complains that the keys don't match.

 Fine, so I need to generate a CSR request with keytool first. When I run
 the
 keytool -genkey -alias... command I get these questions where I need to
 enter my first and last name:

 What is your first and last name?
  [Unknown]: x.example.com

 This is where I enter my fully qualified server name for the certificate.
 Problem is I can't enter MULTIPLE DOMAINS. I need more subdomains here as
 my
 server listens to x.example.com, y.example.com and z.example.com. A
 wildcard
 certificate is not an option as the signing authority doesn't want to
 sign
 wildcard certificates.

 Does anyone know how to generate a multi domain request with keytool? I
 know
 how to do this with openssl but I need a keytool one...

 Thanks!
 --
 View this message in context:
 http://www.nabble.com/Multi-domain-certificate-with-keytool-tp16002309p16002309.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.


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


 
 

-- 
View this message in context: 
http://www.nabble.com/Multi-domain-certificate-with-keytool-tp16002309p16025518.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Database connections grow after redeploy

2008-03-13 Thread Scott McClanahan

On Wed, 2008-03-12 at 14:31 -0400, Scott McClanahan wrote:
 We are using the dbcp capabilities of tomcat and configured the
 datasource in the applications context configuration file.  In a few
 simple tests we've seen some unexpected behavior and aren't sure if it's
 an error on our part.  We are running tomcat 5.5.26 with the
 compatibility libraries on java 1.4.2_16.  Also, CentOS 5.1.
 
 Basically, we setup the datasource to have an initialSize=5, maxIdle=10,
 minIdle=5.  We made a simple request to the web application and
 immediately 5 connections to database were created (as expected).  When
 we redeployed the application lambda probe reported zero connections to
 the database in that datasource (as expected).  Netstat on the server
 reported 5 connections still and tcpdump showed that the validation
 queries were still being done across those connections.  The moment we
 made the same simple request to the application again 5 new connections
 were created and the 5 previous connections were not used at all for the
 database queries.  If we follow this same procedure any arbitrary number
 of times 5 additional connections are created and the previous 5 are
 useless (although still validated with the validationquery).
 
 Is this expected behavior during a redeploy or application restart?  We
 are using the connection pooling libraries bundled in tomcat and haven't
 loaded any pooling libraries in the application.  Thanks.

Some times our exchange server really mangles e-mails or out right
blocks them so this is just a resend in case it didn't make it through.
Anybody else seeing this behavior?  More details can be made available.


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



RE: Database connections grow after redeploy

2008-03-13 Thread Caldarale, Charles R
 From: Scott McClanahan [mailto:[EMAIL PROTECTED] 
 Subject: Re: Database connections grow after redeploy
 
 Some times our exchange server really mangles e-mails or out right
 blocks them so this is just a resend in case it didn't make 
 it through.

Before resending, look in the archives to see if your original message
is there (it is):
http://marc.info/?l=tomcat-user

As far as the continuing data base connections, I can only speculate
that the prior instances of the webapp are still active, thereby
preventing cleanup of their resources.  There are numerous possible
causes, including such things as spawning extra threads and not
terminating them when the webapp is told to shut down.  You should be
able to work around the problem by making the connection pool global
rather than local to the webapp.

 - Chuck


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

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



RE: Many Java Processes

2008-03-13 Thread David Short
Don't know if this applies here or not but, I got this once when my
ORACLE_HOME wasn't set when using Jserv (wrapper.env=) with the Apache web
server.  

-Original Message-
From: Stephen Nelson-Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 13, 2008 3:18 AM
To: Tomcat Users List
Subject: Many Java Processes

Hi,

I've noticed on one machine (4.1.31 / RHEL 3) as soon as I start Java I see
many Java processes:

$  pgrep -l java
1783 java
1844 java
1848 java
1849 java
1880 java
1881 java
1882 java
1883 java
1885 java
1886 java
1887 java
1888 java
1889 java
1890 java
1891 java
1892 java
1893 java
1894 java
1895 java
1896 java
1897 java
1898 java
1899 java
1900 java
1905 java
1906 java
1973 java
1981 java
1983 java
1984 java
1985 java

I only see one java process in the process list:
# ps auxw | grep java
root  1783  0.7 30.5 333988 156532 ? SMar12   7:31
/usr/lib/jvm/java/bin/java -Dbuild.compiler.emacs=true
-Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath
/usr/lib/jvm/java/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar
-Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat

Is this to do with threading?  I can't see a setting in server.xml that
would make this happen?

I have 4 other machines running the same version on the same OS, but I only
see one java process when I do pgrep -l java.  What's happening?

S.

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



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



Re: Multi domain certificate with keytool

2008-03-13 Thread Vamsavardhana Reddy
Glad to learn that your problem is solved :)

++Vamsi

On Thu, Mar 13, 2008 at 7:25 PM, Some user [EMAIL PROTECTED] wrote:


 Thanks Vamsi!

 The post you mention pointed me in the right direction and I have it up
 and
 running. Great! Wasted 3 days on this one. I needed to transform my
 certificate to PKCS12, I missed that.

 Here is how for further reference:

 Create a new keystore with the signed certificate, the key and the
 chainfile. The keystore needs to be PKCS12, the default JKS Java keystore
 is
 not accepted if you created the certiface with OpenSSL. The chainfile is a
 file with all the certificates from you to a trusted root authority.

 openssl pkcs12 -export -inkey mycert.key -in mycert.pem -out mycert.pkcs12
 -chain -CAfile rootchain.pem

 We changed the storetype so from now on you'll always have to specify the
 storetype (PKCS12) as a parameter.

 keytool -v -list -keystore keystore.pkcs12 -storetype PKCS12

 Check the chain length, it has to be  1 or you certainly don't have a
 valid
 path to the root authority.

 Add the right keystore to the Tomcat server.xml file. You don't need to
 specify a keyAlias as there is only one certificate in the keystore.


 Vamsavardhana Reddy-2 wrote:
 
  You should be able to create a PKCS12 keystore using OpenSSL with the
  private key and the certificate you have.  See if the following thread
  helps.
 
  http://www.mail-archive.com/[EMAIL PROTECTED]/msg08816.html
 
  ++Vamsi
 
  On Wed, Mar 12, 2008 at 6:59 PM, Some user [EMAIL PROTECTED]
  wrote:
 
 
  Dear Tomcat wizards,
 
  I need a signed multi domain certificate for Tomcat (x.example.com,
  y.example.com, z.example.com). I do have a signed certificate but can't
  import this in the keystore with the keytool command as I generated the
  request with OpenSSL and now keytool complains that the keys don't
 match.
 
  Fine, so I need to generate a CSR request with keytool first. When I
 run
  the
  keytool -genkey -alias... command I get these questions where I need
 to
  enter my first and last name:
 
  What is your first and last name?
   [Unknown]: x.example.com
 
  This is where I enter my fully qualified server name for the
 certificate.
  Problem is I can't enter MULTIPLE DOMAINS. I need more subdomains here
 as
  my
  server listens to x.example.com, y.example.com and z.example.com. A
  wildcard
  certificate is not an option as the signing authority doesn't want to
  sign
  wildcard certificates.
 
  Does anyone know how to generate a multi domain request with keytool? I
  know
  how to do this with openssl but I need a keytool one...
 
  Thanks!
  --
  View this message in context:
 
 http://www.nabble.com/Multi-domain-certificate-with-keytool-tp16002309p16002309.html
  Sent from the Tomcat - User mailing list archive at Nabble.com.
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Multi-domain-certificate-with-keytool-tp16002309p16025518.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.


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




Connection pooling

2008-03-13 Thread [EMAIL PROTECTED]
Hi,
i'm using tomcat 5.5.9 for a web server application where many clients connect 
and do stuffs.
each time they login to the server, for example, a database query is performed. 
Application works, but reading 
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html#Common%20Problems
 some doubt come to my mind. I just want to be sure that i'm using connection 
pooling correctly.
In that article there is written:

Here is an example of properly written code to use a db connection obtained 
from a connection pool:

  Connection conn = null;
  Statement stmt = null;  // Or PreparedStatement if needed
  ResultSet rs = null;
  try {
conn = ... get connection from connection pool ...
  ...

But what's the best way to get connection from connection pool?

Here is what i've done:

My context.xml file:

Context debug=5 reloadable=true crossContext=true
  Resource
name=jdbc/someDB
auth=Container
type=javax.sql.DataSource
maxActive=300
maxIdle=30
maxWait=15000
username=someUser
password=somePass
driverClassName=com.mysql.jdbc.Driver
validationQuery=SELECT 1
url=jdbc:mysql://1.1.1.1:3306/somePath/
/Context

My web.xml file:

web-app xmlns=http://java.sun.com/xml/ns/j2ee; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4
  display-nameSome name/display-name
  listener
listener-classsomePackage.ApplicationWatch/listener-class
  /listener
  servlet
servlet-namehtmlcontent/servlet-name
servlet-classsomePackage.HtmlContentServlet/servlet-class
  /servlet
  servlet-mapping
servlet-namehtmlcontent/servlet-name
url-pattern/htmlcontent.view/url-pattern
  /servlet-mapping
  resource-ref
descriptionDB Connection/description
res-ref-namejdbc/someDB/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref
/web-app

Then i have Database.java class where i have the method:

private Connection getConnection() throws Exception {
// get context: provides the starting point for resolution of 
names
Context ctx = new InitialContext();
if (ctx == null) {
throw new Exception(No Context);
}
// retrieve datasource
DataSource ds = (DataSource) 
ctx.lookup(java:comp/env/jdbc/someDB);
if (ds == null) {
throw new Exception(No Datasource);
}
// return db connection
return ds.getConnection();
}

that get connection for all of the 20-30 methods in Database.java that do a 
query each. An example of method in Database.java that use it is:

// get user info
public UserData getUserData(UserData res, String un, String pw) {
Connection con = null;
Statement stmt = null;
ResultSet rst = null;
try {
// get connection
con = getConnection();
if (con == null) {
throw new Exception(No Connection);
}
stmt = con.createStatement();
// perform query
rst = stmt.executeQuery(some sql syntax);
if (rst.next()) {
  .
}
else {
throw new Exception(No results);
}
}
catch (Exception e1) {
return null;
}
// close resources
finally {
try {
rst.close();
rst = null;
}
catch (Exception e2) {
}
try {
stmt.close();
stmt = null;
}
catch (Exception e3) {
}
try {
con.close();
con = null;
}
catch (Exception e4) {
}
}
return res;
}

At the moment, methods are not static, so each time a client thread need to 
login, for example, i do (new Database()).getUserData(res, un, pw).

First question is if that solution is correct or create each time a new 
Database class is useless/stupid. If it's stupid, should i make the methods 
static? or should i create a static database object each time server is started?
Second, is that getConnection() method a correct way for what 

Re: Custom URL handlers in Tomcat web app

2008-03-13 Thread pmanvi

Hi Matt,

Today I was trying to port one legacy application from JRun to Tomcat 
facing same problem with URL.
URL.setURLStreamHandlerFactory.java.lang.Error: factory already defined
1. I tried out setting  -Djava.protocol.handler.pkgs=my.package pointing
to where my CustomURLStreamHander is present in catalina.sh 
2. Added the required jar common/lib  other mentioned places

As you have said both didn't help as java.protocol.handler.pkgs setting is
not working.

http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/naming/resources/jndi/Handler.html
I also did not find anything about this is Tomcat configuration files.

Do let me know if you find some solution to the same.

Thanks,
Praveen M.



MK-24 wrote:
 
 Hi everybody,
 
 I have the following problem:
 My Web application needs to handle Lotus Notes URLs which use the scheme
 notes. However, since Java does not know this protocol by default, it
 throws a
 MalformedUrlException when I construct a java.net.URL from a notes://
 URL-string.
 
 So, I read up on custom URL handlers and as far as I understand, you have
 to
 code a custom URLStreamHandler class and a custom URLConnection class.
 Okay, no
 big deal. However, there are three ways to register your new handler:
 
 1) put it in the sun.net.www.protocol.yourprotocol package
 2) put it in a custom package and declare that package to the JRE using
 the
 java.protocol.handler.pkgs system property
 3) register a custom URLStreamHandlerFactory using
 URL.setUrlStreamHandlerFactory
 
 problem is, none of these approaches work in Tomcat 5.5. For 1), this
 simply
 didn't have any effect for me. 2) neither, maybe Tomcat simply ignores
 that
 property? 3) doesn't work because Tomcat already registers its own
 factory, and
 for some reason I can't quite put my hands on you are not allowed to call
 that
 method twice per JVM instance.
 
 This issue is also discussed on Sun's Java issue tracker:
 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4648098
 
 The ticket has been opened six years ago and still no fix!
 
 Does Tomcat meanwhile have some workaround for this? I mean, I don't even
 need
 an actual URL connection, I just want to pass custom URL strings, which
 should
 be perfectly fine if they are valid URLs, no?!
 
 I hope you can help!
 
 Best,
 Matt
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Custom-URL-handlers-in-Tomcat-web-app-tp15629476p16027888.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Compiling Tomcat Native Library on Debian Etch

2008-03-13 Thread ssozonoff

Hi,

OK, so you did not use APR from debian package (apt)?

I will give your solution a try

Thanks,
Serge



Jean Monnat wrote:
 
 Hi
 
 Yes, at least it worked for me tomcat6
 
 I downloaded apr from http://apr.apache.org/
 extract and compile it in /opt
 
 then I ./configure native library --with-apr=/usr/local/apr
  then in catalina.sh
 LD_LIBRARY_PATH=/usr/local/apr/lib
 export LD_LIBRARY_PATH
 
 I hope this will help you
 
 Jean
 
 ssozonoff a écrit :
 Hi All,
 
 Has anyone successfully compiled the Tomcat Native Library on Debian
 Etch?
 
 Our IT guys insist on using this Distro, my experience lies with
 Gentoo
 
 So I run a ./configure --with-apr=/usr/bin --disable-openssl
 
 Any the get loads of errors which look the following:
 
 ./configure: line 4315: APR_INCLUDES: command not found
 ./configure: line 4316: APR_LIBS: command not found
 ./configure: line 4317: APR_LIB_TARGET: command not found
 ./configure: line 4318: APR_SO_EXT: command not found
 ...
 ...
 etc .
 
 Thanks,
 Serge
 
 
 
  
 

-- 
View this message in context: 
http://www.nabble.com/Compiling-Tomcat-Native-Library-on-Debian-Etch-tp16024544p16029126.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Many Java Processes

2008-03-13 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

David Short wrote:
| Don't know if this applies here or not but, I got this once when my
| ORACLE_HOME wasn't set when using Jserv (wrapper.env=) with the Apache web
| server.

Wow. Jserv? Now /that's/ a blast from the past! ;)

That would have been with the Oracle type 2 driver (which is rarely used
these days in favor of type-3 or type-4 drivers), too.

- -chris

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

iEYEARECAAYFAkfZTx4ACgkQ9CaO5/Lv0PA0EACgooPXkvzyqbVg6dx6UG05ie+x
yQsAoKlz9kzXPHXcHKjvXU151AAX0cbd
=RGSk
-END PGP SIGNATURE-

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



Re: Database connections grow after redeploy

2008-03-13 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

Caldarale, Charles R wrote:
| From: Scott McClanahan [mailto:[EMAIL PROTECTED]
| Subject: Re: Database connections grow after redeploy
|
| As far as the continuing data base connections, I can only speculate
| that the prior instances of the webapp are still active, thereby
| preventing cleanup of their resources.

I agree. Scott: are you able to run your application through a tool that
allows you to observe the heap and object graphs? Many profilers will
allow you to do this. You could look for instances of the connection
pool and see what is holding onto them. It's unusual for an application
to hold references to the pool, but not completely impossible.

More likely is that one or more application-level objects has retained a
reference to a specific Connection object, which, of course, retains
references back to the connection pool that created it. I would check
any ServletContextListener classes you have, and then a generic search
for putting things into the ServletContext, since that is one of the
only places that applications typically store long-lived objects.

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

iEYEARECAAYFAkfZUDAACgkQ9CaO5/Lv0PBwCwCfbz4bORVnNboqnMWZu6GQClbA
CNAAn2BIaoZChNHbsks7/tLdK75S2A3X
=4Ssq
-END PGP SIGNATURE-

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



Re: Many Java Processes

2008-03-13 Thread dshort
I experienced the reported multiple-thread Java issue.  Yes, this was with 
Apache 1.x embedded with an Oracle vertical.  Just trying to help...

 Christopher Schultz [EMAIL PROTECTED] wrote: 
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

David Short wrote:
| Don't know if this applies here or not but, I got this once when my
| ORACLE_HOME wasn't set when using Jserv (wrapper.env=) with the Apache web
| server.

Wow. Jserv? Now /that's/ a blast from the past! ;)

That would have been with the Oracle type 2 driver (which is rarely used
these days in favor of type-3 or type-4 drivers), too.

- -chris

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

iEYEARECAAYFAkfZTx4ACgkQ9CaO5/Lv0PA0EACgooPXkvzyqbVg6dx6UG05ie+x
yQsAoKlz9kzXPHXcHKjvXU151AAX0cbd
=RGSk
-END PGP SIGNATURE-

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

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



Re: Database connections grow after redeploy

2008-03-13 Thread Scott McClanahan

On Thu, 2008-03-13 at 12:02 -0400, Christopher Schultz wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Chuck,
 
 Caldarale, Charles R wrote:
 | From: Scott McClanahan [mailto:[EMAIL PROTECTED]
 | Subject: Re: Database connections grow after redeploy
 |
 | As far as the continuing data base connections, I can only speculate
 | that the prior instances of the webapp are still active, thereby
 | preventing cleanup of their resources.
 
 I agree. Scott: are you able to run your application through a tool that
 allows you to observe the heap and object graphs? Many profilers will
 allow you to do this. You could look for instances of the connection
 pool and see what is holding onto them. It's unusual for an application
 to hold references to the pool, but not completely impossible.
 
 More likely is that one or more application-level objects has retained a
 reference to a specific Connection object, which, of course, retains
 references back to the connection pool that created it. I would check
 any ServletContextListener classes you have, and then a generic search
 for putting things into the ServletContext, since that is one of the
 only places that applications typically store long-lived objects.
 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.8 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iEYEARECAAYFAkfZUDAACgkQ9CaO5/Lv0PBwCwCfbz4bORVnNboqnMWZu6GQClbA
 CNAAn2BIaoZChNHbsks7/tLdK75S2A3X
 =4Ssq
 -END PGP SIGNATURE-
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

Do you have any suggestions for a profiling tool like you described?
Preferably open source.  Thanks.


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



Re: Database connections grow after redeploy

2008-03-13 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Scott,

Scott McClanahan wrote:
| Do you have any suggestions for a profiling tool like you described?
| Preferably open source.  Thanks.

I have used Borland's OptimizeIt in the past, but I think it's a defunct
product (and it's also neither free nor open source). I don't have
experience with other profilers or debuggers, but lots of folks on the
list have mentioned JProfiler
(http://www.ej-technologies.com/products/jprofiler/overview.html) which
has a free trial, but I don't believe it is free. My understanding is
that it is a very good tool, though.

JProbe is also brought up on the list occasionally. Also not free, also
has a free trial.

Search for archives of this list for discussions concerning profiles,
debuggers and such, because I apparently don't have any good
recommendations ;)

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

iEYEARECAAYFAkfZaUsACgkQ9CaO5/Lv0PBNVQCgvDLEJ66KelhIqsmuMCae1pkB
6uQAnif2EQ35yv5I2KtUrTPMxDDS8PTE
=7OQZ
-END PGP SIGNATURE-

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



Re: Connection pooling

2008-03-13 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Daad,

[EMAIL PROTECTED] wrote:
| i'm using tomcat 5.5.9 for a web server application where many
| clients connect and do stuffs. each time they login to the server,
| for example, a database query is performed. Application works, but
| reading
|
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html#Common%20Problems
| some doubt come to my mind.

It's interesting that non-native English speakers often use the word
doubt rather than the more usual question. Just FYI (and any other
non-native English speakers who happen to be reading), the word doubt
typically has a connotation closer to suspicion, rather than an
interrogative. The better term in English is question.

In Italiano, la parola doubt e piu similare a uno dubbio, una
domanda non. Me dispiace per mio Italiano malo... seguo solo due
semestri d'Italiano. ;)

| [W]hat's the best way to get connection from connection pool?
|
| Here is what i've done:

Your context.xml looks just fine, as does web.xml.

| Then i have Database.java class where i have the method:
|
|   private Connection getConnection() throws Exception {

This one also looks good. I would recommend that you use an
application-specific exception that any thrown exceptions, or that you
throw if any objects are null, but that's just my own personal feeling.

| that get connection for all of the 20-30 methods in Database.java
| that do a query each. An example of method in Database.java that use
it is:
|
|   // get user info
|   public UserData getUserData(UserData res, String un, String pw) {
|   Connection con = null;
|   Statement stmt = null;
|   ResultSet rst = null;
|   try {

[snip]

|   }
|   catch (Exception e1) {
|   return null;
|   }

You should not do this: exceptions should be (wrapped and) re-thrown or
logged (or both!). Never swallow an exception. Note that you will
swallow your own Exception that you throw in the body of the try/catch
block, thereby wasting the entire throw in the first place.


|   // close resources
|   finally {
|   try {
|   rst.close();
|   rst = null;

Don't forget to check for null. This is an NPE just waiting to happen.

I would recommend a method in Database.java like this:

protected void close(Connection conn, Statement s, ResultSet r)
{
~   if(null != r)
~  try {
~ r.close();
~  } catch (SQLException sqle) {
~ logger.warn(Cannot close result, sqle);
~  }

~   if(null != s)
~  try {
~ s.close();
~  } catch (SQLException sqle) {
~ logger.warn(Cannot close statement, sqle);
~  }

~   if(null != conn)
~  try {
~ conn.close();
~  } catch (SQLException sqle) {
~ logger.warn(Cannot close connection, sqle);
~  }
}

...and use that, rather than repeating the code all over the place.

| At the moment, methods are not static, so each time a client thread
| need to login, for example, i do (new Database()).getUserData(res, un,
pw).
|
| First question is if that solution is correct or create each time a
| new Database class is useless/stupid.

This is a matter of taste, in my opinion. I would prefer to write an
interface called Database and then write an implementation of that
interface. Then, have a dependency-injection framework such as Spring
call setDatabase(Database) on the object that needs to access the
database (such as a servlet or whatever) and then use it that way. It
also makes it much easier to unit-test your code because you can mock
the Database class if you want to.

| If it's stupid, should i make the
| methods static? or should i create a static database object each time
| server is started?

Object allocation is cheap, so i wouldn't worry too much about it. Your
Database class does not contain any members, so it doesn't take up much
memory, etc.

| Second, is that getConnection() method a correct way for what the
| article
|
(http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html#Common%20Problems)
| meant about get connection from connection pool?

Yes.

- -chris

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

iEYEARECAAYFAkfZcfcACgkQ9CaO5/Lv0PD85gCggizSgcs3NrvN1yCXIhjlvP8z
kFUAn1nTN+T96Z3G3p6RkQzJUYswcjl7
=zRYV
-END PGP SIGNATURE-

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



RE: Database connections grow after redeploy

2008-03-13 Thread Caldarale, Charles R
 From: Scott McClanahan [mailto:[EMAIL PROTECTED] 
 Subject: Re: Database connections grow after redeploy
 
 Do you have any suggestions for a profiling tool 
 like you described?

Just to get started, the Sun JDK comes with a primitive heap profiler.
You can enable it with the command line option:

-agentlib:hprof=heap=sites

Documentation is here (among other places):
http://java.sun.com/developer/technicalArticles/Programming/HPROF.html

 - Chuck


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

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



Re: Database connections grow after redeploy

2008-03-13 Thread Juha Laiho

Scott McClanahan wrote:

 On Thu, 2008-03-13 at 12:02 -0400, Christopher Schultz wrote:
 Caldarale, Charles R wrote:
| From: Scott McClanahan [mailto:[EMAIL PROTECTED]
| Subject: Re: Database connections grow after redeploy



| As far as the continuing data base connections, I can only speculate
| that the prior instances of the webapp are still active, thereby
| preventing cleanup of their resources.



 I agree. Scott: are you able to run your application through a tool that
 allows you to observe the heap and object graphs?



 More likely is that one or more application-level objects has retained a
 reference to a specific Connection object, which, of course, retains
 references back to the connection pool that created it. I would check
 any ServletContextListener classes you have, and then a generic search
 for putting things into the ServletContext, since that is one of the
 only places that applications typically store long-lived objects.



Do you have any suggestions for a profiling tool like you described?
Preferably open source.  Thanks.


Don't know about open source products, but I can vouch for YourKit Java
Profiler. As far as I know, the main difference between YourKit and other
profilers is that YourKit allows you to work through snapshots, whereas
other profilers inject their probes into Java object creation methods.
This means that more or less the only moment when YourKit has an effect
on the performance of your application is when you take a memory snapshot.
The other profilers I've seen attempt to trace each object allocation and
deallocation in real time, which can be rather CPU consuming (especially
if you're tracing a problem you cannot replicate in test environments).
With YourKit, you take snapshots of the Java VM memory of your application,
and compare them off-line (i.e. without needing any connection to the
live application).
--
..Juha

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



Tomcat and parallel security realms

2008-03-13 Thread Juergen Weber
Hi,

I have Tomcat users in an LDAP directoy. All users have the same
rights, there are no groups. I have no influence over the LDAP
servers' content.
Tomcat uses the JNDI realm.

Now, I need an additional, technical, user for Tomcat, that should be
allowed to restart/redeploy web apps.Everybody shouldn't be allowed to
do this.

apache-tomcat-6.0.14\conf\tomcat-users.xml would contain a nice user
tomcat in the manager role.

So, if user tomcat logs in, JNDI realm should say User unknown and
afterwards memory realm should say fine, user is allowed.

Unfortunately, Tomcat can only use one active realm. Is that right?

Is there any other way to get the manager user into Tomcat?

Setting up OpenLdap as Meta Directory before our LDAP server and
putting the tomcat user into OpenLDAP seems a bit overblown.

Thanks,
Juergen

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



Re: Tomcat and parallel security realms

2008-03-13 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jürgen,

Juergen Weber wrote:
| So, if user tomcat logs in, JNDI realm should say User unknown and
| afterwards memory realm should say fine, user is allowed.
|
| Unfortunately, Tomcat can only use one active realm. Is that right?

Right.

| Is there any other way to get the manager user into Tomcat?

Write a Realm that wraps two other realms, and use that. Something like
this:

public class MultiRealm
~extends RealmBase
{
~private List _realms;
~public MultiRealm(List realms)
~{
~_realms = realms;
~}

~public Principal authenticate(String username, String credentials)
~{
~for(Iterator i=_realms.iterator(); i.hasNext(); )
~{
~Principal p = ((Realm)i.next()).authenticare(username,
~ credentials);

~if(null != p)
~return p;
~}

~return null;
~}

~// implement the other methods similarly as pass-through methods
}

| Setting up OpenLdap as Meta Directory before our LDAP server and
| putting the tomcat user into OpenLDAP seems a bit overblown.

I would tend to agree.

If you were to write a decent implementation of the above, I would
imagine that the Tomcat folks would happily accept it as a contribution
to the project.

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

iEYEARECAAYFAkfZfRkACgkQ9CaO5/Lv0PCbowCghB4vDu2Rg3GUR7hFvKX2zLZt
hz4An2jU7GxmtDsNdU/Z41ftVgVV/4Bc
=TiR4
-END PGP SIGNATURE-

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



RE: Tomcat and parallel security realms

2008-03-13 Thread Caldarale, Charles R
 From: Juergen Weber [mailto:[EMAIL PROTECTED] 
 Subject: Tomcat and parallel security realms
 
 Unfortunately, Tomcat can only use one active realm. Is that right?

Yes, but you can write your own Realm as a wrapper that simply serially
calls the real ones until the desired response is obtained.

 - Chuck


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

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



Re: Compiling Tomcat Native Library on Debian Etch

2008-03-13 Thread Rainer Jung

configure in tcnative 1.1.12 is broken. See:

http://marc.info/?t=11994474831r=1w=2

Regards,

Rainer

ssozonoff schrieb:

Hi,

OK, so you did not use APR from debian package (apt)?

I will give your solution a try

Thanks,
Serge



Jean Monnat wrote:

Hi

Yes, at least it worked for me tomcat6

I downloaded apr from http://apr.apache.org/
extract and compile it in /opt

then I ./configure native library --with-apr=/usr/local/apr
 then in catalina.sh
LD_LIBRARY_PATH=/usr/local/apr/lib
export LD_LIBRARY_PATH

I hope this will help you

Jean

ssozonoff a écrit :

Hi All,

Has anyone successfully compiled the Tomcat Native Library on Debian
Etch?

Our IT guys insist on using this Distro, my experience lies with
Gentoo

So I run a ./configure --with-apr=/usr/bin --disable-openssl

Any the get loads of errors which look the following:

./configure: line 4315: APR_INCLUDES: command not found
./configure: line 4316: APR_LIBS: command not found
./configure: line 4317: APR_LIB_TARGET: command not found
./configure: line 4318: APR_SO_EXT: command not found
...
...
etc .

Thanks,
Serge



 





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



Re: Problems with JK connector and IIS (HSE_REQ_SEND_RESPONSE_HEADER failed)

2008-03-13 Thread Rainer Jung
Not an immediate solution, but at least a translation: the error number 
2746 is in hex, so in decimal it is 10054, which is connection reset by 
pear.


Since you seem to be able to reproduce with single requests, maybe you 
can use wireshark to check, if the client really resets the connection, 
and at which point it does it (e.g. after receiving the headers). You 
can then also see, if IIS actually send the expected headers back (the 
ones in the JK log) or something else.


Let us know your findings!

Regards,

Rainer

Ari Suutari schrieb:

Hi,

We are unable to get ISAPI JK connector (isapi_redirector.dll) working on
one Windows 2003 based server installation. Here are our findings so far:

- When browsing to http://localhost:8080 everything works, ie. tomcat 
side is working
- When browsing to http://localhost/some.file.txt works, if 
isapi_redirector.dll is unloaded,

  ie. IIS seems to also work.

We enabled debugging in JK and it results in following output:

- First server starts up (ok),
- redirector creates connection to tomcat (ok)
- redirector sends request to tomcat (ok)
- redirector receives response from tomcat (ok)
- redirector sends output to browser (FAILS)

The last operation fails with HSE_REQ_SEND_RESPONSE_HEADER failed with 
error=2746
There were some similar cases that I found with google, but no real 
solution to this.
In some of those cases this occurred only after heavy traffic, but in 
our case it

doesn't work at all.

The isapi_redirectory.dll version is 1.2.26.

The log contents are appended to end of this mail.

   Ari S.



[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_util.c (430): 
Pre-processed log time stamp format is '[%a %b %d %H:%M:%S.000 %Y] '
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_shm.c (169): 
Initialized shared memory size=28800 free=28672 addr=0x1aa
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c 
(1688): Using registry.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c 
(1691): Using log file C:\SyncronTech\Tomcat\log\isapi_redirect.log.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c 
(1692): Using log level 1.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c 
(1693): Using extension uri /jakarta/isapi_redirect.dll.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c 
(1694): Using worker file 
C:\SyncronTech\Tomcat\conf\workers.properties.minimal.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c 
(1695): Using worker mount file 
C:\SyncronTech\Tomcat\conf\uriworkermap.properties.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c 
(1697): Using rewrite rule file .
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c 
(1699): Using uri select 3.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property '/*' with value 'wlb' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property '/jkmanager' with value 'jkstatus' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_uri_worker_map.c 
(722): Loading urimaps from 
C:\SyncronTech\Tomcat\conf\uriworkermap.properties with reload check 
interval 60 seconds
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_uri_worker_map.c 
(379): wildchar rule '/*=wlb' source 'uriworkermap' was added
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_uri_worker_map.c 
(387): exact rule '/jkmanager=jkstatus' source 'uriworkermap' was added
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property 'worker.list' with value 'wlb,jkstatus' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property 'worker.ajp13w.type' with value 'ajp13' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property 'worker.ajp13w.host' with value 'localhost' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property 'worker.ajp13w.port' with value '8009' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property 'worker.wlb.type' with value 'lb' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property 'worker.wlb.balance_workers' with value 'ajp13w' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property 'worker.jkstatus.type' with value 'status' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (770): 
Checking for references with prefix worker. with wildcard (recursion 1)
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (590): Dump 
of map: 'worker.list' - 'wlb,jkstatus'
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (590): Dump 
of map: 'worker.ajp13w.type' - 'ajp13'
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (590): Dump 
of map: 'worker.ajp13w.host' - 'localhost'
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] 

Number of open DB connections in shared a datasource pool?

2008-03-13 Thread Michael L

I have a DataSource pool defined in Tomcat config  shared among multiple
servlets. I would like to monitor its activity level (number of active
connections vs min/max values). 

I tried to find a way to monitor it via JMX but found only ways to see
active connection per each servlet - which is sub-optimal as servlet list
keeps changing as developers work on the product. Is it possible to get the
total number of active connections via JMX? Or if not, how do I do I get
total number of active connections from within java? (I can then write my
own mbean for monitoring via JMX)

Thanks,

-M
-- 
View this message in context: 
http://www.nabble.com/Number-of-open-DB-connections-in-shared-a-datasource-pool--tp16041502p16041502.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: CGIServlet in Tomcat 6

2008-03-13 Thread samk
See Thread at: http://www.techienuggets.com/Detail?tx=4877 Posted on behalf of 
a User

Sorry for a kind of a necropost, but is't enough to add privileged=true to 
the root tag of main context.xml which is in $CATALINA_HOME/conf/context.xml

In Response To: 

Hi all,

I'm using CGI servlet in Tomcat 5 without any problem, but with Tomcat
6 I get this error when deploying my web application:

java.lang.SecurityException: Servlet of class
org.apache.catalina.servlets.CGIServlet is privileged and cannot be
loaded by this web application

In Tomcat 6, I noticed that the servlet-cgi.jar is now part of
catalina.jar, but that's it.

thanks a lot for any advice.

Yannick


compete error message:

java.lang.SecurityException: Servlet of class
org.apache.catalina.servlets.CGIServlet is privileged and cannot be
loaded by thisweb application
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1134)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4044)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
at 
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:451)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

-
To start a new topic, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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



Re: Problems with JK connector and IIS (HSE_REQ_SEND_RESPONSE_HEADER failed)

2008-03-13 Thread Ari Suutari

Hi,

Not an immediate solution, but at least a translation: the error number 
2746 is in hex, so in decimal it is 10054, which is connection reset by 
pear.


 Yes, we found out the errorcode meaning ourselves also.


Since you seem to be able to reproduce with single requests, maybe you 
can use wireshark to check, if the client really resets the connection, 
and at which point it does it (e.g. after receiving the headers). You 
can then also see, if IIS actually send the expected headers back (the 
ones in the JK log) or something else.


   Looks like IIS doesn't send anything back. I also tried with
   telnet localhost 80, issued GET / HTTP/1.0. No headers or data
   is received, connection just closes - and I can be pretty sure that
   telnet doesn't close it by itself.

   My collegue also took a look with wireshark and as far as I know   
   the findings were similar.


   We will try to reinstall IIS, just in order to rule out any possible problems
   with installation (because we have other similar installations, which work
   perfectly).

   Ari S.


Ari Suutari schrieb:

Hi,

We are unable to get ISAPI JK connector (isapi_redirector.dll) working on
one Windows 2003 based server installation. Here are our findings so far:

- When browsing to http://localhost:8080 everything works, ie. tomcat 
side is working
- When browsing to http://localhost/some.file.txt works, if 
isapi_redirector.dll is unloaded,

  ie. IIS seems to also work.

We enabled debugging in JK and it results in following output:

- First server starts up (ok),
- redirector creates connection to tomcat (ok)
- redirector sends request to tomcat (ok)
- redirector receives response from tomcat (ok)
- redirector sends output to browser (FAILS)

The last operation fails with HSE_REQ_SEND_RESPONSE_HEADER failed with 
error=2746
There were some similar cases that I found with google, but no real 
solution to this.
In some of those cases this occurred only after heavy traffic, but in 
our case it

doesn't work at all.

The isapi_redirectory.dll version is 1.2.26.

The log contents are appended to end of this mail.

   Ari S.



[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_util.c (430): 
Pre-processed log time stamp format is '[%a %b %d %H:%M:%S.000 %Y] '
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_shm.c (169): 
Initialized shared memory size=28800 free=28672 addr=0x1aa
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c 
(1688): Using registry.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c 
(1691): Using log file C:\SyncronTech\Tomcat\log\isapi_redirect.log.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c 
(1692): Using log level 1.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c 
(1693): Using extension uri /jakarta/isapi_redirect.dll.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c 
(1694): Using worker file 
C:\SyncronTech\Tomcat\conf\workers.properties.minimal.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c 
(1695): Using worker mount file 
C:\SyncronTech\Tomcat\conf\uriworkermap.properties.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c 
(1697): Using rewrite rule file .
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_isapi_plugin.c 
(1699): Using uri select 3.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property '/*' with value 'wlb' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property '/jkmanager' with value 'jkstatus' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_uri_worker_map.c 
(722): Loading urimaps from 
C:\SyncronTech\Tomcat\conf\uriworkermap.properties with reload check 
interval 60 seconds
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_uri_worker_map.c 
(379): wildchar rule '/*=wlb' source 'uriworkermap' was added
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_uri_worker_map.c 
(387): exact rule '/jkmanager=jkstatus' source 'uriworkermap' was added
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property 'worker.list' with value 'wlb,jkstatus' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property 'worker.ajp13w.type' with value 'ajp13' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property 'worker.ajp13w.host' with value 'localhost' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property 'worker.ajp13w.port' with value '8009' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property 'worker.wlb.type' with value 'lb' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property 'worker.wlb.balance_workers' with value 'ajp13w' to map.
[Wed Mar 12 10:46:47.396 2008] [1472:4468] [debug] jk_map.c (492): 
Adding property 'worker.jkstatus.type' 

Re: Compiling Tomcat Native Library on Debian Etch

2008-03-13 Thread ssozonoff

Thanks,

That was the problem.

Serge


Rainer Jung-3 wrote:
 
 configure in tcnative 1.1.12 is broken. See:
 
 http://marc.info/?t=11994474831r=1w=2
 
 Regards,
 
 Rainer
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Compiling-Tomcat-Native-Library-on-Debian-Etch-tp16024544p16044910.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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