Re: Java 7 + Tomcat 6.0.35 + Win2k3 Problem

2012-03-14 Thread pricyber
I did nothing in the xml files, but in the embedded tomcat I did this
instead.

connector = embedded.createConnector((String)null, port,
Http11NioProtocol.class.getName());

--
View this message in context: 
http://tomcat.10.n6.nabble.com/Java-7-Tomcat-6-0-35-Win2k3-Problem-tp4566739p4619650.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: Java 7 + Tomcat 6.0.35 + Win2k3 Problem

2012-03-14 Thread pricyber
I did nothing in the xml files, but in the embedded tomcat I did this
instead.

connector = embedded.createConnector((String)null, port,
Http11NioProtocol.class.getName());

--
View this message in context: 
http://tomcat.10.n6.nabble.com/Java-7-Tomcat-6-0-35-Win2k3-Problem-tp4566739p4619649.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: Issues with the tomcat connector (On W2k8 + IIS7.5)

2012-03-14 Thread Alex Samad - Yieldbroker


> -Original Message-
> From: Mladen Turk [mailto:mt...@apache.org]
> Sent: Tuesday, 13 March 2012 5:01 PM
> To: users@tomcat.apache.org
> Subject: Re: Issues with the tomcat connector (On W2k8 + IIS7.5)
> 
> On 03/13/2012 12:09 AM, Alex Samad - Yieldbroker wrote:
> > [snip]
> >>
> >> Try the RC binaries from
> >> http://people.apache.org/~mturk/tomcat-connectors/jk-1.2.33/
> >>
> >> Does this one crashes as well?
> >
> > Okay, got your build from there.
> >
> > 1) it loads up with single application thread (so not a web garden)
> > but then failed
> 
> OK, cool.
> 
> > 2) I tried it as a web garden, so 4 processes failed bad !!!
> >
> 
> Suppose the previous versions do the same.

32 didn't fail as bad as this

> 
> > This is what I see in the event log
> > ERROR-
> > Faulting application name: w3wp.exe, version: 7.5.7601.17514, time
> > stamp: 0x4ce7afa2 Faulting module name: isapi_redirect.dll, version:
> > 1.2.33.0, time stamp: 0x4f59bc9e Exception code: 0xc005 Fault
> > offset: 0x00039e82
> 
> This looks like referencing null memory.
> Is there anything in the jk.log before that if you turn log level to trace?

Okay I ran it on trace ... died, the application pool died !

The files are rather large, I will email directly to you instead of on list (1M 
+ 25k)

> 
> > Faulting process id: 0x154c
> > Faulting application start time: 0x01cd00a34e76bf11 Faulting
> > application path: c:\windows\system32\inetsrv\w3wp.exe
> > Faulting module path:
> > C:\YB\Shared\dev.yieldbroker.com\ajpconfig\isapi_redirect.dll
> > Report Id: 8ded0aa6-6c96-11e1-a357-005056b7000a
> >
> 
> > Bit more curious as to why my build didn't work
> >
> > I have VS 2010 install,
> > I built first with 32bit to get the programme built Then I opened a
> > Win64 command window and build the dll there. Mine is about 100K
> small, so I am guessing I am missing something ...
> >
> 
> I build that using WinDDK so it links to msvcrt.dll instead msvcrtXXX.dll.
> Anyhow suppose you missed something with win32/win64 environment
> settings.
> 
> Try to build directly from 1.2.33-src.zip I fixed the need to run win32 build
> before win64 so you can build 64-bit directly.
> Tested that with vs2010 and it builds flawlessly.

Just went in and did a nmake (what is WinDDK and should I install it ?)

C:\Users\alex.samad\Documents\SVN\Tomcat-Connector\tomcat-connectors-1.2.33-src\tomcat-connectors-1.2.33-src\native\iis>nmake
 -f Makefile.am
d64

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

cd ".\pcre"
"C:\Program Files (x86)\Microsoft Visual Studio 
10.0\VC\BIN\amd64\nmake.exe" /   /F ".\pcre.amd64"

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

if not exist ".\Release_amd64/" mkdir ".\Release_amd64"
tempfile.bat
.\pcre.amd64(142) : fatal error U1054: cannot create inline file 'tempfile.bat'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 
10.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.

> 
> 
> Regards
> --
> ^TM
> 
> -
> 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: Help with ROOT.xml and vhosting please? (fwd)

2012-03-14 Thread Pid
On 14/03/2012 22:25, Dave Shevett wrote:
>> From: Pid 
>> Exactly which OS, Java & Tomcat versions are you using?
> 
> This is an AWS micro instance running some variant of CentOS
> Tomcat 6.0.33
> [ec2-user@app01 tomcat6]$ java -version
> java version "1.6.0_22"
> OpenJDK Runtime Environment (IcedTea6 1.10.6)
> (amazon-52.1.10.6.41.amzn1-x86_64)
> OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
> 
>>> 
>>
>> path="" would be correct if it was valid here, which it is not - it is
>> redundant because the path is derived from the Context definition file
>> name 'ROOT.xml'.
> 
> Fair enough - I removed the path= entry from the ROOT.xml.
> 
>>> I'm assuming when I hit vhost.REDACTED.com, I should see a deployed
>>> version of the application.war, right? Or am I doing something
>>> blatantly stupidly wrong here?
>>
>> What _do_ you see?
> 
> Right now I'm getting 404's on the root.
> 
> sloop:~ shevett$ curl -I http://REDACTED.com/
> HTTP/1.1 404 Not Found
> Date: Wed, 14 Mar 2012 22:16:30 GMT
> Content-Type: text/html;charset=utf-8
> Content-Length: 952
> Connection: close

What is serving that error?  Tomcat & HTTPD error pages look different.


>> Are there any relevant messages in the Tomcat logs?
> 
> Just that the app was in fact unpacked into the work directory (and I
> can see it there), and it looked like it tried to start (there's a stack
> trace, but that's application specific - it definitely tried to start, I
> just don't know where it is)

If it didn't start, that would explain why you can't get it to respond.
What is the stacktrace?


p

>> How have you defined the Hosts in server.xml?
> 
> Umm, to be honest initially I hadn't. :(  I was trying to come up with a
> way to get 'dynamic' vhost allocation - kick a ROOT.xml and directory
> structure into place, restart / hup, and the vhost goes live.  That
> doesn't look possible (as it appears I need Host entries in server.xml
> to do this, which is hard to dynamically edit).
> 
> Anyway, I created a new Host entry, and added a Valve for logging:
> 
>  autoDeploy="true">
>  directory="logs" prefix="REDACTED_access_log." suffix=".txt"
> pattern="common" resolveHosts="false"/>
> 
> 
> When I hit the host, the vhost is obviously getting handled, as I'm now
> getting traffic into the REDACTED_access.log, but it's not actually
> triggering the app:
> 
> [ec2-user@app01 tomcat6]$ cat REDACTED_access_log.2012-03-14.txt
> 96.39.62.78 - - [14/Mar/2012:21:58:01 +] "GET / HTTP/1.1" 404 952
> 96.39.62.78 - - [14/Mar/2012:21:58:01 +] "GET /favicon.ico HTTP/1.1"
> 404 952
> 
> Hope that's enough information!


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: JVM won't shut down: DestroyJavaVM thread stuck on ??

