Re: tomcat logging

2022-06-09 Thread tomcat-lists
Hi Alan,

On 09.06.22 12:56, Alan F wrote:
> Tomcat logging
> 
> I would like to add a delimiter or characters " "  around {user-agent} for 
> logging,  I wanted it in double quotes for example "Mozilla 5.0.."  but can't 
> seem to make it work. Or even adding a # symbol before would help any ideas?

I assume, you refer to access logging. Recent Tomcat has a proper example 
already in the standard server.xml (IIRC for a long time), just use the " 
XML
entity, where you need it (taken from 9.0.64):




If you are happy with a standard combined pattern, just use pattern="combined", 
it contains user agent in double quotes.

See https://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Access_Log_Valve 
for complete pattern information.

hth,
Thomas

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



Re: Archive or package install

2021-06-18 Thread tomcat-lists
Hi Christopher,

On 18.06.21 20:54, Christopher Schultz wrote:
>> I would only stick to the distro-provided packages, if it is a small
>> (in other words not that important) application running in Tomcat. Just
>> for reference: With Ubuntu 18.04, you would end up
>> with 9.0.16 vs. 9.0.48 (Tomcat project) or 8.5.39 vs. 8.5.68 (Tomcat
>> project), which is about 2 years old software.

> The above statement is *very* misleading.
> 
> To understand why it's misleading, you have to understand the Debian "way" of 
> package-management. Ubuntu is Debian-derived and, although they have their 
> own package repositories, etc., they do
> inherit from upstream and do make some changes on their own separate from 
> upstream.

Thanks for picking that up, I was not clear enough by just referencing the 
security back ports in one sentence. It is right, that those distro packages 
get updates. My main point is, that due
to the update policy of Ubuntu (and Debian as well), not all changes and 
updates will get into the distro packages. This might be an issue, especially 
if IT organisation stick to a specific
distros version for a long time. This is not an issue with the distro policy or 
updates (never wanted to blame anyone from the Debian or Ubuntu team for that), 
but with the update policies of
the running org. I was focusing on *Ubuntu 18.04* (which was mentioned by 
Onno), for that change log [1] mentions Wed, 11 Sep 2019 as last update.

> All that junk at the end (-4~bpo9+1_all) indicates the various updates that 
> have been applied after the original 9.0.16. If you read the changelog[1] for 
> Buster, you'll see that it was last
> updated as recently as 2021-04-12 to apply fixes for CVE-2021-25122 and 
> CVE-2021-25329 (thanks, Emmanuel!). In fact, in Buster, you are getting 
> 9.0.31. I'll bet if you look at the Ubuntu
> changelog for your package, you'll find something similar.

You are right, if you manage your base system and keep it updated to recent 
version (not my experience though), this will be fine. However if you stick as 
long as possible to a distros version
(there is already a new Ubuntu LTS out for over a year, some time to update), 
you will have a gap to more recent Tomcat versions. Comparing Ubuntu 18.04 
Tomcat versions to current Ubuntu or
Debian versions, is not what was asked by the Onno. My experience is that some 
organisations try to stay on a specific distro version as long as possible.

> If you are getting 9.0.16 from your Ubuntu repository, I think you may be 
> getting "left behind" by something. The current Ubuntu package should 
> actually be a base version of 9.0.43. Older
> versions of Ubuntu have older base Tomcat versions.

Again current vs. Ubuntu 18.04 is a different story. My apologies, I should 
have been clearer in my first post.

[1] 
https://changelogs.ubuntu.com/changelogs/pool/universe/t/tomcat9/tomcat9_9.0.16-3ubuntu0.18.04.1/changelog

regards,
Thomas

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



Re: Archive or package install

2021-06-18 Thread tomcat-lists
Hi Onno,

On 18.06.21 07:07, Sugar Moose wrote:
> I am using Ansible role robertdebock.tomcat to install Tomcat. This role uses 
> archives from the Tomcat site to install Tomcat. I have always thought that 
> this is a fine approach but the customer has pointed out that a package 
> install is preferred because it makes installing security updates easier. 
> This customer uses Ubuntu 18.04 and the position of the InfraOps engineers is 
> that installing Tomcat from the official Ubuntu repository is always 
> preferred. 

Installing Tomcat directly from the archives is easy and straight forward, in 
my opinion it should be perfectly fine using upstream as source (you should at 
least verify the download).
Especially, if Tomcat plays a major role of the system (i.e. running some 
business critical applications), I would always stick to the version from 
Tomcat archives. You will end up with a more
recent version of Tomcat, as it is actively developed, those versions will 
contain all security fixes (directly from the team and without possible 
backporting of security fixes). If you use
CATALINA_HOME and CATALINA_BASE variables you can easily switch between 
different Tomcat versions, making it very easy to manage updates and possible 
necessary rollbacks.

I would only stick to the distro-provided packages, if it is a small (in other 
words not that important) application running in Tomcat. Just for reference: 
With Ubuntu 18.04, you would end up
with 9.0.16 vs. 9.0.48 (Tomcat project) or 8.5.39 vs. 8.5.68 (Tomcat project), 
which is about 2 years old software. For any errors you might get on distro 
packages, first hint would most
likely be to update to a recent Tomcat version. Even if security fixed are 
backported by the distro, you would end up with versions missing a lot of fixes 
and improvements.

> I don't know how exactly using apt packages makes life a lot easier when it 
> comes to security updates. I think it depends. If Ansible manages the version 
> it looks more or less the same to me. The Ansible role would have an var for 
> example tomcat_version and the value would determine the what version is on 
> the system. Updating Tomcat using Ansible would be same proces: update 
> tomcat_version var and provision the node. When Ansible is not managing the 
> version but is used for example only for the initial install using Ansible 
> package module it becomes a bit of a puzzle to figure out how this would 
> work. And also would have some drawbacks. Ansible is good at configuration 
> management and orchestration for example. Apt not really. 

Yes, Ansible is much more flexible for managing the configuration and 
deployment-parts. You will need something for that task, even if you use the 
distro-provided packages.

> What is the position / what are the thoughts on this in the Tomcat community? 
> On the Tomcat website I could find no information on package install. I don't 
> think a recommended installation approach is mentioned there. 

In short: If your application in Tomcat is important, use the Tomcat archive up 
to date versions, if not distro packages might be sufficient. This might be 
challenging, if Tomcat is managed by
the infrastructure team (from my experience, there is always a trend towards 
the distro packages, sometimes with the argument support by the distro). It 
might help, if managing the Tomcat can
be done by the applications support/devops team (however, that might depend on 
the organisation constraints).

hth,
Thomas

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



Re: HTTP error response payload

2020-02-08 Thread tomcat-lists
Hi Saurav,

On 08.02.20 07:47, Saurav Sarkar wrote:
> Through tomcat access valve i can view the HTTP request url ,response code
> etc.
> 
> But i can not view the error response being sent in the form of JSON
> payload.
> 
> Is their any valve/filter/ any other setting on tomcat level which can
> enable this or applications (server and clients) themselves have to log it.

Logging HTTP request or response bodies in access logs (or similar) is not 
common as this can
be anything from a simple (short) string to long binary data. If you need 
specific errors, I
would suggest to log it in your application specific logs (you can add session 
id "%S" or other
identifiers to your access log for easier mapping, see 
https://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Access_Log_Valve
for details).

If you do not have a chance to add this to your logs you can implement a 
ServletFilter which logs
the body of requests for certain requests.

hth,
Thomas

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



Re: Poller & CometPoller general questions

2012-07-17 Thread Filip Hanik Mailing Lists
In http://tomcat.apache.org/tomcat-7.0-doc/config/http.html
you can read about pollerThreadCount and useComet flags for the APR 
implementation.
You don't need Comet unless you applications specifically are using it, most 
likely they are not.

Filip


- Original Message -
> From: "Jeffrey Janner" 
> To: "Tomcat Users List" 
> Sent: Friday, July 13, 2012 9:53:14 AM
> Subject: Poller & CometPoller general questions
>
>
>
>
> I'm more curious here than there being a problem.
>
> Are the Poller & CometPoller threads necessary for Tomcat operation?
> If not, how to turn them off, and do I want to turn them off.
>
> Here's my scenario:
>
> Tomcat 6.0.33 with APR on Windows Server 2008 (regular and R2).
>
> Fairly normal server.xml, with generic  implementation,
> i.e., not explicitly specifying the protocol:
>
> 
>
>  SSLEngine="on" />
>
> 
> maxThreads="10" enableLookups="false" redirectPort="443"
> acceptCount="100"
>
> connectionTimeout="2" disableUploadTimeout="true" />
>
> 
> maxThreads="100" enableLookups="false" acceptCount="100"
>
> connectionTimeout="2" disableUploadTimeout="true"
>
> scheme="https" secure="true" SSLEnabled="true"
>
> SSLCertificateFile="path to server.crt"
>
> SSLCertificateKeyFile=" path to server.key"
>
> SSLCertificateChainFile=" path to _chain.crt"
>
> SSLPassword="password" />
>
> Web.xml is set up to force everything to HTTPS:
>
> 
>
> CONFIDENTIAL
>
> 
>
>
>
> So Tomcat starts up and creates, in my case, 32 poller threads, 8
> poller and 8 cometpoller for each connector.
>
> Now, I know these just sit around waiting on AprEndpoint$Poller,
> basically doing nothing and really causing no harm, other than
> taking up some threads out of my available threadpool.
>
> I pretty sure we don’t use Comet, so I'd like to turn those off, but
> it's not clear in the documentation that I can, only looks like
> there are controls for the NIO connector.
>
> What, if anything, would the standard Poller threads be used for?
>
> Since everything gets forwarded to HTTPS, the HTTP poller threads
> seam exceptionally useless.
>
>
>
> Jeffrey Janner
>
> Sr. Network Administrator
>
> jeffrey.jan...@polydyne.com
>
> PolyDyne Software Inc.
>
> Main: 512.343.9100
>
> Direct: 512.583.8930
>
>
>
> cid:image002.png@01CC0FB7.4FF43CE0
>
>
>
> Speed, Intelligence & Savings in Sourcing
>
>
>
>
> __
>
> Confidentiality Notice: This Transmission (including any attachments)
> may contain information that is privileged, confidential, and exempt
> from disclosure under applicable law. If the reader of this message
> is not the intended recipient you are hereby notified that any
> dissemination, distribution, or copying of this communication is
> strictly prohibited.
>
> If you have received this transmission in error, please immediately
> reply to the sender or telephone (512) 343-9100 and delete this
> transmission from your system.
>

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



RE: Tomcat 7.0.28 connection pool issue

2012-06-29 Thread Filip Hanik (mailing lists)
An update on this issue. Yassir tested with a JAR I built against trunk.
What this could mean is that the bug 
https://issues.apache.org/bugzilla/show_bug.cgi?id=53367
somehow didn't make it into the build of 7.0.28

I will double check it. 

Filip

> -Original Message-
> From: Filip Hanik (mailing lists) [mailto:devli...@hanik.com]
> Sent: Thursday, June 28, 2012 2:42 PM
> To: 'Tomcat Users List'
> Subject: RE: Tomcat 7.0.28 connection pool issue
> 
> Martin, generally I would run with fairQueue="false" - this is the
> default.
> The only time I would change to fairQueue="true" is if we see threads
> being
> starved, and not getting connections. However, this scenario is very
> unlikely unless there is extreme concurrency going on.
> 
> Filip
> 
> > -Original Message-
> > From: Martin Gainty [mailto:mgai...@hotmail.com]
> > Sent: Thursday, June 28, 2012 1:38 PM
> > To: Tomcat Users List
> > Subject: RE: Tomcat 7.0.28 connection pool issue
> >
> >
> > Hi Filip
> >
> > Is there an algorithm we can use to determine if the op should
> configure
> > concurrent db connections (fairQueue=false)  vs config non-concurrent
> db
> > connections (fairQueue=true)
> > e.g. if 50%+ of database cursors are 'read-only' then concurrent
> > connections *should be used* and TC attribute of fairQueue should be
> set
> > to false
> > Thanks!
> > Martin
> > __
> > Place legal disclaimer here
> >
> >  > From: devli...@hanik.com
> > > To: users@tomcat.apache.org
> > > Subject: RE: Tomcat 7.0.28 connection pool issue
> > > Date: Thu, 28 Jun 2012 11:36:49 -0600
> > >
> > > Then the issue you may be running into is that your Tomcat
> > configuration
> > > supports a higher concurrency level than what your Resin
> configuration
> > is
> > > setup to do.
> > > With higher concurrency, there will be a need for more data base
> > > connections. If you still want to run with a lower number of
> > connections,
> > > what you can do is set
> > >
> > > fairQueue="true"
> > > maxWait="time in milliseconds to wait for next available connection"
> > >
> > > and what this effectively will do, is lower your concurrency.
> > Recommended is
> > > of course to increase maxActive if the database supports it.
> > >
> > > Filip
> > >
> > >
> > > > -Original Message-
> > > > From: Yasser [mailto:yarafa...@gmail.com]
> > > > Sent: Thursday, June 28, 2012 11:33 AM
> > > > To: Tomcat Users List
> > > > Subject: Re: Tomcat 7.0.28 connection pool issue
> > > >
> > > > That was the issue with Tomcat 7.0.26 and they fixed it in 7.0.28
> > > >
> > > >
> > > > On Thu, Jun 28, 2012 at 11:54 AM, Filip Hanik (mailing lists) <
> > > > devli...@hanik.com> wrote:
> > > >
> > > > > Could you have run into
> > > > > https://issues.apache.org/bugzilla/show_bug.cgi?id=53367
> > > > >
> > > > > ?
> > > > >
> > > > > You could try out
> > > > > http://people.apache.org/~fhanik/jdbc-pool/bz53367-jdbc-pool.jar
> > > > >
> > > > >
> > > > > > -Original Message-
> > > > > > From: Yasser [mailto:yarafa...@gmail.com]
> > > > > > Sent: Thursday, June 28, 2012 9:39 AM
> > > > > > To: Tomcat Users List
> > > > > > Subject: Re: Tomcat 7.0.28 connection pool issue
> > > > > >
> > > > > > Yes. It does show that maxactive has reached 100. I also use
> > splunk
> > > > to
> > > > > > get
> > > > > > the connection status at the oracle side.
> > > > > > What I dont understand is that Resin needs just 50 connections
> > to
> > > > handle
> > > > > > the same load. I am in the process of increasing the count to
> > 300
> > > > and
> > > > > > see
> > > > > > if that makes a difference. Oracle has the capacity to handle
> > that
> > > > many
> > > > > > connections.
> > > > > >
> > > > > >
> > > > > > On Thu, Jun 28, 2012 at 11:01 AM, Hedrick, Brooke - 43 <
> > > > > > brooke.hedr...@rainhail.com&g

RE: Multicast fails when mcastBindAddress is explicitly set

2012-06-29 Thread Filip Hanik (mailing lists)
I'd write a simple test program to see.

> -Original Message-
> From: Madhav Bhargava [mailto:unmarsh...@gmail.com]
> Sent: Friday, June 29, 2012 10:16 AM
> To: Tomcat Users List
> Subject: Re: Multicast fails when mcastBindAddress is explicitly set
> 
> Hi Filip,
> 
> We as development teams do not have access to the production VM/HV's but
> it
> was told to us that multicast is enabled and they have explicitly
> checked
> the Xen virtual bridges/switch to check if the multicast is blocked but
> it
> does not seem to be.
> 
> At this point in time we do not know if the issue is because of apache
> tribes or it is just related to HV configuration.
> 
> Best Regards,
> Madhav
> 
> On Fri, Jun 29, 2012 at 9:36 PM, Filip Hanik (mailing lists) <
> devli...@hanik.com> wrote:
> 
> > Sounds like you need to enable multicasting. This would be a
> VM/hypervisor
> > configuration issue.
> >
> > Filip
> >
> > > -Original Message-
> > > From: Madhav Bhargava [mailto:unmarsh...@gmail.com]
> > > Sent: Friday, June 29, 2012 10:04 AM
> > > To: users@tomcat.apache.org
> > > Subject: Re: Multicast fails when mcastBindAddress is explicitly set
> > >
> > > Hi All,
> > >
> > > Ok we got resolution for the below exception. The problem was that
> both
> > > IPV4 and IPv6 addresses were enabled for the multihome machine. We
> > > switched
> > > to IPv6 addresses and the issue was no longer there. However there
> is
> > > still
> > > one issue:
> > >
> > > With machines on different hypervisors the multicast traffic seems
> to be
> > > blocked. VM's on different Hypervisors are not able to get presence
> or
> > > any
> > > other message from each other. So neither the discovery works nor
> inter
> > > node communication because there is no knowledge of the other VMs
> > >
> > > Best Regard,
> > > Madhav
> > >
> > > On Fri, Jun 29, 2012 at 5:58 PM, Madhav Bhargava
> > > wrote:
> > >
> > > > Hi All,
> > > >
> > > > We are using Apache Tribes 7.0.2. We use it for node discovery and
> p2p
> > > > communication.
> > > > We are currently running into a problem where the discovery fails
> on
> > > > multihomed machines (multiple IP's). We were not sure to which IP
> the
> > > > multicast bind address was getting bound to, so we thought of
> > > explicitly
> > > > binding the interface via "mcastBindAddress" property. However
> when we
> > > set
> > > > this property then we get the following exception:
> > > >
> > > > Exception occured: java.io.IOException: Invalid argument; No
> faulty
> > > > members identified.org.apache.catalina.tribes.ChannelException:
> > > > java.io.IOException: Invalid argument; No faulty members
> identified.
> > > >
> > > > at
> > > >
> > >
> org.apache.catalina.tribes.group.ChannelCoordinator.internalStart(Channe
> > > lCoordinator.java:178)
> > > >
> > > > at
> > > >
> > >
> org.apache.catalina.tribes.group.ChannelCoordinator.start(ChannelCoordin
> > > ator.java:99)
> > > >
> > > > at
> > > >
> > >
> org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInt
> > > erceptorBase.java:162)
> > > >
> > > > at
> > > >
> > >
> org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor
> > > .start(MessageDispatchInterceptor.java:153)
> > > >
> > > > at
> > > >
> > >
> org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInt
> > > erceptorBase.java:162)
> > > >
> > > > at
> > > >
> > >
> org.apache.catalina.tribes.group.GroupChannel.start(GroupChannel.java:41
> > > 9)
> > > >
> > > > at
> > > >
> > >
> com.sap.it.gizmos.diag.TribesConfigurator.run(TribesConfigurator.java:10
> > > 9)
> > > >
> > > > at
> > > >
> > >
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> > > >
> > > > at
> > > > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334

RE: Multicast fails when mcastBindAddress is explicitly set

2012-06-29 Thread Filip Hanik (mailing lists)
Sounds like you need to enable multicasting. This would be a VM/hypervisor 
configuration issue.

Filip

> -Original Message-
> From: Madhav Bhargava [mailto:unmarsh...@gmail.com]
> Sent: Friday, June 29, 2012 10:04 AM
> To: users@tomcat.apache.org
> Subject: Re: Multicast fails when mcastBindAddress is explicitly set
> 
> Hi All,
> 
> Ok we got resolution for the below exception. The problem was that both
> IPV4 and IPv6 addresses were enabled for the multihome machine. We
> switched
> to IPv6 addresses and the issue was no longer there. However there is
> still
> one issue:
> 
> With machines on different hypervisors the multicast traffic seems to be
> blocked. VM's on different Hypervisors are not able to get presence or
> any
> other message from each other. So neither the discovery works nor inter
> node communication because there is no knowledge of the other VMs
> 
> Best Regard,
> Madhav
> 
> On Fri, Jun 29, 2012 at 5:58 PM, Madhav Bhargava
> wrote:
> 
> > Hi All,
> >
> > We are using Apache Tribes 7.0.2. We use it for node discovery and p2p
> > communication.
> > We are currently running into a problem where the discovery fails on
> > multihomed machines (multiple IP's). We were not sure to which IP the
> > multicast bind address was getting bound to, so we thought of
> explicitly
> > binding the interface via "mcastBindAddress" property. However when we
> set
> > this property then we get the following exception:
> >
> > Exception occured: java.io.IOException: Invalid argument; No faulty
> > members identified.org.apache.catalina.tribes.ChannelException:
> > java.io.IOException: Invalid argument; No faulty members identified.
> >
> > at
> >
> org.apache.catalina.tribes.group.ChannelCoordinator.internalStart(Channe
> lCoordinator.java:178)
> >
> > at
> >
> org.apache.catalina.tribes.group.ChannelCoordinator.start(ChannelCoordin
> ator.java:99)
> >
> > at
> >
> org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInt
> erceptorBase.java:162)
> >
> > at
> >
> org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor
> .start(MessageDispatchInterceptor.java:153)
> >
> > at
> >
> org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInt
> erceptorBase.java:162)
> >
> > at
> >
> org.apache.catalina.tribes.group.GroupChannel.start(GroupChannel.java:41
> 9)
> >
> > at
> >
> com.sap.it.gizmos.diag.TribesConfigurator.run(TribesConfigurator.java:10
> 9)
> >
> > at
> >
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> >
> > at
> > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> >
> > at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> >
> > at
> >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.jav
> a:1110)
> >
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
> va:603)
> >
> > at java.lang.Thread.run(Thread.java:782)
> >
> > Caused by: java.io.IOException: Invalid argument
> >
> > at java.net.PlainDatagramSocketImpl.send(Native Method)
> >
> > at java.net.DatagramSocket.send(DatagramSocket.java:675)
> >
> > at
> >
> org.apache.catalina.tribes.membership.McastServiceImpl.send(McastService
> Impl.java:503)
> >
> > at
> >
> org.apache.catalina.tribes.membership.McastServiceImpl.send(McastService
> Impl.java:480)
> >
> > at
> >
> org.apache.catalina.tribes.membership.McastServiceImpl.start(McastServic
> eImpl.java:269)
> >
> > at
> >
> org.apache.catalina.tribes.membership.McastService.start(McastService.ja
> va:386)
> >
> > at
> >
> org.apache.catalina.tribes.group.ChannelCoordinator.internalStart(Channe
> lCoordinator.java:167)
> >
> > ... 12 more
> >
> > So we wrote a simple test program (attached) which fails on multi-home
> > machines. We also wrote another test program where we just used simple
> > java.net.MulticastSocket, set the multicast interface (using
> setInterface)
> > to one of the interfaces and tried to send a Datagram packet and it
> was
> > able to send.
> >
> > So now we wonder:
> >
> > 1. How do you explicitly set the multicast interface on the group
> channel
> > in apache tribes?
> > 2. I assume that tcpListenHost is the IP address that gets advertised
> when
> > it joins the group and mcastBindAddress is the interface used to send
> out
> > messages over a multicast socket. Is my assumption right?
> >
> > Any help/pointers would be greatly appreciated.
> >
> > Best Regards,
> > Madhav
> >
> >
> > --
> > When I tell the truth, it is not for the sake of convincing those who
> do
> > not know it, but for the sake of defending those that do
> >
> 
> 
> 
> --
> When I tell the truth, it is not for the sake of convincing those who do
> not know it, but for the sake of defending those that do


---

RE: Tomcat 7.0.28 connection pool issue

2012-06-28 Thread Filip Hanik (mailing lists)
Martin, generally I would run with fairQueue="false" - this is the default.
The only time I would change to fairQueue="true" is if we see threads being
starved, and not getting connections. However, this scenario is very
unlikely unless there is extreme concurrency going on.

Filip

> -Original Message-
> From: Martin Gainty [mailto:mgai...@hotmail.com]
> Sent: Thursday, June 28, 2012 1:38 PM
> To: Tomcat Users List
> Subject: RE: Tomcat 7.0.28 connection pool issue
> 
> 
> Hi Filip
> 
> Is there an algorithm we can use to determine if the op should configure
> concurrent db connections (fairQueue=false)  vs config non-concurrent db
> connections (fairQueue=true)
> e.g. if 50%+ of database cursors are 'read-only' then concurrent
> connections *should be used* and TC attribute of fairQueue should be set
> to false
> Thanks!
> Martin
> __
> Place legal disclaimer here
> 
>  > From: devli...@hanik.com
> > To: users@tomcat.apache.org
> > Subject: RE: Tomcat 7.0.28 connection pool issue
> > Date: Thu, 28 Jun 2012 11:36:49 -0600
> >
> > Then the issue you may be running into is that your Tomcat
> configuration
> > supports a higher concurrency level than what your Resin configuration
> is
> > setup to do.
> > With higher concurrency, there will be a need for more data base
> > connections. If you still want to run with a lower number of
> connections,
> > what you can do is set
> >
> > fairQueue="true"
> > maxWait="time in milliseconds to wait for next available connection"
> >
> > and what this effectively will do, is lower your concurrency.
> Recommended is
> > of course to increase maxActive if the database supports it.
> >
> > Filip
> >
> >
> > > -Original Message-
> > > From: Yasser [mailto:yarafa...@gmail.com]
> > > Sent: Thursday, June 28, 2012 11:33 AM
> > > To: Tomcat Users List
> > > Subject: Re: Tomcat 7.0.28 connection pool issue
> > >
> > > That was the issue with Tomcat 7.0.26 and they fixed it in 7.0.28
> > >
> > >
> > > On Thu, Jun 28, 2012 at 11:54 AM, Filip Hanik (mailing lists) <
> > > devli...@hanik.com> wrote:
> > >
> > > > Could you have run into
> > > > https://issues.apache.org/bugzilla/show_bug.cgi?id=53367
> > > >
> > > > ?
> > > >
> > > > You could try out
> > > > http://people.apache.org/~fhanik/jdbc-pool/bz53367-jdbc-pool.jar
> > > >
> > > >
> > > > > -Original Message-
> > > > > From: Yasser [mailto:yarafa...@gmail.com]
> > > > > Sent: Thursday, June 28, 2012 9:39 AM
> > > > > To: Tomcat Users List
> > > > > Subject: Re: Tomcat 7.0.28 connection pool issue
> > > > >
> > > > > Yes. It does show that maxactive has reached 100. I also use
> splunk
> > > to
> > > > > get
> > > > > the connection status at the oracle side.
> > > > > What I dont understand is that Resin needs just 50 connections
> to
> > > handle
> > > > > the same load. I am in the process of increasing the count to
> 300
> > > and
> > > > > see
> > > > > if that makes a difference. Oracle has the capacity to handle
> that
> > > many
> > > > > connections.
> > > > >
> > > > >
> > > > > On Thu, Jun 28, 2012 at 11:01 AM, Hedrick, Brooke - 43 <
> > > > > brooke.hedr...@rainhail.com> wrote:
> > > > >
> > > > > >
> > > > > > > -Original Message-
> > > > > > > From: Yasser [mailto:yarafa...@gmail.com]
> > > > > > > Sent: Thursday, June 28, 2012 9:44 AM
> > > > > > > To: users@tomcat.apache.org
> > > > > > > Subject: Tomcat 7.0.28 connection pool issue
> > > > > > >
> > > > > > ...
> > > > > > > What is the issue?
> > > > > > > When we run a stress test on the same codebase deployed to
> > > Tomcat
> > > > > 7.0.28,
> > > > > > > at about 2hr45min into the test with 530 virtual users
> logged in
> > > (at
> > > > > > peak load),
> > > > > > > I get a lot of connection pool empty errors. The maxactive
> > > attribute
> > > > > >

