Re: How to get heap dump of Tomcat running as windows service.

2012-09-12 Thread Aditi Sinha
Hi,

Please find the requested details below

1. What is your OS?
*Windows 7,  32-bit OS. I have even tried on Windows 2k8 server but the
same problem.*

2. How much memory the running Tomcat is using? Do you have enough
space on your hard drive, and does it have access rights to write
there?
*Running Tomcat is using around 247MB and JvmMx is set to 512 MB. There is
enough free disk space available.*
**
*Tomcat is running as the logged on user account and therefore should have
access rights.*
*Also, did not login to machine as remote desktop session. I logged in to
the machine directly.

*Any help appreciated.

Thanks & Regards,
Aditi


On Wed, Sep 12, 2012 at 3:56 PM, Konstantin Kolinko
wrote:

> 2012/9/12 Aditi Sinha :
> > Hi,
> >
> >
> >
> > We have web server hosted on Tomcat 7.0.22. Tomcat is running as windows
> > service.
> >
> > When we try to get the heap  dump of Tomcat using the following command
> >
> >
> >
> > *jmap -dump:format=b,file=heap.bin *
> >
> >
> >
> > we get below error
> >
> >
> >
> > *: Not enough storage is available to process this command.*
> >
> >
> >
> > When Tomcat is started manually in console (using command “catalina.bat
> > start”), we are able to take the heap dump.
> >
> >
> > Is there any workaround which would allow to take heap dump when Tomcat
> > running as windows service?
>
> 1. What is your OS?
> 2. How much memory the running Tomcat is using? Do you have enough
> space on your hard drive, and does it have access rights to write
> there?
>
> Maybe you could try configuring the service to run as specific user
> (instead of Local Service account).
>
> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Fwd: Problems loading external jar in my app !

2012-09-12 Thread joel badia escolà
Hello everyone, i have a problem with my jsp app for adding external
jars. First of all I have tried the same code and app directory
structure in netbeans ide "built-in" tomcat and works fine, but when i
try to serve my app in my tomcat installation (installed using
aptitude) it seems that it's impossible to locate the external jar.

Only with this code:

<%@page import="weka.classifiers.trees.RandomTree" %>

<%
RandomTree t = new RandomTree();
out.println();
out.println("It works");
%>

I get this error message:

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 6 in the generated java file
Only a type can be imported. weka.classifiers.trees.RandomTree
resolves to a package

An error occurred at line: 6 in the jsp file:
/DiseaseDiscover/make_diagnosis.jsp
RandomTree cannot be resolved to a type
3: <%@page import="weka.classifiers.trees.RandomTree" %>
4:
5: <%
6: RandomTree t = new RandomTree();
7: out.println();
8: out.println("It works");
9: %>

I tried to put weka.jar in all this directories my-app/WEB-INF/lib/ &
/var/lib/tomcat6/common/ & /var/lib/tomcat6/server/ &
/usr/share/tomcat6/lib/

In all directories I get the same error message.

Greetings,

Joel

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



RE: Q) ajp connector

2012-09-12 Thread Alex Samad - Yieldbroker
So would that then be

Client -> websocket -> IIS ->  is this still done as AJP or websocket  
->jboss/tomcat


Is jboss tomcat ready to handle websockets ?

Alex

> -Original Message-
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Sent: Thursday, 13 September 2012 12:51 PM
> To: Tomcat Users List
> Subject: Re: Q) ajp connector
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Alex,
> 
> On 9/12/12 9:17 PM, Alex Samad - Yieldbroker wrote:
> > I have a design question. I have an application that uses long lived
> > connections back to the server so
> 
> It sounds like HTTP isn't the right for you. Maybe you want to use something
> like WekSocket?
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
> 
> iEYEARECAAYFAlBRSisACgkQ9CaO5/Lv0PAKcACeLAAtEQ6N57e8H7/8/kWRvFf
> g
> ay4AmwUnMqVEBeKH+wZeTKe+fIzyG3tM
> =QhEO
> -END PGP SIGNATURE-
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org


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



Re: Q) ajp connector

2012-09-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Alex,

On 9/12/12 9:17 PM, Alex Samad - Yieldbroker wrote:
> I have a design question. I have an application that uses long
> lived connections back to the server so