2012-03-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 3/14/12 2:04 PM, Caldarale, Charles R wrote:
>> From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
>> Subject: JVM won't shut down: DestroyJavaVM thread stuck on ??
> 
>> All threads are deamons except for this one:
> 
>> "DestroyJavaVM" prio=10 tid=0x7fa528a77800 nid=0x4b2a waiting
>> on condition [0x] java.lang.Thread.State:
>> RUNNABLE
> 
> That's a dummy Java thread created during the shutdown processing
> to have something to do joins with.

Good to know.

> Given your symptoms, it looks like something non-Java inside the
> JVM itself is stuck.

I'm not using anything native that is specific to the app or Tomcat.
None of the stack traces I remember seeing looked suspicious.

> Does it ever break loose from this situation?

It will certainly stay stuck for several minutes. I didn't time it
from the point when I tried to shut it down until I eventually killed
the process.

The only reason I knew something was wrong was because trying to
start-up again I got an error about the connector port being
unavailable. That was weird, because Tomcat appeared to have
completely shut down, including closing its sockets.

> Is it possible that one of the daemon threads isn't actually idle, 
> but instead off doing something like waiting on a socket with 
> infinite timeout? (Although I think even that should respond to a 
> shutdown.)

That certainly is possible. If I can get it to happen again, I'll get
much better data.

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

iEYEARECAAYFAk9hFiEACgkQ9CaO5/Lv0PD29wCaA6AcvwvzOB91fo8/OuheeIe9
jtUAoMPLe9TkCcBvx7/rGd6fH0QRf8K2
=BxOj
-END PGP SIGNATURE-

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



Re: crash with mod_jk 1.2.33

2012-03-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thad,

On 3/14/12 3:13 PM, Thad Humphries wrote:
> This version causes my Apache server to crash when serving most any
> page I've tried--HTML, cgi-bin/test-cgi, GIF, etc. The only
> exceptions I've found are Apache's htdocs/index.html page,
> server-info, and Tomcat served pages. In the Apache error_log I see
> entries such as
> 
> [Wed Mar 14 14:54:45 2012] [notice] child pid 7729 exit signal
> Segmentation fault (11)
> 
> I am running openSUSE Linux 11.4. From the connector's config.log: 
> uname -m = i686 uname -r = 2.6.37.6-0.11-desktop uname -s = Linux 
> uname -v = #1 SMP PREEMPT 2011-12-19 23:39:38 +0100
> 
> Initially I tried building the connector using --with-apxs set to
> the apxs in my copy of Apache 2.2.15. When that failed, I
> downloaded, built, and installed Apache 2.2.22, then built mod_jk
> 1.2.33 with the apxs from that version. Again, Apache (this time
> 2.2.22) crashes with mod_jk 1.2.33, but runs fine with the 1.2.32
> connector.
> 
> Any thoughts or ideas?

Enable trace logging, fire it up, crash it, then post the log file
back to the list.

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

iEYEARECAAYFAk9hE9EACgkQ9CaO5/Lv0PD7AgCfTiQbaM3UCF+13rAd9uut8CTu
aFYAoLq5/w5JbPqG4HpMv9h0Te35eIex
=8aaJ
-END PGP SIGNATURE-

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



Re: Help with ROOT.xml and vhosting please?

2012-03-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dave,

On 3/14/12 5:00 PM, Dave Shevett wrote:
> Hi folks, I'm setting up a tomcat server that will be running a
> few dozen vhosts all being served from the same war file.  I've set
> up AJP connectors for wildcard hosts on apache, and I'm able to see
> the tomcat server from the outside world.
> 
> However, secondary vhosts I create don't seem to be working.

So, a request to http://m.REDACTED.com/whatever works but not
http://vhost.REDACTED.com/whatever?

What response do you get from the web server?

Have you configured an access log on the Tomcat side? If not, do so.
Include the "Host" header that comes in from httpd... I wouldn't be
surprised if the hostname not what you expected.

If the host goes over correctly, the virtual hosts *should* work. What
does your server.xml look like?

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

iEYEARECAAYFAk9hE28ACgkQ9CaO5/Lv0PAbRACgxAaxZRWPQ0qTQIGQ2+5q3kWF
7e8An36QZJba5plQiFrypdPITU21GXvg
=d+s5
-END PGP SIGNATURE-

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



Re: Help with ROOT.xml and vhosting please?

2012-03-14 Thread Pid
On 14/03/2012 21:00, Dave Shevett wrote:
> Hi folks, I'm setting up a tomcat server that will be running a few
> dozen vhosts all being served from the same war file.  I've set up AJP
> connectors for wildcard hosts on apache, and I'm able to see the tomcat
> server from the outside world.

Exactly which OS, Java & Tomcat versions are you using?


> However, secondary vhosts I create don't seem to be working.
> 
> An example.  The apache front end has:
> 
> 
> ServerName m.REDACTED.com
> ServerAlias *.REDACTED.com
> 
> ProxyPreserveHost On
> ProxyPass / ajp://10.211.42.48:8009/
> ProxyPassReverse / ajp://10.211.42.48:8009/
> 
> 
>   Order allow,deny
>   Allow from all
> 

The above doesn't serve any purpose does it, unless you have 'deny from
all' rules applied elsewhere?


> 


> The target IP is 10.211.42.48 is running Tomcat6, and has things like this:
> 
> /etc/tomcat6/Catalina/vhost.REDACTED.com/ROOT.xml
> 
> containing:
> 
> 

path="" would be correct if it was valid here, which it is not - it is
redundant because the path is derived from the Context definition file
name 'ROOT.xml'.

> I'm assuming when I hit vhost.REDACTED.com, I should see a deployed
> version of the application.war, right?  Or am I doing something
> blatantly stupidly wrong here?

What _do_ you see?

Are there any relevant messages in the Tomcat logs?

How have you defined the Hosts in server.xml?

What is the appBase setting for each Host you define in server.xml?


p

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


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat+SOLR, acceptCount not working

2012-03-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Андрей,