RE: Tomcat 7.0.28 connection pool issue

2012-06-28 Thread Filip Hanik (mailing lists)
Then the issue you may be running into is that your Tomcat configuration
supports a higher concurrency level than what your Resin configuration is
setup to do.
With higher concurrency, there will be a need for more data base
connections. If you still want to run with a lower number of connections,
what you can do is set

fairQueue="true"
maxWait="time in milliseconds to wait for next available connection"

and what this effectively will do, is lower your concurrency. Recommended is
of course to increase maxActive if the database supports it.

Filip


> -Original Message-
> From: Yasser [mailto:yarafa...@gmail.com]
> Sent: Thursday, June 28, 2012 11:33 AM
> To: Tomcat Users List
> Subject: Re: Tomcat 7.0.28 connection pool issue
> 
> That was the issue with Tomcat 7.0.26 and they fixed it in 7.0.28
> 
> 
> On Thu, Jun 28, 2012 at 11:54 AM, Filip Hanik (mailing lists) <
> devli...@hanik.com> wrote:
> 
> > Could you have run into
> > https://issues.apache.org/bugzilla/show_bug.cgi?id=53367
> >
> > ?
> >
> > You could try out
> > http://people.apache.org/~fhanik/jdbc-pool/bz53367-jdbc-pool.jar
> >
> >
> > > -Original Message-
> > > From: Yasser [mailto:yarafa...@gmail.com]
> > > Sent: Thursday, June 28, 2012 9:39 AM
> > > To: Tomcat Users List
> > > Subject: Re: Tomcat 7.0.28 connection pool issue
> > >
> > > Yes. It does show that maxactive has reached 100. I also use splunk
> to
> > > get
> > > the connection status at the oracle side.
> > > What I dont understand is that Resin needs just 50 connections to
> handle
> > > the same load. I am in the process of increasing the count to 300
> and
> > > see
> > > if that makes a difference. Oracle has the capacity to handle that
> many
> > > connections.
> > >
> > >
> > > On Thu, Jun 28, 2012 at 11:01 AM, Hedrick, Brooke - 43 <
> > > brooke.hedr...@rainhail.com> wrote:
> > >
> > > >
> > > > > -Original Message-
> > > > > From: Yasser [mailto:yarafa...@gmail.com]
> > > > > Sent: Thursday, June 28, 2012 9:44 AM
> > > > > To: users@tomcat.apache.org
> > > > > Subject: Tomcat 7.0.28 connection pool issue
> > > > >
> > > > ...
> > > > > What is the issue?
> > > > > When we run a stress test on the same codebase deployed to
> Tomcat
> > > 7.0.28,
> > > > > at about 2hr45min into the test with 530 virtual users logged in
> (at
> > > > peak load),
> > > > > I get a lot of connection pool empty errors. The maxactive
> attribute
> > > > (using
> > > > > tomcat connection pool) has been set to 100.
> > > > >
> > > >
> > > > Have you used jconsole to monitor the pool usage?
> > > >
> > > > -Brooke
> > > >
> > > > > Other information:
> > > > > CAS runs on a different server with a dedicated tomcat home and
> > > base. I
> > > > > dont see any errors on this box.
> > > > > 7.0.26 was found to have a bug in the way connection count is
> > > determined,
> > > > > which got fixed in 7.0.28, hence we switched to the latest
> version.
> > > > >
> > > > > Here is one of the connection pool config from server.xml. We do
> a
> > > > resource
> > > > > link to this pool in the context.xml
> > > > >
> > > > >  > > > > type="javax.sql.DataSource" username="webconnect"
> > > > > password="xxx"
> > > > > driverClassName="oracle.jdbc.driver.OracleDriver"
> > > > >
> > > > >
> url="jdbc:oracle:thin:@&&dbs.ip&&:&&oracle.db.port&&:&&dts.dbname&&
> > > > > "
> > > > >
> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
> > > > > maxActive="100" />
> > > > >
> > > > > Any help is appreciated. Please let me know if you need more
> > > information
> > > > or
> > > > > code snippets.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Yasser
> > > >
> > > > --
> ---
> > > > 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 7.0.28 connection pool issue

2012-06-28 Thread Filip Hanik (mailing lists)
Could you have run into 
https://issues.apache.org/bugzilla/show_bug.cgi?id=53367

?

You could try out
http://people.apache.org/~fhanik/jdbc-pool/bz53367-jdbc-pool.jar


> -Original Message-
> From: Yasser [mailto:yarafa...@gmail.com]
> Sent: Thursday, June 28, 2012 9:39 AM
> To: Tomcat Users List
> Subject: Re: Tomcat 7.0.28 connection pool issue
> 
> Yes. It does show that maxactive has reached 100. I also use splunk to
> get
> the connection status at the oracle side.
> What I dont understand is that Resin needs just 50 connections to handle
> the same load. I am in the process of increasing the count to 300 and
> see
> if that makes a difference. Oracle has the capacity to handle that many
> connections.
> 
> 
> On Thu, Jun 28, 2012 at 11:01 AM, Hedrick, Brooke - 43 <
> brooke.hedr...@rainhail.com> wrote:
> 
> >
> > > -Original Message-
> > > From: Yasser [mailto:yarafa...@gmail.com]
> > > Sent: Thursday, June 28, 2012 9:44 AM
> > > To: users@tomcat.apache.org
> > > Subject: Tomcat 7.0.28 connection pool issue
> > >
> > ...
> > > What is the issue?
> > > When we run a stress test on the same codebase deployed to Tomcat
> 7.0.28,
> > > at about 2hr45min into the test with 530 virtual users logged in (at
> > peak load),
> > > I get a lot of connection pool empty errors. The maxactive attribute
> > (using
> > > tomcat connection pool) has been set to 100.
> > >
> >
> > Have you used jconsole to monitor the pool usage?
> >
> > -Brooke
> >
> > > Other information:
> > > CAS runs on a different server with a dedicated tomcat home and
> base. I
> > > dont see any errors on this box.
> > > 7.0.26 was found to have a bug in the way connection count is
> determined,
> > > which got fixed in 7.0.28, hence we switched to the latest version.
> > >
> > > Here is one of the connection pool config from server.xml. We do a
> > resource
> > > link to this pool in the context.xml
> > >
> > >  > > type="javax.sql.DataSource" username="webconnect"
> > > password="xxx"
> > > driverClassName="oracle.jdbc.driver.OracleDriver"
> > >
> > > url="jdbc:oracle:thin:@&&dbs.ip&&:&&oracle.db.port&&:&&dts.dbname&&
> > > "
> > >   factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
> > > maxActive="100" />
> > >
> > > Any help is appreciated. Please let me know if you need more
> information
> > or
> > > code snippets.
> > >
> > > Thanks,
> > >
> > > Yasser
> >
> > -
> > 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: non blocking Websockets?

2012-05-31 Thread Filip Hanik (mailing lists)
You can achieve that right now. Use the NIO connector, And then set up the
write buffer:

 -Original Message-
> From: Christian Finckler [mailto:christian.finck...@gmx.de]
> Sent: Thursday, May 31, 2012 11:45 AM
> To: Tomcat Users List
> Subject: Re: non blocking Websockets?
> 
> 
> 
> Am 31.05.2012 11:09, schrieb Mark Thomas:
> > On 31/05/2012 10:02, Christian Finckler wrote:
> >> Hello,
> >> as far I understood, the websocket implementation of tomcat is using
> one
> >> thread per client.
> >> Is there also a possibility to configure it to use non blocking IO?
> > No. That has not yet been implemented. It shouldn't be too hard
> provided
> > that non-blocking is used between messages and blocking is used during
> > messages. Obviously, the BIO connector will always use blocking.
> >
> > Mark
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> Ok, if that is so easy, it should be done. I am developing an online
> game, in which the player dont send messages very often (max: ten
> messages per minute), but is is very important to get the messages of
> other players very fast. Thats why I want to use websockets. But now it
> would be sad, if I need multiple tomcat instances only for connection
> handling although the process handling itself is not very complicated
> (cpu and memory intensive).
> 
> Thank you,
> Chris
> 
> -
> 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: encrypt the database password

2012-05-24 Thread Filip Hanik Mailing Lists
yes, there is, search http://tomcat.markmail.org for the same
org.apache.tomcat.util.digester.PROPERTY_SOURCE
is a system property where you can add the code that digests properties in 
server.xml
This code can 'decode' your encoded properties



- Original Message -
> From: "Bill Wang" 
> To: "Tomcat Users List" 
> Sent: Wednesday, May 23, 2012 11:34:10 PM
> Subject: encrypt the database password
> 
> Hi All,
> 
> There is a tomcat server with some database setup.
> 
> cd apache-tomcat-6.0.29/conf
> cat server.xml
> 
>driverClassName="oracle.jdbc.driver.OracleDriver"
> 
>   factory="oracle.jdbc.pool.OracleDataSourceFactory"
> maxActive="20"
>   maxIdle="10" maxWait="-1" name="jdbc/abc"
>   password="abcADMIN"
>   type="oracle.jdbc.pool.OracleDataSource"
> 
> url="jdbc:oracle:thin:@localhost:1521:mydb" user="abc" />
> 
> 
> So which the plain password, end user may get the password directly.
> 
> 
> How can create encrypted password within server.xml
> 

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



Re: Tomcat 7. MX4J

2012-05-23 Thread Filip Hanik Mailing Lists
http://tomcat.apache.org/tomcat-6.0-doc/config/listeners.html#JMX_Remote_Lifecycle_Listener_-_org.apache.catalina.mbeans.JmxRemoteLifecycleListener



- Original Message -
> From: "Vadzim Mikhalenak" 
> To: "Tomcat Users List" 
> Sent: Tuesday, May 22, 2012 4:06:52 PM
> Subject: Re: Tomcat 7. MX4J
> 
> On Wed, May 23, 2012 at 12:31 AM, Konstantin Kolinko
>  > wrote:
> 
> > 2012/5/22 Vadzim Mikhalenak :
> > > Hello  Christopher,
> > > *
> > > *
> > > Thank you for the reply! Yes, link
> > > http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html is for
> > > version
> > 5.5
> > > but we are migrating from version 6 (sorry for the confusion) but
> > > the
> > > configuration above was valid for version 6
> > >
> >
> > It works (or at least tries to start, to my surprise) in Tomcat 6
> > with
> > this particular AJP/1.3 connector implementation, but it is not
> > documented and not supported.  Other connectors do not support
> > those
> > attributes and this one was removed from Tomcat 7.
> >
> > Tomcat 6 and 7 use JMX support provided by JRE and if you need http
> > access to it, the common way is to use "JMXProxy" servlet that is
> > part
> > of the manager webapp.
> >
> > It is all is documented
> > http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html
> >
> > http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Using_the_JMX_Proxy_Servlet
> >
> > or see the same docs for Tomcat 7.
> >
> >
> >
> > >   > >handler.list="mx"
> > >mx.enabled="true"
> > >mx.httpHost="${JMX.HOST}"
> > >mx.httpPort="${JMX.PORT}"
> > >protocol="AJP/1.3" />
> > >
> > >
> > > *
> > > *
> > > and gave us opportunity to manage JMX beans using  http://
> > > ${JMX.HOST}:${JMX.PORT} (please see
> > >
> > http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
> > > )
> > > In version 7 I couldn't see any possibility to do it.
> > > I've noticed that in Connector class of version 6
> > > if ("AJP/1.3".equals(protocol)) {
> > >setProtocolHandlerClassName
> > >("org.apache.jk.server.JkCoyoteHandler");
> > >
> > > org.apache.jk.server.JkCoyoteHandler used JkMain which used JkMX
> > > where
> > > HttpAdapter from mx4j-tool.jar was used.
> > >
> > > but in version 7
> > > else if ("AJP/1.3".equals(protocol)) {
> > >setProtocolHandlerClassName
> > >("org.apache.coyote.ajp.AjpAprProtocol");
> > >
> > >
> > >
> > > So do we have possibility to manage JMX beans in version 7 as we
> > > could in
> > > version 6? (please see
> > >
> > http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
> > >  )
> > >
> >
> > Please
> > 1. Post your response below the text that you are replying to (aka
> > "do
> > not top-post")
> > 2. Do not cross-post questions between users@ and dev@ lists.
> >
> > This one belongs to users@.
> >
> > Best regards,
> > Konstantin Kolinko
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> > Hi,
> 
> Thanks for the reply.
> I know about JMX Proxy Servlet but it was more preferable to use MX4J
> page
> and I thought there is simple way to configure it (as it was
> configured in
> 6 version).
> I'll be looking for solution to get mx4j page working.
> Thanks again for your help!
> Sorry for the trouble.
> 
> Best regards,
> Vadim.
> 

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



Re: DefaultServlet socketWrite hang

2012-05-21 Thread Filip Hanik Mailing Lists
if you look deeper under the hood of Java NET/IO you will see that there is no 
configurable timeout for writing blocking IO.
The best thing you can do is upgrade to Tomcat 6, and use the NIO connector 
(protocol="org.apache.coyote.http11.Http11NioProtocol") as that has a 
configurable timeout for writing data.

best
Filip


- Original Message -
> From: "Douglas Briere" 
> To: 'users@tomcat.apache.org'
> Sent: Tuesday, May 15, 2012 4:18:00 PM
> Subject: DefaultServlet socketWrite hang
> 
> 
> Hello,
> 
> We are using tomcat 5.5.30. I saw the following 26 times at one of
> customers sites.  Our web server is used to launch JNLP
> applications, so I believe this was downloading the client jar
> files.  However, java webstart caches after the first occurrence so
> this is a bit odd.  Has anyone seen this before? It appears these
> threads are getting stalled out.  Could a socket timeout be
> configured?  Thanks.
> 
> at java.net.SocketOutputStream.socketWrite0(Native Method)
> at
> 
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
> at
> java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> at
> 
> org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:751)
> at
> 
> org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
> at
> 
> org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)
> at
> 
> org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:774)
> at
> 
> org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)
> at
> 
> org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:584)
> at
> org.apache.coyote.Response.doWrite(Response.java:560)
> at
> 
> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:365)
> at
> 
> org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:352)
> at
> 
> org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:396)
> at
> 
> org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:385)
> at
> 
> org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
> at
> 
> org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:1839)
> at
> 
> org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:929)
> at
> 
> org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:385)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
> at
> 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
> at
> 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> at
> 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> at
> 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
> at
> 
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
> at
> 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> at
> 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> at
> 
> org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:500)
> at
> 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
> at
> 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
> at
> 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879)
> at
> 
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
> at
> 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
> at
> 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo

RE: Start Tomcat6 service with StartMode as java

2012-05-08 Thread Filip Hanik (mailing lists)
The Java Service Wrapper does this for you, if you want to try an
alternative
http://wrapper.tanukisoftware.com/doc/english/download.jsp


> -Original Message-
> From: Venkata R Madugundu [mailto:venkataraman...@in.ibm.com]
> Sent: Tuesday, May 08, 2012 8:07 AM
> To: Venkata R Madugundu
> Cc: users@tomcat.apache.org
> Subject: Re: Start Tomcat6 service with StartMode as java
> 
> Hi,
> 
> We have been trying to run Tomcat6 windows service to spawn java.exe
> instead of loading having JVM loaded in process.
> I have tried to follow through all the documentation of Tomcat6 and
> procrun
> to use StartMode as 'java'.
> 
> But no matter how I tweak the arguments, the StartMode with 'java' does
> not
> seem to work. Do you know if there is a deterministic way to make it
> work.
> We are using Tomcat 6.0.20
> 
> Here is the relevant content of the service install script.
> 
> 
> 
> ---
> set INSTALL_DIR=%~dp0
> 
> rem Tomcat 'catalina home' and 'catalina base' paths
> cd ..
> set CATALINA_HOME=%cd%
> set CATALINA_BASE=%CATALINA_HOME%
> cd .\bin
> 
> rem Java path relative to ASBNode
> set ASBNODE_DIR=%INSTALL_DIR:\Clients\MetaBrokersAndBridges\web\bin\=%
> set ASBNODE_DIR=%ASBNODE_DIR%\ASBNode
> set
> JVM_OPTIONS="-Dcatalina.base=%CATALINA_BASE%;-
> Dcatalina.home=%CATALINA_HOME%;-
> Djava.endorsed.dirs=%CATALINA_HOME%\endorsed;-
> Djava.io.tmpdir=%CATALINA_BASE%\temp;-
> Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-
> Djava.util.logging.config.file=%CATALINA_BASE%\conf
> \logging.properties"
> 
> set SERVICE_NAME=MBB
> set SERVICE_EXECUTABLE=%CATALINA_HOME%\bin\tomcat6.exe
> 
> set OPTIONS=--DisplayName "IBM InfoSphere Metadata Integration Bridges"
> set OPTIONS=%OPTIONS% --Description "IBM InfoSphere Metadata Integration
> Bridges"
> set OPTIONS=%OPTIONS% --Install %SERVICE_EXECUTABLE%
> set OPTIONS=%OPTIONS% --LogPath %CATALINA_BASE%\logs
> set OPTIONS=%OPTIONS% --Classpath %CATALINA_HOME%\bin
> \bootstrap.jar;%CATALINA_HOME%\bin\tomcat-juli.jar
> set OPTIONS=%OPTIONS% --StartMode Java
> set OPTIONS=%OPTIONS% --StopMode Java
> set OPTIONS=%OPTIONS% --JavaHome %ASBNODE_DIR%\apps\jre
> set OPTIONS=%OPTIONS% --StartClass org.apache.catalina.startup.Bootstrap
> set OPTIONS=%OPTIONS% --StartParams start
> set OPTIONS=%OPTIONS% --StopClass org.apache.catalina.startup.Bootstrap
> set OPTIONS=%OPTIONS% --StopParams stop
> set OPTIONS=%OPTIONS% --JvmOptions %JVM_OPTIONS%
> set OPTIONS=%OPTIONS% --StdOutput auto
> set OPTIONS=%OPTIONS% --StdError auto
> set OPTIONS=%OPTIONS% --JvmMs 128
> set OPTIONS=%OPTIONS% --JvmMx 1024
> set OPTIONS=%OPTIONS% --LogLevel Debug
> 
> "%SERVICE_EXECUTABLE%" //IS//%SERVICE_NAME% %OPTIONS%
> if not errorlevel 1 goto end
> echo Failed installing '%SERVICE_NAME%' service
> goto end
> 
> echo The service '%SERVICE_NAME%' has been installed.
> :end
> cd %INSTALL_DIR%
> 
> 
> ---
> 
> Thanks
> Venkat
> 
> 
> -
> 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 config the Tomcat 7.x JNDI datasource by using BoneCP ??

2012-05-03 Thread Filip Hanik Mailing Lists
found it, check the logs at startup for the error and post it here. 

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



Re: How to config the Tomcat 7.x JNDI datasource by using BoneCP ??

2012-05-03 Thread Filip Hanik Mailing Lists
reading this on my phone, but does your  element have a name 
attribute? 

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



RE: How to config the Tomcat 7.x JNDI datasource by using BoneCP ??

2012-05-02 Thread Filip Hanik (mailing lists)
Aah, yes you are right. The specify 



Filip

> -Original Message-
> From: zuxiong lin [mailto:linzuxiong1...@gmail.com]
> Sent: Wednesday, May 02, 2012 8:40 PM
> To: Tomcat Users List
> Subject: Re: How to config the Tomcat 7.x JNDI datasource by using
> BoneCP ??
> 
> com.jolbox.bonecp.BoneCPDataSource  implements DataSource,
> *ObjectFactory ,
> *
> *isnot it a JNDI factory ?
> *
> On Thu, May 3, 2012 at 10:30 AM, Filip Hanik (mailing lists) <
> devli...@hanik.com> wrote:
> 
> > BoneCP doesn't have a JNDI factory AFAICT, and it's also missing a lot
> of
> > critical features, like validation etc
> >
> > Filip
> >
> > > -Original Message-
> > > From: zuxiong lin [mailto:linzuxiong1...@gmail.com]
> > > Sent: Wednesday, May 02, 2012 7:36 PM
> > > To: Tomcat Users List
> > > Subject: Re: How to config the Tomcat 7.x JNDI datasource by using
> > > BoneCP ??
> > >
> > > > Don't do that: remove mysql-connector-j-5.1.9.jar from WEB-
> INF/lib.
> > > > Also remove the JAR for BoneCP.
> > >
> > > I donot have a try now. This morning I received your mail ,UTC+8.
> > > Before I sent my mail for help , I just put the jar in both
> Tomcat/lib
> > > dir
> > > and webapp/WEB-INF/lib.
> > > And I found I am very confused in Tomcat->  />
> > > ...
> > > It seems that facotry doesnot work well.
> > >
> > > I found com.jolbox.bonecp.BoneCPDataSource have properties
> > > : driverClassName in
> javax.naming.spi.ObjectFactory#getObjectInstance
> > > and driverClass .
> > >
> > >
> > >
> > > Thanks!
> > >
> > >
> > > On Thu, May 3, 2012 at 9:19 AM, Christopher Schultz <
> > > ch...@christopherschultz.net> wrote:
> > >
> > > > -BEGIN PGP SIGNED MESSAGE-
> > > > Hash: SHA1
> > > >
> > > > Zuxiong,
> > > >
> > > > On 5/2/12 9:13 PM, zuxiong lin wrote:
> > > > > When I use BoneCP in per-web-app,  it is OK with  partitionCount
> .
> > > > > "partitionCount " is a property of BoneCP.
> > > >
> > > > Okay, that's fine then.
> > > >
> > > > > MySQL Connector/J  5.1.19,  I put it into both Tomcat's lib/
> > > > > directory and my webapp's WEB-INF/lib directory.
> > > >
> > > > Don't do that: remove mysql-connector-j-5.1.9.jar from WEB-
> INF/lib.
> > > > Also remove the JAR for BoneCP.
> > > >
> > > > > I can have a try. I think it doesnot work :
> > > >
> > > > Did you try it or not?
> > > >
> > > > >> you'll need to have the JAR files for MySQL Connector/J *and*
> > > > >> BoneCP in Tomcat's lib/ directory and *not* in your webapp's
> > > > >> WEB-INF/lib directory.
> > > >
> > > > I thought it was clear: Tomcat needs these libraries. Your webapp
> does
> > > > not. If you put those .jar files into WEB-INF/lib, things will ber
> > > > seriously confused.
> > > >
> > > > - -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/
> > > >
> > > > iEYEARECAAYFAk+h3Q8ACgkQ9CaO5/Lv0PBItwCZAQ46/6hFozDCuQuzD6CzAsFg
> > > > CRAAoKLTCLFSoswkgvreSBUBYeShxM1R
> > > > =k9mT
> > > > -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
> >
> >


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



RE: How to config the Tomcat 7.x JNDI datasource by using BoneCP ??

2012-05-02 Thread Filip Hanik (mailing lists)
BoneCP doesn't have a JNDI factory AFAICT, and it's also missing a lot of
critical features, like validation etc

Filip 