It sounds like HTTP isn't the right for you. Maybe you want to use
something like WekSocket?

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

iEYEARECAAYFAlBRSisACgkQ9CaO5/Lv0PAKcACeLAAtEQ6N57e8H7/8/kWRvFfg
ay4AmwUnMqVEBeKH+wZeTKe+fIzyG3tM
=QhEO
-END PGP SIGNATURE-

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



Re: Where do I store Images in tomcat structure so that I can retrive it properly in all browsers

2012-09-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kiran,

On 9/11/12 10:44 PM, Kiran Badi wrote:
> On 9/8/2012 4:09 PM, Konstantin Kolinko wrote:
>> Regarding the aliases feature:
>> 
>> single path -> multiple file paths: No multiple different
>> non-intersecting paths -> multiple file paths: Yes
>> 
>> As far as I remember, an example of using multiple aliases is
>> present in documentation.
> Thanks Konstantin, it seems to be working perfectly fine.
> 
> This is how I am doing it now,
> 
>  aliases="/UploadedImages=c:/UploadedImages,/st=c:/st,/sb=c:/sb,/UploadedImages/scr=c:/UploadedImages/scr,/UploadedImages/scyr=c:/UploadedImages/scyr,/UploadedImages/sem=c:/UploadedImages/sem">
>
> 
> 
> Now I have one clarification, I am going need  close to 150 
> categories(think of marketplace) and there will be fair amount of
> images upload which my users will be doing.
> 
> I expect the aliases to grow till 150 to 200 paths, do you feel
> this is correct.I am not sure as how large sites deal when they
> have heavy volumes of images getting uploaded on daily basis.

Large sites will use a single URL that ends up resolving the images
from some kind of data source. That data source might be a disk (e.g.
you could forward to the DefaultServlet) or a database (relational or
otherwise) where you would write your own servlet to retrieve the data
yourself.

I would use a servlet that gets the image identifier from the request
parameters or "path info" and then continues from there. As Konstantin
points out, using Tomcat's "aliases" feature means that these requests
may have to perform a linear search through all the aliases to find
the requested resource. If you write a custom servlet, it will likely
perform much better than that.

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBRSGUACgkQ9CaO5/Lv0PAIbACfYgbM2eyv5TD8uYC7GfV2taUB
uOAAn1RHpGwal9jkMe6HRiBazEAJ6CCa
=jqvA
-END PGP SIGNATURE-

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



Q) ajp connector

2012-09-12 Thread Alex Samad - Yieldbroker
Hi

I have a design question. I have an application that uses long lived 
connections back to the server so



App -> IIS -> AJP Connector -> Jboss/Tomcat
Or 
App -> Apache -> AJP Connector -> Jboss/Tomcat

So I know that IIS / Apache can handle lots of connections without pairing it 1 
thread to 1 connection.  And JBoss/Tomcat can handle multiple connection per 
thread.

But can the AJP connector handle multiple connections per thread.

My recent problem with IIS + AJP... IIS limited the number of threads that the 
AJP connector could create, to roughly 265 once it was reached when another 
request was made it was blocked... So it looked like a 1 connection 1 thread 
bottle neck.

Is this by design ... is this a IIS thing or would I see the same issue with 
Apache/AJP


Alex

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



Re: HTTP NIO connector not supporting IPv6

2012-09-12 Thread Daniel Mikusa
On Sep 12, 2012, at 2:44 PM, Jeffrey Janner wrote:

>> -Original Message-
>> From: Daniel Mikusa [mailto:dmik...@vmware.com]
>> Sent: Wednesday, September 12, 2012 10:00 AM
>> To: Tomcat Users List
>> Subject: Re: HTTP NIO connector not supporting IPv6
>> 
>> On Sep 12, 2012, at 1:29 AM, Aditi Sinha wrote:
>> 
>>> Thanks Dan, Jeff.
>>> 
>>> 
>>> 
>>> There are no errors in catalina.log file.
>>> 
>>> The connector tags are defined as below in server.xml. This
>>> configuration does not support IPv6.
>>> 
>>> 
>>> > connectionTimeout="2"
>>> redirectPort="8443" />
>>> 
>>> 
>>> 
>>> >> maxThreads="150"
>>> 
>>> scheme="https" secure="true" clientAuth="false"
>> sslProtocol="TLS"
>>> keystoreFile="xx" keystorePass="xx"/>
>>> 
>> 
>> Tried it on my MBP (10.7 w/Java 1.6.0_35) and it worked fine.  Tried on
>> Windows XP (only version I have available) w/ Java 1.6.0_35 and was
>> able to replicate the problem behavior.  According to the following bug
>> report this is a limitation of the OS / JVM.  Looks like a recent
>> versions of Windows and a recent version of the JVM are required to
>> resolve this.
>> 
>> Try upgrading from 1.6.0_25 to 1.6.0_35.
>> 
>> http://bugs.sun.com/view_bug.do?bug_id=6230761
>> 
>> Dan
>> 
> One workaround is to explicitly define the IPv4 and IPv6 addressing in the 
> .
> That is, add address="0.0.0.0" for any IPv4 connectors and address="[::]" for 
> any IPv6 connectors. (Or use your real addresses instead of the "any" 
> addresses listed here.)
> This means setting up 2 sets of connectors for each port/protocol, but 
> there's nothing wrong with being explicit.
> This is what I had to do to get the APR protocol to set up for IPv4.


With all due respect, I do not think that this is going to work for the poster. 
 You're saying that your workaround was for an issue with the APR connector, 
but the poster is using the NIO connector.  The APR connector does not use NIO 
or the JVM, so I don't think your workaround is relevant.  In fact I tried your 
workaround previously without success.  The problem is that on older versions 
of Windows (pre-vista) and older versions of the JVM, the NIO libraries do not 
support IPv6 (see bug report).

As a side note, the poster could switch from NIO to the APR connector, and it 
would likely resolve his problem (just like he reported switching to the BIO 
connector resolved his problem).  Just assuming that the poster wants to stick 
with the NIO connector.

Dan



> 
> Plus, why do you have asterisks (*) bracketing the protocols?  All examples 
> I've ever seen don't use them.  They are just quoted strings. From the 
> default server.xml shipped with Tomcat:
>   maxThreads="150" scheme="https" secure="true"
>   clientAuth="false" sslProtocol="TLS" />
> 
> 
> 
> -
> 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: HTTP NIO connector not supporting IPv6

2012-09-12 Thread Jeffrey Janner
> -Original Message-
> From: Daniel Mikusa [mailto:dmik...@vmware.com]
> Sent: Wednesday, September 12, 2012 10:00 AM
> To: Tomcat Users List
> Subject: Re: HTTP NIO connector not supporting IPv6
> 
> On Sep 12, 2012, at 1:29 AM, Aditi Sinha wrote:
> 
> > Thanks Dan, Jeff.
> >
> >
> >
> > There are no errors in catalina.log file.
> >
> > The connector tags are defined as below in server.xml. This
> > configuration does not support IPv6.
> >
> >
> >   connectionTimeout="2"
> > redirectPort="8443" />
> >
> >
> >
> >   > maxThreads="150"
> >
> >  scheme="https" secure="true" clientAuth="false"
> sslProtocol="TLS"
> > keystoreFile="xx" keystorePass="xx"/>
> >
> 
> Tried it on my MBP (10.7 w/Java 1.6.0_35) and it worked fine.  Tried on
> Windows XP (only version I have available) w/ Java 1.6.0_35 and was
> able to replicate the problem behavior.  According to the following bug
> report this is a limitation of the OS / JVM.  Looks like a recent
> versions of Windows and a recent version of the JVM are required to
> resolve this.
> 
> Try upgrading from 1.6.0_25 to 1.6.0_35.
> 
> http://bugs.sun.com/view_bug.do?bug_id=6230761
> 
> Dan
> 
One workaround is to explicitly define the IPv4 and IPv6 addressing in the 
.
That is, add address="0.0.0.0" for any IPv4 connectors and address="[::]" for 
any IPv6 connectors. (Or use your real addresses instead of the "any" addresses 
listed here.)
This means setting up 2 sets of connectors for each port/protocol, but there's 
nothing wrong with being explicit.
This is what I had to do to get the APR protocol to set up for IPv4.