On 3/14/12 2:17 PM, Андрей Беликов wrote:
> Hi... I am running Apache Tomcat Version 7.0.26 with SOLR 3.5 on 
> jdk1.7.0_03
> 
> The problem is that i cannot limit count of connections. I never
> get connection refused (only timeouts). For example:
> maxThreads="150" and acceptCount="100", as i think i will have
> 150+100=250 connections in ESTABLISHED state, and all others will
> be refused.
> 
> But in realy: #netstat -na | grep 8080 | awk '{print $6}' | sort |
> uniq -c | sort -rn 3899 FIN_WAIT2 3385 ESTABLISHED 243 TIME_WAIT 9
> CLOSE_WAIT 3 FIN_WAIT1 1 SYN_SENT 1 LISTEN
> 
> Probe (http://localhost:8080/probe/connectors.htm) return me
> Connectors Count: 150
> 
> http://localhost:8080/probe/threadpools.htm Threads count Name
> Current BusyMax Spare1  Spare2 "ajp-apr-8009"  0   0
> 40960   0 "http-apr-8080" 150 150 150 0
> 0 AJPThreadPool   0   0   40960   200 
> HTTPThreadPool  150 150 150 150 20
> 
> As I think: connections comes to some buffer (may be JVM) and
> slowly transferres to TOMCAT... It is not good for my task, the
> best way is to recieve 250 connections and all other to refuse. How
> I can do this?
> 
> /data/servers/solr_tomcat/conf/server.xml:
> 
>   shutdown="SHUTDOWN">
> 
> [snip]
> 
>  maxThreads="4096" minSpareThreads="150"/>
> 
>  maxThreads="150" minSpareThreads="20"/>
> 
>  protocol="org.apache.coyote.http11.Http11AprProtocol"
> redirectPort="8443" URIEncoding="UTF-8" 
> maxHttpHeaderSize="8388608"

OMG that header size is HUGE. Do you really expect 8MiB of headers?
Are people sending SOLR documents in cookies or something?

> maxThreads="150" maxKeepAliveRequests="1" enableLookups="false" 
> acceptCount="100" connectionTimeout="3000" />

Note that you aren't limiting the number of connections. Note that you
are specifying "maxThreads" which is irrelevant when you are using an
executor.

Read the docs for :
http://tomcat.apache.org/tomcat-7.0-doc/config/http.html

Specifically, read the part about "maxConnections".

Also, since you are using AJP on one of those , your web
server should probably be taking care of connection-limiting at that end.

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

iEYEARECAAYFAk9hEaAACgkQ9CaO5/Lv0PAfoQCfT33TdW5Fg8WBtGOZVJou1pc0
omQAnA4HibZgKZ3XM9X2GISW1fLx6Mcm
=J5pR
-END PGP SIGNATURE-

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



Help with ROOT.xml and vhosting please?

2012-03-14 Thread Dave Shevett
Hi folks, I'm setting up a tomcat server that will be running a few 
dozen vhosts all being served from the same war file.  I've set up AJP 
connectors for wildcard hosts on apache, and I'm able to see the tomcat 
server from the outside world.


However, secondary vhosts I create don't seem to be working.

An example.  The apache front end has:


ServerName m.REDACTED.com
ServerAlias *.REDACTED.com

ProxyPreserveHost On
ProxyPass / ajp://10.211.42.48:8009/
ProxyPassReverse / ajp://10.211.42.48:8009/


  Order allow,deny
  Allow from all



The target IP is 10.211.42.48 is running Tomcat6, and has things like this:

/etc/tomcat6/Catalina/vhost.REDACTED.com/ROOT.xml

containing:



I'm assuming when I hit vhost.REDACTED.com, I should see a deployed 
version of the application.war, right?  Or am I doing something 
blatantly stupidly wrong here?


Thanks!

-d

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



RE: Tomcat+SOLR, acceptCount not working

2012-03-14 Thread Caldarale, Charles R
> From: Андрей Беликов [mailto:pion...@mail.ru] 
> Subject: Tomcat+SOLR, acceptCount not working

>  protocol="org.apache.coyote.http11.Http11AprProtocol"

What happens if you try a different protocol handler, such as 
org.apache.coyote.http11.Http11NioProtocol?

>   cachingAllowed="true">
> 

I have no idea what the effect of the above is, but it certainly doesn't belong 
in server.xml.  Perhaps you meant to include the attributes in the default 
conf/context.xml file.

 - 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: Java 7 + Tomcat 6.0.35 + Win2k3 Problem

2012-03-14 Thread Pid
On 14/03/2012 18:04, pricyber wrote:
> It look like a similar issue with Tomcat 7 
> http://tomcat.10.n6.nabble.com/Tomcat-7-Cluster-Issue-td4562937.html

I couldn't replicate the issue on OSX with Oracle Java 7u4 or OpenJDK.

The other thread referred to NIO configuration in the Cluster, which
implies the source of the issue is not in the Connector but more likely
to be a JVM problem.

I haven't had an opportunity to try it with a Windows 2003 yet.

Can you post your Connector config please?


p


> View this message in context: 
> http://tomcat.10.n6.nabble.com/Java-7-Tomcat-6-0-35-Win2k3-Problem-tp4566739p4579220.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
> 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Java 7 + Tomcat 6.0.35 + Win2k3 Problem

2012-03-14 Thread pricyber
I downloaded the apache source code and commented out the line in 
org.apache.tomcat.util.net.SocketProperties.setProperties(SocketProperties.java:184)
where it say 
socket.setTrafficClass(soTrafficClass);

And it works, but not sure if there are any ill effects for doing that.

This problem only occurs in Windows 2003 with Java7, but no problem on
ubuntu/osx/windows 7/2008

--
View this message in context: 
http://tomcat.10.n6.nabble.com/Java-7-Tomcat-6-0-35-Win2k3-Problem-tp4566739p4582365.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



crash with mod_jk 1.2.33

2012-03-14 Thread Thad Humphries
Since October of last year, I have run the mod_jk connector v. 1.2.32. I
built the connector myself using Apache 2.2.15's apxs (I also built Apache
myself).

Today I downloaded, built, and installed the latest mod_jk connector, v.
1.2.33 (
http://mail-archives.apache.org/mod_mbox/tomcat-users/201203.mbox/%3C4F608246.4060601%40apache.org%3E
).

This version causes my Apache server to crash when serving most any page
I've tried--HTML, cgi-bin/test-cgi, GIF, etc. The only exceptions I've
found are Apache's htdocs/index.html page, server-info, and Tomcat served
pages. In the Apache error_log I see entries such as

[Wed Mar 14 14:54:45 2012] [notice] child pid 7729 exit signal Segmentation
fault (11)

I am running openSUSE Linux 11.4. From the connector's config.log:
uname -m = i686
uname -r = 2.6.37.6-0.11-desktop
uname -s = Linux
uname -v = #1 SMP PREEMPT 2011-12-19 23:39:38 +0100

Initially I tried building the connector using --with-apxs set to the apxs
in my copy of Apache 2.2.15. When that failed, I downloaded, built, and
installed Apache 2.2.22, then built mod_jk 1.2.33 with the apxs from that
version. Again, Apache (this time 2.2.22) crashes with mod_jk 1.2.33, but
runs fine with the 1.2.32 connector.

Any thoughts or ideas?

-- 
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v, 121-24)


Re: Tomcat advantages

2012-03-14 Thread André Warnier

Mark H. Wood wrote:

But does it also walk dogs?


In this area one should thread carefully, lest one would get into a heap of 
trouble.


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



Re: Tomcat advantages

2012-03-14 Thread Tim Watts
I've been trying to get Tomcat to chase my mouse for year with no luck.

On Wed, 2012-03-14 at 10:29 -0400, Mark H. Wood wrote:
> But does it also walk dogs?
> 



signature.asc
Description: This is a digitally signed message part