> -Original Message-
> From: zuxiong lin [mailto:linzuxiong1...@gmail.com]
> Sent: Wednesday, May 02, 2012 7:36 PM
> To: Tomcat Users List
> Subject: Re: How to config the Tomcat 7.x JNDI datasource by using
> BoneCP ??
> 
> > Don't do that: remove mysql-connector-j-5.1.9.jar from WEB-INF/lib.
> > Also remove the JAR for BoneCP.
> 
> I donot have a try now. This morning I received your mail ,UTC+8.
> Before I sent my mail for help , I just put the jar in both Tomcat/lib
> dir
> and webapp/WEB-INF/lib.
> And I found I am very confused in Tomcat-> 
> ...
> It seems that facotry doesnot work well.
> 
> I found com.jolbox.bonecp.BoneCPDataSource have properties
> : driverClassName in javax.naming.spi.ObjectFactory#getObjectInstance
> and driverClass .
> 
> 
> 
> Thanks!
> 
> 
> On Thu, May 3, 2012 at 9:19 AM, Christopher Schultz <
> ch...@christopherschultz.net> wrote:
> 
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > Zuxiong,
> >
> > On 5/2/12 9:13 PM, zuxiong lin wrote:
> > > When I use BoneCP in per-web-app,  it is OK with  partitionCount .
> > > "partitionCount " is a property of BoneCP.
> >
> > Okay, that's fine then.
> >
> > > MySQL Connector/J  5.1.19,  I put it into both Tomcat's lib/
> > > directory and my webapp's WEB-INF/lib directory.
> >
> > Don't do that: remove mysql-connector-j-5.1.9.jar from WEB-INF/lib.
> > Also remove the JAR for BoneCP.
> >
> > > I can have a try. I think it doesnot work :
> >
> > Did you try it or not?
> >
> > >> you'll need to have the JAR files for MySQL Connector/J *and*
> > >> BoneCP in Tomcat's lib/ directory and *not* in your webapp's
> > >> WEB-INF/lib directory.
> >
> > I thought it was clear: Tomcat needs these libraries. Your webapp does
> > not. If you put those .jar files into WEB-INF/lib, things will ber
> > seriously confused.
> >
> > - -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/
> >
> > iEYEARECAAYFAk+h3Q8ACgkQ9CaO5/Lv0PBItwCZAQ46/6hFozDCuQuzD6CzAsFg
> > CRAAoKLTCLFSoswkgvreSBUBYeShxM1R
> > =k9mT
> > -END PGP SIGNATURE-
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >


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



RE: Tomcat 7 NIO Socket accept failed - Too many open files

2012-05-02 Thread Filip Hanik (mailing lists)
Ok, lsof -p  (IIRC) should do the trick, it will tell all the handles open 
for that process, and you can deduce where the problem stems from

> -Original Message-
> From: David Wall [mailto:d.w...@computer.org]
> Sent: Wednesday, May 02, 2012 2:48 PM
> To: users@tomcat.apache.org
> Subject: Re: Tomcat 7 NIO Socket accept failed - Too many open files
> 
> 
> 
> On 5/2/2012 12:34 PM, Pid * wrote:
> > It's an OS issue: google 'ulimit'.
> >
> >
> > p
> 
> Yes, I am familiar with ulimit -Sn (it's 1024), but I suspect this could
> be a Tomcat issue somehow opening too many files and/or not releasing
> them.  I had never seen this issue before we upgraded from Tomcat 5.5
> (all using BIO) to Tomcat 7.0 (all using NIO).  We run on lots of
> servers, and none have shown this error before (and they are all Linux
> servers all set to 1024 for open files).  But we will give it a try by
> setting to a higher number.
> 
> The reason we suspect it's Tomcat is that we're getting other
> exceptions, too, those that indicate our session/request objects are not
> valid when our JSPs are running (and of course work fine when the loads
> are normal, but start to fail when we push lots of concurrent requests
> at Tomcat).
> 
> David
> 
> -
> 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: Web Socket Issue

2012-05-02 Thread Filip Hanik (mailing lists)
While the API call to set timeout is missing (it is present in Tomcat's
Comet implementation) a "forever" setting would not do you any good
Your application has to learn how to deal with disconnects, as they are very
common over WAN.
I expect that a future version will have that call, but it wont completely
solve your problem

Best
Filip

> -Original Message-
> From: umar farooq [mailto:umarfarooq...@gmail.com]
> Sent: Wednesday, May 02, 2012 12:45 PM
> To: Tomcat Users List
> Subject: Re: Web Socket Issue
> 
> But it is not requirement. I want to send ping once to open the socket
> after that it should depend on user when he wants to close the
> connection.
> Cannot I explicitly call some method to set timeout forever on client or
> server side. Or any other mechanism..??
> 
> On Wed, May 2, 2012 at 10:04 AM, Filip Hanik (mailing lists) <
> devli...@hanik.com> wrote:
> 
> > Have the client send a ping message every 10 seconds
> >
> > > -Original Message-
> > > From: umar farooq [mailto:umarfarooq...@gmail.com]
> > > Sent: Tuesday, May 01, 2012 6:06 PM
> > > To: users@tomcat.apache.org
> > > Subject: Web Socket Issue
> > >
> > > Hi All,
> > >I am trying to use Chat example of WebSocket given in  Tomcat
> > > version
> > >  7.0.27. Problem I faced are here.
> > >
> > > 1) After opening the web socket it closes the socket automatically
> after
> > > 20
> > > sec. I want connection open until Guest (i.e. user) explicitly
> closes
> > > it.
> > > 2) Second thing is that It broad casts the message to all users but
> what
> > > i
> > > want is to send message to a specific group of people.
> > > Is there any method to send message to specific group.?? I checked
> API
> > > for
> > > WebSocket but there is no method for multicast.
> > >
> > > Kindly help me I have very short time to implement it.
> > >
> > > Thanks..
> > > --
> > > *Regards,
> > > *
> > > *Muhammad Umar Farooq*
> > > *Student **BIT* | SEECS, NUST *
> > > *
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
> 
> 
> --
> *Regards,
> *
> *Muhammad Umar Farooq*
> *Student **BIT* | SEECS, NUST *
> *


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



RE: Web Socket Issue

2012-05-02 Thread Filip Hanik (mailing lists)
Have the client send a ping message every 10 seconds

> -Original Message-
> From: umar farooq [mailto:umarfarooq...@gmail.com]
> Sent: Tuesday, May 01, 2012 6:06 PM
> To: users@tomcat.apache.org
> Subject: Web Socket Issue
> 
> Hi All,
>I am trying to use Chat example of WebSocket given in  Tomcat
> version
>  7.0.27. Problem I faced are here.
> 
> 1) After opening the web socket it closes the socket automatically after
> 20
> sec. I want connection open until Guest (i.e. user) explicitly closes
> it.
> 2) Second thing is that It broad casts the message to all users but what
> i
> want is to send message to a specific group of people.
> Is there any method to send message to specific group.?? I checked API
> for
> WebSocket but there is no method for multicast.
> 
> Kindly help me I have very short time to implement it.
> 
> Thanks..
> --
> *Regards,
> *
> *Muhammad Umar Farooq*
> *Student **BIT* | SEECS, NUST *
> *


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



RE: How to config the Tomcat 7.x JNDI datasource by using BoneCP ??

2012-05-02 Thread Filip Hanik (mailing lists)
http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html

> -Original Message-
> From: zuxiong lin [mailto:linzuxiong1...@gmail.com]
> Sent: Wednesday, May 02, 2012 2:35 AM
> To: Tomcat Users List
> Subject: Re: How to config the Tomcat 7.x JNDI datasource by using
> BoneCP ??
> 
> See appending mail.
> 
> On Wed, May 2, 2012 at 4:23 PM, Pid  wrote:
> 
> > On 02/05/2012 02:12, zuxiong lin wrote:
> > > Hi, All.
> > > Any help ?
> > >
> > > Thanks?
> > >
> >
> > Perhaps you could read the following:
> >
> >  http://www.catb.org/~esr/faqs/smart-questions.html
> >
> > and then rephrase your question?
> >
> >
> > p
> >
> > --
> >
> > [key:62590808]
> >
> >


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



RE: Tribes coordinator

2012-05-01 Thread Filip Hanik (mailing lists)
> -Original Message-
> From: Afkham Azeez [mailto:afk...@gmail.com]
> Sent: Tuesday, April 24, 2012 2:39 AM
> To: Tomcat Users List
> Subject: Re: Tribes coordinator
> 
> Hi Filip,
> I have integrated the NonBlockingCoordinator & committed to the Axis2
> trunk. One thing I noticed is that even if the current coordinator is
> alive, and a new member joins, it is possible for the new member to be
> made
> the coordinator while the existing coordinator transforms into a normal
> member. Is this the intended behavior? Is it possible to change the
> coordinator only if the existing coordinator fails?
[Filip Hanik] 
It was a while ago I wrote that. Non blocking coordinator means that 
Change of coordination can be happen while other activities take place.

I think the NonBlocking coordinator builds on the absolute order algorithm
for selecting a coordinator.
The absolute order is a stateless ranking system in tribes that let's you
order members with no chat/messages exchanged.
So, the answer to your question would be no, cause if a member joins with a
higher rank, it becomes coordinator.

Now, what you could do is change the criteria for the absolute order stuff,
instead of ranking it based on IP (IIRC) then rank on how long a member has
been alive. This way, the member with the largest uptime will always be
coordinator. Of course, instead of using uptime, use starttime, so you don't
use a value that changes with every membership message

Best
Filip

> 
> Thanks
> Azeez
> 
> On Tue, Apr 24, 2012 at 11:26 AM, Afkham Azeez  wrote:
> 
> > Thanks for the pointers Filip. I will take a look.
> >
> >
> > On Mon, Apr 23, 2012 at 9:12 PM, Filip Hanik Mailing Lists <
> > devli...@hanik.com> wrote:
> >
> >>
> >> http://tomcat.apache.org/tomcat-7.0-
> doc/api/org/apache/catalina/tribes/group/interceptors/package-
> summary.html
> >>
> >> Take a look at SimpleCoordinator and NonBlockingCoordinator
> >>
> >> Equally simple to implement your own based on the requirement you
> have
> >> for leader election.
> >>
> >> It does depend on what you need leader ship for, sometimes, like
> virtual
> >> synchrony, leaders are used to determine atomic delivery of a message
> to an
> >> entire group. Either the entire group gets it, or doesn't.
> >>
> >> Filip
> >>
> >> - Original Message -
> >> > From: "Afkham Azeez" 
> >> > To: "Tomcat Users List" 
> >> > Sent: Monday, April 23, 2012 6:38:31 AM
> >> > Subject: Tribes coordinator
> >> >
> >> > We are using Tribes in Axis2. In a cluster, we want to have leader
> >> > election, and one member to be designated as the coordinator. How
> can
> >> > this
> >> > be achieved using Tribes?
> >> >
> >> > Thanks
> >> > Azeez
> >> >
> >>
> >> -
> >> 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: Signing and Encrypting messages using Apache tribes

2012-05-01 Thread Filip Hanik (mailing lists)


> -Original Message-
> From: Madhav Bhargava [mailto:unmarsh...@gmail.com]
> Sent: Monday, April 30, 2012 4:16 PM
> To: users@tomcat.apache.org
> Subject: Signing and Encrypting messages using Apache tribes
> 
> Hi All,
> 
> We use apache tribes for inter node communication via multicast. For
> securing inter node communication two things are required:
> 
> 1. Establishing the identity of a node as valid who is sending the
> message
> 2. Encrypting selective messages which are sensitive in nature.
> 
> This topic was raised some time back (
> http://tomcat.10.n6.nabble.com/Securing-Tomcat-cluster-communication-
> td1973779.html
>  )
> 
> It is recommended that encryption/decryption of messages be done using a
> custom interceptor or using a stunnel, the former approach being the
> preferred approach. 
[Filip Hanik] 
Correct, using an interceptor you can do that. That is the easiest way. You can 
also use it for membership as membership messages carry a payload.

It has also being mentioned that the option
> SEND_OPTIONS_SECURE has not been implemented. This was in 2011, how its
> 2012 - Has this been implemented now?
[Filip Hanik]
No.
 
> 
> What do you suggest is the best way using tribes to sign messages - via
> another interceptor 
[Filip Hanik] 
Yes, use an interceptor


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



Re: dbcp datasource encryption

2012-04-23 Thread Filip Hanik Mailing Lists


- Original Message -

> 
> http://wiki.apache.org/tomcat/FAQ/Password
> 
> 
> In short, no.
> 
> Encrypting your database, database user, and database password buys
> you virtually (and most people would say actually) nothing.

"virtually nothing" is the opposite of what I would call it. What about 
compliance, this is HUGE for companies, and not to be discarded as an 
unimportant requirement

http://tomcat.markmail.org/thread/wmdu4e52y2msjzal

If you wish to implement password obfuscator/deobfuscator yourself, you can set 
the 
org.apache.tomcat.util.digester.PROPERTY_SOURCE system property to a class that 
deobfuscates your password for you

reference: http://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html


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



Re: Tribes coordinator

2012-04-23 Thread Filip Hanik Mailing Lists
http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/tribes/group/interceptors/package-summary.html

Take a look at SimpleCoordinator and NonBlockingCoordinator

Equally simple to implement your own based on the requirement you have for 
leader election.

It does depend on what you need leader ship for, sometimes, like virtual 
synchrony, leaders are used to determine atomic delivery of a message to an 
entire group. Either the entire group gets it, or doesn't.

Filip

- Original Message -
> From: "Afkham Azeez" 
> To: "Tomcat Users List" 
> Sent: Monday, April 23, 2012 6:38:31 AM
> Subject: Tribes coordinator
> 
> We are using Tribes in Axis2. In a cluster, we want to have leader
> election, and one member to be designated as the coordinator. How can
> this
> be achieved using Tribes?
> 
> Thanks
> Azeez
> 

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



Re: LockOutRealm IP logging

2012-04-16 Thread Oliver Kohll - Mailing Lists

On 16 Apr 2012, at 14:53, Daniel Mikusa wrote:

>> Hello,
>> 
>> Is it possible to get LockOutRealm to include the client's IP address
> 
> Not as convenient, but if you have an access log enabled you should be able 
> to find the IP address in there.
> 
> Dan

Thanks, I've now set up FastCommonAccessLogValve in server.xml

Oliver

LockOutRealm IP logging

2012-04-16 Thread Oliver Kohll - Mailing Lists
Hello,

Is it possible to get LockOutRealm to include the client's IP address in log 
messages, rather than just the username? Messages such as

16-Apr-2012 13:43:23 org.apache.catalina.realm.LockOutRealm authenticate
WARNING: An attempt was made to authenticate the locked user "administrator"

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



RE: Bug in Tomcat AJP Connector?

2012-04-05 Thread Filip Hanik (mailing lists)
> -Original Message-
> From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
> Sent: Thursday, April 05, 2012 10:18 AM
> To: Tomcat Users List
> Subject: Re: Bug in Tomcat AJP Connector?
> 
> 2012/4/5 Christopher Schultz :
> >
> > On 4/5/12 11:57 AM, Konstantin Kolinko wrote:
> >> 1. Tomcat does not start JVM  thus it cannot restart it.
> >>
> >> You need some external tool or script or admin to perform
> >> monitoring and (re)starts.
> >
> > Asking Tomcat to restart itself after OOME would be like expecting you
> > to defibrillate yourself. It works in theory, but not in practice.
> >
> 
> Yes.  It reminds me of that Bond movie
[Filip Hanik] 
I would not discard this as a joke, software is headed that way, there are
solutions for this today, and more of them will come tomorrow.
Self healing - it's gonna be fairly important in the new paradigm

> 
> http://www.youtube.com/watch?v=Jhm5up5NQwk
> 
> Best regards,
> Konstantin Kolinko
> 
> -
> 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: Discrepancy between Tomcat's connection pool and tomcat's report on memory leaks

2012-04-04 Thread Filip Hanik Mailing Lists
The real fix to your problem should have been

 (available in 
Tomcat 7)

If I understand the problem you're having is two fold
1. you see reports about memory leaks
"started a thread named [H2 File Lock Watchdog" you should be able to fix this 
by setting initialSize>0 so that the thread is started using the main class 
loader when tomcat starts, not when an app starts using the pool.
(Tomcat 7's jdbc-pool does this automatically from 7.0.27 onwards, regardless 
of configuration)

2. The connection pool is not closed properly, again, this is addressed in the 
top of this email.

letting the pool eventually shrink to 0, is merely a work around, but I realize 
it will NOT work. H2 is starting it's own thread, there is no way around this, 
unless there is way to shut down this thread. Maybe this shuts down if all 
connections are closed.

Filip

- Original Message -
> From: "Hermes Flying" 
> To: "Filip Hanik Mailing Lists" , "Tomcat Users List" 
> 
> Sent: Wednesday, April 4, 2012 10:56:10 AM
> Subject: Re: Discrepancy between Tomcat's connection pool and tomcat's report 
> on memory leaks
> 
> 
> 
> Ok. So how is the configuration parameter fixing my problem? Would
> you please explain this to me to undestand how this works?
> 
> 
> 
> 
> 
> From: Filip Hanik Mailing Lists 
> To: Tomcat Users List ; Hermes Flying
> 
> Sent: Wednesday, April 4, 2012 7:50 PM
> Subject: Re: Discrepancy between Tomcat's connection pool and
> tomcat's report on memory leaks
> 
> no, that would happen if you set maxIdle=0, not minIdle
> 
> - Original Message -
> > From: "Hermes Flying" < flyingher...@yahoo.com >
> > To: "Tomcat Users List" < users@tomcat.apache.org >
> > Sent: Wednesday, April 4, 2012 10:45:24 AM
> > Subject: Re: Discrepancy between Tomcat's connection pool and
> > tomcat's report on memory leaks
> > 
> > But if I set 'minIdle=0' all the connections would close
> > imediatelly,
> > right?
> > So why would I need a connection pool in the first place if I do
> > this?
> > 
> > 
> > 
> > From: Filip Hanik Mailing Lists < devli...@hanik.com >
> > To: Tomcat Users List < users@tomcat.apache.org >
> > Sent: Wednesday, April 4, 2012 7:28 PM
> > Subject: Re: Discrepancy between Tomcat's connection pool and
> > tomcat's report on memory leaks
> > 
> > just set minIdle=0 and enable the eviction process to take care of
> > it.
> > 
> > Filip
> > 
> > 
> > - Original Message -
> > > From: "Hermes Flying" < flyingher...@yahoo.com >
> > > To: "Daniel Mikusa" < dmik...@vmware.com >
> > > Cc: users@tomcat.apache.org
> > > Sent: Wednesday, April 4, 2012 9:53:30 AM
> > > Subject: Re: Discrepancy between Tomcat's connection pool and
> > > tomcat's report on memory leaks
> > > 
> > > >>Which is indicating that the application deployed to
> > > >>"/GeneralApplication" is creating a thread named "H2 Log Writer
> > > >>>>GENERICAPPLICATION" and never stopping it. I do not believe
> > > >>that this would be associated with the pool created by Tomcat
> > > >>as
> > > >>that would >>be created as a global resource available to all
> > > >>applications and not specific to "/GeneralApplication".
> > > >>I can't really say a whole lot more about what is going on,
> > > >>just
> > > >>that this strikes me as odd. If it were my app, I'd dig into
> > > >>this
> > > >>more and see what is >>creating that thread. Possibly with a
> > > >>profiler or thread dumps.
> > > 
> > > What is happening here (as I undestand it is the following):
> > > 1) My application uses Tomcat's connection pool from the data
> > > source
> > > 2) My application uses H2 as a file database. H2 starts back
> > > end(s)
> > > thread which is about logging (H2 logging) and possibly other
> > > tasks
> > > and that is the thread that catalina complaints about
> > > 3) H2 remains open as long as there are open connections and is
> > > closed when the last connection is released
> > > 4) My application uses Tomcat's connection pool and as a result
> > > Tomcat "decides" when the data source should be disposed or when
> > > connections are rel

Re: Discrepancy between Tomcat's connection pool and tomcat's report on memory leaks

2012-04-04 Thread Filip Hanik Mailing Lists
no, that would happen if you set maxIdle=0, not minIdle