Plus, why do you have asterisks (*) bracketing the protocols?  All examples 
I've ever seen don't use them.  They are just quoted strings. From the default 
server.xml shipped with Tomcat:




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



Re: HTTP NIO connector not supporting IPv6

2012-09-12 Thread Daniel Mikusa
On Sep 12, 2012, at 1:29 AM, Aditi Sinha wrote:

> Thanks Dan, Jeff.
> 
> 
> 
> There are no errors in catalina.log file.
> 
> The connector tags are defined as below in server.xml. This configuration
> does not support IPv6.
> 
> 
>   redirectPort="8443" />
> 
> 
> 
>   maxThreads="150"
> 
>  scheme="https" secure="true" clientAuth="false" sslProtocol="TLS"
> keystoreFile="xx" keystorePass="xx"/>
> 

Tried it on my MBP (10.7 w/Java 1.6.0_35) and it worked fine.  Tried on Windows 
XP (only version I have available) w/ Java 1.6.0_35 and was able to replicate 
the problem behavior.  According to the following bug report this is a 
limitation of the OS / JVM.  Looks like a recent versions of Windows and a 
recent version of the JVM are required to resolve this.

Try upgrading from 1.6.0_25 to 1.6.0_35.

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

Dan


> 
> 
> 
> 
> 
> 
> Below configuration supports IPv6. The only difference is the protocol.
> 
> 
> 
>   connectionTimeout="2" redirectPort="8443" />
> 
> 
> 
>   SSLEnabled="true" maxThreads="150"
> 
>  scheme="https" secure="true" clientAuth="false" sslProtocol="TLS"
> keystoreFile="xx" keystorePass="xx"/>
> 
> 
> 
> Please let me know if something missing here?
> 
> 
> 
> Thanks & Regards,
> 
> Aditi
> 
> 
> On Tue, Sep 11, 2012 at 7:30 PM, Jeffrey Janner > wrote:
> 
>>> -Original Message-
>>> From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com]
>>> Sent: Tuesday, September 11, 2012 8:57 AM
>>> To: 'Tomcat Users List'
>>> Subject: RE: HTTP NIO connector not supporting IPv6
>>> 
>>> Aditi -
>>> 
>>> All connectors support both IPv4 and IPv6, including BIO, NIO, and
>>> native/APR. However, how you configure the connector will affect which
>>> protocol is supported.
>>> 
>>> As far as I've been able to tell from empirical testing (see previous
>>> threads), if you leave off the address parameter, the java-based
>>> connectors (BIO & NIO) will set up listeners on both of the "any"
>>> addresses, i.e. 0.0.0.0:port for IPv4 and [::]:port for IPv6. Unless
>>> it's been fixed in a recent release, the APR will only set up to listen
>>> on the IPv6 address.  You have to specifically give it the IPv4 "any"
>>> if you want IPv4 support. Since I only support IPv4 right now, I
>>> haven't re-tested the current version of APR. (pltr)
>>> 
>>> So, as Daniel says, please resend your message with copies of the
>>> actual  tags, minus any passwords and excess comments.  If
>>> you are seeing any errors in your catalina.log file, those would be
>>> helpful as well.
>>> 
>>> Jeff
>>> 
>> 
>> p.s. sorry for the top-post, it's early.
>> p.p.s.  The above is testing done under Windows servers.
>> 
>> Also, you really should upgrade to the latest sun JDK (jdk1.6.0_35).
>> There are issues with some of the lower versions, but I don't think any
>> that affect the connector mechanism.
>> 
>> 
 -Original Message-
 From: Aditi Sinha [mailto:adisinha0...@gmail.com]
 Sent: Tuesday, September 11, 2012 7:21 AM
 To: Tomcat Users List
 Subject: HTTP NIO connector not supporting IPv6
 
 Hi,
 
 
 
 We have a web server hosted on Apache Tomcat Version 7.0.22.
 
 Machine details: Windows 2008 server machine, 32-bit OS
 
 Java version:  jdk1.6.0_25
 
 
 
 Two HTTP connectors are defined in server.xml.
 
 1.   For non-SSL requests:  Connector with  protocol="HTTP/1.1"