Tomcat+SOLR, acceptCount not working

2012-03-14 Thread Андрей Беликов
Hi... I am running Apache Tomcat Version 7.0.26 with SOLR 3.5 on jdk1.7.0_03
The problem is that i cannot limit count of connections. I never get connection 
refused (only timeouts). For example: maxThreads="150" and acceptCount="100", 
as i think i will have 150+100=250 connections in ESTABLISHED state, and all 
others will be refused. 

But in realy:
#netstat -na | grep 8080 | awk '{print $6}' | sort | uniq -c | sort -rn
   3899 FIN_WAIT2
   3385 ESTABLISHED
243 TIME_WAIT
  9 CLOSE_WAIT
  3 FIN_WAIT1
  1 SYN_SENT
  1 LISTEN

Probe (http://localhost:8080/probe/connectors.htm) return me Connectors Count: 
150

http://localhost:8080/probe/threadpools.htm
Threads count
NameCurrent BusyMax Spare1  Spare2
"ajp-apr-8009"  0   0   40960   0
"http-apr-8080" 150 150 150 0   0
AJPThreadPool   0   0   40960   200
HTTPThreadPool  150 150 150 150 20

As I think: connections comes to some buffer (may be JVM) and slowly 
transferres to TOMCAT... It is not good for my task, the best way is to recieve 
250 connections and all other to refuse. How I can do this?

my start options:

/production/jdk7/jre/bin/java 
-Djava.util.logging.config.file=/data/servers/solr_tomcat/conf/logging.properties
 -XX:+CMSClassUnloadingEnabled -XX:MaxGCPauseMillis=3000 
-XX:MaxGCMinorPauseMillis=3000 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Duser.timezone=UTC -Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.port=8161 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.authenticate=false 
-Djava.endorsed.dirs=/production/tomcat7/endorsed -classpath 
/production/tomcat7/bin/bootstrap.jar:/production/tomcat7/bin/tomcat-juli.jar 
-Dcatalina.base=/data/servers/solr_tomcat -Dcatalina.home=/production/tomcat7 
-Djava.io.tmpdir=/data/servers/solr_tomcat/temp 
org.apache.catalina.startup.Bootstrap start

/data/servers/solr_tomcat/conf/server.xml:



  
  
  
  
  
  
  
  































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



RE: JVM won't shut down: DestroyJavaVM thread stuck on ??

2012-03-14 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
> Subject: JVM won't shut down: DestroyJavaVM thread stuck on ??

> All threads are deamons except for this one:

> "DestroyJavaVM" prio=10 tid=0x7fa528a77800 nid=0x4b2a waiting on
> condition [0x]
>java.lang.Thread.State: RUNNABLE

That's a dummy Java thread created during the shutdown processing to have 
something to do joins with.  Given your symptoms, it looks like something 
non-Java inside the JVM itself is stuck.  Does it ever break loose from this 
situation?  Is it possible that one of the daemon threads isn't actually idle, 
but instead off doing something like waiting on a socket with infinite timeout? 
 (Although I think even that should respond to a shutdown.)

 - 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: Java 7 + Tomcat 6.0.35 + Win2k3 Problem

2012-03-14 Thread pricyber
It look like a similar issue with Tomcat 7 
http://tomcat.10.n6.nabble.com/Tomcat-7-Cluster-Issue-td4562937.html

--
View this message in context: 
http://tomcat.10.n6.nabble.com/Java-7-Tomcat-6-0-35-Win2k3-Problem-tp4566739p4579220.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: Precompile JSPs, avoid thousands of servlets?

2012-03-14 Thread Rob Koberg
>> If you pass an empty web.xml to be updated by precompile tasks, it
>> should not be hard to convert it into web-fragment.xml, using an
>> XSLT transform or just regexp replacements.
>
> I had considered using 'cat' :)

You could also use XML entities and/or XInclude (don't know if you
would need to set a system property to use XInclude or if the default
has it enabled):



 
]>
http://www.w3.org/2001/XMLSchema-instance";
xmlns="http://java.sun.com/xml/ns/javaee";
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; id="WebApp_ID"
version="3.0"

  xmlns:xi="http://www.w3.org/2001/XInclude";

  >

  &component1;
  &component2;

  



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



JVM won't shut down: DestroyJavaVM thread stuck on ??

2012-03-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

I'm sure this has nothing to do with Tomcat, but I figured I'd ask if
anyone has seen anything like this before.

We use a couple of ant scripts to start and stop Tomcat on our Linux
machines. Ultimately, they always call bin/catalina.sh to do the real
work or startup or shutdown.

Shutdowns are performed by connecting to the shutdown port and saying
SHUTDOWN -- there's no process ids or running 'kill' or anything like
that.

For some reason, our Cocoon instances specifically seem to be having a
hard time shutting down: they just sit forever. Tomcat appears to have
stopped: all request processor threads have stopped and even the main
thread has stopped. All threads are deamons except for this one:

"DestroyJavaVM" prio=10 tid=0x7fa528a77800 nid=0x4b2a waiting on
condition [
0x]
   java.lang.Thread.State: RUNNABLE

No stack trace other than what's shown there: waiting on 0x0, which
I'm guessing is a condition that is always false.

The only other threads still alive are Cocoon-related and are
basically cache-watchers, all sitting idle (again, daemon threads).
I'd post the whole thread dump but I already killed the process and
forgot to save the dump. This is in a development environment so I
wasn't too concerned with capturing everything about it at the time.

Here is my environment:
Debian Linux 6.0 (Squeeze) kernel 2.6.32-312-ec2 SMP x86_64
Sun/Oracle Java 1.6.0_26 64-bit Server VM (build 20.1-b02, mixed mode)
Tomcat 6.0.35 (though certainly irrelevant)

I'm not using APR, but I do happen to be using BIO/AJP.

Can anyone shed any light on what might be happening?

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

iEYEARECAAYFAk9g0YUACgkQ9CaO5/Lv0PCIpwCffK8bjly9ppshKjf7NJHcfbM7
wcMAn1SoyBX3x2cjgoSBvQgqka2qWfIT
=oCUo
-END PGP SIGNATURE-

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



Re: Precompile JSPs, avoid thousands of servlets?

2012-03-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Konstantin,

On 3/14/12 8:49 AM, Konstantin Kolinko wrote:
> 2012/3/13 Nick Williams :
>> 
>> Our second  challenge is the 11,500-line web.xml file that
>> results from this process. I understand that Ant does a lot of
>> the hard work for me, but a web.xml file this large bothers me,
>> even if I don’t have to look at it during every day development.
>> What’s more, we’re actually trying to *move away* from having a
>> web.xml file (of any real substance) and using new Servlet 3.0
>> features.
>> 
> 
> There was a discussion to pack precompiled JSPs as a web fragment, 
> https://issues.apache.org/bugzilla/show_bug.cgi?id=50234 but no
> code has been proposed to implement that.

I've been slowly hacking-away at an ant script that handles almost all
of this. I still need to work with JspC to do things like confirm the
spec-compliance-level when emitting a web fragment.