- Original Message -
> From: "Hermes Flying" 
> To: "Tomcat Users List" 
> Sent: Wednesday, April 4, 2012 10:45:24 AM
> Subject: Re: Discrepancy between Tomcat's connection pool and tomcat's report 
> on memory leaks
>
> But if I set 'minIdle=0' all the connections would close imediatelly,
> right?
> So why would I need a connection pool in the first place if I do
> this?
>
>
> 
>  From: Filip Hanik Mailing Lists 
> To: Tomcat Users List 
> Sent: Wednesday, April 4, 2012 7:28 PM
> Subject: Re: Discrepancy between Tomcat's connection pool and
> tomcat's report on memory leaks
>
> just set minIdle=0 and enable the eviction process to take care of
> it.
>
> Filip
>
>
> - Original Message -
> > From: "Hermes Flying" 
> > To: "Daniel Mikusa" 
> > Cc: users@tomcat.apache.org
> > Sent: Wednesday, April 4, 2012 9:53:30 AM
> > Subject: Re: Discrepancy between Tomcat's connection pool and
> > tomcat's report on memory leaks
> >
> > >>Which is indicating that the application deployed to
> > >>"/GeneralApplication" is creating a thread named "H2 Log Writer
> > >>>>GENERICAPPLICATION" and never stopping it.  I do not believe
> > >>that this would be associated with the pool created by Tomcat as
> > >>that would >>be created as a global resource available to all
> > >>applications and not specific to "/GeneralApplication".
> > >>I can't really say a whole lot more about what is going on, just
> > >>that this strikes me as odd.  If it were my app, I'd dig into
> > >>this
> > >>more and see what is >>creating that thread.  Possibly with a
> > >>profiler or thread dumps.
> >
> > What is happening here (as I undestand it is the following):
> > 1) My application uses Tomcat's connection pool from the data
> > source
> > 2) My application uses H2 as a file database. H2 starts back end(s)
> > thread which is about logging (H2 logging) and possibly other tasks
> >  and that is the thread that catalina complaints about
> > 3) H2 remains open as long as there are open connections and is
> > closed when the last connection is released
> > 4) My application uses Tomcat's connection pool and as a result
> > Tomcat "decides" when the data source should be disposed or when
> > connections are released (not my code).
> > 5) I shutdown Tomcat.
> > 6) The connection pool of Tomcat has still connections (e.g. idle)
> > and so H2 does not shutdown. Hence it's lock file and related
> > background threads are still running.
> > 7) Tomcat shuts down my application but does not dispose off the
> > connection pool (yet). I believe this happens because of the way
> > Tomcat is being shut down (as sequence of actions I mean).
> > 8) Since the connection pool has not been disposed, there are still
> > connections and as a result H2 is still running
> > 9) Tomcat's memory leak detection mechanism detects H2 threads
> > started from GenericApplication which uses H2 and gives the report
> > in catalina.out. So Tomcat gives the report first and then proceeds
> > with the shutdown (and this perhaps is not correct? I can't say)
> > 10) Tomcat eventually shuts down.
> >  
> > Is this scenario as I describe it, wrong?
> > Should I somehow have configured the datasource to be "associated"
> > with my web application instead of a generic data source? Why?
> > Should I have shut the data source myself? How?
> > If all what I describe is reasonable this seems to me like a
> > "racing"
> > condition. How should I mediate this?
> >
> > Thank you for your time.
> >  
> >
> > 
> >  From: Daniel Mikusa 
> > To: Hermes Flying 
> > Sent: Wednesday, April 4, 2012 5:14 PM
> > Subject: Re: Discrepancy between Tomcat's connection pool and
> > tomcat's report on memory leaks
> >
> > - Original Message -
> > >
> > >
> > > What I do is get the dataSource inside a ServletContextListener
> > > and
> > > save it in servlet context (as part of a DAO Factory):
> > >
> > > public void contextInitialized(ServletContextEvent sce) {
> > >
> > > ServletContext context = sce.getServletContext();
> > > DataSource dataSource = null;
&

Re: Discrepancy between Tomcat's connection pool and tomcat's report on memory leaks

2012-04-04 Thread Filip Hanik Mailing Lists
just set minIdle=0 and enable the eviction process to take care of it.

Filip


- Original Message -
> From: "Hermes Flying" 
> To: "Daniel Mikusa" 
> Cc: users@tomcat.apache.org
> Sent: Wednesday, April 4, 2012 9:53:30 AM
> Subject: Re: Discrepancy between Tomcat's connection pool and tomcat's report 
> on memory leaks
>
> >>Which is indicating that the application deployed to
> >>"/GeneralApplication" is creating a thread named "H2 Log Writer
> GENERICAPPLICATION" and never stopping it.  I do not believe
> >>that this would be associated with the pool created by Tomcat as
> >>that would >>be created as a global resource available to all
> >>applications and not specific to "/GeneralApplication".
> >>I can't really say a whole lot more about what is going on, just
> >>that this strikes me as odd.  If it were my app, I'd dig into this
> >>more and see what is >>creating that thread.  Possibly with a
> >>profiler or thread dumps.
>
> What is happening here (as I undestand it is the following):
> 1) My application uses Tomcat's connection pool from the data source
> 2) My application uses H2 as a file database. H2 starts back end(s)
> thread which is about logging (H2 logging) and possibly other tasks
>  and that is the thread that catalina complaints about
> 3) H2 remains open as long as there are open connections and is
> closed when the last connection is released
> 4) My application uses Tomcat's connection pool and as a result
> Tomcat "decides" when the data source should be disposed or when
> connections are released (not my code).
> 5) I shutdown Tomcat.
> 6) The connection pool of Tomcat has still connections (e.g. idle)
> and so H2 does not shutdown. Hence it's lock file and related
> background threads are still running.
> 7) Tomcat shuts down my application but does not dispose off the
> connection pool (yet). I believe this happens because of the way
> Tomcat is being shut down (as sequence of actions I mean).
> 8) Since the connection pool has not been disposed, there are still
> connections and as a result H2 is still running
> 9) Tomcat's memory leak detection mechanism detects H2 threads
> started from GenericApplication which uses H2 and gives the report
> in catalina.out. So Tomcat gives the report first and then proceeds
> with the shutdown (and this perhaps is not correct? I can't say)
> 10) Tomcat eventually shuts down.
>  
> Is this scenario as I describe it, wrong?
> Should I somehow have configured the datasource to be "associated"
> with my web application instead of a generic data source? Why?
> Should I have shut the data source myself? How?
> If all what I describe is reasonable this seems to me like a "racing"
> condition. How should I mediate this?
>
> Thank you for your time.
>  
>
> 
>  From: Daniel Mikusa 
> To: Hermes Flying 
> Sent: Wednesday, April 4, 2012 5:14 PM
> Subject: Re: Discrepancy between Tomcat's connection pool and
> tomcat's report on memory leaks
>
> - Original Message -
> >
> >
> > What I do is get the dataSource inside a ServletContextListener and
> > save it in servlet context (as part of a DAO Factory):
> >
> > public void contextInitialized(ServletContextEvent sce) {
> >
> > ServletContext context = sce.getServletContext();
> > DataSource dataSource = null;
> > try {
> > dataSource = (DataSource) new
> > InitialContext().lookup("java:/comp/env/jdbc/GenericDataSource");
> > context.setAttribute("daogenericfactory",
> > DAOGenericFactory.getInstance(dataSource));
> >
> > } catch (NamingException e) {
> > e.printStackTrace();
> > }
> >
> > }
> >
> >
> > The DAOGenericFactory just returns specific DAO objects passing in
> > their constructor the data source.
> > Each DAO instance has an member variable of DataSource and for
> > action
> > to the database I do in order to get a connection:
> >
> > public Connection getConnection() throws Exception{
> > return dataSource.getConnection();
> > }
> >
> >
> > So I use the Connection this way and I always close the connections
> > in order to be returned back to the pool.
> > The only thing perhaps to mention is that I create new DAO objects
> > passing this data source (I don't reuse instances of DAO).
> > So I don't have a pool of my own. I just use DAO pattern .
> > This is happening in my web application GeneralApplication
> > Is this information adequate/clear?
>
> Definitely clear.  It just doesn't seem to match up with the output
> from the log files.  You're seeing
>
>     SEVERE: The web application [/GeneralApplication] appears to have
>     started a thread named [H2 Log Writer GENERICAPPLICATION] but has
>     failed to stop it. This is very likely to create a memory leak.
>
> Which is indicating that the application deployed to
> "/GeneralApplication" is creating a thread named "H2 Log Writer
> GENERICAPPLICATION" and never stopping it.  I do not believe that
> this would be associated with the pool created by Tomcat as that
> would be created as a g

Re: Tomcat6 thread pool questions

2012-04-04 Thread Filip Hanik Mailing Lists
In Tomcat 6, the default thread pool ignores minSpareThreads, but if you use 
 and then  From: llow...@oreillyauto.com
> To: users@tomcat.apache.org
> Sent: Wednesday, April 4, 2012 7:50:24 AM
> Subject: Tomcat6 thread pool questions
>
>
> Greetings,
>
> I was wondering if someone could help me understand how the
> threadpools are
> handled in tomcat6. I know that a lot of the functionality was moved
> to
> executors.
>
> I set one up and using psi-Probe I could see that it was indeed
> killing off
> threads as I expected. However, the minSpareThreads did not seem to
> be used
> at all.
>
> Is my understanding of that attribute correct, in that
> "minSparethreads"
> should be the minimum number of threads running at any point?
>
> For example, if I have minSpareThreads set to 30, I should see 30
> threads
> when the server is idle, and between 30 and maxThreads when it is
> under a
> load, right?
>
> That is not what I am seeing, as most of the time there are only 2-3
> threads with one busy thread while the server is idle or near idle.
>
> If anyone could let me know either what I am missing or what it is I
> do not
> understand correctly, I would appreciate it.
>
> Thank you.
>
> Lee Lowder
>
> This communication and any attachments are confidential, protected by
> Communications Privacy Act 18 USCS � 2510, solely for the use of the
> intended recipient, and may contain legally privileged material. If
> you are not the intended recipient, please return or destroy it
> immediately. Thank you.
>
> -
> 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: [JDBC Pool] PoolCleaner creates some sort of memory

2012-04-04 Thread Filip Hanik Mailing Lists
I'll take a look at the test failures, but yes you can ignore them. Tomcat 
7.0.27 will have the fix included, about to be released shortly
building it is easy, builds with both maven and ant

Filip

- Original Message -
> From: "Michael Osipov" 
> To: "Tomcat Users List" 
> Sent: Friday, March 30, 2012 2:05:50 AM
> Subject: RE: [JDBC Pool] PoolCleaner creates some sort of memory
> 
> Konstantin Kolinko wrote:
> > 2012/3/30 Osipov, Michael :
> >> Filip Hanik (mailing lists) wrote:
> >>> http://svn.apache.org/viewvc?view=revision&revision=1306946
> >> 
> >> Thanks for the patch, I am having trouble to build from source. I
> >> do
> >> have some test failures, should I ignore them and go on?
> > 
> > Please be more specific. In what tests?
> 
> Have a look at this: http://pastebin.com/kiHLF6D9
> -
> 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: jdbc pool properties

2012-04-04 Thread Filip Hanik Mailing Lists
> There are some databases that do go in and periodically kill off
> connections, aside from the Tomcat settings.

you may want to explore the maxAge option for this, as we can disconnect and 
create new connections before the DB does kills it as long lived

- Original Message -
> From: "Barry L Propes" 
> To: "Tomcat Users List" 
> Sent: Wednesday, April 4, 2012 7:53:26 AM
> Subject: RE: jdbc pool properties
> 
> There are some databases that do go in and periodically kill off
> connections, aside from the Tomcat settings.
> 
> In addition to testOnBorrow=true, I also had two other attributes,
> but not sure if Tomcat 7.0 uses them or not, as I'm on 6.0.29.
> 
> testOnBorrow="true"
> timeBetweenEvictionRunsMillis="-1"
> minEvictableIdleTimeMillis="28800"
> 
> 
> 
> -Original Message-
> From: Daniel Mikusa [mailto:dmik...@vmware.com]
> Sent: Wednesday, April 04, 2012 7:46 AM
> To: Tomcat Users List
> Subject: Re: jdbc pool properties
> 
> 
> 
> - Original Message -
> > My db connections seem to be lost after an extended period of
> > inactivity
> 
> There could be a number of reasons that this occurs.  Perhaps a
> network issue is causing them to be disconnected or the database may
> be timing them out.  At any rate, it's not likely that the problem
> would be caused by the "removeAbandoned" / "abandonedTimeout"
> settings, unless you application is not properly returning
> connections to the connection pool.
> 
>   
> https://tomcat.apache.org/tomcat-7.0-doc/jndi-datasource-examples-howto.html#Preventing_database_connection_pool_leaks
> 
> 
> > (for a web application).  And the only way to get the connections
> > to
> > work again is to restart tomcat.
> >
> > My tomcat.jdbc.pool.Datasource settings have:
> >
> >  
> > 
> > 
> > 
> > 
> > 
> >
> 
> You probably want to add testOnBorrow="true" and
> "validationQuery=SELECT 1"  (or some other valid query for your DB).
>  See the following link for an explanation of those properties.
> 
>   https://commons.apache.org/dbcp/configuration.html
> 
> This will cause your connections to be validated prior to their use
> by your application.  Stale connections will be removed and replaced
> with new, working connections.
> 
> >
> > Is it the removedAbonded and abandonedTimeout?  Does it mean "after
> > 60
> > seconds, remove the connection from the pool?
> 
> No.  See either of the links I've referenced above for an explanation
> of these settings.
> 
> >
> > I guess what I need is a minActive setting then?
> >
> 
> There's no "minActive" setting.  You have "minIdle", but I don't
> think that would help here.
> 
> Dan
> 
> 
> 
> 
> 
> -
> 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: [JDBC Pool] PoolCleaner creates some sort of memory

2012-03-29 Thread Filip Hanik (mailing lists)
http://svn.apache.org/viewvc?view=revision&revision=1306946



> -Original Message-
> From: Osipov, Michael [mailto:michael.osi...@siemens.com]
> Sent: Thursday, March 29, 2012 1:36 AM
> To: Tomcat Users List
> Subject: RE: [JDBC Pool] PoolCleaner creates some sort of memory
> 



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



RE: Accessing static resource during loading of webapp

2012-03-28 Thread Filip Hanik (mailing lists)
Are you trying to read a file in the same webapp or another?

> -Original Message-
> From: Farrukh Najmi [mailto:farr...@wellfleetsoftware.com]
> Sent: Wednesday, March 28, 2012 4:34 PM
> To: users@tomcat.apache.org
> Subject: Accessing static resource during loading of webapp
> 
> 
> I have a webapp that accesses some static resources during startup of
> the webapp. On Glassfish 3.1.2 this works fine. However on Tomcat 7.0.26
> the webapp ciode gets a read timeout when it tries to do an HTTP GET
> using a URLConnection to a static resource deployed in the same tomcat
> instance. Is there a way to fix this?
> 
> --
> Regards,
> Farrukh Najmi
> 
> Web: http://www.wellfleetsoftware.com
> 
> 
> 
> -
> 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: [JDBC Pool] PoolCleaner creates some sort of memory

2012-03-28 Thread Filip Hanik (mailing lists)
: SHA1
> 
> Filip,
> 
> On 3/28/12 12:00 PM, Filip Hanik (mailing lists) wrote:
> > PoolCleaner is a static singleton. The pool cleaner thread will not
> > be removed until all JDBC pools have been stopped. So, yes, one
> > application can be the one that starts the thread, but not
> > necessarily the one that stops it
> 
> Is there any reason not to associate the thread with the
> WebappClassLoader's parent? Otherwise, this will pin the first webapp
> to use tomcat-pool in memory until all webapps have been undeployed,
> right?
[Filip Hanik] 

Correct, I can add in a fix for this to force the context classloader to be the 
same as the pool while it is starting the thread

> 
> - -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/
> 
> iEYEARECAAYFAk9zPQkACgkQ9CaO5/Lv0PD7wwCeOR3bVeJOk6fyWsTtzE3Fp
> bzm
> Bk8AnjrsNqyp3zsHexJhIuLumEgZ1fsj
> =pI1I
> -END PGP SIGNATURE-
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org



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



RE: tomcat dbcp encryption

2012-03-28 Thread Filip Hanik (mailing lists)
Or pay a vendor to do it for you :)
http://pubs.vmware.com/vfabric5/index.jsp?topic=/com.vmware.vfabric.tc-server.2.6/admin/manual-encrypt-passwords.html



> -Original Message-
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Sent: Wednesday, March 28, 2012 10:25 AM
> To: Tomcat Users List
> Subject: Re: tomcat dbcp encryption
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Ognjen,
> 
> On 3/27/12 6:32 AM, Ognjen Blagojevic wrote:
> > 이재만,
> >
> > On 27.3.2012 9:54, 이재만 wrote:
> >> how do i encrypt my datasource's user and password  in server.xml
> >> ??
> >
> > Read this: http://wiki.apache.org/tomcat/FAQ/Password
> 
> No, he didn't like that answer last time, so he asked again :(
> 
> The answer, of course, is to use ZIP encryption or PGP/GPG. Good luck
> starting Tomcat after that, though.
> 
> - -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/
> 
> iEYEARECAAYFAk9zO2UACgkQ9CaO5/Lv0PDj0gCfY3mSJV/VYzhjk226RPeo617
> Q
> aGEAn2zXTsQayySY6txyRC16m9UOS2Id
> =+Tna
> -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: [JDBC Pool] PoolCleaner creates some sort of memory

2012-03-28 Thread Filip Hanik (mailing lists)
PoolCleaner is a static singleton. The pool cleaner thread will not be removed 
until all JDBC pools have been stopped.
So, yes, one application can be the one that starts the thread, but not 
necessarily the one that stops it

Filip

> -Original Message-
> From: Osipov, Michael [mailto:michael.osi...@siemens.com]
> Sent: Wednesday, March 28, 2012 8:29 AM
> To: users@tomcat.apache.org
> Subject: [JDBC Pool] PoolCleaner creates some sort of memory
> 
> Hi folks,
> 
> Recently this started to pop up in my logs:
> 23.03.2012 14:12:28 org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SCHWERWIEGEND: The web application [/ket] appears to have started a
> thread named [PoolCleaner[18291494:1332172047553]] but has failed to stop
> it. This is very likely to create a memory leak.
> 
> There is some similar thread [1] which had no real result.
> 
> I am on Tomcat 6.0.35, all DataSources are created in the context.xml file. 
> All
> DataSources are cleaned up (closed) with a context.xml Listener. The JDBC
> Pool is version 7.0.26.
> 
> As far as my debug sessions have revealed (with attached VisualVM), it does
> not matter how many apps you deploy the PoolCleanTimer thread is created
> only once and retained until all apps have been stopped or removed. This
> makes Tomcat think that this is a memory leak.
> 
> Is there a way to associate this thread with another class loader in order to
> avoid this problem or create multiple threads or simple ignore this warning
> which is not a solution for those who face that issue too?
> 
> Besides that, the numbers in the thread name are not very informative, the
> classloader hashcode and timestamp did not really help to to identify
> anything. Can this be improved?
> 
> [1] http://www.mail-archive.com/users@tomcat.apache.org/msg87350.html
> 
> With best regards,
> Michael Osipov
> -
> 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 enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)

2012-03-22 Thread Filip Hanik Mailing Lists
Pretty much you're guaranteed to have a network problem at that point. You see 
Java caches DNS translations forever, and yanking VPN like that may change 
around IPs but the JVM is not aware of that. Wireshark would tell you that. Now 
relying in VPN is never a good thing, but maybe it's required. You could try
1. Use IP instead of host name in your jdbc URL
2. Configure the JRE to not cache dns lookups, (network.properties)


The error you see tells you that:
1. The pool doesn't have any idle established connections idle=0
2. The pool doesn't have any connections used by other threads busy=0
3. There is currently 1 thread trying to activate a connection size=1. The size 
is an atomic counter to protect against overuse in a lock free way. 


Filip



Hi Filip,

Today I have been trying to recreate the issue by disconnecting from the
vpn, as:
1.  Start app.  Pool creates some connections via the vpn.
2.  Test app a bit to execute sql queries.
3.  Shut down the vpn
4.  Force some more queries.  Predictably, connections fail and exceptions
show up in the logs.
5.  Restore vpn connection
6.  Check if pool creates new connections, which it does not.

I also upgraded to the latest pool available in maven
central: tomcat-jdbc-7.0.26.jar

I understand this could still be a connection leak in my application.  But
the new pool version logs an error I don't understand:
... stack trace ...
Caused by: java.sql.SQLException: [scheduler-low-1] Timeout: Pool empty.
Unable to fetch a connection in 10 seconds, none available[size:1; busy:0;
idle:0; lastwait:1].
... more trace ...

The relevant part of my current pool DataSource configuration:
removeAbandonedTimeout="10"
removeAbandoned="true"
logAbandoned="true"

defaultAutoCommit="false"
maxActive="1" maxIdle="1" minIdle="1" maxWait="1"
testOnBorrow="true"
validationQuery="SELECT 1"

I also have yet to see any "abandoned" log messages.

Should the pool always have at least 1 busy or idle connection?  If not
would it create another?

Thanks,
Colin




On Thu, Mar 22, 2012 at 11:11 AM, Filip Hanik Mailing Lists <
devli...@hanik.com> wrote:

> > Ultimately tho I'd still like to see some debug logging from the pool
> > itself.  Is there a simple way to turn it on?
>
> not to the problem you are looking at. if a connection got taken out of
> the pool, and it passed validation, then everything is ok.
> at this point the SQLException you get has all the data, and the problem
> is probably at the network level
>
> the fact that you see that for 2 hours and problem goes away with restart,
> that can only be the app holding on to the flawed connection, cause there
> would have been several validations during the 2 hour period :) I think
> there is a loop somewhere that when it fails it just retries and retries,
> logAbandoned will show that though.
>
> Filip
>
>
>
>
> - Original Message -
> > From: "Colin Ingarfield" 
> > To: "Tomcat Users List" 
> > Sent: Thursday, March 22, 2012 8:06:14 AM
> > Subject: Re: how to enable debug logging for Tomcat jdbc pool (Tomcat
> 6.0.32)
> >
> > Ah, Wireshark.  My friend calls it the "universal debugger". :)
> >
> > I will set the validation interval to 1 and keep an eye on the
> > network to
> > see what's going on.  I may also install MySql locally so I can kill
> > it
> > easily to try and simulation connection timeouts.  I won't really
> > feel this
> > is resolved until I can recreate the original issue.
> >
>
> >
> > Thanks,
> > Colin
> >
> > On Wed, Mar 21, 2012 at 11:20 AM, Filip Hanik Mailing Lists <
> > devli...@hanik.com> wrote:
> >
> > > it will take a while to see the abandoned log. I'm not implying
> > > every
> > > request hogs the connection, but that you could have ended up in a
> > > scenario
> > > where that did happen.
> > > otherwise, you would have not seen the problem for 2 hours and to
> > > go away
> > > when the system was restarted, as it should have failed on
> > > validation.
> > >
> > > You can enable validation every single time by doing
> > >
> > > validationInterval="1"
> > >
> > > after that, if it was me, I'd start pulling in something like
> > > Wireshark to
> > > see what is going on
> > >
> > > Filip
> > >
> > > - Original Message -
> > > > From: "Colin Ingarfield" 
> > > > To: "Tomcat Users List" 
> > > > Sent: Wednesday, Marc

Re: how to enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)

2012-03-22 Thread Filip Hanik Mailing Lists
> Ultimately tho I'd still like to see some debug logging from the pool
> itself.  Is there a simple way to turn it on?

not to the problem you are looking at. if a connection got taken out of the 
pool, and it passed validation, then everything is ok.
at this point the SQLException you get has all the data, and the problem is 
probably at the network level

the fact that you see that for 2 hours and problem goes away with restart, that 
can only be the app holding on to the flawed connection, cause there would have 
been several validations during the 2 hour period :) I think there is a loop 
somewhere that when it fails it just retries and retries, logAbandoned will 
show that though.

Filip




- Original Message -
> From: "Colin Ingarfield" 
> To: "Tomcat Users List" 
> Sent: Thursday, March 22, 2012 8:06:14 AM
> Subject: Re: how to enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)
> 
> Ah, Wireshark.  My friend calls it the "universal debugger". :)
> 
> I will set the validation interval to 1 and keep an eye on the
> network to
> see what's going on.  I may also install MySql locally so I can kill
> it
> easily to try and simulation connection timeouts.  I won't really
> feel this
> is resolved until I can recreate the original issue.
> 

> 
> Thanks,
> Colin
> 
> On Wed, Mar 21, 2012 at 11:20 AM, Filip Hanik Mailing Lists <
> devli...@hanik.com> wrote:
> 
> > it will take a while to see the abandoned log. I'm not implying
> > every
> > request hogs the connection, but that you could have ended up in a
> > scenario
> > where that did happen.
> > otherwise, you would have not seen the problem for 2 hours and to
> > go away
> > when the system was restarted, as it should have failed on
> > validation.
> >
> > You can enable validation every single time by doing
> >
> > validationInterval="1"
> >
> > after that, if it was me, I'd start pulling in something like
> > Wireshark to
> > see what is going on
> >
> > Filip
> >
> > - Original Message -
> > > From: "Colin Ingarfield" 
> > > To: "Tomcat Users List" 
> > > Sent: Wednesday, March 21, 2012 10:11:43 AM
> > > Subject: Re: how to enable debug logging for Tomcat jdbc pool
> > > (Tomcat
> > 6.0.32)
> > >
> > > I added the 3 abandoned settings but I don't see any indication
> > > in
> > > the
> > > tomcat log that connections are being abandoned.  I also made the
> > > max
> > > pool
> > > size pretty small.. my application would have failed quickly if
> > > all
> > > the
> > > connections we're being incorrectly held up.
> > >
> > > Anything else I can try?  Thanks again for your  help.
> > >
> > > -- Colin
> > >
> > > On Wed, Mar 21, 2012 at 10:41 AM, Filip Hanik Mailing Lists <
> > > devli...@hanik.com> wrote:
> > >
> > > > Got it, thank you.
> > > > The other way this can happen is if the application checks out
> > > > a
> > > > connection and then never returns it, and expects it to be
> > > > used.
> > > > For this you will want to enable
> > > >
> > > > removeAbandonedTimeout="60"
> > > > removeAbandoned="true"
> > > > logAbandoned="true"
> > > >
> > > > this should tell you pretty quickly if you got a component that
> > > > is
> > > > hogging
> > > > the connection. So test that first. Now if that is the case,
> > > > there
> > > > is a way
> > > > to fix that:
> > > >
> > > > 1. remove the above settings
> > > > 2. compile and configure the interceptor described in:
> > > >   https://issues.apache.org/bugzilla/show_bug.cgi?id=52024
> > > > In this interceptor, when a failure occurs, it automatically
> > > > reconnects
> > > > and retries the operation. And that is the only way to get
> > > > around
> > > > the
> > > > problem (assuming my assumption is correct)
> > > >
> > > >
> > > > Filip
> > > > - Original Message -
> > > > > From: "Colin Ingarfield" 
> > > > > To: users@tomcat.apache.org
> > > > > Sent: Wednesday, March 21, 2012 9:30:46 AM
> > > > > Subject: Re: h

Re: Operation has timed out(3000 ms.).;

2012-03-22 Thread Filip Hanik Mailing Lists
take a look at the  attribute

http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-sender.html



- Original Message -
> From: "Dhaval Jaiswal" 
> To: "Tomcat Users List" 
> Sent: Wednesday, March 21, 2012 10:35:14 PM
> Subject: Operation has timed out(3000 ms.).;
> 
> Receiving below errors in catalina log. I have changed the backup
> manager
> value of dropTime="3000" to "1" with restart of tomcats. However,
> still
> it is not taking effect & notifying that Operation has timed out(3000
> ms.)
> Please guide me where should i look to stop this messages.
> 
> 
> SEVERE: Unable to send message through cluster sender.
> org.apache.catalina.tribes.ChannelException: Operation has timed
> out(3000
> ms.).; Faulty members:tcp://{-64, -88, 3, 6}:4000;
> at
> org.apache.catalina.tribes.transport.nio.ParallelNioSender.sendMessage(ParallelNioSender.java:97)
> at
> org.apache.catalina.tribes.transport.nio.PooledParallelSender.sendMessage(PooledParallelSender.java:53)
> at
> org.apache.catalina.tribes.transport.ReplicationTransmitter.sendMessage(ReplicationTransmitter.java:80)
> at
> org.apache.catalina.tribes.group.ChannelCoordinator.sendMessage(ChannelCoordinator.java:78)
> at
> org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
> at
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.sendMessage(TcpFailureDetector.java:87)
> 
> 
> 
> 
> --
> *
>   Dhaval Jaiswal
> Database & System
>  E: dhaval.jais...@via.com
> T: +91-80-4043 3000
> M: +91-8095397843
>  www.via.com
>  
> 
> 
>  *
> 

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



Re: how to enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)

2012-03-21 Thread Filip Hanik Mailing Lists
it will take a while to see the abandoned log. I'm not implying every request 
hogs the connection, but that you could have ended up in a scenario where that 
did happen.
otherwise, you would have not seen the problem for 2 hours and to go away when 
the system was restarted, as it should have failed on validation.

You can enable validation every single time by doing 

validationInterval="1"

after that, if it was me, I'd start pulling in something like Wireshark to see 
what is going on

Filip

- Original Message -
> From: "Colin Ingarfield" 
> To: "Tomcat Users List" 
> Sent: Wednesday, March 21, 2012 10:11:43 AM
> Subject: Re: how to enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)
> 
> I added the 3 abandoned settings but I don't see any indication in
> the
> tomcat log that connections are being abandoned.  I also made the max
> pool
> size pretty small.. my application would have failed quickly if all
> the
> connections we're being incorrectly held up.
> 
> Anything else I can try?  Thanks again for your  help.
> 
> -- Colin
> 
> On Wed, Mar 21, 2012 at 10:41 AM, Filip Hanik Mailing Lists <
> devli...@hanik.com> wrote:
> 
> > Got it, thank you.
> > The other way this can happen is if the application checks out a
> > connection and then never returns it, and expects it to be used.
> > For this you will want to enable
> >
> > removeAbandonedTimeout="60"
> > removeAbandoned="true"
> > logAbandoned="true"
> >
> > this should tell you pretty quickly if you got a component that is
> > hogging
> > the connection. So test that first. Now if that is the case, there
> > is a way
> > to fix that:
> >
> > 1. remove the above settings
> > 2. compile and configure the interceptor described in:
> >   https://issues.apache.org/bugzilla/show_bug.cgi?id=52024
> > In this interceptor, when a failure occurs, it automatically
> > reconnects
> > and retries the operation. And that is the only way to get around
> > the
> > problem (assuming my assumption is correct)
> >
> >
> > Filip
> > - Original Message -
> > > From: "Colin Ingarfield" 
> > > To: users@tomcat.apache.org
> > > Sent: Wednesday, March 21, 2012 9:30:46 AM
> > > Subject: Re: how to enable debug logging for Tomcat jdbc pool
> > > (Tomcat
> > 6.0.32)
> > >
> > > My configuration:
> > >
> > > > > name="jdbc/cdb.mysql"
> > > defaultAutoCommit="false"
> > > driverClassName="com.mysql.jdbc.Driver"
> > > factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
> > > url="jdbc:mysql://X.com/_dev?sessionVariables=TRANSACTION
> > > ISOLATION LEVEL READ COMMITTED"
> > > username="X"
> > > password="X"
> > >
> > > maxActive="100"
> > > maxIdle="100"
> > > minIdle="10"
> > > initialSize="10"
> > > maxWait="1"
> > > testOnBorrow="true"
> > > type="javax.sql.DataSource"
> > > validationQuery="SELECT 1"/>
> > >
> > >
> > > I have testOnBorrow and validationQuery set as you suggest, so I
> > > do
> > > not
> > > think that is the issue.
> > >
> > > Thanks,
> > > Colin
> > >
> >
> > -
> > 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 enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)

2012-03-21 Thread Filip Hanik Mailing Lists
Got it, thank you.
The other way this can happen is if the application checks out a connection and 
then never returns it, and expects it to be used.
For this you will want to enable 