(HTTP
 BIO connector)
 
 2.   For SSL requests:  Connector with
 protocol="org.apache.coyote.http11.Http11NioProtocol"   (HTTP NIO
 connector)
 
 
 
 With the above configuration server is not accessible through the
>>> IPv6
 address.   The "netstat -an" command also does not list the connector
 ports(defined in server.xml).
 
 
 
 *On modifying these two connectors to use the BIO implementation,
 protocol="org.apache.coyote.http11.Http11Protocol"
 the server supports IPv6.  *
 
 
 
 Any idea why HTTP NIO connector would not support IPv6?
 
 
 
 Thanks & Regards,
 
 Aditi
>>> 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>> 
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
>> 


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



Re: Tomcat JNDI custom resource factory questions

2012-09-12 Thread Daniel Mikusa
On Sep 12, 2012, at 1:52 AM, Kirill Ilyukhin wrote:

> Hi!
> 
> I am using Tomcat 7.0.29 with a custom JNDI resource factory
> (http://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html#Adding_Custom_Resource_Factories).
> The factory creates a connection to data server which then can be
> shared between servlets.
> Two questions regarding the resource usage.
> 
> 1. Creation of the resource factory, isn't is supposed to be thread-safe?

As I understand it, your ObjectFactory implementation needs to be thread safe.  
See section 4.5 of the link below.

  
http://docs.oracle.com/javase/1.3/docs/guide/jndi/spec/spi/jndispi.fm.html#1007939

> The resource (connection) is used by two servlets which obtains it on
> start-up. It works fine if the servlets are loaded one after another -
> the first servlet asks JNDI for a connection, JNDI creates a factory,
> the factory creates a connection, JNDI gives the connection to the
> servlet; the second one ask JNDI for a connection and immediately gets
> the same connection, without calling the factory. But if the servlets
> are being started exactly at the same time, they get two different
> connections created by two different factories. Shouldn't the factory
> singleton-ness be managed by Tomcat?

Look at the resource definition...

singleton

"Specify whether this resource definition is for a singleton resource, i.e. one 
where there is only a single instance of the resource. If this attribute is 
true, multiple JNDI lookups for this resource will return the same object. If 
this attribute is false, multiple JNDI lookups for this resource will return 
different objects. This attribute must be true for javax.sql.DataSource 
resources to enable JMX registration of the DataSource. The value of this 
attribute must be true or false. By default, this attribute is true."

https://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Resource_Definitions

> 
> 2. What is the correct way to close the resource?
> How should I close the resource if the webapp is being
> stopped/undeployed?

Again, look at the resource definition...

closeMethod 

Name of the zero-argument method to call on a singleton resource when it is no 
longer required. This is intended to speed up clean-up of resources that would 
otherwise happen as part of garbage collection. This attribute is ignored if 
the singleton attribute is false. If not specificed, no default is defined and 
no close method will be called.

https://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Resource_Definitions

Dan


> My factory creates a connection on "please create
> a resource" call somewhere from inside JNDI, lets the connection go
> and doesn't know how many servlets use it. Users of the resource are
> independent, they do not know how many of them are and do not know
> when the resource can be closed. So I would expect some kind of "it's
> time to close the resource(s)" call from JNDI. Is there one?
> I know that I can track all the resources creation in a
> ServletContextListener and then close them in contextDestroyed(), but
> I hope there is a nicer way.
> 
> 
> Thanks in advance,
> Kirill
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


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



Re: How to send some requests to all tomcat cluster nodes from loadbalancer

2012-09-12 Thread Orhan Karasakal
Thanks for your help and reply

On Wed, Sep 12, 2012 at 3:11 PM, Pid  wrote:

> On 12/09/2012 12:45, Orhan Karasakal wrote:
> > Hi,
> >
> > I have a distrubuted cluster system. I have set up apache server and set
> > loadbalancing (mod_jk) conditions. And also sticky session is true mode.
> Among
> > nodes, there is no multicasting
> >
> > Is it possible that could I send some special requests (after request
> > header control) or broadcast message to all tomcat cluster nodes ? Is
> there
> > any rule or method ?
> >
> > Normally every request goes one node but for some special url, I want to
> > send these requests to all cluster nodes. For example for some url,
> > application should not be seen to user.
> >
> > Thanks for your help,
> > Orhan Karasakal
>
> That can't be supported by HTTP - how would the protocol handle sending
> more than one HTTP response back to the requestor?
>
> Design an alternative solution that uses a messaging system (perhaps JMS
> or AMQP), or in which any member can relay the payload of the request to
> other nodes one at a time.
>
>
> p
>
>
> --
>
> [key:62590808]
>
>


Re: How to get heap dump of Tomcat running as windows service.

2012-09-12 Thread Joao Silva

On 12/09/2012 11:02, Aditi Sinha wrote:

Hi,



We have web server hosted on Tomcat 7.0.22. Tomcat is running as windows
service.

When we try to get the heap  dump of Tomcat using the following command



*jmap -dump:format=b,file=heap.bin *



we get below error



*: Not enough storage is available to process this command.*



When Tomcat is started manually in console (using command “catalina.bat
start”), we are able to take the heap dump.


Is there any workaround which would allow to take heap dump when Tomcat
running as windows service?


Thanks & Regards,

Aditi


Hi

If you are connected to the Windows machine through remote desktop, 
please try to connect to it using the console session (administrative 
credentials required).
This is because starting with Windows 2003, services run with service 
isolation, but you can get around that by connecting to the console session.
Depending on your operating system version (not the server's version), 
you can connect to the console session by


   After Windows XP SP3, Vista SP1

From the Start menu, choose Run. Type "mstsc /console". Connect
   to the server as usual.

   Other versions

From the Start menu, choose Run. Type "mstsc /admin". Connect
   to the server as usual.

Hope it helps.

Best regards
--
*João M. Silva — VILT Group*
*http://www.vilt-group.com *

Rua Ivone Silva, 6 - 7º Esq
1050-124 Lisboa - Portugal

Mobile  +351 926 531 097
Phone   +351 210 34 33 00
Fax +351 210 34 33 99
Email   joao.si...@vilt-group.com 



Re: How to get heap dump of Tomcat running as windows service.

2012-09-12 Thread Pid
On 12/09/2012 11:02, Aditi Sinha wrote:
> Hi,
> 
> 
> 
> We have web server hosted on Tomcat 7.0.22. Tomcat is running as windows
> service.
> 
> When we try to get the heap  dump of Tomcat using the following command
> 
> 
> 
> *jmap -dump:format=b,file=heap.bin *
> 
> 
> 
> we get below error
> 
> 
> 
> *: Not enough storage is available to process this command.*

probably because you have set a large heap size.

> When Tomcat is started manually in console (using command “catalina.bat
> start”), we are able to take the heap dump.

because you are probably not setting a heap size.

> Is there any workaround which would allow to take heap dump when Tomcat
> running as windows service?

make some more disk space available, sufficient to permit the heap to be
written to file.


p

> Thanks & Regards,
> 
> Aditi
> 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: How to send some requests to all tomcat cluster nodes from loadbalancer

2012-09-12 Thread Pid
On 12/09/2012 12:45, Orhan Karasakal wrote:
> Hi,
> 
> I have a distrubuted cluster system. I have set up apache server and set
> loadbalancing (mod_jk) conditions. And also sticky session is true mode. Among
> nodes, there is no multicasting
> 
> Is it possible that could I send some special requests (after request
> header control) or broadcast message to all tomcat cluster nodes ? Is there
> any rule or method ?
> 
> Normally every request goes one node but for some special url, I want to
> send these requests to all cluster nodes. For example for some url,
> application should not be seen to user.
> 
> Thanks for your help,
> Orhan Karasakal

That can't be supported by HTTP - how would the protocol handle sending
more than one HTTP response back to the requestor?

Design an alternative solution that uses a messaging system (perhaps JMS
or AMQP), or in which any member can relay the payload of the request to
other nodes one at a time.


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Offline generation of effective web.xml

2012-09-12 Thread Violeta Georgieva
Thanks for the starting point.
I'm starting to look at the code and when I have the first results I'll
write to the dev list.
Is that OK?

2012/9/11 Konstantin Kolinko 

> 2012/9/11 Violeta Georgieva :
> > It would be very useful if I can provide this as part of the build
> > infrastructure for example.
> > If you can give me a hint from where to start I may try to provide a
> patch
> > for 8.0.x? Wdyt?
> >
> >
> > 2012/9/11 Mark Thomas 
> >
> >>  Violeta Georgieva  wrote:
> >>
> >> >Hi,
> >> >
> >> >I do know that if I provide "logEffectiveWebXml=true" in my context.xml
> >> >then the effective web.xml will be logged in the log files during
> >> >application start.
> >> >
> >> >Is there a way (library etc.) that I can use to generated effective
> >> >web.xml
> >> >offline i.e. without starting the application.
> >> >
> >> >Thanks in advance.
> >> >Violeta
> >>
> >> No, although I am beginning to think about refactoring the web.xml
> >> scanning for 8.0.x for other reasons but any such refactoring should
> make
> >> this trivial.
> >>
> >> I haven't got much further than "it would be useful if..." so it may
> turn
> >> out to be impractical.
> >>
>
> 1. Logging the effective web.xml is performed in
> o.a.c.startup.ContextConfig.
> Search for
> org.apache.tomcat.util.scan.Constants.MERGED_WEB_XML
>
> 2. I would like to remove this MERGED_WEB_XML
> from future versions. Instead of re-parsing web.xml Jasper would
> better be using Servlet API to query needed features.
>
> IIRC, actually Jasper does not need much: just specification version
> and jsp-config.
>
> A downside is that Jasper has to be used stand-alone as JspC. So it
> should still be able to parse web.xml. So either
> a) refactor the whole parsing of web.xml, moving it into reusable
> component (like Mark wrote),  or
> b) keep the current parsing code in Jasper and make its own objects
> implement relevant parts of Servlet API.
>
> This is filed as BZ53737. The first attempt was in r1377511
> (+discussion), reverted in r1377539.
>
> https://issues.apache.org/bugzilla/show_bug.cgi?id=53737
> http://markmail.org/message/dyuyuuglunuy4qej
> http://markmail.org/message/kknk2xh7wdcznsv7
>
> 3. Note, that currently this "merged web xml" may miss some features.
>
> - It may change the order of elements vs. original web.xml. There are
> a number of elements whose order is not important. Tomcat uses HashMap
> for those, so their order may change randomly from run to run.
>
> - It may miss some elements from original web.xml, that are not parsed
> by Tomcat. Such as s.
>
> Several weeks ago I went through the code, correcting some typos in
> element names and wrong order of elements.
>
> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