> If you seriously consider this feature to be useful to be used in
> a real application, you may be the one contributing the code.
> 
> If you pass an empty web.xml to be updated by precompile tasks, it 
> should not be hard to convert it into web-fragment.xml, using an
> XSLT transform or just regexp replacements.

I had considered using 'cat' :)

> Though note that a web application that does not use fragments and 
> annotations (and has metadata-complete="true" in its web.xml)
> starts up faster, because Tomcat does not need to spend time
> scanning the classes and libraries for annotations and web
> fragments.

+1

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

iEYEARECAAYFAk9gzcUACgkQ9CaO5/Lv0PBFCwCgtvSMv0QqqGTUxGtVx1cqgp0F
Y0kAn1TBvOrJo1A0WDbxZUAGxHc+TYvz
=2iTK
-END PGP SIGNATURE-

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



Re: parallel deployment: multiple applications responding

2012-03-14 Thread Pid
On 27/02/2012 22:23, Aristedes Maniatis wrote:
> On 28/02/12 12:14 AM, Christopher Schultz wrote:
> Chuck,
> 
> On 2/26/12 11:29 PM, Caldarale, Charles R wrote:
> From: Aristedes Maniatis [mailto:amania...@apache.org] Subject:
> Re: parallel deployment: multiple applications responding

> What happens if our application defines a static class or other
> resource?

 Not sure what you mean by "static class", unless you're referring
 to an inner class.  Regardless, each parallel deployment uses a
 separate classloader, so the webapp instances cannot interfere
 with each other.
> 
> I'm sure he means a class with a static method that returns a shared
> object (aka singleton, etc.).
> 
>> Yes of course. I mispoke earlier.
> 
> 
 However, if you've placed classes in a shared library (e.g.,
 Tomcat's lib directory), anything in there will be shared by all
 webapps.  You must be very, very careful when utilizing shared
 classes, since that can easily lead to unexpected data leakage
 between webapps (not to mention often making it impossible to
 undeploy them).
> 
> Yes, but I would be very surprised if one could cause a different
> webapp to service a request by doing such a thing. What you might be
> able to do is get the request *logged* to the wrong webapp, if you
> were fetching references (say, to the ServletContext) and caching them
> in the (shared) class, then calling ServletContext.log on them.
> 
> Aristedes, can you describe in a bit more detail the kinds of things
> you are doing, here?
> 
> Also, what kind of logging are you using that suggests your requests
> are being handled by the wrong webapp? What does JMX have to say about
> the number of active sessions? (You said that the 'manager' webapp
> shows a status for the webapp, so you are probably using that session
> count in your reports, here, but I just wanted to check).
> 
> 
>> I'll focus on trying to get some better logging of the session into the
>> log output and see if we can narrow down the symptoms. Yes, I am using
>> JMX and the Manager app to identify when there are no remaining
>> sessions, and when I therefore should expect to see no further activity
>> at all from the older application. I'll try and get some better
>> information around that by adding logging as you suggest.
> 
>> The logging that we did originally to discover this problem was simple:
> 
>> * sessionless application
>> * we changed the log.properties for log4j in the new app
>> * some hours after we deployed, the old-style log entries were still
>> being written, mixed in with the new ones

Aristedes,

Did you manage to resolve the problem or narrow down on what is actually
happening?


p



signature.asc
Description: OpenPGP digital signature


Re: Initializing webapps in a certain order

2012-03-14 Thread Mark H. Wood
On Wed, Mar 14, 2012 at 12:50:45PM +, Paul Singleton wrote:
> On 14/03/2012 01:37, Caldarale, Charles R wrote:
> 
> >> From: Warren Bell [mailto:warrenbe...@gmail.com]
> >> Subject: Initializing webapps in a certain order
> 
> >> Can you initialize webapps in a certain order ?
> 
> > Read the FAQ:
> > http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q27
> >
> > The primary reason is that the servlet spec requires that each webapp be 
> > self-contained and independent.
> 
> >> I have two apps, app1 and app2. app2 needs to access app1 during app2's
> >> initialization. I need app1 to be initialized first and be done before
> >> app2 starts to initialize.
> 
> > Sounds like a bad plan.
> 
> Sounds reasonable to me, that one service be designed to make use of 
> another service ;-)

It's also reasonable to design a service so that it doesn't have to
stall (or fail) *in the middle of startup* because a supporting
service is not running yet.  If they have to depend on each other,
they might just start anyway, keep trying to make contact, and fire a
message upon unreasonable delay.  Or just return an error status (and
hopefully an informative text) when dependent service A is asked for
something that can't be done without the help of supporting service B
which is not responding.  You probably want that sort of fail-soft
design anyway.  That would be "self-contained and independent" in my
book, since the app. can continue to operate and gives useful (if
undesired) responses regardless of what any other app. is doing.

Think of it as lazy initialization, driven by user requests instead of
startup code.  Startup of service or interactive programs should do
only what is absolutely necessary to get the app. into a state in
which it can respond, since there can be no guarantee that an
arbitrary request will *ever* succeed.

> We have OS services with explicit start-up dependencies, e.g. an issue 
> tracking system which uses an RDBMS, and I'd expect to be able to do 
> this with webapps.

Ah, but that's not the same mechanism.  There the OS works out the
dependency tree and doesn't start service A until supporting service B
indicates successful startup.  There's no such centralized dependency
analysis in a servlet container; the app.s start in any order the
container may choose and then stumble over missing dependencies.  I
think it could be argued that the servlet spec. makes startup ordering
by the container an explicit non-requirement, so you couldn't count on
it at another site or in another container version anyway.  If you're
going to make them dependent then you have to provide the whole
dependency resolution mechanism.

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
Asking whether markets are efficient is like asking whether people are smart.


pgpZJLaxkL0af.pgp
Description: PGP signature


Re: Info on PermSize and MaxPermSize

2012-03-14 Thread Geet Chandra
Version of Tomcat is 6.0.035 As  Tomcat is being shipped
with product developed, we are providing command line utility,using the
same utility users are of product allow to change the configurable
parameters as per application type deployed in tomcat.We are using
.vbs as mentioned utility implementation file.Also we are
registering tomcat as windows service while product is being installed and
command to start tomcat as "cmd.exe /c net start tomcat ".Hoping everyone
understood my requirements.

On Wed, Mar 14, 2012 at 6:59 PM, Pid  wrote:

> On 14/03/2012 09:22, André Warnier wrote:
> > Geet Chandra wrote:
> >> how to set  -XX:PermSize and   -XX:MaxPermSize at startup of Tomcat?.
> >> Please let me know
> >
> > Considering that you don't really seem to know what they are, you
> > probably shouldn't.
> > By default, the JVM on your platform will use reasonable values.  So why
> > exactly do you want to change them ?  Do you have a problem with their
> > current size ? Explain.
> >
> > By the way, it may also help to inform us which version of Tomcat you
> > are using, with which JVM version, and on which platform.
>
> [cough] homework [cough]
>
>
> p
>
>
> >> On Mon, Feb 20, 2012 at 12:25 PM, Thomas Rohde  wrote:
> >>
> >>> Hi Geet,
> >>>
> >>> these parameters are not Tomcat specific. This are JVM parameters as
> >>> Chuck
> >>> mentioned. The parameter -XX:PermSize defines the initial size of the
> >>> PermGen (permanent generation) of the jvm memory. -XX:MaxPermSize is
> >>> to set
> >>> the max size.
> >>>
> >>> Thomas
> >>>
> >>>
> >>> Am 20.02.2012 04:46, schrieb Geet Chandra:
> >>>
> >>>  Hi All,
>  Please let me know,
> 
>  What is the difference beween PermSize and MaxPermSize in Tomcat
> 
> 
> >>>
> >>>
> --**--**-
> >>>
> >>> To unsubscribe, e-mail:
> >>> users-unsubscribe@tomcat.**apache.org<
> 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
> >
>
>
> --
>
> [key:62590808]
>
>


-- 
Thanks & Regards
Geet


Re: Tomcat advantages

2012-03-14 Thread Mark H. Wood
But does it also walk dogs?

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
Asking whether markets are efficient is like asking whether people are smart.


pgpavqdMWRTQY.pgp
Description: PGP signature


Re: Tomcat Logging Jarhell

2012-03-14 Thread Christopher Gross
Correct -- a typo.  WEB-INF/classes

-- Chris



On Wed, Mar 14, 2012 at 10:20 AM, Mark Thomas  wrote:
> On 14/03/2012 14:04, Christopher Gross wrote:
>> After reverting -- all but one of my logs are working correctly.  Each
>> web app has a log4j jar and the commons logging jars in its
>> WEB-INF/lib, and a log4j.properties in the WEB-INF/class.  I didn't
>> change that file at all.
>>
>> Any ideas as to why the one set of log files aren't being written to?
>
> WEB-INF/classes vs. WEB-INF/class or was that just a typo?
>
> Mark
>
> -
> 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 Logging Jarhell

2012-03-14 Thread Mark Thomas
On 14/03/2012 14:04, Christopher Gross wrote:
> After reverting -- all but one of my logs are working correctly.  Each
> web app has a log4j jar and the commons logging jars in its
> WEB-INF/lib, and a log4j.properties in the WEB-INF/class.  I didn't
> change that file at all.
> 
> Any ideas as to why the one set of log files aren't being written to?

WEB-INF/classes vs. WEB-INF/class or was that just a typo?

Mark

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



Re: Tomcat Logging Jarhell

2012-03-14 Thread Christopher Gross
After reverting -- all but one of my logs are working correctly.  Each
web app has a log4j jar and the commons logging jars in its
WEB-INF/lib, and a log4j.properties in the WEB-INF/class.  I didn't
change that file at all.

Any ideas as to why the one set of log files aren't being written to?

-- Chris



On Wed, Mar 14, 2012 at 8:42 AM, Christopher Gross  wrote:
> That section just gives some basic info, but nothing that tries to
> help with what I'm doing.  I'm well aware what the directories are
> for.
>
> There are a lot of libraries that my apps have in common, and because
> of the nature of the project, I need to try to conserve space.  By
> moving jars to a shared spot, I can trim off a decent amount of space.
>
> The individual app's code gets updated, but we rarely update the
> supporting jars, unless it is absolutely needed.   It doesn't matter
> anyways, we can always drop a newer version of a supporting jar in the
> web app's WEB-INF/lib and it will be used before the others in
> common/lib or shared/lib get loaded.  That's what the documentation
> says, anyway.
>
> 5.5.25 is our standard deployment.  We haven't moved up, and perhaps
> later I'll do that.  However, this same problem would arise,
> regardless of the version, and I was just trying to provide enough
> about my situation so that I could find appropriate assistance.
>
> While I can appreciate some constructive criticism, I'd rather have
> answers to my questions, as opposed to questions about my design.
>
> -- Chris
>
>
>
> On Tue, Mar 13, 2012 at 4:17 PM, Konstantin Kolinko
>  wrote:
>> 2012/3/13 Christopher Gross :
>>> Hi all.
>>>
>>>  I'm trying to utilize the common/lib and shared/lib directories on
>>> Tomcat 5.5.25.  I have a few separate apps that were each using many
>>> of the same JAR files, so I have been moving them down to shared &
>>> common lib (DB stuff went to common/lib, the apache commons modules &
>>> others went to the shared/lib).  I was doing testing as I went along
>>> -- but I never went to look at the logfiles for my webapps.  I'm now
>>> noticing that they aren't getting anything anymore.  I haven't changed
>>> anything aside from moving the JARs around.  I'm using the Apache
>>> Log4j Logger in my classes.
>>>
>>>  I have:
>>> shared/lib:
>>> commons-logging-1.0.4.jar
>>> commons-logging-api.jar
>>> commons-logging.jar
>>>
>>> common/lib:
>>> apache-log4j-extras-1.0.jar
>>> log4j-1.2.15.jar
>>>
>>> each app has:
>>> commons-logging-1.0.4.jar
>>> commons-logging-api.jar
>>> commons-logging.jar
>>>
>>> I'd like to avoid rolling back to how everything was, with a lot of
>>> repeated JAR files all over the place.  Has anyone run into a similar
>>> problem and found a decent solution?
>>>
>>
>> 1. You have to read "Class Loading" page of the user manual.
>>
>> Then I hope that you will note that it is a bad idea to move
>> everything into common/lib or shared/lib.
>>
>> 2. If you have foo-x.y.z in your libs folder that will impede your
>> efforts to upgrade some webapps to foo-y.z.w.
>>
>> Is is better to limit what you put into the common libs folder to
>> components that are needed by the server itself, like database
>> drivers.
>>
>> 3. Why are you investing your time in several-years-old 5.5.25,  and
>> when the whole 5.5.x line is going to be abandoned in several months?
>>
>> -
>> 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 advantages

2012-03-14 Thread André Warnier

Pid wrote:

On 14/03/2012 09:13, André Warnier wrote:

Pid * wrote:

On 13 Mar 2012, at 16:03, Allen Reese  wrote:


-Original Message-
From: Pid [mailto:p...@pidster.com]
Sent: Tuesday, March 13, 2012 7:46 AM
To: Tomcat Users List
Subject: Re: Tomcat advantages

On 13/03/2012 14:42, Leo Donahue - PLANDEVX wrote:

-Original Message-
From: Pid * [mailto:p...@pidster.com]
Subject: Re: Tomcat advantages


What else would you like it to do?


p

My list is long... ;)

It can start by checking if Tomcat is not your default web server,

and ask if you would like to make it so.

It would also be cool if it could make skype phone calls and if it

came a digital camera.  A low tech camera at first but on subsequent
releases the camera would get better, because all cameras at first are
limited by the current technology.  It always takes a few releases for
them to get good.

I keep trying to get it to make my coffee, but it always forgets the
grounds.

That's because theres no grounds for making Tomcat pretend to be a
coffee machine.


Except if you're doing monitoring via JMX of course.  That makes Tomcat
look like a bag of Beans.  Spooky action-et-a-distance kind of stuff.