removeAbandonedTimeout="60"
removeAbandoned="true"
logAbandoned="true"

this should tell you pretty quickly if you got a component that is hogging the 
connection. So test that first. Now if that is the case, there is a way to fix 
that:

1. remove the above settings
2. compile and configure the interceptor described in:
   https://issues.apache.org/bugzilla/show_bug.cgi?id=52024
In this interceptor, when a failure occurs, it automatically reconnects and 
retries the operation. And that is the only way to get around the problem 
(assuming my assumption is correct)


Filip
- Original Message -
> From: "Colin Ingarfield" 
> To: users@tomcat.apache.org
> Sent: Wednesday, March 21, 2012 9:30:46 AM
> Subject: Re: how to enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)
> 
> My configuration:
> 
> name="jdbc/cdb.mysql"
> defaultAutoCommit="false"
> driverClassName="com.mysql.jdbc.Driver"
> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
> url="jdbc:mysql://X.com/_dev?sessionVariables=TRANSACTION
> ISOLATION LEVEL READ COMMITTED"
> username="X"
> password="X"
> 
> maxActive="100"
> maxIdle="100"
> minIdle="10"
> initialSize="10"
> maxWait="1"
> testOnBorrow="true"
> type="javax.sql.DataSource"
> validationQuery="SELECT 1"/>
> 
> 
> I have testOnBorrow and validationQuery set as you suggest, so I do
> not
> think that is the issue.
> 
> Thanks,
> Colin
> 

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



Re: how to enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)

2012-03-21 Thread Filip Hanik Mailing Lists


- Original Message -
> From: "Colin Ingarfield" 
> To: users@tomcat.apache.org
> Sent: Wednesday, March 21, 2012 6:25:54 AM
> Subject: Re: how to enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)

> 
> iirc I copied the version number from the
> tomcat-jdbc.jar/META-INF/MANIFEST.MF file and renamed the jar myself.
> (Looking in the manifest now I see Bundle-Version: 1.1.0.1).  I
> prefer
> to avoid unversioned jar files in my project as it can cause
> confusion.
> 
> But I don't recall which version of Tomcat 7 I got the jar from.  Is
> the
> best policy to always use the tomcat-jdbc jar from the latest version
> of
> Tomcat 7?

yes, as of now it is. As tomcat-jdbc got included in Tomcat 7 it gets published 
as an individual JAR in the Maven repo as well.

Filip

> 
> Thank you,
> Colin
> 

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



Re: how to enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)

2012-03-21 Thread Filip Hanik Mailing Lists
  at
> org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:595)
> ~[tomcat-jdbc-1.1.0.1.jar:na]
>  at
> org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:174)
> ~[tomcat-jdbc-1.1.0.1.jar:na]
>  at
> org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:111)
> ~[tomcat-jdbc-1.1.0.1.jar:na]
>  at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
> ~[na:na]
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> ~[na:1.6.0_29]
>  at java.lang.reflect.Method.invoke(Method.java:597)
>  ~[na:1.6.0_29]
>  at
>  net.bull.javamelody.JdbcWrapper$4.invoke(JdbcWrapper.java:660)
> ~[javamelody-core-1.34.0.jar:1.34.0]
>  at
> net.bull.javamelody.JdbcWrapper$DelegatingInvocationHandler.invoke(JdbcWrapper.java:232)
> ~[javamelody-core-1.34.0.jar:1.34.0]
>  at $Proxy4.getConnection(Unknown Source) ~[na:na]
>  at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
> ~[na:na]
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> ~[na:1.6.0_29]
>  at java.lang.reflect.Method.invoke(Method.java:597)
>  ~[na:1.6.0_29]
>  at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
> ~[spring-aop-3.0.5.RELEASE.jar:3.0.5.RELEASE]
>  at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
> ~[spring-aop-3.0.5.RELEASE.jar:3.0.5.RELEASE]
>  at $Proxy13.getConnection(Unknown Source) ~[na:na]
>  at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
> ~[na:na]
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> ~[na:1.6.0_29]
>  at java.lang.reflect.Method.invoke(Method.java:597)
>  ~[na:1.6.0_29]
>  at
>  net.bull.javamelody.JdbcWrapper$4.invoke(JdbcWrapper.java:660)
> ~[javamelody-core-1.34.0.jar:1.34.0]
>  at
> net.bull.javamelody.JdbcWrapper$DelegatingInvocationHandler.invoke(JdbcWrapper.java:232)
> ~[javamelody-core-1.34.0.jar:1.34.0]
>  at $Proxy21.getConnection(Unknown Source) ~[na:na]
>  at
> org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy$LazyConnectionInvocationHandler.getTargetConnection(LazyConnectionDataSourceProxy.java:403)
> ~[spring-jdbc-3.0.5.RELEASE.jar:3.0.5.RELEASE]
>  at
> org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy$LazyConnectionInvocationHandler.invoke(LazyConnectionDataSourceProxy.java:376)
> ~[spring-jdbc-3.0.5.RELEASE.jar:3.0.5.RELEASE]
>  at $Proxy28.prepareStatement(Unknown Source) ~[na:na]
>  at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
> ~[na:na]
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> ~[na:1.6.0_29]
>  at java.lang.reflect.Method.invoke(Method.java:597)
>  ~[na:1.6.0_29]
>  at
> net.bull.javamelody.JdbcWrapper$ConnectionInvocationHandler.invoke(JdbcWrapper.java:176)
> ~[javamelody-core-1.34.0.jar:1.34.0]
>  at
> net.bull.javamelody.JdbcWrapper$DelegatingInvocationHandler.invoke(JdbcWrapper.java:232)
> ~[javamelody-core-1.34.0.jar:1.34.0]
>  at $Proxy29.prepareStatement(Unknown Source) ~[na:na]
>  at
> org.springframework.jdbc.core.JdbcTemplate$SimplePreparedStatementCreator.createPreparedStatement(JdbcTemplate.java:1375)
> ~[spring-jdbc-3.0.5.RELEASE.jar:3.0.5.RELEASE]
>  at
> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:580)
> ~[spring-jdbc-3.0.5.RELEASE.jar:3.0.5.RELEASE]
>  ... 22 common frames omitted
> Caused by: java.net.ConnectException: Connection timed out
>  at java.net.PlainSocketImpl.socketConnect(Native Method)
>  ~[na:1.6.0_29]
>  at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
> ~[na:1.6.0_29]
>  at
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
> ~[na:1.6.0_29]
>  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
> ~[na:1.6.0_29]
>  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
> ~[na:1.6.0_29]
>  at java.net.Socket.connect(Socket.java:529) ~[na:1.6.0_29]
>  at java.net.Socket.connect(Socket.java:478) ~[na:1.6.0_29]
>  at java.net.Socket.(Socket.java:375) ~[na:1.6.0_29]
>  at java.net.Socket.(Socket.java:218) ~[na:1.6.0_29]
>  at
> com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:257)
> ~[mysql-connector-java-5.1.17-bin.jar:na]
>  at com.mysql.jdbc.MysqlIO.(MysqlIO.java:294)
> ~[mysql-connector-java-5.1.17-bin.jar:na]
>  ... 68 common frames omitted
> 
> 
> 
> 
> 

RE: Need a sample server.xml file for the session replication using backup manager

2012-03-20 Thread Filip Hanik (mailing lists)
Take the sample from the tomcat site, change DeltaManager to BackupManager

> -Original Message-
> From: Dhaval Jaiswal [mailto:dhaval.jais...@via.com]
> Sent: Monday, March 19, 2012 4:32 AM
> To: users@tomcat.apache.org
> Cc: Shrinivas Devarkonda
> Subject: Need a sample server.xml file for the session replication using
> backup manager
> 
> Hi List,
> 
> I am planning to implement  the session replication using backup manager
> mode.
> 
> We have 10 tomcats. we need in place where one node can work as a backup
> manager; on which we want to send all jsessions information from rest of
> the tomcats.


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



RE: how to enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)

2012-03-20 Thread Filip Hanik (mailing lists)
Define "connection timeouts" so that we can understand your problem to
suggest for how to trace it down.
What are you trying to search for. Errors would be logged as errors, and
should show up with the standard configuration

Filip

> -Original Message-
> From: Colin Ingarfield [mailto:colin...@gmail.com]
> Sent: Monday, March 19, 2012 1:51 PM
> To: users@tomcat.apache.org
> Subject: how to enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)
> 
> Hello,
> 
> I'm using the new Tomcat jdbc pool (1.1.0.1) with Tomcat 6.0.32, Ubuntu
> x86_64.  I would like to increase the logging from the pool to try and
> chase down connection timeouts.
> 
> I added the following line to $CATALINA_BASE/conf/logging.properties:
> org.apache.tomcat.jdbc.pool.level=FINE
> 
> (the rest of the logging.properties file is unchanged.)
> 
> But I don't see any pool debug logging output on the console.  I thought
> this setting would enable debug logging for all classes in that package.
> Is there something else I need to do?
> 
> Thank you,
> Colin


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



Re: Configure SSL under Tomcat 7

2012-03-19 Thread Filip Hanik Mailing Lists
ok, keystore is for Java connectors. but you have chosen to use the APR 
connector. so you should use the certificate format that is used for that 
connector

- Original Message -
> From: "ayouB __" 
> To: users@tomcat.apache.org
> Sent: Monday, March 19, 2012 11:00:59 AM
> Subject: RE: Configure SSL under Tomcat 7
> 
> 
> Still not working !!
> I downloaded Apache Tomcat 7.0.26 (again), i added the tcnative-1.dll
> in my : apache-tomcat-7.0.26\bin, i created a keystore file with
> this command :
> keytool -genkeypair -alias tomcat -keyalg RSA -keystore C:\mykeystore
> i put the file named "mykeystore" in my : apache-tomcat-7.0.26\conf
> i modified my Tomcat's server.xml to be able to support HTTPS as it
> has been said in apache tomcat's documentation from the official
> website and as it had been said in the e-book : Apache Tomcat 7
> (Aleska Vukotic and James Goodwill) in the chapter 7 : Securing
> tomcat with SSL ! (Step by step)
> Here's my "conf/server.xml" :
> ===server.xml=
> 
> 
> 
> 
>   
>   
>  SSLEngine="on" />
>   
>   
>   
>  className="org.apache.catalina.core.JreMemoryLeakPreventionListener"
>   />
>  className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
>   />
>  className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"
>   />
>   
>   
> 
>type="org.apache.catalina.UserDatabase"
>   description="User database that can be updated and
>   saved"
>   factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
>   pathname="conf/tomcat-users.xml" />
>   
>   
>   
> 
> 
> 
> 
> connectionTimeout="2"
>redirectPort="8443" />
> 
> 
> 
> 
> scheme="https" secure="true" clientAuth="false"
>sslProtocol="TLS" keystoreFile="mykeystore"
>keystorePass="changeit"
>   keyAlias="tomcat" keyPass="changeit"/>
> 
> 
> 
> 
> 
> 
>   
>   
>   
>   
> 
>  className="org.apache.catalina.realm.UserDatabaseRealm"
>resourceName="UserDatabase"/>
>   
>unpackWARs="true" autoDeploy="true">
> 
> 
> 
>  directory="logs"
>prefix="localhost_access_log." suffix=".txt"
>pattern="%h %l %u %t "%r" %s %b" />
>   
> 
>   
> 
> 
>  
> 1) The question is  : what's things i'm supported to do and i didn't
> cause i have tried every kind of solution without any satisfying
> result !!
>  
> 2) Moreover i saw in :
> http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html two
> attributes (i talked about before but nobody explain me where they
> get their values !!), i mean :
>  
> SSLCertificateFile="/usr/local/ssl/server.crt"
> SSLCertificateKeyFile="/usr/local/ssl/server.pem"
>  
> I want just know from where they get these files : server.crt &
> server.pem !!! They even talked about how it had been generated and
> what's its utility  it were just parachuted whitout any
> indication 
>   
>  
> So please if anyone had started before Tomcat7 under HTTPS mode, let
> me know how did you do it (no more tutorials pleaaase, i want
> something useful and had been experimented).
>  
> Thank you a.

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



RE: Configure SSL under Tomcat 7

2012-03-16 Thread Filip Hanik Mailing Lists
The logs show that you don't have Tcnative installed

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



Re: Configure SSL under Tomcat 7

2012-03-16 Thread Filip Hanik Mailing Lists
ok, check your logs for errors. You must have APR libraries with OpenSSL 
installed, and you must specify the 
SSLCertificateFile & SSLCertificateKeyFile attributes.
All errors will be in the logs

Filip

- Original Message -
> From: "ayouB __" 
> To: users@tomcat.apache.org
> Sent: Friday, March 16, 2012 10:52:13 AM
> Subject: RE: Configure SSL under Tomcat 7
> 
> 
> Sorry :D i want say server.xml
>  
> 
> > From: ayb-2...@hotmail.fr
> > To: users@tomcat.apache.org
> > Subject: RE: Configure SSL under Tomcat 7
> > Date: Fri, 16 Mar 2012 16:50:14 +
> > 
> > 
> > Here's My service.xml file :
> > 
> > 
> > 
> > 
> > 
> > 
> >  > SSLEngine="on" />
> > 
> > 
> > 
> >  > className="org.apache.catalina.core.JreMemoryLeakPreventionListener"
> > />
> >  > className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
> > />
> >  > className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"
> > />
> > 
> > 
> > 
> > 
> >  > type="org.apache.catalina.UserDatabase"
> > description="User database that can be updated and saved"
> > factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
> > pathname="conf/tomcat-users.xml" />
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >  > protocol="org.apache.coyote.http11.Http11AprProtocol"
> > SSLEnabled="true"
> > maxThreads="150" scheme="https" secure="true"
> > clientAuth="optional" sslProtocol="TLS"/>
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >  > resourceName="UserDatabase"/>
> > 
> > 
> >  > unpackWARs="true" autoDeploy="true">
> > 
> > 
> > 
> > 
> > 
> >  > directory="logs"
> > prefix="localhost_access_log." suffix=".txt"
> > pattern="%h %l %u %t "%r" %s %b" />
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > Date: Fri, 16 Mar 2012 10:41:38 -0600
> > > From: devli...@hanik.com
> > > To: users@tomcat.apache.org
> > > Subject: Re: Configure SSL under Tomcat 7
> > > 
> > > set SSLEnabled="true" in your  element, that turns on
> > > SSL.
> > > After that, if you don't have keystoreFile or keystorePass set,
> > > it will throw errors
> > > 
> > > Filip
> > > 
> > > 
> > > - Original Message -
> > > > From: "ayouB __" 
> > > > To: users@tomcat.apache.org
> > > > Sent: Friday, March 16, 2012 9:58:49 AM
> > > > Subject: Configure SSL under Tomcat 7
> > > > 
> > > > 
> > > > Hi every one,
> > > > 
> > > > I'm ayoub and i'm a new member of this mailing list :)
> > > > Well, i want to configure SSL under Tomcat 7 so i have followed
> > > > steps
> > > > said in http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html,
> > > > but
> > > > when i deploy my project in tomcat server i don't get :
> > > > https://loclhost:8080/ i still working with the native http !!
> > > > what
> > > > should i do, what configuration should i make on my server.xml
> > > > file.
> > > > PS : I want to use the APR implementation not the JSSE one, and
> > > > BTW
> > > > the : SSLCertificateFile & SSLCertificateKeyFile don't exist in
> > > > the
> > > >  element (usinf eclipse Ctrl+space
> > > > auto-complish)
> > > > !!
> > > > 
> > > > Thanks.
> > > 
> > > -
> > > 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: Configure SSL under Tomcat 7

2012-03-16 Thread Filip Hanik Mailing Lists
set SSLEnabled="true" in your  element, that turns on SSL.
After that, if you don't have keystoreFile or keystorePass set, it will throw 
errors

Filip


- Original Message -
> From: "ayouB __" 
> To: users@tomcat.apache.org
> Sent: Friday, March 16, 2012 9:58:49 AM
> Subject: Configure SSL under Tomcat 7
> 
> 
> Hi every one,
>  
> I'm ayoub and i'm a new member of this mailing list :)
> Well, i want to configure SSL under Tomcat 7 so i have followed steps
> said in http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html, but
> when i deploy my project in tomcat server i don't get :
> https://loclhost:8080/ i still working with the native http !! what
> should i do, what configuration should i make on my server.xml file.
> PS : I want to use the APR implementation not the JSSE one, and BTW
> the : SSLCertificateFile & SSLCertificateKeyFile don't exist in the
>  element (usinf eclipse Ctrl+space auto-complish)
> !!
>  
> Thanks.

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



Re: What is the best way to view Tomcat JDBC pool properties in Tomcat 6?

2012-03-10 Thread Filip Hanik - Dev Lists

cast it to java.sql.Connection

On 3/8/2012 4:29 AM, hodgesz wrote:

Yes you are correct we are creating the pool in Spring configuration as it is
more natural for our application, but the only problem we see now is once we
upgraded to 7.0.26 we see the following exception in the logs when viewing
through JMXProxy.  The data is retrieved correctly so the exception is a
little baffling.



http://localhost:8080/manager/jmxproxy/?qry=bean:name=eventingDataSource


OK - Number of results: 1

Name: bean:name=eventingDataSource
modelerType: org.apache.tomcat.jdbc.pool.DataSource
MaxIdle: 100
JdbcInterceptors:
org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer
DefaultTransactionIsolation: -1
ValidationQuery: SELECT 1 FROM dual
TestOnConnect: false
Password: Password not available as DataSource/JMX operation.
AbandonWhenPercentageFull: 0
TestOnReturn: false
Username: 
NumActive: 0
MinIdle: 10
PoolSize: 4
ValidationInterval: 180
Connection:
ProxyConnection[PooledConnection[oracle.jdbc.driver.T4CConnection@17f8b39]]
NumIdle: 2
AccessToUnderlyingConnectionAllowed: true
Url: jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST =
localhost)(PORT = 1580))(CONNECT_DATA =(SERVER = DEDICATED)( SERVICE_NAME =
anywhere.com )(INSTANCE_NAME = xxx)(SID = xxx)))
Size: 4
Active: 2
AlternateUsernameAllowed: false
TestOnBorrow: true
LoginTimeout: 6
MaxActive: 100
MaxAge: 0
SuspectTimeout: 0
Pool: org.apache.tomcat.jdbc.pool.ConnectionPool@9283bf
NumTestsPerEvictionRun: 0
Name: Tomcat Connection Pool[1-6300663]
MaxWait: 6000
PoolProperties: ConnectionPool[defaultAutoCommit=null; defaultReadOnly=null;
defaultTransactionIsolation=-1; defaultCatalog=null;
driverClassName=oracle.jdbc.driver.OracleDriver; maxActive=100; maxIdle=100;
minIdle=10; initialSize=10; maxWait=6000; testOnBorrow=true;
testOnReturn=false; timeBetweenEvictionRunsMillis=3;
numTestsPerEvictionRun=0; minEvictableIdleTimeMillis=3;
testWhileIdle=false; testOnConnect=false; password=x;
url=jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST =
localhost)(PORT = 1580))(CONNECT_DATA =(SERVER = DEDICATED)( SERVICE_NAME =
anywhere.com )(INSTANCE_NAME = xxx)(SID = xxx))); username=xxx;
validationQuery=SELECT 1 FROM dual; validationInterval=180;
accessToUnderlyingConnectionAllowed=true; removeAbandoned=true;
removeAbandonedTimeout=60; logAbandoned=true; connectionProperties=null;
initSQL=null;
jdbcInterceptors=org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer;
jmxEnabled=true; fairQueue=false; useEquals=false;
abandonWhenPercentageFull=0;
maxAge=0; useLock=false; dataSource=null; dataSourceJNDI=null;
alternateUsernameAllowed=false;
PoolName: Tomcat Connection Pool[1-6300663]
WaitCount: 0
JmxEnabled: true
TestWhileIdle: false
UseEquals: false
UseLock: false
DriverClassName: oracle.jdbc.driver.OracleDriver
RemoveAbandonedTimeout: 60
DbProperties: {user=, password=}
Idle: 2
LogAbandoned: true
FairQueue: false
PoolSweeperEnabled: true
ConnectionAsync:
org.apache.tomcat.jdbc.pool.ConnectionPool$ConnectionFuture@e9c2d3
JdbcInterceptorsAsArray:
Array[org.apache.tomcat.jdbc.pool.PoolProperties$InterceptorDefinition] of
length 2

org.apache.tomcat.jdbc.pool.PoolProperties$InterceptorDefinition@125f027

org.apache.tomcat.jdbc.pool.PoolProperties$InterceptorDefinition@1b99628
RemoveAbandoned: true
TimeBetweenEvictionRunsMillis: 3
MinEvictableIdleTimeMillis: 3
InitialSize: 10



Mar 6, 2012 9:18:20 AM org.apache.catalina.mbeans.MBeanDumper dumpBeans
SEVERE: Error getting attribute bean:name=eventingDataSource
PooledConnection
javax.management.MBeanException: RuntimeException thrown in
RequiredModelMBean
while trying to invoke operation getPooledConnection
 at
javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1091)
 at
javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:955)
 at
org.springframework.jmx.export.SpringModelMBean.invoke(SpringModelMBean.java:90)
 at
javax.management.modelmbean.RequiredModelMBean.getAttribute(RequiredModelMBean.java:1358)
 at
org.springframework.jmx.export.SpringModelMBean.getAttribute(SpringModelMBean.java:109)
 at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:666)
 at
com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638)
 at
org.apache.catalina.mbeans.MBeanDumper.dumpBeans(MBeanDumper.java:82)
 at
org.apache.catalina.manager.JMXProxyServlet.listBeans(JMXProxyServlet.java:172)
 at
org.apache.catalina.manager.JMXProxyServlet.doGet(JMXProxyServlet.java:121)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 at
org.apache.catalina.core.ApplicationFilterCh

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-10 Thread Filip Hanik - Dev Lists

On 3/3/2012 10:50 AM, Brooke Hedrick wrote:

On Mar 3, 2012 11:48 AM, "Brooke Hedrick"
wrote:


On Mar 3, 2012 11:35 AM, "Caldarale, Charles R"<

chuck.caldar...@unisys.com>  wrote:

From: Brooke Hedrick [mailto:brooke.t.hedr...@gmail.com]
Subject: Re: [Tomcat JDBC Pool] Close pooled connections via JMX

Do you have testOnBorrow="true" and a validationQuery="SELECT 1 FROM
DUAL" configured?

This should suffice to ensure each connection is valid before use.

That approach doesn't work when the application uses symlinks to get

to

data on other Oracle servers.

That makes no sense to me; please explain how links in the file system

affect DB connections over the network.

Chuck, I used the wrong word.  I should have said 'database links'.  You

will see things like: select * emp@otherdb.  Where @otherdb is typically an
entry that you would find in a tnsnames.ora.

Before you correct me, yes, I left out the FROM between the * and emp.


still doesn't make sense. if you need another DB validated, use another 
validation query.
sounds like one is creating a problem here rather than detecting one


  - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE

PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If
you received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


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




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



Re: Using Tomcat7 JDBC Connection Pool

2012-02-13 Thread Filip Hanik - Dev Lists

Here is an example

String query = "BEGIN DBMS_LOCK.sleep(seconds => 5.01); END;"


It is pretty obvious that you can't do "SELECT 1; SELECT 1;" is this would 
result in TWO result sets.
But you can create a block and execute any number of instructions

The above example executes a stored procedure.
Filip

On 2/9/2012 9:48 AM, Pid wrote:

On 09/02/2012 16:21, Amit wrote:

Any thoughts on the first point about executing multiple SQL queries on 
physical connection creation?

I have no idea if it'll work, but I'd try:

  SELECT 1; SELECT 1;

If you are controlling the pool (and you are) by passing in
username/password parameters each time, then you could do it as an extra
transaction thereafter.


p


On 09-Feb-2012, at 7:05 PM, Pid  wrote:


On 09/02/2012 12:56, amit shah wrote:

One more comment below about oracle UCP.




The pool returns members at random, so how would you know which cached
credentials you were getting?

The credentials which are passed to the getConnection(String username,

String password) method. When we configure the same pool to be used for
multiple schema's the pool will *not *be configured with default

username

password.

OK, so you create a bunch of connections with various credentials, you
want to cache those connections and only return them if the creds match
for the new request?

So you're basically creating an uncontrolled pool per cred pair, inside
the outer pool which is controlled?


Yes right.

So why not create multiple controlled pools&  not run into availability
problems?





What overhead?


The application server and database server resources (memory, cpu etc) for
keeping the connections open?

That's a total connection count dependent metric.

So the overhead is virtually the same regardless of whether you have 5
pools or 1, if you have the same total number of connections.



For e.g. If we have 5 tenants with 5

pools configured with 10 min pool size, we would have min 50 connections
always open to the database server. This count would be for each
application server. If we had the same pool for all 5 tenants, there

would

be just 10 connections open per application server.

There's a flaw in your logic.

In your example there may be zero connections open for a given tenant
because they use a shared pool.

So you might has well have separate pools with the minimum set to 2 and
still have more connections guaranteed per tenant, and the 10 you were
aiming for.

Worse, if you hit your max with other tenants, a remaining tenant might
not be able to get a connection at all, thus failing to address one of
the key requirements in a multi-tenant system - guaranteed availability.

Probably true when all the tenants are actively used. As I said, there is

always a flexibility in the configuration to use a separate pool for a
particular tenant.

That should be the default IMO.  You're asking for trouble otherwise.



Also the application can always provide a configuration flexibility to
allow a tenant to use a separate pool instead of sharing it with other
tenants (like I said above).