RE: IIS 7.5 + AJP Connector

2012-09-12 Thread Alex Samad - Yieldbroker
[snip]
> >
> >   and the thread count is over the 264.
> >
> > oh yeah.
> > the pain of using IIS !
> 
> Thanks for sharing the solution.

Least I can do ! 

> 
> Rainer
> [snip]


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



Re: IIS 7.5 + AJP Connector

2012-09-12 Thread Rainer Jung

On 12.09.2012 01:52, Alex Samad - Yieldbroker wrote:

okay.. worked it out.
Seems like I had the application pool set to no .net framework... and 
integrated pipeline NOT classic.

But it seem if you don't set a .net it uses the old IIS6 ISAPI reg settings !
So now I have set .net framework to 4 , even though the  plugin doesn't use it 
(I presume)

  and the thread count is over the 264.

oh yeah.
the pain of using IIS !


Thanks for sharing the solution.

Rainer


-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Tuesday, 11 September 2012 7:54 AM
To: Tomcat Users List
Subject: Re: IIS 7.5 + AJP Connector

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Alex,

On 9/9/12 10:35 PM, Alex Samad - Yieldbroker wrote:

-Original Message- From: Martin Gainty
[mailto:mgai...@hotmail.com] Sent: Monday, 10 September 2012
12:11 PM To: Tomcat Users List Subject: RE: IIS 7.5 + AJP Connector