NOT the quantum physics stuff again, please.  I nearly did myself an
injury last time.



Saw this coming, huh ? Ok, no quantum physics then. Pity.
How about psychiatry (memory leaks) ? or black magic (daemon threads) ?


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



Re: Initializing webapps in a certain order

2012-03-14 Thread Pid
On 14/03/2012 13:29, Caldarale, Charles R wrote:
>> From: Paul Singleton [mailto:p...@jbgb.com] 
>> Subject: Re: Initializing webapps in a certain order
> 
>> Does the servlet spec require that no web app may use the 
>> services of another web app?
> 
> No that's perfectly alright.  The key point of the OP's query was that he has 
> a webapp that required the other service _during_initialization_ 

+ in the same container

- thus requiring startup ordering.  There's no problem at all with
webapps accessing each other once initialization is complete.

If it's an external service you can obviously manage the startup order.


p

>> Is a servlet spec implementation free to enable startup 
>> sequence to be defined?
> 
> Not quite sure how to parse that.  If you're asking if a specific container 
> could implement something outside of the spec to control ordering, that would 
> certainly be possible, but also certainly against the spirit of 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.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


RE: Initializing webapps in a certain order

2012-03-14 Thread Caldarale, Charles R
> From: Caldarale, Charles R 
> Subject: RE: Initializing webapps in a certain order

> I have two apps, app1 and app2. app2 needs to access app1 during app2's>
> initialization. I need app1 to be initialized first and be done before
> app2 starts to initialize.

Just had a thought: Tomcat 7 has the startStopThreads config attribute for the 
 element; this might let you get away with what you want to do, depending 
on how it's implemented.  (It won't work if all initialization threads have to 
complete before any request processing is allowed; I haven't looked at the code 
to see.)

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

2012-03-14 Thread Pid
On 14/03/2012 09:13, André Warnier wrote:
> Pid * wrote:
>> On 13 Mar 2012, at 16:03, Allen Reese  wrote:
>>
 -Original Message-
 From: Pid [mailto:p...@pidster.com]
 Sent: Tuesday, March 13, 2012 7:46 AM
 To: Tomcat Users List
 Subject: Re: Tomcat advantages

 On 13/03/2012 14:42, Leo Donahue - PLANDEVX wrote:
>> -Original Message-
>> From: Pid * [mailto:p...@pidster.com]
>> Subject: Re: Tomcat advantages
>>
>>
>> What else would you like it to do?
>>
>>
>> p
> My list is long... ;)
>
> It can start by checking if Tomcat is not your default web server,
 and ask if you would like to make it so.
> It would also be cool if it could make skype phone calls and if it
 came a digital camera.  A low tech camera at first but on subsequent
 releases the camera would get better, because all cameras at first are
 limited by the current technology.  It always takes a few releases for
 them to get good.
>>> I keep trying to get it to make my coffee, but it always forgets the
>>> grounds.
>>
>> That's because theres no grounds for making Tomcat pretend to be a
>> coffee machine.
>>
> 
> Except if you're doing monitoring via JMX of course.  That makes Tomcat
> look like a bag of Beans.  Spooky action-et-a-distance kind of stuff.

NOT the quantum physics stuff again, please.  I nearly did myself an
injury last time.


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


RE: Initializing webapps in a certain order

2012-03-14 Thread Caldarale, Charles R
> From: Paul Singleton [mailto:p...@jbgb.com] 
> Subject: Re: Initializing webapps in a certain order

> Does the servlet spec require that no web app may use the 
> services of another web app?

No that's perfectly alright.  The key point of the OP's query was that he has a 
webapp that required the other service _during_initialization_ - thus requiring 
startup ordering.  There's no problem at all with webapps accessing each other 
once initialization is complete.

> Is a servlet spec implementation free to enable startup 
> sequence to be defined?

Not quite sure how to parse that.  If you're asking if a specific container 
could implement something outside of the spec to control ordering, that would 
certainly be possible, but also certainly against the spirit of 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.


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



Re: Info on PermSize and MaxPermSize

2012-03-14 Thread Pid
On 14/03/2012 09:22, André Warnier wrote:
> Geet Chandra wrote:
>> how to set  -XX:PermSize and   -XX:MaxPermSize at startup of Tomcat?.
>> Please let me know
> 
> Considering that you don't really seem to know what they are, you
> probably shouldn't.
> By default, the JVM on your platform will use reasonable values.  So why
> exactly do you want to change them ?  Do you have a problem with their
> current size ? Explain.
> 
> By the way, it may also help to inform us which version of Tomcat you
> are using, with which JVM version, and on which platform.

[cough] homework [cough]


p


>> On Mon, Feb 20, 2012 at 12:25 PM, Thomas Rohde  wrote:
>>
>>> Hi Geet,
>>>
>>> these parameters are not Tomcat specific. This are JVM parameters as
>>> Chuck
>>> mentioned. The parameter -XX:PermSize defines the initial size of the
>>> PermGen (permanent generation) of the jvm memory. -XX:MaxPermSize is
>>> to set
>>> the max size.
>>>
>>> Thomas
>>>
>>>
>>> Am 20.02.2012 04:46, schrieb Geet Chandra:
>>>
>>>  Hi All,
 Please let me know,

 What is the difference beween PermSize and MaxPermSize in Tomcat


>>>
>>> --**--**-
>>>
>>> To unsubscribe, e-mail:
>>> users-unsubscribe@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
> 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Where to place custom classloader in Tomcat5?

2012-03-14 Thread Pid
On 14/03/2012 10:58, Volodymyr Bezuglyy wrote:
> Hi!
> 
> Where to place custom WebappClassLoader in Tomcat?
> Should I place it in Tomcat5\server\classes directory only?
> Is it possible to place it in WEB-INF\clases directory of my web application?

If it's in the classes directory of your application, which ClassLoader
is loading it?


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Initializing webapps in a certain order

2012-03-14 Thread Paul Singleton

On 14/03/2012 01:37, Caldarale, Charles R wrote:


From: Warren Bell [mailto:warrenbe...@gmail.com]
Subject: Initializing webapps in a certain order



Can you initialize webapps in a certain order ?



Read the FAQ:
http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q27

The primary reason is that the servlet spec requires that each webapp be 
self-contained and independent.



I have two apps, app1 and app2. app2 needs to access app1 during app2's
initialization. I need app1 to be initialized first and be done before
app2 starts to initialize.



Sounds like a bad plan.


Sounds reasonable to me, that one service be designed to make use of 
another service ;-)


We have OS services with explicit start-up dependencies, e.g. an issue 
tracking system which uses an RDBMS, and I'd expect to be able to do 
this with webapps.



If the apps are so tightly coupled, why aren't they just one webapp?


The dependency Warren describes doesn't imply "tightly coupled", and 
one possible reason they aren't one webapp is that they come from 
different vendors.


Does the servlet spec require that no web app may use the services of 
another web app?


Is a servlet spec implementation free to enable startup sequence to be 
defined?


Paul Singleton

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