This flexibility is provided by the Oracle Universal Connection
Pool

So if that's a better fit for your requirement, why not use it?



It provides the feature I mentioned about by has lock contention issues.
Tomcat 7 jdbc pool seems to be better and hence I was trying it out.

!




If you are programmatically registering the pool, can you not just
register it with the MBean server yourself?

Ok I will try this and provide an update.

Cool.


p




--

[key:62590808]


-
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: Apache tribes deserialization issues

2012-01-09 Thread Filip Hanik - Dev Lists

your workaround is valid
I would not expect thread context class loader to work, as the thread for 
deserializing is the thread from the tribes TCP thread pool


On 12/29/2011 5:06 AM, Madhav Bhargava wrote:

Hi All,

We are using Apache tribes library for presence and inter node
communication within an OSGi runtime environment. We have a central node
(say node A) receiving messages from other nodes ( say node B, C). The
message passed is a custom class which is present as part of the API
defined in a separate OSGi bundle. This custom class is Serializable.

When a send method is invoked on the GroupChannel to send the custom class
message to node A then it throws an exception with the following stack
trace:

java.lang.ClassNotFoundException: com.sap.nm.NodeSnapshot
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.io.ObjectInputStream.resolveClass(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at
org.apache.catalina.tribes.io.XByteBuffer.deserialize(XByteBuffer.java:568)
at
org.apache.catalina.tribes.io.XByteBuffer.deserialize(XByteBuffer.java:554)
at
org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChannel.java:261)
at
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84)
at
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84)
at
org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(ChannelCoordinator.java:253)
at
org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(ReceiverBase.java:287)
at
org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTask.java:212)
at
org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:101)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

The problem is that OSGi has a totally different class loading mechanism
that what is followed in java/j2ee applications. We looked at the tribes
source code and found out that following piece of code is the culprit:

Class: XByteBuffer.java

public static Serializable deserialize(byte[] data, int offset, int length)
 throws IOException, ClassNotFoundException, ClassCastException {
 return deserialize(data,offset,length,null);
 }

Instead of passing null to the ClassLoader[] (last argument), Thread
context classloader should have been passed. What is happening is that the
tribes is trying to load the class with the tribes class loader and not
using the current thread classloader and is therefore not able to find the
custom class.

A workaround that we have adopted now is to use byte[] and set
Channel.SEND_OPTIONS_BYTE_MESSAGE option while sending the message. We then
explicitly recreate the object in the ChannelListener in bundle A from the
bytes message.  This is possible because in GroupChannel byte messages are
not deserialized using XByteBuffer.

It will great if anyone can investigate this issue.

Best Regards,
Madhav




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



Re: Session replication fails with "Member send is failing"

2011-12-08 Thread Filip Hanik - Dev Lists

On 12/7/2011 9:04 AM, Jürgen Link wrote:

Caused by: org.apache.catalina.tribes.RemoteProcessException: Received a
failedack:org.apache.catalina.tribes.transport.Constants.FAIL_ACK_DATA


sure thing, this is actually telling the "sender" that an exception happened on the 
"receiver" end.
Take a look at the logs for tcp://{10, 1, 3, 181}:5000 and it should contain 
the information in there

Filip

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



Re: Antw.: how to properly configure tomcat 7 cluster with BackupManager

2011-12-01 Thread Filip Hanik - Dev Lists

http://www.datadisk.co.uk/html_docs/java_app/tomcat6/tomcat6_clustering.htm
http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html
http://tomcat.apache.org/tomcat-6.0-doc/tribes/introduction.html

On 10/27/2011 9:29 AM, juergen.l...@gmail.com wrote:

Hi Mark,
thanks a lot for this clarification!
Is there any reference you recommend for learning about tomcat clustering 
(apart from the source code)?

Cheers
Jürgen




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



Re: Server crash for memory limit

2011-11-29 Thread Filip Hanik Mailing Lists
that's a restriction of 32 bit systems. upgrade to 64 bit for more memory 
requirements
depending on the kernel, you can go to 3.7gb for a 32 bit system
- Original Message -
From: "hi tanin" 
To: users@tomcat.apache.org
Sent: Tuesday, November 29, 2011 8:05:51 AM
Subject: Server crash for memory limit

Hi,
I am using Tomcat 5.0.27. I cannot use more then 2GB for Tomcat 5.0.27. Our OS 
is 32-bit Linux. Can ane one tell me why this happening? And is there any way 
to get rid of this problem and use lot of memory?

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



Re: Securing Tomcat cluster communication

2011-11-23 Thread Filip Hanik - Dev Lists

Yes, that way you could encrypt your data packets and not worry about the wire 
protocol.
the placement of the interceptor will be important, so that you don't encrypt 
packets you don't need to (like ping and failure detection)

Filip

On 11/23/2011 10:53 AM, Afkham Azeez wrote:

On Wed, Nov 23, 2011 at 8:48 PM, Filip Hanik - Dev Lists
wrote:
On 10/6/2011 8:31 AM, Afkham Azeez wrote:


I had a look at the Tribes code. Can somebody please explain how
Channel.SEND_OPTIONS_SECURE works?


not yet implemented :(


What is the proper way of implementing this if I was to do it? Implement an
interceptor which will handle encryption/decryption? This is for Axis2
clustering which uses Tribes, so we could use the Tribes API.




 From the JavaDoc: SEND_OPTIONS_SECURE - Message is sent over an

encrypted
channel

How is this encrypted channel setup? How do we define the keys/keystores
etc?


On Thu, Oct 6, 2011 at 7:47 PM, Afkham Azeez   wrote:

  Hi folks,

Is there a way to do authentication in Tribes when new members try to
join
a cluster so that unauthorized nodes cannot join in? Also, when
clustering
messages are sent back&   forth, how do we ensure security?

Thanks
Azeez




--**--**-
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: Securing Tomcat cluster communication

2011-11-23 Thread Filip Hanik - Dev Lists

On 10/6/2011 8:31 AM, Afkham Azeez wrote:

I had a look at the Tribes code. Can somebody please explain how
Channel.SEND_OPTIONS_SECURE works?

not yet implemented :(


> From the JavaDoc: SEND_OPTIONS_SECURE - Message is sent over an encrypted
channel

How is this encrypted channel setup? How do we define the keys/keystores
etc?


On Thu, Oct 6, 2011 at 7:47 PM, Afkham Azeez  wrote:


Hi folks,
Is there a way to do authentication in Tribes when new members try to join
a cluster so that unauthorized nodes cannot join in? Also, when clustering
messages are sent back&  forth, how do we ensure security?

Thanks
Azeez







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



Re: Cluster - No faulty members identified

2011-11-18 Thread Filip Hanik - Dev Lists

remove bind="172.30.5.77"

Filip
On 11/4/2011 6:41 AM, Alexander Diedler wrote:


Hello @ll,

I have two Tomcat instances (6.0.32 x64 on Windows) on the same server. Both servers make their own clustering with the other physical 
node independent from each other on the same machine.


I get during start of the 2^nd Tomcat on the same node the following error:

INFO: Receiver Server Socket bound to:/172.30.5.77:4001

04.11.2011 13:32:37 org.apache.catalina.tribes.membership.McastServiceImpl 
setupSocket

INFO: Attempting to bind the multicast socket to /228.0.0.4:45574

04.11.2011 13:32:37 org.apache.catalina.tribes.membership.McastServiceImpl 
setupSocket

INFO: Binding to multicast address, failed. Binding to port only.

04.11.2011 13:32:37 org.apache.catalina.tribes.membership.McastServiceImpl 
setupSocket

INFO: Setting multihome multicast interface to:/178.30.5.77

04.11.2011 13:32:37 org.apache.catalina.ha.tcp.SimpleTcpCluster start

SCHWERWIEGEND: Unable to start cluster.

org.apache.catalina.tribes.ChannelException: java.net.SocketException: The requested address is not valid in its context; No faulty 
members identified.


What could it be??

Here server.xml from the first tomcat:

[…]



































[…]

And here the second tomcat:

[…]



































[…]




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



Re: Problem with threads in stage Service (Tomcat 7.0.14)

2011-07-28 Thread Filip Hanik - Dev Lists

that's an academic exercise for you, in the meantime, add in this option to 
your startup options
-XX:-DisableExplicitGC

Filip

On 7/28/2011 1:07 PM, Alejandro Henao González wrote:

I dont believe that have GC running all the time, but the GC is called in the 
above line to HTMLEncoder.encode. as follows.



System.gc();


resultado = htmlEncoder.encode(resultado);
response.reset();


may be this the problem? why?


Thanks.

- Mensaje original -

De: "Filip Hanik - Dev Lists"
Para: "Tomcat Users List"
Enviados: Jueves, 28 de Julio 2011 12:35:56
Asunto: Re: Problem with threads in stage Service (Tomcat 7.0.14)

most likely you have GC running all the time

""http-bio-80"-exec-107" daemon prio=10 tid=0x2aaab31ea000 nid=0x47b2 
runnable [0x436ab000]
java.lang.Thread.State: RUNNABLE
at java.util.HashMap.get(HashMap.java:303)
at sae.HTMLEncoder.encode(HTMLEncoder.java:46)

this should not be a stage where you're stuck, unless you have a loop problem.





On 7/28/2011 9:09 AM, Alejandro Henao González wrote:

Good day.

I have the following problem with my tomcat.

Sometimes, some threads are keep in service stage for a long time (really never 
exit from this stage), this causes that tomcat uses a
hight percentage of the CPU (100 % of 2 or 3 cores) thus the webapp executes 
very slow.

I have a Tomcat 7.0.14 in a Redhat RHLE 5.5.

The partial solution is restart the service, but this is not a practical 
solution(because is a 24/7 server). is posible config a timeout
for threads in service stage, or any solution??

Thanks. Sorry for the redaction. Attached an image with the tomcat manager 
status and the CPU consuming.




Cordial saludo.

Tengo el siguiente problema con mi tomcat.
En algunas ocasiones, algunos hilos se quedan en la etapa de servicio por 
demasiado tiempo (de hecho nunca salen de esta etapa), esto
causa que el tomcat use un alto porcenta de la CPU (el 100 % de 2 o 3 núcluos 
incluso hasta los 8 a veces), y en consecuencia mi
aplicación web trabaja demasiado lento.

Tengo el Tomcat 7.0.14 en Redhat RHLE 5.5

La solución temporal que tengo es reiniciar el servicio, sin embargo esta no es 
una solución práctica (pues debe ser un servidor 24/7). Es
posible configurar algún timeout para hilos en la etapa de servicio, o alguna 
solución alternativa para este problema?

Muchas Gracias. Adjunto una imagen del reporte del estado por el tomcat 
Manager, y el uso de la CPU


-
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: Problem with threads in stage Service (Tomcat 7.0.14)

2011-07-28 Thread Filip Hanik - Dev Lists

most likely you have GC running all the time

""http-bio-80"-exec-107" daemon prio=10 tid=0x2aaab31ea000 nid=0x47b2 
runnable [0x436ab000]
java.lang.Thread.State: RUNNABLE
at java.util.HashMap.get(HashMap.java:303)
at sae.HTMLEncoder.encode(HTMLEncoder.java:46)

this should not be a stage where you're stuck, unless you have a loop problem.





On 7/28/2011 9:09 AM, Alejandro Henao González wrote:

Good day.

I have the following problem with my tomcat.

Sometimes, some threads are keep in service stage for a long time (really never exit from this stage), this causes that tomcat uses a 
hight percentage of the CPU (100 % of 2 or 3 cores) thus the webapp executes very slow.


I have a Tomcat 7.0.14 in a Redhat RHLE 5.5.

The partial solution is restart the service, but this is not a practical solution(because is a 24/7 server). is posible config a timeout 
for threads in service stage, or any solution??


Thanks. Sorry for the redaction. Attached an image with the tomcat manager 
status and the CPU consuming.




Cordial saludo.

Tengo el siguiente problema con mi tomcat.
En algunas ocasiones, algunos hilos se quedan en la etapa de servicio por demasiado tiempo (de hecho nunca salen de esta etapa), esto 
causa que el tomcat use un alto porcenta de la CPU (el 100 % de 2 o 3 núcluos incluso hasta los 8 a veces), y en consecuencia mi 
aplicación web trabaja demasiado lento.


Tengo el Tomcat 7.0.14 en Redhat RHLE 5.5

La solución temporal que tengo es reiniciar el servicio, sin embargo esta no es una solución práctica (pues debe ser un servidor 24/7). Es 
posible configurar algún timeout para hilos en la etapa de servicio, o alguna solución alternativa para este problema?


Muchas Gracias. Adjunto una imagen del reporte del estado por el tomcat 
Manager, y el uso de la CPU


-
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: Comet over HTTPS: END event recieved immeidately for the first few times

2011-07-14 Thread Filip Hanik - Dev Lists

why dont you
1. package up a sample application and configuration
2. open a bugzilla issue
3. https://issues.apache.org/bugzilla/enter_bug.cgi

that way we can take a look ait it.

Filip


On 7/13/2011 2:54 PM, Sudeep Pradhan wrote:

Hi Filip,

Thanks for the reply.

I don't think that I am using BIO connector for SSL. I don't see any such 
option in the server.xml. The connector is as follows:



Also, It does *work sometimes*. I get a proper streaming output of the weather 
feeds when it works.

Hope this helps you understand the scenario better.

Thanks,
Sudeep



-Original Message-
From: Filip Hanik - Dev Lists [mailto:devli...@hanik.com]
Sent: Wednesday, July 13, 2011 1:43 PM
To: Tomcat Users List
Subject: Re: Comet over HTTPS: END event recieved immeidately for the first few 
times

is it possible that when you turn on SSL, you are using the regular BIO 
connector when you use SSL and Comet is not supported by that connector.
best
Filip

On 7/11/2011 11:05 AM, Sudeep Pradhan wrote:

Hi Filip,

I have tried the app with tomcat 6.0.32 and 7.0.16, and the result is the same. 
I am not able to get it working with https. Http works just fine.

The use case I am trying to address is that, I want to send 
notifications/events from a webapp to another webapp asynchronously. The 2 
webapps communicate using REST call for other things. I want to have the same 
model for notifications. The client webapp will send a Https GET request and 
the server webapp will push the notifications asynchronously as a response. The 
client can be anything not just a webapp, I will be using curl as the client 
for testing.

Please let me know if you want to know more.

Thanks,
Sudeep

-Original Message-
From: Filip Hanik - Dev Lists [mailto:devli...@hanik.com]
Sent: Sunday, July 10, 2011 8:12 PM
To: Tomcat Users List
Subject: Re: Comet over HTTPS: END event recieved immeidately for the first few 
times

try the latest version of Tomcat 6, if that doesn't work, provide a test case 
so we can take a look at it

On 7/8/2011 4:07 PM, Sudeep Pradhan wrote:

Any insights on this?

-Original Message-
From: Sudeep Pradhan [mailto:pradh...@vmware.com]
Sent: Wednesday, June 29, 2011 4:54 PM
To: users@tomcat.apache.org
Subject: Comet over HTTPS: END event recieved immeidately for the first few 
times

Hello,

I am  using Tomcat 6.0.20 on Ubuntu 10.04 and have written a simple 
TomcatWeatherServlet as presented in 
http://www.ibm.com/developerworks/web/library/wa-cometjava/ I modified the 
servlet to stream weather feed to multiple curl clients. I am using curl 7.21.6 
as my client.

When I run curl -i -k -v -trace 
https://:8443/Weather<https://%3cIP_Addr%3e:8443/Weather>from the 
command-line I get the following response for the first few times:


$ curl -i -k -v -trace https://:8443/Weather
* About to connect() toport 8443 (#0)
*   Trying... connected
* Connected to() port 8443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
 CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
*  subject: 
*  start date: 2009-02-23 23:07:18 GMT
*  expire date: 2019-02-21 23:07:18 GMT
*  common name: XX (does not match '')
*  issuer: XX
*  SSL certificate verify result: self signed certificate (18), 
continuing anyway.

GET /Weather HTTP/1.1
User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k 
zlib/1.2.3.3 libidn/1.15
Host::8443
Accept: */*


<HTTP/1.1 200 OK
HTTP/1.1 200 OK
<Server: Apache-Coyote/1.1
Server: Apache-Coyote/1.1
<Content-Length: 0
Content-Length: 0
<Date: Wed, 29 Jun 2011 23:40:17 GMT
Date: Wed, 29 Jun 2011 23:40:17 GMT

<
* Connection #0 to hostleft intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):


Observe that Content-Length is 0 in the response. Also when I do get the 
expected response which is,



GET /Weather HTTP/1.1
User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k 
zlib/1.2.3.3 libidn/1.15
Host::8443
Accept: */*


<HTTP/1.1 200 OK
HTTP/1.1 200 OK
<Server: Apache-Coyote/1.1
Server: Apache-Coyote/1.1
<Transfer-Encoding: chunked
Transfer-Encoding: chunked
<Date: Wed, 29 Jun 2011 23:46:18 GMT
Date: Wed, 29 Jun 2011 23:46:18 GMT

<
Conditions for San Jose, CA at 3:52 pm PDT
http:/

Re: Tomcat Pool and XA datasource

2011-07-13 Thread Filip Hanik - Dev Lists

you've misconfigured it. the driverClassName would have to be a driver.
Using XA data sources needs to create the datasource for those connections 
first.

There is an example towards the bottom of

http://www.tomcatexpert.com/blog/2010/04/01/configuring-jdbc-pool-high-concurrency

Filip

On 7/12/2011 6:27 AM, Siemback, Chris wrote:

Hello all,

Has anyone ever been able to successfully setup an Oracle XA datasource using 
the newer Tomcat Pool and running Tomcat 7?  It appears the Tomcat Pool is 
attempting to cast the oracle XA data source to a java.sql.Driver - which it 
isn't.  This needs to be an XA datasource.  Anyone have luck with this - no 
working examples that I can find?  Here's the versions/info/error:

Software:
Tomcat 7.0.16
Tomcat Pool 1.1.0.1 
http://people.apache.org/~fhanik/jdbc-pool/v1.1.0.1/apache-tomcat-jdbc-1.1.0.1-bin.zip
Oracle 11 (ojdbc6.jar)


Context.xml contents:



Exception:

SEVERE: Servlet.service() for servlet [jsp] in context with path [] threw 
exception [javax.servlet.ServletException: javax.naming.NamingException: 
oracle.jdbc.xa.client.OracleXADataSource cannot be cast to java.sql.Driver] 
with root cause
javax.naming.NamingException: oracle.jdbc.xa.client.OracleXADataSource cannot 
be cast to java.sql.Driver
 at 
org.apache.naming.NamingContext.lookup(NamingContext.java:843)
 at 
org.apache.naming.NamingContext.lookup(NamingContext.java:145)
 at 
org.apache.naming.NamingContext.lookup(NamingContext.java:814)
 at 
org.apache.naming.NamingContext.lookup(NamingContext.java:145)
 at 
org.apache.naming.NamingContext.lookup(NamingContext.java:814)
 at 
org.apache.naming.NamingContext.lookup(NamingContext.java:145)
 at 
org.apache.naming.NamingContext.lookup(NamingContext.java:814)
 at 
org.apache.naming.NamingContext.lookup(NamingContext.java:159)
 at 
org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
 at javax.naming.InitialContext.lookup(InitialContext.java:392)
 at org.apache.jsp.jdbc_jsp._jspService(jdbc_jsp.java:69)
 at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
 at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
 at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
 at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
 at 
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:286)
 at 
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:272)
 at 
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1730)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

This e-mail message is being sent solely for use by the intended recipient(s) 
and may contain confidential information.  Any unauthorized review, use, 
disclosure or distribution is prohibited.  If you are not the intended 
recipient, please contact the sender by phone or reply by e-mail, delete the 
original message and destroy all copies. Thank you.



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



Re: Comet over HTTPS: END event recieved immeidately for the first few times

2011-07-13 Thread Filip Hanik - Dev Lists

is it possible that when you turn on SSL, you are using the regular BIO 
connector when you use SSL and Comet is not supported by that connector.
best
Filip

On 7/11/2011 11:05 AM, Sudeep Pradhan wrote:

Hi Filip,

I have tried the app with tomcat 6.0.32 and 7.0.16, and the result is the same. 
I am not able to get it working with https. Http works just fine.

The use case I am trying to address is that, I want to send 
notifications/events from a webapp to another webapp asynchronously. The 2 
webapps communicate using REST call for other things. I want to have the same 
model for notifications. The client webapp will send a Https GET request and 
the server webapp will push the notifications asynchronously as a response. The 
client can be anything not just a webapp, I will be using curl as the client 
for testing.

Please let me know if you want to know more.

Thanks,
Sudeep

-Original Message-
From: Filip Hanik - Dev Lists [mailto:devli...@hanik.com]
Sent: Sunday, July 10, 2011 8:12 PM
To: Tomcat Users List
Subject: Re: Comet over HTTPS: END event recieved immeidately for the first few 
times

try the latest version of Tomcat 6, if that doesn't work, provide a test case 
so we can take a look at it

On 7/8/2011 4:07 PM, Sudeep Pradhan wrote:

Any insights on this?

-Original Message-
From: Sudeep Pradhan [mailto:pradh...@vmware.com]
Sent: Wednesday, June 29, 2011 4:54 PM
To: users@tomcat.apache.org
Subject: Comet over HTTPS: END event recieved immeidately for the first few 
times

Hello,

I am  using Tomcat 6.0.20 on Ubuntu 10.04 and have written a simple 
TomcatWeatherServlet as presented in 
http://www.ibm.com/developerworks/web/library/wa-cometjava/ I modified the 
servlet to stream weather feed to multiple curl clients. I am using curl 7.21.6 
as my client.

When I run curl -i -k -v -trace 
https://:8443/Weather<https://%3cIP_Addr%3e:8443/Weather>   from the 
command-line I get the following response for the first few times:


$ curl -i -k -v -trace https://:8443/Weather
* About to connect() to   port 8443 (#0)
*   Trying... connected
* Connected to   () port 8443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
*  subject: 
*  start date: 2009-02-23 23:07:18 GMT
*  expire date: 2019-02-21 23:07:18 GMT
*  common name: XX (does not match '')
*  issuer: XX
*  SSL certificate verify result: self signed certificate (18), 
continuing anyway.

GET /Weather HTTP/1.1
User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k 
zlib/1.2.3.3 libidn/1.15
Host::8443
Accept: */*


<   HTTP/1.1 200 OK
HTTP/1.1 200 OK
<   Server: Apache-Coyote/1.1
Server: Apache-Coyote/1.1
<   Content-Length: 0
Content-Length: 0
<   Date: Wed, 29 Jun 2011 23:40:17 GMT
Date: Wed, 29 Jun 2011 23:40:17 GMT

<
* Connection #0 to host   left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):


Observe that Content-Length is 0 in the response. Also when I do get the 
expected response which is,



GET /Weather HTTP/1.1
User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k 
zlib/1.2.3.3 libidn/1.15
Host::8443
Accept: */*


<   HTTP/1.1 200 OK
HTTP/1.1 200 OK
<   Server: Apache-Coyote/1.1
Server: Apache-Coyote/1.1
<   Transfer-Encoding: chunked
Transfer-Encoding: chunked
<   Date: Wed, 29 Jun 2011 23:46:18 GMT
Date: Wed, 29 Jun 2011 23:46:18 GMT

<
Conditions for San Jose, CA at 3:52 pm PDT
http://l.yimg.com/a/i/us/we/52/30.gif"/>
Current Conditions:
Partly Cloudy, 68 F
Forecast:
Wed - Mostly Clear. High: 70 Low: 55
Thu - Partly Cloudy. High: 77 Low: 57

http://us.rd.yahoo.com/dailynews/rss/weather/San_Jose__CA/*http://weather.yahoo.com/forecast/USCA0993_f.html";>Full
 Forecast at Yahoo! Weather
(provided byhttp://www.weather.com";>The Weather Channel)



I get Transfer-Encoding as chunked and no Content-Length.

On Server logs I get for the error are:
16:40:16.916  INFO http-8443-exec-3 TomcatWeatherServlet:41 - Begin for 
session: BDD6B1808161F1DA99D5D3207F1A719B
16:40:16.959  INFO http-8443-exec-4 TomcatWeatherServlet:48 - End for session: 
BDD6B1808161F1DA99D5D3207F1A719B
16:40:17.033  INFO http-8443-exec-4 TomcatWeatherServlet:48 - End for session: 
BDD6B1808161F1DA99D5D3207F1A719B

T

Re: Comet over HTTPS: END event recieved immeidately for the first few times

2011-07-10 Thread Filip Hanik - Dev Lists

try the latest version of Tomcat 6, if that doesn't work, provide a test case 
so we can take a look at it

On 7/8/2011 4:07 PM, Sudeep Pradhan wrote:

Any insights on this?

-Original Message-
From: Sudeep Pradhan [mailto:pradh...@vmware.com]
Sent: Wednesday, June 29, 2011 4:54 PM
To: users@tomcat.apache.org
Subject: Comet over HTTPS: END event recieved immeidately for the first few 
times

Hello,

I am  using Tomcat 6.0.20 on Ubuntu 10.04 and have written a simple 
TomcatWeatherServlet as presented in 
http://www.ibm.com/developerworks/web/library/wa-cometjava/ I modified the 
servlet to stream weather feed to multiple curl clients. I am using curl 7.21.6 
as my client.

When I run curl -i -k -v -trace 
https://:8443/Weather  from the 
command-line I get the following response for the first few times:


$ curl -i -k -v -trace https://:8443/Weather
* About to connect() to  port 8443 (#0)
*   Trying... connected
* Connected to  () port 8443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
   CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
*  subject: 
*  start date: 2009-02-23 23:07:18 GMT
*  expire date: 2019-02-21 23:07:18 GMT
*  common name: XX (does not match '')
*  issuer: XX
*  SSL certificate verify result: self signed certificate (18), 
continuing anyway.

GET /Weather HTTP/1.1
User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k 
zlib/1.2.3.3 libidn/1.15
Host::8443
Accept: */*


<  HTTP/1.1 200 OK
HTTP/1.1 200 OK
<  Server: Apache-Coyote/1.1
Server: Apache-Coyote/1.1
<  Content-Length: 0
Content-Length: 0
<  Date: Wed, 29 Jun 2011 23:40:17 GMT
Date: Wed, 29 Jun 2011 23:40:17 GMT

<
* Connection #0 to host  left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):


Observe that Content-Length is 0 in the response. Also when I do get the 
expected response which is,



GET /Weather HTTP/1.1
User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k 
zlib/1.2.3.3 libidn/1.15
Host::8443
Accept: */*


<  HTTP/1.1 200 OK
HTTP/1.1 200 OK
<  Server: Apache-Coyote/1.1
Server: Apache-Coyote/1.1
<  Transfer-Encoding: chunked
Transfer-Encoding: chunked
<  Date: Wed, 29 Jun 2011 23:46:18 GMT
Date: Wed, 29 Jun 2011 23:46:18 GMT

<
Conditions for San Jose, CA at 3:52 pm PDT
http://l.yimg.com/a/i/us/we/52/30.gif"/>
Current Conditions:
Partly Cloudy, 68 F
Forecast:
Wed - Mostly Clear. High: 70 Low: 55
Thu - Partly Cloudy. High: 77 Low: 57

http://us.rd.yahoo.com/dailynews/rss/weather/San_Jose__CA/*http://weather.yahoo.com/forecast/USCA0993_f.html";>Full
 Forecast at Yahoo! Weather
(provided byhttp://www.weather.com";>The Weather Channel)



I get Transfer-Encoding as chunked and no Content-Length.

On Server logs I get for the error are:
16:40:16.916  INFO http-8443-exec-3 TomcatWeatherServlet:41 - Begin for 
session: BDD6B1808161F1DA99D5D3207F1A719B
16:40:16.959  INFO http-8443-exec-4 TomcatWeatherServlet:48 - End for session: 
BDD6B1808161F1DA99D5D3207F1A719B
16:40:17.033  INFO http-8443-exec-4 TomcatWeatherServlet:48 - End for session: 
BDD6B1808161F1DA99D5D3207F1A719B

This was working when I was on HTTP. I have tried to debug this for a lot of 
time w/o success. Also I get two END events instead of one as seen in the Logs. 
 Any insights will be helpful.

Thanks,
Sudeep

-
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: getAllClusterSessions gives OptionalDataException

2011-07-07 Thread Filip Hanik - Dev Lists

On 6/28/2011 2:31 AM, Konstantin Kolinko wrote:

2011/6/23 Ronald Klop:

Hi,

I have an exception when one on my Tomcat nodes restarts. The session are
not synced and user complain about being logged out. I was running 6.0.32
and had the problem. Now I'm running a custom build of 6.0.33 from
yesterday. I added a little code which prints ' SEVERE: name=user'. The key
on which the sync fails while reading the value.

I looked into the java code in ObjectInputStream and it looks like some
inconsistency in the ObjectStream.

I have 4 nodes on Debian 5, sun-java6-jdk 6-22-0lenny1, seen the problem on
Tomcat 6.0.29, 6.0.32 and a custom build 6.0.33. I can't reproduce this
(yet) on my test environment, so debugging it is difficult without upset
customers.


  









Can I provide more information? Where should I look.

NB: In some previous mails about another problem I thought that might be the
reason for my logout problem, that is why I tried 6.0.33-dev.

Ronald.

Jun 23, 2011 5:49:47 PM org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions
WARNING: Manager [crm.realworks.nl#], requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 10,
110}:4000,{10, 0, 10, 110},4000, alive=45370885,id={-34 112 102 -93 -87 -88
77 18 -113 -30 62 8 62 -65 -112 -13 }, payload={}, command={}, domain={}, ].
This operation will timeout if no session state has been received within 60
seconds.
Jun 23, 2011 5:49:47 PM org.apache.catalina.ha.session.DeltaManager
waitForSendAllSessions
INFO: Manager [crm.realworks.nl#]; session state send at 6/23/11 5:49 PM
received in 304 ms.
Jun 23, 2011 5:49:47 PM org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions
WARNING: Manager [crm.realworks.nl#]: Drop message SESSION-ACCESSED inside
GET_ALL_SESSIONS sync phase start date 6/23/11 5:49 PM message date 6/23/11
5:49 PM
Jun 23, 2011 5:49:47 PM org.apache.catalina.ha.session.DeltaSession
readObject
SEVERE: name=user.
Jun 23, 2011 5:49:47 PM org.apache.catalina.ha.session.DeltaManager
deserializeSessions
SEVERE: IOException while loading persisted sessions:
java.io.OptionalDataException
java.io.OptionalDataException
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.util.HashMap.readObject(HashMap.java:1029)

(...)

Looking at ObjectInputStream sourced, the OptionalDataException is
thrown when the source stream is truncated.

It might be related to the following issue, fixed in Tomcat 7, but
never proposed for backport yet:
https://issues.apache.org/bugzilla/show_bug.cgi?id=50646
"Tribes ByteMessage will get corrupted if message size exceeds the
underlying buffer size"

that's what I thought, but the SessionMessage doesn't use ByteMessage


Best regards,
Konstantin Kolinko

-
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: getAllClusterSessions gives OptionalDataException

2011-06-23 Thread Filip Hanik - Dev Lists

are there other versions of Apache Tomcat running in the same cluster?
Check the logs for what members are joining the cluster, then check what 
version they are

best
Filip

On 6/23/2011 10:14 AM, Ronald Klop wrote:

Hi,

I have an exception when one on my Tomcat nodes restarts. The session are not synced and user complain about being logged out. I was 
running 6.0.32 and had the problem. Now I'm running a custom build of 6.0.33 from yesterday. I added a little code which prints ' SEVERE: 
name=user'. The key on which the sync fails while reading the value.


I looked into the java code in ObjectInputStream and it looks like some 
inconsistency in the ObjectStream.

I have 4 nodes on Debian 5, sun-java6-jdk 6-22-0lenny1, seen the problem on Tomcat 6.0.29, 6.0.32 and a custom build 6.0.33. I can't 
reproduce this (yet) on my test environment, so debugging it is difficult without upset customers.













Can I provide more information? Where should I look.

NB: In some previous mails about another problem I thought that might be the 
reason for my logout problem, that is why I tried 6.0.33-dev.

Ronald.

Jun 23, 2011 5:49:47 PM org.apache.catalina.ha.session.DeltaManager 
getAllClusterSessions
WARNING: Manager [crm.realworks.nl#], requesting session state from org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 10, 
110}:4000,{10, 0, 10, 110},4000, alive=45370885,id={-34 112 102 -93 -87 -88 77 18 -113 -30 62 8 62 -65 -112 -13 }, payload={}, command={}, 
domain={}, ]. This operation will timeout if no session state has been received within 60 seconds.

Jun 23, 2011 5:49:47 PM org.apache.catalina.ha.session.DeltaManager 
waitForSendAllSessions
INFO: Manager [crm.realworks.nl#]; session state send at 6/23/11 5:49 PM 
received in 304 ms.
Jun 23, 2011 5:49:47 PM org.apache.catalina.ha.session.DeltaManager 
getAllClusterSessions
WARNING: Manager [crm.realworks.nl#]: Drop message SESSION-ACCESSED inside GET_ALL_SESSIONS sync phase start date 6/23/11 5:49 PM message 
date 6/23/11 5:49 PM

Jun 23, 2011 5:49:47 PM org.apache.catalina.ha.session.DeltaSession readObject
SEVERE: name=user.
Jun 23, 2011 5:49:47 PM org.apache.catalina.ha.session.DeltaManager 
deserializeSessions
SEVERE: IOException while loading persisted sessions: 
java.io.OptionalDataException
java.io.OptionalDataException
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.util.HashMap.readObject(HashMap.java:1029)
at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at 
org.apache.catalina.ha.session.DeltaSession.readObject(DeltaSession.java:655)
at 
org.apache.catalina.ha.session.DeltaSession.readObjectData(DeltaSession.java:481)
at 
org.apache.catalina.ha.session.DeltaManager.deserializeSessions(DeltaManager.java:745)
at 
org.apache.catalina.ha.session.DeltaManager.handleALL_SESSION_DATA(DeltaManager.java:1583)
at 
org.apache.catalina.ha.session.DeltaManager.messageReceived(DeltaManager.java:1440)
at 
org.apache.catalina.ha.session.DeltaManager.messageDataReceived(DeltaManager.java:1173)
at 
org.apache.catalina.ha.session.ClusterSessionListener.messageReceived(ClusterSessionListener.java:92)
at 
org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpCluster.java:901)
at 
org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpCluster.java:882)
at 
org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChannel.java:269)
at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79)
at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79)
at 
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageReceived(TcpFailureDetector.java:110)
at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79)
at 
org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(ChannelCoordinator.java:241)
at 
org.apache.catalina.tribes.transpo

Re: async requests on cluster

2011-06-08 Thread Filip Hanik - Dev Lists

On 6/7/2011 3:34 PM, Mark Thomas wrote:

On 07/06/2011 21:46, Seth Lenzi wrote:

The isAsyncSupported() method of the SerlvletRequest object returns
false when you uncomment the  element in the
server.xml file (Tomcat 7.0.14). Basically, enabling clustering seems to
break support for asynchronous servlets... Is there something else that
needs to be done to enable async requests to work on a cluster?

That would be a bug. Looking at it now, the fix should make it into the
next 7.0.x release (7.0.16). I'll be starting on that release once this
issue is fixed.
not a bug,just not a feature yet implemented. replication is triggered when a request ends. when async is in play, replication must be 
replicated based on an interval, or when the request is finally complete.




Mark



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



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1382 / Virus Database: 1511/3688 - Release Date: 06/08/11





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



Re: Tomcat 6 Clustering vs. Tomcat 5.5 clustering

2011-06-06 Thread Filip Hanik - Dev Lists

On 5/23/2011 6:50 AM, Martin Knoblauch wrote:

Hi,

while moving an application from Tomcat 5.5 to Tomcat 6 I found some
differences in clustering, that I could not resolve myself:

e. G. What happened to replicationMode, ackTimeout waitForAck? In TC 5.5 I had:

 

channelSendOptions
http://tomcat.apache.org/tomcat-6.0-doc/config/cluster.html



Are they still available with
"org.apache.catalina.tribes.transport.ReplicationTransmitter"?

Also, can I assume the "bindAddress" from
"org.apache.catalina.cluster.mcast.McastService" is the same as "bind" from
"org.apache.catalina.tribes.membership.McastService"?


yes
http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-membership.html


Thanks
Martin
--
Martin Knoblauch
email: k n o b i AT knobisoft DOT de
www:   http://www.knobisoft.de


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



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1375 / Virus Database: 1511/3673 - Release Date: 06/01/11





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



Re: Tomcat download stream gets broken

2011-05-19 Thread Filip Hanik - Dev Lists


Looks like the client disconnected, that is a fairly normal scenario.
You have to be able to handle the error if a client disconnects prior to having 
downloaded all the content

Filip

On 5/19/2011 8:46 AM, Gerardo Corro wrote:

Trying gmail


Hi all,

I have a file download servlet running on Tomcat, the code is


 public void service(HttpServletRequest request,
HttpServletResponse response) throws IOException {
 byte buf[] = new byte[1024 * 4];
 try {
 File file = new File(realFilename);
 int size = (int) file.length();
 BufferedInputStream realFile = new BufferedInputStream(new
FileInputStream(file));
 OutputStream out = response.getOutputStream();
 response.setContentLength(size);
 while (true) {
 int count = realFile.read(buf);
 if (count == -1) {
 break;
 }
 out.write(buf, 0, count);
 }
 out.flush();
 } catch (FileNotFoundException e) {
 logger.error("Stream download failed, file not found: " +
realFilename, e);
 response.sendError(404);
 } catch (Exception e) {
 logger.error("DownloadException:", e);
 }
 }

However once in a while I get an error that prevents files from being
downloaded:


DownloadException:  java.net.SocketException: Broken pipe
 at 
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:366)
 at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
 at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)
 at 
org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:392)
 at 
org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:381)
 at 
org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
 at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
 at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
 at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
 at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
 at 
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:113)
 at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.SocketException: Broken pipe
 at java.net.SocketOutputStream.socketWrite0(Native Method)
 at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
 at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
 at 
org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:750)
 at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
 at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)
 at 
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:773)
 at 
org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)
 at 
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:583)
 at org.apache.coyote.Response.doWrite(Response.java:560)
 at 
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:361)
 ... 23 more

How can I prevent such an error?

Thanks!!!

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



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1321 / Virus Database: 1500/3646 - Release Date: 05/18/11





-
To unsubscribe, 

Re: How to close all connections in a Tomcat container db connection pool?

2011-05-16 Thread Filip Hanik - Dev Lists

in Tomcat 7 (not sure if backported to 6), you configure a



Filip



On 5/11/2011 7:55 AM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dale,

On 5/10/2011 7:24 PM, Dale Ogilvie wrote:

The cause of the error was the db admin patching a db package underlying
one used by our web-app. Post patch all the packages appeared valid to
the admin, but not to our app using db connections established prior to
the db patching.

Looks like the Oracle connection caches some of that metadata. Maybe
your dba shouldn't mess with that kind of stuff while the application is
running :)


Is there any way to tell the running Tomcat to clean out the connection
pool, so that it throws away all the established connections, and
establishes new ones for the applications. I don't really want to have
to stop all the applications on our server to deal with this sort of
issue.

You'll have to basically reach-into the JNDI context, pull-out the
DataSource object, cross your fingers and cast it to some "known" object
type (like org.apache.tomcat.dbcp.dbcp.BasicDataSource) and then call
methods on that Tomcat-specific class.

You could call the "close" method on that class, but I suspect you'll
end up with an empty, useless pool at that point. It's possible that the
pool will re-initialize itself when you call getConnection but you'll
have to check that out for yourself.

You could also look into using JMX, but you'll have to poke around
looking for the key for your DataSource and then I don't have any idea
what actions are available... YMMV.

Maybe there's a method on the Oracle-specific connection object(s) that
you can use to flush all the metadata. You might want to look into that,
too.

Finally, if you use a webapp-specific DataSource (that is, not a
"global" one) and you properly close the DataSource when the webapp
shuts down, a new one should be created for your when the new instance
of the webapp launches.

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

iEYEARECAAYFAk3KlV8ACgkQ9CaO5/Lv0PCLcQCgt5X+2GBrQpIaHSY+nYwFZZrp
QsYAnjQTGHKiwGNTrdkBkRkHbwPebosE
=Z1eH
-END PGP SIGNATURE-

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



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1321 / Virus Database: 1500/3629 - Release Date: 05/10/11





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



Re: Connection pool race condition

2011-04-28 Thread Filip Hanik - Dev Lists
There is another solution that should work, and that is to define initialSize="0" so that no attempt is made to contact the DB when it is 
created. Then set testOnBorrow="true"


The jdbc-pool project should work like this
http://people.apache.org/~fhanik/jdbc-pool/

Filip

On 4/28/2011 1:58 PM, Filip Hanik - Dev Lists wrote:

this is the way to go, just setup a service dependency



On 4/28/2011 7:36 AM, Peter Crowther wrote:

You could use Windows' service dependency management (
http://support.microsoft.com/kb/193888) to start Tomcat only after Oracle
reports that it's running.  This might still cause problems if Oracle does
the same as SQL Server and continues recovering after its "official" startup
has finished.  In that case, I'd try to write a small service that polled
Oracle every few seconds till it started, then reported itself as started,
and make Tomcat dependent on that.  Service creation in Windows isn't too
hard, but it's another moving part to support!

- Peter

On 27 April 2011 21:18, chris derham  wrote:


All,

So we have various tomcat services setup on windows. When windows updates
are auto installed, sometimes they force a reboot of the server. When this
happens, the tomcats win the race with the database (Oracle) to startup.
Then the connection pool can't start, and then the war file is flagged as
shutdown. We have tried to make the tomcat services dependent on the oracle
service (both db service and tns listener), but same happens. Just tried to
turn the connection pool initial size down to zero, but the app fetches
some
config at startup. I guess we could recode to lazily fetch this upon first
access. Just curious if anyone has hit this, and if there is a way to delay
the tomcat service startup.

Tomcat 7.0.12
Windows server 2008 r2 64 bit


java -version

java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)

We have connection pool setup in catalina_base\conf\context.xml




27-Apr-2011 19:48:22 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
27-Apr-2011 19:48:31 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'dispatcher'
27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log
INFO: Destroying Spring FrameworkServlet 'dispatcher'
27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log
INFO: Shutting down log4j
27-Apr-2011 20:25:36 org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of
class liquibase.integration.servlet.LiquibaseServletListener
java.lang.RuntimeException: javax.naming.NamingException: Cannot create
PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in
progress
)
at

liquibase.integration.servlet.LiquibaseServletListener.contextInitialized(LiquibaseServletListener.java:159)
at

org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at

java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.naming.NamingException: Cannot create
PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in
progress
)
at org.apache.naming.NamingContext.lookup(NamingContext.java:843)
at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
at javax.naming.InitialContext.lookup(InitialContext.java:392)

Thanks

Chris




-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1209 / Virus Database: 1500/3601 - Release Date: 04/27/11



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

Re: Connection pool race condition

2011-04-28 Thread Filip Hanik - Dev Lists

this is the way to go, just setup a service dependency



On 4/28/2011 7:36 AM, Peter Crowther wrote:

You could use Windows' service dependency management (
http://support.microsoft.com/kb/193888) to start Tomcat only after Oracle
reports that it's running.  This might still cause problems if Oracle does
the same as SQL Server and continues recovering after its "official" startup
has finished.  In that case, I'd try to write a small service that polled
Oracle every few seconds till it started, then reported itself as started,
and make Tomcat dependent on that.  Service creation in Windows isn't too
hard, but it's another moving part to support!

- Peter

On 27 April 2011 21:18, chris derham  wrote:


All,

So we have various tomcat services setup on windows. When windows updates
are auto installed, sometimes they force a reboot of the server. When this
happens, the tomcats win the race with the database (Oracle) to startup.
Then the connection pool can't start, and then the war file is flagged as
shutdown. We have tried to make the tomcat services dependent on the oracle
service (both db service and tns listener), but same happens. Just tried to
turn the connection pool initial size down to zero, but the app fetches
some
config at startup. I guess we could recode to lazily fetch this upon first
access. Just curious if anyone has hit this, and if there is a way to delay
the tomcat service startup.

Tomcat 7.0.12
Windows server 2008 r2 64 bit


java -version

java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)

We have connection pool setup in catalina_base\conf\context.xml




27-Apr-2011 19:48:22 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
27-Apr-2011 19:48:31 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'dispatcher'
27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log
INFO: Destroying Spring FrameworkServlet 'dispatcher'
27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log
INFO: Shutting down log4j
27-Apr-2011 20:25:36 org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of
class liquibase.integration.servlet.LiquibaseServletListener
java.lang.RuntimeException: javax.naming.NamingException: Cannot create
PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in
progress
)
at

liquibase.integration.servlet.LiquibaseServletListener.contextInitialized(LiquibaseServletListener.java:159)
at

org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at

java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.naming.NamingException: Cannot create
PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in
progress
)
at org.apache.naming.NamingContext.lookup(NamingContext.java:843)
at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
at javax.naming.InitialContext.lookup(InitialContext.java:392)

Thanks

Chris




-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1209 / Virus Database: 1500/3601 - Release Date: 04/27/11



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



Re: Why can't Tomcat find class org.apache.tomcat.jdbc.pool DataSourceFactory?

2011-04-20 Thread Filip Hanik - Dev Lists

download tomcat-jdbc.jar from
http://people.apache.org/~fhanik/jdbc-pool/
and put it in your lib directory
Filip

On 4/20/2011 7:38 AM, dunnlow wrote:

So, I'm investigating moving away from an oracleconnectionpool and using the
tomcat connection pool.  I followed the myriad of examples for configuring
the Resource in the server.xml.  Found great info here
(http://people.apache.org/~fhanik/tomcat/jdbc-pool.html) However, when I
start tomcat, I get the following error:

javax.naming.NamingException: Could not load resource factory class [Root
exception is java.lang.ClassNotFoundException: org.apache.tomcat.jdbc.pool
DataSourceFactory]

I'm using Tomcat 6.0

My config in server.xml is


I get it, tomcat can't find the class.  But WHY?  I don't see anything in
the documentation about adding extra .jar files.  I've looked in the distrib
and can find the golden .jar anyway.

Can anyone tell me what I am doing wrong?

Thanks!



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



Re: HttpSessionActivationListener sessionDidActivate not getting called

2011-04-08 Thread Filip Hanik - Dev Lists

did any data actually get written to

/shared/httpd/tomcat_sessions

It could be that there is a permission problem

best
Filip



On 4/8/2011 1:20 PM, Aggarwal, Ajay wrote:

I enabled logging, created 1 session and restarted tomcat. This is what
I see in the logs. Is there anything suspicious here?

Why are there multiple attempts to persist sessions? Is it one per
application? One thing that has changed is now I have multiple
applications. And the path "/shared/httpd/tomcat_sessions" for
persistence is configured in {TOMCAT_BASE}/conf/context.xml, which means
it applies to all apps. So perhaps my 1st app is persisting the session
ok. But 2nd app that has no sessions is overriding the session
persistence file.

I will try by moving this configuration to the application where I
really need this functionality.

Meanwhile can anybody, familiar with this code, validate my theory?

--- while stopping
DEBUG [main] 2011-04-08 15:05:37,352
org.apache.catalina.session.ManagerBase - Stopping
DEBUG [main] 2011-04-08 15:05:37,352
org.apache.catalina.session.ManagerBase - Unloading persisted sessions
DEBUG [main] 2011-04-08 15:05:37,352
org.apache.catalina.session.ManagerBase - Saving persisted sessions to
/shared/httpd/tomcat_sessions
DEBUG [main] 2011-04-08 15:05:37,353
org.apache.catalina.session.ManagerBase - Unloading 1 sessions
DEBUG [main] 2011-04-08 15:05:37,359
org.apache.catalina.session.ManagerBase - Expiring 1 persisted sessions
DEBUG [main] 2011-04-08 15:05:37,359
org.apache.catalina.session.ManagerBase - Unloading complete
DEBUG [main] 2011-04-08 15:05:37,590
org.apache.catalina.session.ManagerBase - Stopping
DEBUG [main] 2011-04-08 15:05:37,590
org.apache.catalina.session.ManagerBase - Unloading persisted sessions
DEBUG [main] 2011-04-08 15:05:37,590
org.apache.catalina.session.ManagerBase - Saving persisted sessions to
/shared/httpd/tomcat_sessions
DEBUG [main] 2011-04-08 15:05:37,590
org.apache.catalina.session.ManagerBase - Unloading 0 sessions
DEBUG [main] 2011-04-08 15:05:37,590
org.apache.catalina.session.ManagerBase - Expiring 0 persisted sessions
DEBUG [main] 2011-04-08 15:05:37,590
org.apache.catalina.session.ManagerBase - Unloading complete
DEBUG [main] 2011-04-08 15:05:37,597
org.apache.catalina.session.ManagerBase - Stopping

--- restarting 
DEBUG [main] 2011-04-08 15:05:40,463
org.apache.catalina.session.ManagerBase - Start: Loading persisted
sessions
DEBUG [main] 2011-04-08 15:05:40,464
org.apache.catalina.session.ManagerBase - Loading persisted sessions
from /shared/httpd/tomcat_sessions
DEBUG [main] 2011-04-08 15:05:40,464
org.apache.catalina.session.ManagerBase - Creating custom object input
stream for class loader
DEBUG [main] 2011-04-08 15:05:40,470
org.apache.catalina.session.ManagerBase - Loading 0 persisted sessions

-Original Message-
From: Aggarwal, Ajay [mailto:ajay.aggar...@stratus.com]

That's the first thing I thought too. However I don't see anything in
the logs to indicate this. Also when sessionWillPassivate() is called I
am logging all session attributes to make sure there is nothing non
serializable there.


-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]


From: Aggarwal, Ajay [mailto:ajay.aggar...@stratus.com]
Subject: HttpSessionActivationListener sessionDidActivate not getting

called


Lately I am seeing that sessionDidActivate() does not get called upon
tomcat restart, even though sessionWillPassivate() is called. Also

even

though sessionWillPassivate() is called, I don't see the session
persistence file being created (the one that I specified in
conf/context.xml  ).

Perhaps you are now storing something in the session that is not
serializable.  I would expect some log entries indicating such if that's
the case.

  - Chuck


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



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1209 / Virus Database: 1500/3559 - Release Date: 04/08/11






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



Re: Trouble with jdbc drivers in TC 7

2011-04-07 Thread Filip Hanik - Dev Lists

The config has changed from





to

System:  Windows Server 2008 R2 Standard (64-bit)
JRE:  1.6.0_24 x64
TC:  7.0.11, installed in c:\Program Files\..., so it detected an x64 
installation
DB:  Sybase ASA 9.0.2.3951, x64 version

DB server and TC are both installed on this same machine.

I'm trying to port my app from tc 5.5.something late, to 7.0, and can't get my 
app to find the driver class.  It all works fine under TC 5.5.

All my database pooling is done in the application, so I thought putting the jodbc.jar in the WEB-INF/lib of the app would work with no 
need to edit my configuration files, but I'm still getting the class not found error below.  I have also tried moving jodbc.jar to 
%catalina_home%/lib, but that didn't help either.