Alex

connection_pool_size is usually for pooling algorithms such as DBCP..
Are you following the DBCP configuration doc?
http://commons.apache.org/dbcp/configuration.html


? so I am looking at the AJP Connector used in IIS on Windows. I
believe this is the relevant page
http://tomcat.apache.org/connectors-doc/reference/workers.html

I believe the connection_pool_size is an indication of how many
(max) worker threads are used to connect from IIS+AJP to tomcat ...


So I am not sure how the BDCP is going to help me, as there is no ODBC
connectivity from my RP's


Just ignore Martin: he is posting random bits of information from teh
intarwebs. His comments are not relevant to your question and you can
pretend they were never offered.

- -chris


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



Re: How to get heap dump of Tomcat running as windows service.

2012-09-12 Thread Konstantin Kolinko
2012/9/12 Aditi Sinha :
> Hi,
>
>
>
> We have web server hosted on Tomcat 7.0.22. Tomcat is running as windows
> service.
>
> When we try to get the heap  dump of Tomcat using the following command
>
>
>
> *jmap -dump:format=b,file=heap.bin *
>
>
>
> we get below error
>
>
>
> *: Not enough storage is available to process this command.*
>
>
>
> When Tomcat is started manually in console (using command “catalina.bat
> start”), we are able to take the heap dump.
>
>
> Is there any workaround which would allow to take heap dump when Tomcat
> running as windows service?