Re: Precompile JSPs, avoid thousands of servlets?

2012-03-14 Thread Konstantin Kolinko
2012/3/13 Nick Williams :
>
> Our second  challenge is the 11,500-line web.xml file that results from
> this process. I understand that Ant does a lot of the hard work for me, but
> a web.xml file this large bothers me, even if I don’t have to look at it
> during every day development. What’s more, we’re actually trying to *move
> away* from having a web.xml file (of any real substance) and using new
> Servlet 3.0 features.
>

There was a discussion to pack precompiled JSPs as a web fragment,
https://issues.apache.org/bugzilla/show_bug.cgi?id=50234
but no code has been proposed to implement that.

If you seriously consider this feature to be useful to be used in a
real application, you may be the one contributing the code.

If you pass an empty web.xml to be updated by precompile tasks, it
should not be hard to convert it into web-fragment.xml, using an XSLT
transform or just regexp replacements.


Though note that a web application that does not use fragments and
annotations (and has metadata-complete="true" in its web.xml) starts
up faster, because Tomcat does not need to spend time scanning the
classes and libraries for annotations and web fragments.

Best regards,
Konstantin Kolinko

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



Re: Tomcat Logging Jarhell

2012-03-14 Thread Christopher Gross
That section just gives some basic info, but nothing that tries to
help with what I'm doing.  I'm well aware what the directories are
for.

There are a lot of libraries that my apps have in common, and because
of the nature of the project, I need to try to conserve space.  By
moving jars to a shared spot, I can trim off a decent amount of space.

The individual app's code gets updated, but we rarely update the
supporting jars, unless it is absolutely needed.   It doesn't matter
anyways, we can always drop a newer version of a supporting jar in the
web app's WEB-INF/lib and it will be used before the others in
common/lib or shared/lib get loaded.  That's what the documentation
says, anyway.

5.5.25 is our standard deployment.  We haven't moved up, and perhaps
later I'll do that.  However, this same problem would arise,
regardless of the version, and I was just trying to provide enough
about my situation so that I could find appropriate assistance.

While I can appreciate some constructive criticism, I'd rather have
answers to my questions, as opposed to questions about my design.

-- Chris



On Tue, Mar 13, 2012 at 4:17 PM, Konstantin Kolinko
 wrote:
> 2012/3/13 Christopher Gross :
>> Hi all.
>>
>>  I'm trying to utilize the common/lib and shared/lib directories on
>> Tomcat 5.5.25.  I have a few separate apps that were each using many
>> of the same JAR files, so I have been moving them down to shared &
>> common lib (DB stuff went to common/lib, the apache commons modules &
>> others went to the shared/lib).  I was doing testing as I went along
>> -- but I never went to look at the logfiles for my webapps.  I'm now
>> noticing that they aren't getting anything anymore.  I haven't changed
>> anything aside from moving the JARs around.  I'm using the Apache
>> Log4j Logger in my classes.
>>
>>  I have:
>> shared/lib:
>> commons-logging-1.0.4.jar
>> commons-logging-api.jar
>> commons-logging.jar
>>
>> common/lib:
>> apache-log4j-extras-1.0.jar
>> log4j-1.2.15.jar
>>
>> each app has:
>> commons-logging-1.0.4.jar
>> commons-logging-api.jar
>> commons-logging.jar
>>
>> I'd like to avoid rolling back to how everything was, with a lot of
>> repeated JAR files all over the place.  Has anyone run into a similar
>> problem and found a decent solution?
>>
>
> 1. You have to read "Class Loading" page of the user manual.
>
> Then I hope that you will note that it is a bad idea to move
> everything into common/lib or shared/lib.
>
> 2. If you have foo-x.y.z in your libs folder that will impede your
> efforts to upgrade some webapps to foo-y.z.w.
>
> Is is better to limit what you put into the common libs folder to
> components that are needed by the server itself, like database
> drivers.
>
> 3. Why are you investing your time in several-years-old 5.5.25,  and
> when the whole 5.5.x line is going to be abandoned in several months?
>
> -
> 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



[ANN] Apache Tomcat Connectors 1.2.33 released

2012-03-14 Thread Mladen Turk

The Apache Tomcat Project is proud to announce the release
of version 1.2.33 of Apache Tomcat Connectors.

This release includes both bug fixes and new features compared
to version 1.2.32. Full details of these changes and new features,
are available in the Apache Tomcat Connectors changelog:
http://tomcat.apache.org/connectors-doc/miscellaneous/changelog.html


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


Thank you,
--
The Apache Tomcat Team

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



Where to place custom classloader in Tomcat5?

2012-03-14 Thread Volodymyr Bezuglyy
Hi!

Where to place custom WebappClassLoader in Tomcat?
Should I place it in Tomcat5\server\classes directory only?
Is it possible to place it in WEB-INF\clases directory of my web application?

Vladimir Bezugliy.



Re: Info on PermSize and MaxPermSize

2012-03-14 Thread André Warnier

Geet Chandra wrote:

how to set  -XX:PermSize and   -XX:MaxPermSize at startup of Tomcat?.
Please let me know


Considering that you don't really seem to know what they are, you probably 
shouldn't.
By default, the JVM on your platform will use reasonable values.  So why exactly do you 
want to change them ?  Do you have a problem with their current size ? Explain.


By the way, it may also help to inform us which version of Tomcat you are using, with 
which JVM version, and on which platform.





On Mon, Feb 20, 2012 at 12:25 PM, Thomas Rohde  wrote:


Hi Geet,

these parameters are not Tomcat specific. This are JVM parameters as Chuck
mentioned. The parameter -XX:PermSize defines the initial size of the
PermGen (permanent generation) of the jvm memory. -XX:MaxPermSize is to set
the max size.

Thomas


Am 20.02.2012 04:46, schrieb Geet Chandra:

 Hi All,

Please let me know,

What is the difference beween PermSize and MaxPermSize in Tomcat




--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@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 advantages

2012-03-14 Thread André Warnier

Pid * wrote:

On 13 Mar 2012, at 16:03, Allen Reese  wrote:


-Original Message-
From: Pid [mailto:p...@pidster.com]
Sent: Tuesday, March 13, 2012 7:46 AM
To: Tomcat Users List
Subject: Re: Tomcat advantages

On 13/03/2012 14:42, Leo Donahue - PLANDEVX wrote:

-Original Message-
From: Pid * [mailto:p...@pidster.com]
Subject: Re: Tomcat advantages


What else would you like it to do?


p

My list is long... ;)

It can start by checking if Tomcat is not your default web server,

and ask if you would like to make it so.

It would also be cool if it could make skype phone calls and if it

came a digital camera.  A low tech camera at first but on subsequent
releases the camera would get better, because all cameras at first are
limited by the current technology.  It always takes a few releases for
them to get good.

I keep trying to get it to make my coffee, but it always forgets the grounds.


That's because theres no grounds for making Tomcat pretend to be a
coffee machine.



Except if you're doing monitoring via JMX of course.  That makes Tomcat look like a bag of 
Beans.  Spooky action-et-a-distance kind of stuff.



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