RtData64 is the 64-bit ODBC DSN, which test ok in ODBC admin.  I have opened jodbc.jar to be sure it has ianywhere.ml.jdbcodbc.IDriver 
inside it.


Am I missing some configuration requirements?  I can't find anything in the online docs that would indicate I need to do anything, since 
I'm not having TC handle the connection pooling.


Dave


Thu Apr 07 12:09:56 EDT 2011:  Exception in class: com.wra.websira.WraAdmin, Msg: 'Initialization', Exception: 
java.lang.ClassNotFoundException: ianywhere.ml.jdbcodbc.IDriver
Thu Apr 07 12:09:56 EDT 2011:  Exception in class: com.wra.websira.WraJdbc, Msg: 'Creating database: RtData64', Exception: 
java.lang.ClassNotFoundException: ianywhere.ml.jdbcodbc.IDriver

java.lang.ClassNotFoundException: ianywhere.ml.jdbcodbc.IDriver
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.wra.websira.WraDatabase.open(WraDatabase.java:64)
at com.wra.websira.WraJdbc.(WraJdbc.java:46)
at com.wra.websira.WraAdmin.init(WraAdmin.java:257)
at com.wra.websira.WraAdmin.validateUser(WraAdmin.java:594)
at com.wra.websira.WraAdmin.validateUser(WraAdmin.java:451)
at eddsrv.LoginBean.verifyUser(LoginBean.java:41)
at org.apache.jsp.Login_jsp._jspService(Login_jsp.java:144)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394)
at 
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:284)
at 
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:322)
at 
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1714)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)



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



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1209 / Virus Database: 1500/3557 - Release Date: 04/07/11





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



Re: No access log for AJP traffic

2011-04-06 Thread Filip Hanik - Dev Lists

The logging now takes place in the CoyoteAdapter
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?r1=1086351&r2=1086352&;

Filip

On 4/6/2011 2:26 PM, Filip Hanik - Dev Lists wrote:

Tomcat 6
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java?annotate=1030188
Look at the invoke() method, it logs the data


Tomcat 7
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?view=annotate
Look at the invoke() method, it does nothing :)

It seems to have happened here
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?r1=1059547&r2=1059548&;

Filip

On 4/6/2011 1:50 PM, Chris Dumoulin wrote:

In looking into this further, it appears that the difference isn't in HTTP vs 
AJP, the difference is in async vs synchronous.

The AJP traffic was carrying requests that were being processed asynchronously in Tomcat. If I switch to using the HTTP connector for 
this same traffic I still don't see anything in the access log. Other requests that are being processed synchronously are showing up in 
the access logs.


I'm starting to step through the Tomcat code now, but any thoughts on this 
would be appreciated.

- Chris

On April 6, 2011 03:31:18 pm Chris Dumoulin wrote:
Thanks for your response Andre. I'm using AJP between Tomcat and Nginx using this Nginx module: 
https://github.com/yaoweibin/nginx_ajp_module

There is definitely AJP traffic, it's just not showing up in the access log.

- Chris

On April 6, 2011 03:24:38 pm André Warnier wrote:

Chris Dumoulin wrote:

I'm using tomcat 7.0.11 with the following Connector and Host elements in 
server.xml:





prefix="localhost_access_log." resolveHosts="false" suffix=".txt"/>





In the access log I'm seeing the HTTP traffic on port 8080 but not the AJP traffic on port 8009. I've googled around and I don't see 
any mention of specific Valve settings for AJP.


Any ideas?


And are you expecting traffic on the AJP Connector ?
For traffic to show up there, some client would need to connect to your server 
on port
8009.  Is there anything that connects to that port ?

If not, then there is nothing to worry about, and you could even comment-out 
that
, since it will never be used.
Like :



The AJP Connector is used in scenarios where there is another webserver used as 
a
front-end to Tomcat, and this other webserver, to pass requests to Tomcat, uses 
the AJP
protocol.  For example, a configuration like this one :

browser<-->  Apache httpd server<->  Tomcat
 + mod_jk module
  OR + mod_proxy_ajp module

or

browser<-->  IIS webserver<->  Tomcat
   + isapi_redirect module

If you do not use such a configuration, or you do not understand what this is 
all about,
then you don't need the AJP  in Tomcat.


-
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



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1209 / Virus Database: 1500/3555 - Release Date: 04/06/11






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



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1209 / Virus Database: 1500/3555 - Release Date: 04/06/11





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



Re: No access log for AJP traffic

2011-04-06 Thread Filip Hanik - Dev Lists

Tomcat 6
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java?annotate=1030188
Look at the invoke() method, it logs the data


Tomcat 7
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?view=annotate
Look at the invoke() method, it does nothing :)

It seems to have happened here
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?r1=1059547&r2=1059548&;

Filip

On 4/6/2011 1:50 PM, Chris Dumoulin wrote:

In looking into this further, it appears that the difference isn't in HTTP vs 
AJP, the difference is in async vs synchronous.

The AJP traffic was carrying requests that were being processed asynchronously 
in Tomcat. If I switch to using the HTTP connector for this same traffic I 
still don't see anything in the access log. Other requests that are being 
processed synchronously are showing up in the access logs.

I'm starting to step through the Tomcat code now, but any thoughts on this 
would be appreciated.

- Chris

On April 6, 2011 03:31:18 pm Chris Dumoulin wrote:

Thanks for your response Andre. I'm using AJP between Tomcat and Nginx using 
this Nginx module: https://github.com/yaoweibin/nginx_ajp_module
There is definitely AJP traffic, it's just not showing up in the access log.

- Chris

On April 6, 2011 03:24:38 pm André Warnier wrote:

Chris Dumoulin wrote:

I'm using tomcat 7.0.11 with the following Connector and Host elements in 
server.xml:





 
 
 


In the access log I'm seeing the HTTP traffic on port 8080 but not the AJP 
traffic on port 8009. I've googled around and I don't see any mention of 
specific Valve settings for AJP.

Any ideas?


And are you expecting traffic on the AJP Connector ?
For traffic to show up there, some client would need to connect to your server 
on port
8009.  Is there anything that connects to that port ?

If not, then there is nothing to worry about, and you could even comment-out 
that
, since it will never be used.
Like :



The AJP Connector is used in scenarios where there is another webserver used as 
a
front-end to Tomcat, and this other webserver, to pass requests to Tomcat, uses 
the AJP
protocol.  For example, a configuration like this one :

browser<-->  Apache httpd server<->  Tomcat
 + mod_jk module
  OR + mod_proxy_ajp module

or

browser<-->  IIS webserver<->  Tomcat
   + isapi_redirect module

If you do not use such a configuration, or you do not understand what this is 
all about,
then you don't need the AJP  in Tomcat.


-
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



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1209 / Virus Database: 1500/3555 - Release Date: 04/06/11






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



Re: JDBC Pool Disconnections

2011-04-06 Thread Filip Hanik - Dev Lists

On 4/6/2011 1:54 PM, הילה wrote:

I wanted to add the last string as well, but they said to forget about it..

:] and they should know best
however, if disconnections will continue (there are some right now) I'll try
it anyway

as for the connection validation = you said that if the DB closes a
connection (why does it happen? can I prevent it?)
most common is that the DB times out an idle connection. A pool holds a connection open, the connection is not being used and the DB times 
it out. there are many examples, same thing if there is a network glitch, or the db is restarted.




than the pool is checking
if the connection is open and working. and if not? i the DB closed the
connection and it's not usable.. then what does the pool do?

if the pool doesn't check, then it doesn't do anything.
if the pool check (testOnBorrow=true) and the test fails, it closes the old 
connection and opens a new one.

Filip


2011/4/6 Filip Hanik - Dev Lists


validate == connection is open and working

if they are worried about performance, there is a compromise that gets you
best of both worlds


testOnBorrow="true"
validationQuery="select 1"
validationInterval="3"

this ensures that in a high concurrency environment, the number of
validations are limited

Filip




On 4/6/2011 1:36 PM, הילה wrote:


I wanted to add it, bu the company that developed the application that
runs

on the tomcat, says that it affect performance and has issues.

what do you mean "validates it"? what does it do, exactly?

Thanks
Hila


2011/4/6 Filip Hanik - Dev Lists

  On 4/5/2011 7:31 AM, הילה wrote:

  name="jdbc/com/vstechnology/appname

scope="Shareable"
type="javax.sql.Datasource"


url="jdbc:jtds:sqlserver://SQLServerName:1433/DBname;useCursors=false;sendStringParametersAsUnicode=false"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
maxActive="200"
minIdle="0"
maxIdle="10"
maxWait="1"
initialSize="20"
driverClassName="net.sourceforge.jtds.jdbc.Driver"

  Add in

testOnBorrow="true"
validationQuery="select 1"

this ensures that if the DB closes a connection, the pool validates it

best
Filip

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




-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1209 / Virus Database: 1500/3555 - Release Date: 04/06/11



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





-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1209 / Virus Database: 1500/3555 - Release Date: 04/06/11




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



Re: JDBC Pool Disconnections

2011-04-06 Thread Filip Hanik - Dev Lists

validate == connection is open and working

if they are worried about performance, there is a compromise that gets you best 
of both worlds

testOnBorrow="true"
validationQuery="select 1"
validationInterval="3"

this ensures that in a high concurrency environment, the number of validations 
are limited

Filip



On 4/6/2011 1:36 PM, הילה wrote:

I wanted to add it, bu the company that developed the application that runs

on the tomcat, says that it affect performance and has issues.

what do you mean "validates it"? what does it do, exactly?

Thanks
Hila


2011/4/6 Filip Hanik - Dev Lists


On 4/5/2011 7:31 AM, הילה wrote:


name="jdbc/com/vstechnology/appname
scope="Shareable"
type="javax.sql.Datasource"

url="jdbc:jtds:sqlserver://SQLServerName:1433/DBname;useCursors=false;sendStringParametersAsUnicode=false"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
maxActive="200"
minIdle="0"
maxIdle="10"
maxWait="1"
initialSize="20"
driverClassName="net.sourceforge.jtds.jdbc.Driver"


Add in

testOnBorrow="true"
validationQuery="select 1"

this ensures that if the DB closes a connection, the pool validates it

best
Filip

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





-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1209 / Virus Database: 1500/3555 - Release Date: 04/06/11




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



Re: TomcatCluster data replication

2011-04-06 Thread Filip Hanik - Dev Lists

On 4/6/2011 1:22 PM, Jürgen Jakobitsch wrote:

hi,

i'm in need of data replication in a tomcat-cluster.
i set up a tomcat cluster of three tomcats on a single machine with a apache 
(mod_jk) front that does the load balacing.
everything works absolutely charming for reading requests, my trouble start 
with data input.

what i'm trying to achieve is that if i submit data with a html form, the 
storage on all cluster members needs to be updated.
i'm using an openrdf's sesame triple store which locks it's data directory so i 
can't simply use a single shared directory
in my application.


sounds like a limitation of sesame. Use some other noSQL data store and you 
wont have this issue

best
Filip


what i have in mind, after first readings, is some sort of clustervalve that 
checks, if a request is a POST request and if
yes, sends this request (which updates the repository in the back) to all 
members of the cluster.

so here would be my questions :

1. is there a standard way of doing something like (which a not-clusterable 
data-backend)
2. is the thing with the clustervalve in fact the correct starting point

any help or pointer to the right direction greatly appreciated

wkr turnguard.com/turnguard




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



Re: JDBC Pool Disconnections

2011-04-06 Thread Filip Hanik - Dev Lists

On 4/5/2011 7:31 AM, הילה wrote:

name="jdbc/com/vstechnology/appname
scope="Shareable"
type="javax.sql.Datasource"
url="jdbc:jtds:sqlserver://SQLServerName:1433/DBname;useCursors=false;sendStringParametersAsUnicode=false"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
maxActive="200"
minIdle="0"
maxIdle="10"
maxWait="1"
initialSize="20"
driverClassName="net.sourceforge.jtds.jdbc.Driver"

Add in

testOnBorrow="true"
validationQuery="select 1"

this ensures that if the DB closes a connection, the pool validates it

best
Filip

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



Re: Tomcat hardware requirments

2011-04-05 Thread Filip Hanik - Dev Lists

On 4/5/2011 10:46 AM, bfackrell wrote:

What are the hardware requirements for Tomcat 7?  I looked (Google and on the
Apache website)

I’m just finishing a college course that taught Java technologies that
interact with Tomcat but I want to know more so I’ve decided to try to build
my own Tomcat server from scrap computer parts that I have.  The first thing
I need to know is: Will my junk even run Tomcat 7?
The chance that your "junk" will run Tomcat 7 is very high. Tomcat has a very small foot print as an application server. Most of the memory 
and CPU requirements come from the application itself


Filip


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



Re: Tomcat 6.0.32, Http11NioProtocol and log poll

2011-03-29 Thread Filip Hanik - Dev Lists

On 3/21/2011 10:55 AM, ar...@bca-group.com wrote:

I don't think I do this but I'm double-checking. Thanks.

After writing to the OutputStream, should I just close the OutputStream
which seems to generate a CometEvent.CLOSE or explicitly call
event.close() after closing the stream?

yes, explicitly call event.close

Filip

Thanks, Adam




"Caldarale, Charles R"
21/03/2011 15:47
Please respond to
"Tomcat Users List"


To
Tomcat Users List
cc

Subject
RE: Tomcat 6.0.32,  Http11NioProtocol and log poll







From: ar...@bca-group.com [mailto:ar...@bca-group.com]
Subject: Tomcat 6.0.32, Http11NioProtocol and log poll
Occasionally (like 0.1% of the time), when another web page
in a second frame reloads (Independent JSP generated from
SpringController in same container) the page loads with what
appears to be the byte stream for the applet

This is pretty much always caused by an application coding error: keeping
request information at the wrong scoping level.  For example, if you save
anything about a specific request as a session attribute, other requests
may accidentally use it or overwrite it, causing this kind of confusing.
Keeping request-specific information in static fields is another typical
example.

Nothing absolutely rules out a Tomcat bug, but the odds are against it.

  - 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



This email and any attachments to it may contain confidential information 
intended
for the addressee only. If you are not the intended addressee, you are strictly
prohibited from disclosing, copying, distributing or using this email in any 
way.
Unauthorised use of the information contained in this email is unlawful. If you 
have
received this email in error please notify us on enquir...@bca-group.com and 
delete
the email from your system.

Information contained in this email can not be disclosed, copied, distributed 
or used
in any way without the prior consent of the sender. Any opinions, advice or 
facts
given in this email are given without warranty or the intention to enter into an
agreement unless specifically stated and confirmed by agreement, letter or such 
other
documentation signed by an authorised signatory of BCA Holdings Limited or any 
of its
subsidiary companies.

Any personal information contained in this email is strictly the view of the 
sender
and is in no way authorised or attributable to BCA Holdings Limited or any of 
its
subsidiary companies in any way. All emails through the company gateway are 
subject
to monitoring. The company cannot be held liable for any errors or viruses 
contained
in this message.

BCA (438886) Headway House, Crosby Way, Farnham, Surrey GU9 7XG, England
VAT registration number: GB 188 1552 38

#
This e-mail message has been scanned for Viruses and Content and cleared
by NetIQ MailMarshal
#



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1204 / Virus Database: 1498/3520 - Release Date: 03/21/11



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



Re: What is the right way to redirect http to https with tomcat 7 ?

2011-03-14 Thread Filip Hanik - Dev Lists

On 3/14/2011 3:46 PM, János Löbb wrote:

Hi,

I set up ssl using the JAVA_HOME/bin/keytool on OSX 10.6.6 - JSSE type 
configuration with a self-signed certificate.  Modified server.xml to include a 
connector:

 

anything else is the default, out of box.

Where should I configure and how that when I hit

http://localhost:8080

it should redirect to

https://localhost:8443


make sure your connector 8080 has redirectPort="8443" in it, then in 
/conf/web.xml define a constraint, transport/confidential



Everything is https
/*



CONFIDENTIAL






??

That is I do not want it to be web app specific, I want to have this behavior 
by default.   I am not using httpd or mod_jk at this time and do not want to 
use if I can avoid them.

Should I also add SSLEngine="on" ??


Thanks ahead,

János
P.S.  I looked the list from 2008 and see nothing in this regard.
-
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: Cleaning up after tomcat jdbc-pool?

2011-03-09 Thread Filip Hanik - Dev Lists

On 03/07/2011 06:46 PM, Nicholas Sushkin wrote:

I don't think the default pool has any glaring leaks. However, your db may.
I have ran into cases when Oracle would run out of PGA memory, which cleared
with tomcat restart.

It may help to use connection validation feature of tomcat's new pool to
close connections that ran out of memory.
   


Look at the "maxAge" property in
http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html

it is created just to deal with the database sessions that have memory 
leaks, and the leak is somewhat predictable timing wise


best
Filip


Don't know if such a scenario has been tested. I am curious to hear.

On Mar 7, 2011 10:46 AM, "הילה"  wrote:

Thanks :]
Let's see if it'll somewhat help with the memory leak, or with memory
management at all


2011/3/7 Filip Hanik - Dev Lists


   

On 3/7/2011 3:48 AM, Mark Thomas wrote:

 

On 07/03/2011 10:39, הילה wrote:

   

I found this...
 
   



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



Re: SSL on Apache 6.0.18 troubles

2011-03-08 Thread Filip Hanik - Dev Lists

add

SSLEnabled="true"

to your connector

Filip

On 3/8/2011 12:20 PM, Jacob Nyhart wrote:

I am running Apache version 6.0.18 on a Windows 2003 server. Cannot go to
6.0.29 yet because of vendor/client requirements.



I am attempting to setup SSL, but am not having any success and so I seek
your help.



My connector in my settings.xml file looks like this:



   



The pfx file was generated by exporting my certificate from the IIS on the
same server. That cert was generated from our company’s internal CA (lower
level environment).



Now, here’s the problem…  If I call my app like this:  http://domain:8080
-- it works

If I call my app like this:  http://domain:443 – it works, but I don’t
suspect this is SSL traffic since the browser doesn’t present any indication
the traffic is secure.

If I call my app like this: https://domain – it fails – reporting that IE
cannot display the page. (the file being called is a *jsp file).



The server is inside a firewalled DMZ, and I have confirmed with my network

guys that the rule is open. In addition, I have tested this from the server

itself, so firewall rules should not be an issue.



The STDOut.log file and Windows Event Viewers are giving no indications as
to what the problem is, the Tomcat appears to start fine, and APorts shows
that Tomcat6 is listening on port 443.



Any help would be appreciated.




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



Re: Cleaning up after tomcat jdbc-pool?

2011-03-07 Thread Filip Hanik - Dev Lists

On 3/7/2011 3:48 AM, Mark Thomas wrote:

On 07/03/2011 10:39, הילה wrote:

I found this
http://people.apache.org/~fhanik/tomcat/jdbc-pool.html
that I see that it suits for tomcat 6 as well
but I can't find tomcat-jdbc.jar for download, and I understood I need it to
use the new pool.
from where can I download it?

You can download the iteration builds from
http://people.apache.org/~fhanik/jdbc-pool/

That site has the latest doc as well

Filip


There is no download since that component has never been released. If
you want to experiment with it then you'll need to build it from source.

Mark


Thanks
Hila

בתאריך 7 במרס 2011 12:28, מאת הילה:


So it's only for use on Tomcat 7?
I have installed tomcat 6.0.29


2011/3/7 Olivier Lefevre

On 3/7/2011 8:00 AM, הילה wrote:

How do I know if I use the new pool?

just by specifying the
org.apache.tomcat.jdbc.pool.DataSourceFactory


AFAICT yes.


  what is the advantages of using the new pool?

in which cases should I use it?


See http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html
I guess that will be merged into the Tomcat docs eventually.

-- O.L.



-
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



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1204 / Virus Database: 1435/3486 - Release Date: 03/06/11





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



Re: Cleaning up after tomcat jdbc-pool?

2011-03-04 Thread Filip Hanik - Dev Lists

On 03/04/2011 02:04 PM, Olivier Lefevre wrote:

Thanks! But this:

factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"

is the default, I believe. Didn't you say you were using something else?
is not the default. org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory 
is default


Filip


-- O.L.


-
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: Cleaning up after tomcat jdbc-pool?

2011-03-03 Thread Filip Hanik - Dev Lists

On 3/3/2011 11:44 AM, Olivier Lefevre wrote:

On 3/3/2011 5:17 PM, Filip Hanik - Dev Lists wrote:

If it is configured in the application context, then this simply means
you forgot to call DataSource.close on the connection pool when your
web application is stopped.

This is confusing advice because javax.sql.DataSource
doesn't have a close() method.

In order to call close, one has to cast it to what ever the data source you are 
using.
That is why it's easier to define these types of resources as spring beans, 
since spring takes care of that for you

Also, I have this element in my webapp context.xml

   

and I don't get the error the OP reported. Are you both
talking about something else?

It will only start a thread if you have configured it to do clean up while 
running

Filip


Regards,

-- O.L.


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1204 / Virus Database: 1435/3479 - Release Date: 03/03/11





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



Re: Cleaning up after tomcat jdbc-pool?

2011-03-03 Thread Filip Hanik - Dev Lists

hi Nicholas,
where is your pool configured? In server.xml or in your application context?
If it is configured in server.xml, then this is a bug, the thread should have 
been created with the class loader from the pool itself.
If it is configured in the application context, then this simply means you forgot to call DataSource.close on the connection pool when your 
web application is stopped.


best
Filip


On 3/2/2011 8:32 PM, Nicholas Sushkin wrote:

Hi, Filip,

Is there a recommended way to clean up after the pool? I am getting the
following error message and I wonder if I need to add some code to prevent

memory leak.

2011-03-02 22:20:20,786 ERROR [http-8081-1]
org.apache.catalina.loader.WebappClassLoader - The web application [/…]
appears to have started a thread named [[Pool-Cleaner]:Tomcat Connection
Pool[19-2018147830]] but has failed to stop it. This is very likely to create
a memory leak.

Thanks.

ps. Also, thanks for offering to open a Bugzilla enhancement request for
setting password via JMX.



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



Re: Wildcard SSL import from IIS 6 to Tomcat 7?

2011-02-25 Thread Filip Hanik - Dev Lists

I would change

sslProtocol="PKCS12"

to

keystoreType="PKCS12"


On 02/25/2011 11:10 AM, Carlton Whitmore wrote:

Filip,
When I try to access https://www.disabilityrightstx.org:8443 I get the standard 
Page can't be displayed message.

Here is what I found in the Catalina logs:
Feb 25, 2011 9:53:00 AM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException:  Protocol handler initialization failed: 
java.io.IOException: PKCS12 SSLContext not available
at 
org.apache.catalina.connector.Connector.startInternal(Connector.java:868)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at 
org.apache.catalina.core.StandardService.startInternal(StandardService.java:437)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at 
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:648)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)




-Original Message-
From: Filip Hanik - Dev Lists [mailto:devli...@hanik.com]
Sent: Friday, February 25, 2011 11:59 AM
To: Tomcat Users List
Subject: Re: Wildcard SSL import from IIS 6 to Tomcat 7?

Define "not working". Do you get an error in the logs?

Filip

'On 02/25/2011 10:24 AM, Carlton Whitmore wrote:
   

I setup my SSL wildcard on IIS 6 and exported the cert file to some other IIS 
servers. Now I'd like to set it up on a Tomcat 7 server. This server already 
has a standard SSL cert running.

I tried these instructions, but couldn't get it working.

http://www.lazynetworkadmin.com/knowledgebase-mainmenu-6/2-windows/150-export-ssl-certificate-from-iis-and-import-into-tomcat

Here is the SSL section from my server.xml file:



Carlton.






 


-
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: Wildcard SSL import from IIS 6 to Tomcat 7?

2011-02-25 Thread Filip Hanik - Dev Lists

Define "not working". Do you get an error in the logs?

Filip

'On 02/25/2011 10:24 AM, Carlton Whitmore wrote:

I setup my SSL wildcard on IIS 6 and exported the cert file to some other IIS 
servers. Now I'd like to set it up on a Tomcat 7 server. This server already 
has a standard SSL cert running.

I tried these instructions, but couldn't get it working.

http://www.lazynetworkadmin.com/knowledgebase-mainmenu-6/2-windows/150-export-ssl-certificate-from-iis-and-import-into-tomcat

Here is the SSL section from my server.xml file:



Carlton.





   



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



Re: Exception in hibernate3 relating to timeout

2011-02-25 Thread Filip Hanik - Dev Lists
Use a different connection pool that can properly handle your timeouts 
when idle.

http://people.apache.org/~fhanik/jdbc-pool/
http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html

Filip

On 02/24/2011 11:31 PM, abhishek jain wrote:

hi,
I am not sure if i am ringing the correct list, but i am sure people here
must have encountered this problem. I am new to hibernate and when i ran the
code on server it was fine , strangely next day it keep on giving this error
till i restart tomcat.

The last packet successfully received from the server was 54,880,316
milliseconds ago.  The last packet sent successfully to the server was
54,880,317 milliseconds ago. is longer than the server configured value of
'wait_timeout'. You should consider either expiring and/or testing
connection validity before use in your application, increasing the server
configured values for client timeouts, or using the Connector/J connection
property 'autoReconnect=true' to avoid this problem.

I have searched a lot on net and added the following properties on
hibernate.cfg.xml, as people there were suggesting this,but of no use.


5
20
300
50
3000
thread



Pl. help me.
I have used hibernate3 with myeclipse as the development environment, and am
using mysql 5.x and centos (Linux) with Tomcat 5.x
   



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



  1   2   3   4   5   6   7   8   9   10   >