1. What is your OS?
2. How much memory the running Tomcat is using? Do you have enough
space on your hard drive, and does it have access rights to write
there?

Maybe you could try configuring the service to run as specific user
(instead of Local Service account).

Best regards,
Konstantin Kolinko

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



How to get heap dump of Tomcat running as windows service.

2012-09-12 Thread Aditi Sinha
Hi,



We have web server hosted on Tomcat 7.0.22. Tomcat is running as windows
service.

When we try to get the heap  dump of Tomcat using the following command



*jmap -dump:format=b,file=heap.bin *



we get below error



*: Not enough storage is available to process this command.*



When Tomcat is started manually in console (using command “catalina.bat
start”), we are able to take the heap dump.


Is there any workaround which would allow to take heap dump when Tomcat
running as windows service?


Thanks & Regards,

Aditi


Re: tomcat7-maven-plugin 2.0-SNAPSHOT:deploy ignores server configuration

2012-09-12 Thread Olivier Lamy
vote started see: http://markmail.org/message/ewcp3ukbcoogtswh


2012/9/12 Gert van Spijker :
> On 11/09/12 20:34, Olivier Lamy wrote:
>> Hi,
>>
>> Some issues has been fixed regarding that.
>> Is there any logs on server side.
>> Did you try a recent snapshot or build yourself ?
>
> No, I didn't.
> But I googled a bit more and found this:
>
> http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/snapshot-test.html
> I added the repositories as described and tested.
> The current snapshot does indeed solve the problem.
>
> Thanks.
>
> This seems like a fairly fundamental issue. Are the main stream
> repositories going to be updated soon? Or would it otherwise be a good
> idea to make a note about this in the documentation?
>
> Gert
>
>
>>
>>
>> 2012/9/11 Gert van Spijker :
>>> Hi,
>>>
>>> If this is not the correct list to ask about the Tomcat Maven plugins
>>> then I apologize in advance. I have been googiling for better places,
>>> but to no avail.
>>>
>>> I have a Maven Web application project and am trying to deploy to a
>>> local Tomcat 7 server on http://localhost:8080. I can access this server
>>> with my browser and deploy the web app manually. I  also set the correct
>>> credentials in the maven settings.xml configuration file.
>>>
>>> I follow the documentation about the tomcat7:deploy goal:
>>>
>>> http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/tomcat7-maven-plugin/deploy-mojo.html
>>>
>>> Although the server is running on the plugin's default URL I get a 403
>>> HTTP error. I have tried to add the ".text" using the  parameter,
>>> but this is completely ignored (I can see in the plugin output that it
>>> always uses the default URL)
>>>
>>> I also set the  parameter to match the id in mavens settings.xml
>>> but the behavior does not change.
>>>
>>> It seems that tomcat7-maven-plugin 2.0-SNAPSHOT ignores its parameters.
>>>
>>> Or am I doing something wrong?
>>>
>>> Gert
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>
>>
>>
>>
>



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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