Re: Minor grammar glitch in a Websocket exception message.

2013-12-13 Thread Igor Urisman
Precisamente.


On Fri, Dec 13, 2013 at 3:11 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Mark,
>
> On 12/12/13, 4:43 PM, Mark Thomas wrote:
> > On 12/12/2013 06:35, Igor Urisman wrote:
> >> As seen in 8.0.0 RC5:
> >>
> >> java.lang.IllegalStateException:
> >> javax.websocket.DeploymentException: Multiple Endpoints may not
> >> be deployed to using the same path [/conntestCloseEndpoint]
> >>
> >> IMHO, the message can't make up its mind between "to the same
> >> path" and "using the same path".
> >
> > While I think the grammar of the original is technically OK
>
> Split infinitive? The original verb appears to be "to deployed"
> ("deployed-to") and used as if endpoints were deployed to something.
> Are they deployed /to/ a path, or /using/ a path? I'm guessing ...
> both. :)
>
> Perhaps the best phrasing is to say something like "Endpoint path
> [path] is already bound [other endpoint details?]".
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.15 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJSq5Q6AAoJEBzwKT+lPKRYL18P/A483rHy6sl7u1cmWkKgib/a
> f9JFddHLpKg+yzKegQ7bvJNmzEjjplGKqSGIV6EgKrsBEnezafEkVIp5uidc/5TH
> A0N+6go0N3O3GtnjjtrXivbVz+SMni09avXnz1T1RB6z0drN7JgYZ2SGfN+NDDIA
> /5eIpfinl4m/0cfZHfUVygy5U2liGLJ8a0bfrBLc1Oab4Tc0ZzzTcque/plnkjLu
> ICcGpWd6k6b1SdTpavLQXnz9aT/puVdvtmFPkMDMI7rSiUJbNJ+U15IPtPRwzmYC
> P8UM9jBYkf00yuxvSovGOEnC3FiUmOVULUlWgkV/5ipg0GldjpFBSblClQXQOhGT
> xsqcYfxW4LhqFCUMhVAeQHXmAw7c+/Pg/jEn6zh/NGIwQ6MfQiK7vEfZUKwg3YVj
> hIrPgJHXzPCenjV6lxdY9HD/xtt3azYdgEaw5w+K5cftn1LW2+X6/VhLyS51a97P
> NIWUv+zg+3Euy4eisfYDczMZdAr/gc4HsJioaboeC3EnatwC1qyGa1zCGyodg25R
> jR6l7tjiyDNpfbMmPTEF5ql/dOnCc378fbiBR2WngTLIa2I76VBkK1rpKcuvntSd
> NXst7kr1bW34y/jND3e7uzhZfPiZopPnmQ7biUX4AGQAg3FtoivRUNDVJqAqOXuh
> JX0SvUCE37b1XG4JWGRB
> =jLyk
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: high CPU usage with NIO and 1000+ websockets on Tomcat 7.0.49?

2013-12-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Bob,

On 12/13/13, 8:12 AM, Bob DeRemer wrote:
> Hi Mark (et al),

While Mark is one of the most likely to respond, please address your
questions only to the community at least at first ;)

> We’re seeing really high CPU utilization with just a 1000 active 
> websockets that are sending/receiving 100 byte binary messages.
> The profiling snippet below was with 1000 connections.  If we start
> to increase the number of connections, the time spent in the NIO
> logic starts to consume the majority of the processing.

For those trying to play-along at home (who haven't been keeping their
configuration up-to-date with yours), what is your current 
configuration?

How are you observing CPU usage? Do you have thread dumps and/or
profiling data you can share with us?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.15 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSq5W4AAoJEBzwKT+lPKRY5BcQAJFEinaGtvPUs+AyNkZ45Agf
go6esNq1xmKVejLq899KxeF+kPGfBUO3e8WO4abYiz5S1bd0Sqfo9I9i5h1EF7bg
HupcRlGKFrq3/YlCwe49QFkShk3CMCx6MtlWmoTbeL4ZNKkKQFDMbQDreJ3Gj8pd
pwkR8CFg/MvGPJWrhBRNOh9/mP+1tUfOizyLpr9qC9pPJ3X42IuocsFuhZ9uiGNv
gdOgfBI85XaIefuKWUlzTnqovozhQcLtpg3brsbhF6RxL92SYBE2aSPz53378B2H
/4KwnTkISJdLObm9/k1qxigQroJ0GOsaTpqoEYdhbNn9YYKovaKYM4c3hehS6QfA
wx1rwtN4j/t8T96W/Rp7UrL0uxmRwvs+QJB1lDWTD4+Cp0elsTgDU91K3b9r8I64
ZnG7Z4Kep2x23ybcnksMvgzQvQiUntaUY4Q44cF0FTw5S0+hCD8t7ov3mMl4IrHX
2y+rRkgylNi2wiDOI5XHPQB/UYG3FmDy9hSce68jqvmy9gGOBmt7kcKsxaVvRqaJ
WXX97SLL91gNbVZ0UY1X5N18C0X/Hr4p8LYJ6hDf8L4JAgO8wVGGjPrFY3GvHxXv
S+W3JOKqo9jCukWhdPTmxVGfWWEuvv3LoYZ3d0yaHdMvojq9bfMYW8rCU1+1x+HT
QOkC/NVl2a5doe3qCWwL
=wv12
-END PGP SIGNATURE-

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



Re: What if my database is unavailable at startup?

2013-12-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Dan,

On 12/13/13, 2:29 PM, Daniel Mikusa wrote:
> On Dec 13, 2013, at 2:24 PM, "Dames, Kristopher J"
>  wrote:
> 
>> Hi,
>> 
>> I use tomcat 6
> 
> Which version specifically?
> 
>> and have noticed if a database is not available when tomcat
>> starts, tomcat will not try to connect once the database becomes
>> available. Tomcat must be restarted to establish the database
>> connection. What are best practices regarding this? Is there a
>> way in tomcat to get it to automatically retry so I don't have to
>> restart tomcat? I use DBCP but am willing to try some other
>> pool.
> 
> Can you include the  tag for your connection pool?

Other important missing information:

1. What do you [Kris] expect to happen when the database becomes
available?

2. What actually happens when the database becomes available?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.15 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSq5T5AAoJEBzwKT+lPKRY1lgQAMUCI6sM7nFn5RZ0QsG58Lt2
SmJS98h/Grw0t58rQ78pXEVz68Jj3f/VAsky8a+6ENZOgu5DzskjNCpjq7S6jgsK
ZtgnAude7dsIlRrZi+DlD8oXPU0uo3f+SmA2redE7RZL6vXrVi3t2UUGZJGIOA/F
EgDhqZGP63O4JYHyk9JjwXKq6UVHZzYvjzzwp+4Nuf6n0AvOlFgUfqRI/TYyEhmt
0eH1/e0ZrpdXXyGBwVx5XdN/8PbhZGEVdhC6k/XdZTLwAHIRB3Y7a02QfovUA+jK
I1vJludiSA51ZafMPlCMQZHUXxOjk6joGMfYQ3y4wMSCRl/5mMIA9ETVzzi7C7HW
Ne8VQq3YmBmtmL34Ap/2Oof1hK5WWrDTNS7D+5bDTfq8ypr1ymZ2RJp+FNhkp+4C
p1cn10Rn23U1JbHEt55Exjp0mDOVbVMZpQzDgOX4JPeAREJa7czAS14FzPvHbLDR
CgobUVwBzjlG1/OLw4gVv+EjcvyFQIeA31+UT6YhHhWJvATiqHYoGTZKmEM2OMzO
IwAtUeasOKEIWulImMheckYaLPgp5Ce0BmUWGJ5RETbk8tmInRLGoZzxSKiSvQqC
YjJRYcfIzfFuGOhmShovRBm/8EvIUIg1IFhyRMb/BrR2IRf1IX+Cg+CCmHn9VgCL
6/Yqd8TBKp204ja8jwe7
=DgQm
-END PGP SIGNATURE-

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



Re: Minor grammar glitch in a Websocket exception message.

2013-12-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 12/12/13, 4:43 PM, Mark Thomas wrote:
> On 12/12/2013 06:35, Igor Urisman wrote:
>> As seen in 8.0.0 RC5:
>> 
>> java.lang.IllegalStateException:
>> javax.websocket.DeploymentException: Multiple Endpoints may not
>> be deployed to using the same path [/conntestCloseEndpoint]
>> 
>> IMHO, the message can't make up its mind between "to the same
>> path" and "using the same path".
> 
> While I think the grammar of the original is technically OK

Split infinitive? The original verb appears to be "to deployed"
("deployed-to") and used as if endpoints were deployed to something.
Are they deployed /to/ a path, or /using/ a path? I'm guessing ...
both. :)

Perhaps the best phrasing is to say something like "Endpoint path
[path] is already bound [other endpoint details?]".

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.15 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSq5Q6AAoJEBzwKT+lPKRYL18P/A483rHy6sl7u1cmWkKgib/a
f9JFddHLpKg+yzKegQ7bvJNmzEjjplGKqSGIV6EgKrsBEnezafEkVIp5uidc/5TH
A0N+6go0N3O3GtnjjtrXivbVz+SMni09avXnz1T1RB6z0drN7JgYZ2SGfN+NDDIA
/5eIpfinl4m/0cfZHfUVygy5U2liGLJ8a0bfrBLc1Oab4Tc0ZzzTcque/plnkjLu
ICcGpWd6k6b1SdTpavLQXnz9aT/puVdvtmFPkMDMI7rSiUJbNJ+U15IPtPRwzmYC
P8UM9jBYkf00yuxvSovGOEnC3FiUmOVULUlWgkV/5ipg0GldjpFBSblClQXQOhGT
xsqcYfxW4LhqFCUMhVAeQHXmAw7c+/Pg/jEn6zh/NGIwQ6MfQiK7vEfZUKwg3YVj
hIrPgJHXzPCenjV6lxdY9HD/xtt3azYdgEaw5w+K5cftn1LW2+X6/VhLyS51a97P
NIWUv+zg+3Euy4eisfYDczMZdAr/gc4HsJioaboeC3EnatwC1qyGa1zCGyodg25R
jR6l7tjiyDNpfbMmPTEF5ql/dOnCc378fbiBR2WngTLIa2I76VBkK1rpKcuvntSd
NXst7kr1bW34y/jND3e7uzhZfPiZopPnmQ7biUX4AGQAg3FtoivRUNDVJqAqOXuh
JX0SvUCE37b1XG4JWGRB
=jLyk
-END PGP SIGNATURE-

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



RE: What if my database is unavailable at startup?

2013-12-13 Thread Dames, Kristopher J
> can/should we assume that your URL is referencing a database on a different
> machine, same network/intranet/LAN?
>
> >  url="jdbc:oracle:thin:@x.y.com:1521:x"
>
> it seems as though OP is referencing a database somewhere on the 'internet'.

The database server is on the same network, different machine.


--
Kris D.


This email contains information which may be PROPRIETARY IN NATURE OR OTHERWISE 
PROTECTED BY LAW FROM DISCLOSURE and is intended only for the use of the 
addresses(s) named above.  If you have received this email in error, please 
contact the sender immediately.

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



Re: What if my database is unavailable at startup?

2013-12-13 Thread Howard W. Smith, Jr.
OP,

On Fri, Dec 13, 2013 at 2:24 PM, Dames, Kristopher J <
kristopher.da...@mercy.net> wrote:

> I use tomcat 6 and have noticed if a database is not available when tomcat
> starts, tomcat will not try to connect once the database becomes available.
> Tomcat must be restarted to establish the database connection. What are
> best practices regarding this? Is there a way in tomcat to get it to
> automatically retry so I don't have to restart tomcat? I use DBCP but am
> willing to try some other pool.


Barry,

On Fri, Dec 13, 2013 at 4:59 PM, Propes, Barry L wrote:

> I use DBCP and Oracle as well, and am also on Tomcat 6 - 6.0.26. Take a
> look at mine, as I have NO trouble with it, and see if you can configure it
> similarly with success. NOTE - remove those other two parameters that Jose
> mentions in a prior email.
>
>auth="Container"
> description="mytomcatapp"
> name="jdbc/myoracle"
> type="javax.sql.DataSource"
> driverClassName="oracle.jdbc.driver.OracleDriver"
> username="username"
> password="password"
> url="jdbc:oracle:thin:@cgnrdb1p:1648:SERVNAME"
> maxIdle="30"
> maxWait="1"
> maxActive="10"
> testOnBorrow="true"
> timeBetweenEvictionRunsMillis="-1"
> minEvictableIdleTimeMillis="28800"
> poolPreparedStatements="true"
> removeAbandoned="true"
> removeAbandonedTimeout="300"
> logAbandoned="false"/>
>

are you suggesting that your (or a correct(ed))  will solve the
problem stated in OP (above)?

can/should we assume that your URL is referencing a database on a different
machine, same network/intranet/LAN?

>  url="jdbc:oracle:thin:@x.y.com:1521:x"

it seems as though OP is referencing a database somewhere on the 'internet'.


RE: What if my database is unavailable at startup?

2013-12-13 Thread Propes, Barry L


-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, December 13, 2013 3:59 PM
To: Tomcat Users List
Subject: RE: What if my database is unavailable at startup?

> From: Propes, Barry L [mailto:barry.l.pro...@citi.com] 
> Subject: RE: What if my database is unavailable at startup?

> I've never heard of these or seen these attributes either. What are they for?

> maxOpenPreparedStatements="0"
> accessToUnderlyingConnectionAllowed="false"

You could look in the doc:
http://commons.apache.org/proper/commons-dbcp/configuration.html

 - Chuck


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




Good enough. Although I'm not the one experiencing the problem. Mine works 
quite well without those two.

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



RE: What if my database is unavailable at startup?

2013-12-13 Thread Propes, Barry L


-Original Message-
From: Dames, Kristopher J [mailto:kristopher.da...@mercy.net] 
Sent: Friday, December 13, 2013 1:39 PM
To: Tomcat Users List
Subject: RE: What if my database is unavailable at startup?

Daniel,

I use tomcat 6.0.32. Here is an example Resource tag:




I use DBCP and Oracle as well, and am also on Tomcat 6 - 6.0.26. Take a look at 
mine, as I have NO trouble with it, and see if you can configure it similarly 
with success. NOTE - remove those other two parameters that Jose mentions in a 
prior email.

  





This email contains information which may be PROPRIETARY IN NATURE OR OTHERWISE 
PROTECTED BY LAW FROM DISCLOSURE and is intended only for the use of the 
addresses(s) named above.  If you have received this email in error, please 
contact the sender immediately.

-
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: What if my database is unavailable at startup?

2013-12-13 Thread Caldarale, Charles R
> From: Propes, Barry L [mailto:barry.l.pro...@citi.com] 
> Subject: RE: What if my database is unavailable at startup?

> I've never heard of these or seen these attributes either. What are they for?

> maxOpenPreparedStatements="0"
> accessToUnderlyingConnectionAllowed="false"

You could look in the doc:
http://commons.apache.org/proper/commons-dbcp/configuration.html

 - Chuck


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


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



RE: What if my database is unavailable at startup?

2013-12-13 Thread Propes, Barry L
I've never heard of these or seen these attributes either. What are they for?

-Original Message-
From: Jose María Zaragoza [mailto:demablo...@gmail.com] 
Sent: Friday, December 13, 2013 2:10 PM
To: Tomcat Users List
Subject: Re: What if my database is unavailable at startup?

With testOnBorrow="true" ( I think that is the default value in Tomcat
6 ) + validationQuery="SELECT 1 FROM DUAL" , that should work

I've never used

maxOpenPreparedStatements="0"
accessToUnderlyingConnectionAllowed="false"

what are they for ?




-
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: LDPA Authentication Failure

2013-12-13 Thread Phill
Thanks, I have been staring at it for ages. The > is a massive typo.

I had the debug as it is included in lots of examples dated 2012+

I will remove it.

No wonder the changes I was making seemed to have no effect.

Sent from my iPad

On 13 Dec 2013, at 16:07, Cédric Couralet  wrote:

> 2013/12/13 Phill Perryman :
>> I have set up the following authentication to the ldap server. I can log
>> into this server using the LdapAdmin browser ok.
>> 
>> Running 7.0.34 (I think its 34 but I can't bring the server up at the
>> moment)
>> 
>> I am getting a stack trace
>> 
>> Dec 13, 2013 1:56:35 PM org.apache.catalina.realm.JNDIRealm open
>> WARNING: Exception performing authentication
>> javax.naming.CommunicationException: localhost:389 [Root exception is
>> java.net.ConnectException: Connection refused: connect]
>> at com.sun.jndi.ldap.Connection.(Unknown Source)
>> 
> 
> Does the authentication fail at the time of this warning? It may
> happen that the connection is finished on the ldap server when tomcat
> tries to authenticate the user, but tomcat should retry anyway after
> this message (which has an INFO level in recents versions)
> 
>> I am not connecting to local host so I don't understand the message. None
>> of the other files in conf have been touched.
>> 
>> I tried searching and found lots of references but no real solutions.
>> 
>> 
>>   > autoDeploy="true">
>> 
>> debug="99"
>> connectionName="cn=xxx,o=mitelinternet"
>> connectionPassword="xxx"
>> connectionURL="ldap://ottedev02.mitel.com:389";
>> alternateURL="ldap://ottedev02.mitel.com:389";
>> userPattern="uid={0},o=mitelinternet"
>> roleBase="o=mitelinternet"
>> roleSubtree="true"
>> roleSearch="(member={0})"
>> roleName="cn"
>> 
>> 
> 
> Is it really the definition that you have in server.xml or is a typo?
> As it is written, the Realm has no attribute which may explain the
> localhost in the message (default in JNDI).
> 
> May be you meant :
> .
>> > debug="99"
>> connectionName="cn=xxx,o=mitelinternet"
>> connectionPassword="xxx"
>> connectionURL="ldap://ottedev02.mitel.com:389";
>> alternateURL="ldap://ottedev02.mitel.com:389";
>> userPattern="uid={0},o=mitelinternet"
>> roleBase="o=mitelinternet"
>> roleSubtree="true"
>> roleSearch="(member={0})"
>> roleName="cn">
>> 
> 
> -
> 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: What if my database is unavailable at startup?

2013-12-13 Thread Jose María Zaragoza
2013/12/13 Dames, Kristopher J :
>> With testOnBorrow="true" ( I think that is the default value in Tomcat
>> 6 ) + validationQuery="SELECT 1 FROM DUAL" , that should work
>>
>
> So you are saying my configuration should work as-is to allow Tomcat to 
> create a database connection pool to a database that was unavailable when 
> Tomcat was started?


Yes , I do it and it works
But I dont use some parameters like maxOpenPreparedStatements ,
accessToUnderlyingConnectionAllowed
Furthermore, I use default values for testOnXXX
The others , at first sight, are similar


>
>
>
>> I've never used
>>
>> maxOpenPreparedStatements="0"
>> accessToUnderlyingConnectionAllowed="false"
>>
>> what are they for ?
>>
>
> maxOpenPreparedStatements: The maximum number of open statements that can be 
> allocated from the statement pool at the same time
> accessToUnderlyingConnectionAllowed: Allows the raw physical connection to 
> the database to be accessed by the webapp
>
> This email contains information which may be PROPRIETARY IN NATURE OR 
> OTHERWISE PROTECTED BY LAW FROM DISCLOSURE and is intended only for the use 
> of the addresses(s) named above.  If you have received this email in error, 
> please contact the sender immediately.
>
> -
> 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: What if my database is unavailable at startup?

2013-12-13 Thread Dames, Kristopher J
> With testOnBorrow="true" ( I think that is the default value in Tomcat
> 6 ) + validationQuery="SELECT 1 FROM DUAL" , that should work
> 

So you are saying my configuration should work as-is to allow Tomcat to create 
a database connection pool to a database that was unavailable when Tomcat was 
started?



> I've never used
> 
> maxOpenPreparedStatements="0"
> accessToUnderlyingConnectionAllowed="false"
> 
> what are they for ?
> 

maxOpenPreparedStatements: The maximum number of open statements that can be 
allocated from the statement pool at the same time
accessToUnderlyingConnectionAllowed: Allows the raw physical connection to the 
database to be accessed by the webapp

This email contains information which may be PROPRIETARY IN NATURE OR OTHERWISE 
PROTECTED BY LAW FROM DISCLOSURE and is intended only for the use of the 
addresses(s) named above.  If you have received this email in error, please 
contact the sender immediately.

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



Re: What if my database is unavailable at startup?

2013-12-13 Thread Daniel Mikusa
On Dec 13, 2013, at 2:39 PM, "Dames, Kristopher J"  
wrote:

> Daniel,

When you reply, please include the previous email and don't top post.  Post 
inline like me or at the bottom.  This helps with the readability of this 
thread and it's the convention that we follow on this list.

> 
> I use tomcat 6.0.32. Here is an example Resource tag:
> 
> accessToUnderlyingConnectionAllowed="false"
>auth="Container"
>defaultAutoCommit="true"
>defaultReadOnly="false" 
>defaultSchema="x"
>driverClassName="oracle.jdbc.driver.OracleDriver"
>factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
>initialSize="0" 
>logAbandoned="false" 
>maxActive="20"
>maxIdle="8" 
>maxOpenPreparedStatements="0" 
>maxWait="5000"
>minEvictableIdleTimeMillis="180" 
>minIdle="5"
>name="jdbc/x" 
>numTestsPerEvictionRun="3"
>password="x" 
>poolPreparedStatements="false"
>removeAbandoned="true" 
>removeAbandonedTimeout="300"
>testOnBorrow="true" 
>testOnReturn="false"
>testWhileIdle="true" 
>timeBetweenEvictionRunsMillis="180"
>type="javax.sql.DataSource"
>url="jdbc:oracle:thin:@x.y.com:1521:x"
>username="x"
>validationQuery="SELECT 1 FROM DUAL"
> />

Thanks. 

> and have noticed if a database is not available when tomcat starts, tomcat 
> will not try to connect once the database becomes available. Tomcat must be 
> restarted to establish the database connection.

Can you be more specific about this?  If the pool is empty, which I think it 
would be because you have "initialSize" set to zero and the database was down, 
it should try to create a new connection when the application requests the 
first connection from it.  What happens when your application requests a 
connection from the pool?  Does it fail with an exception?  Does it hang?  If 
it hangs, can you take some thread dumps?

Dan

> What are best practices regarding this? Is there a way in tomcat to get it to 
> automatically retry so I don't have to restart tomcat? I use DBCP but am 
> willing to try some other pool.
> 
> -
> 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: What if my database is unavailable at startup?

2013-12-13 Thread Jose María Zaragoza
With testOnBorrow="true" ( I think that is the default value in Tomcat
6 ) + validationQuery="SELECT 1 FROM DUAL" , that should work

I've never used

maxOpenPreparedStatements="0"
accessToUnderlyingConnectionAllowed="false"

what are they for ?




2013/12/13 Dames, Kristopher J :
> Daniel,
>
> I use tomcat 6.0.32. Here is an example Resource tag:
>
>  accessToUnderlyingConnectionAllowed="false"
> auth="Container"
> defaultAutoCommit="true"
> defaultReadOnly="false"
> defaultSchema="x"
> driverClassName="oracle.jdbc.driver.OracleDriver"
> factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
> initialSize="0"
> logAbandoned="false"
> maxActive="20"
> maxIdle="8"
> maxOpenPreparedStatements="0"
> maxWait="5000"
> minEvictableIdleTimeMillis="180"
> minIdle="5"
> name="jdbc/x"
> numTestsPerEvictionRun="3"
> password="x"
> poolPreparedStatements="false"
> removeAbandoned="true"
> removeAbandonedTimeout="300"
> testOnBorrow="true"
> testOnReturn="false"
> testWhileIdle="true"
> timeBetweenEvictionRunsMillis="180"
> type="javax.sql.DataSource"
> url="jdbc:oracle:thin:@x.y.com:1521:x"
> username="x"
> validationQuery="SELECT 1 FROM DUAL"
> />
>
> This email contains information which may be PROPRIETARY IN NATURE OR 
> OTHERWISE PROTECTED BY LAW FROM DISCLOSURE and is intended only for the use 
> of the addresses(s) named above.  If you have received this email in error, 
> please contact the sender immediately.
>
> -
> 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: What if my database is unavailable at startup?

2013-12-13 Thread Dames, Kristopher J
Daniel,

I use tomcat 6.0.32. Here is an example Resource tag:



This email contains information which may be PROPRIETARY IN NATURE OR OTHERWISE 
PROTECTED BY LAW FROM DISCLOSURE and is intended only for the use of the 
addresses(s) named above.  If you have received this email in error, please 
contact the sender immediately.

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



Re: What if my database is unavailable at startup?

2013-12-13 Thread Daniel Mikusa
On Dec 13, 2013, at 2:24 PM, "Dames, Kristopher J"  
wrote:

> Hi,
> 
> I use tomcat 6

Which version specifically?

> and have noticed if a database is not available when tomcat starts, tomcat 
> will not try to connect once the database becomes available. Tomcat must be 
> restarted to establish the database connection. What are best practices 
> regarding this? Is there a way in tomcat to get it to automatically retry so 
> I don't have to restart tomcat? I use DBCP but am willing to try some other 
> pool.

Can you include the  tag for your connection pool?

Dan

> 
> --
> Kris D.
> 
> 
> This email contains information which may be PROPRIETARY IN NATURE OR 
> OTHERWISE PROTECTED BY LAW FROM DISCLOSURE and is intended only for the use 
> of the addresses(s) named above.  If you have received this email in error, 
> please contact the sender immediately.


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



What if my database is unavailable at startup?

2013-12-13 Thread Dames, Kristopher J
Hi,

I use tomcat 6 and have noticed if a database is not available when tomcat 
starts, tomcat will not try to connect once the database becomes available. 
Tomcat must be restarted to establish the database connection. What are best 
practices regarding this? Is there a way in tomcat to get it to automatically 
retry so I don't have to restart tomcat? I use DBCP but am willing to try some 
other pool.

--
Kris D.


This email contains information which may be PROPRIETARY IN NATURE OR OTHERWISE 
PROTECTED BY LAW FROM DISCLOSURE and is intended only for the use of the 
addresses(s) named above.  If you have received this email in error, please 
contact the sender immediately.


RE: LDPA Authentication Failure

2013-12-13 Thread Caldarale, Charles R
> From: André Warnier [mailto:a...@ice-sa.com] 
> Subject: Re: LDPA Authentication Failure

> That's because you have :

> 
> ... text ...
> 

> So in fact  has one attribute ("className"), but not the other 
> ones that you thought it has.

And while the OP is fixing that, he should also remove the debug= attribute, 
since that hasn't been used in about a decade.

 - Chuck


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


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



Re: LDPA Authentication Failure

2013-12-13 Thread André Warnier

Cédric Couralet wrote:
...


Is it really the definition that you have in server.xml or is a typo?
As it is written, the Realm has no attribute which may explain the
localhost in the message (default in JNDI).



and Cedric means :
> Is it really the definition that you have in server.xml or is a typo?
> As it is written the Realm has no attribute, (comma)
> which may explain the
> localhost in the message (default in JNDI).

That's because you have :


... text ...


So in fact  has one attribute ("className"), but not the other ones that you 
thought it has.


(By the way, that was still a good catch from Cedric.  I had to re-read the whole thing at 
leat 3 times before I saw it myself and understood what he meant.)



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



Re: LDPA Authentication Failure

2013-12-13 Thread Cédric Couralet
2013/12/13 Phill Perryman :
> I have set up the following authentication to the ldap server. I can log
> into this server using the LdapAdmin browser ok.
>
> Running 7.0.34 (I think its 34 but I can't bring the server up at the
> moment)
>
> I am getting a stack trace
>
> Dec 13, 2013 1:56:35 PM org.apache.catalina.realm.JNDIRealm open
> WARNING: Exception performing authentication
> javax.naming.CommunicationException: localhost:389 [Root exception is
> java.net.ConnectException: Connection refused: connect]
> at com.sun.jndi.ldap.Connection.(Unknown Source)
>

Does the authentication fail at the time of this warning? It may
happen that the connection is finished on the ldap server when tomcat
tries to authenticate the user, but tomcat should retry anyway after
this message (which has an INFO level in recents versions)

> I am not connecting to local host so I don't understand the message. None
> of the other files in conf have been touched.
>
> I tried searching and found lots of references but no real solutions.
>
>  
> autoDeploy="true">
>  
>  debug="99"
>  connectionName="cn=xxx,o=mitelinternet"
>  connectionPassword="xxx"
>  connectionURL="ldap://ottedev02.mitel.com:389";
>  alternateURL="ldap://ottedev02.mitel.com:389";
>  userPattern="uid={0},o=mitelinternet"
>  roleBase="o=mitelinternet"
>  roleSubtree="true"
>  roleSearch="(member={0})"
>  roleName="cn"
>  
>

Is it really the definition that you have in server.xml or is a typo?
As it is written, the Realm has no attribute which may explain the
localhost in the message (default in JNDI).

May be you meant :
.
>debug="99"
>  connectionName="cn=xxx,o=mitelinternet"
>  connectionPassword="xxx"
>  connectionURL="ldap://ottedev02.mitel.com:389";
>  alternateURL="ldap://ottedev02.mitel.com:389";
>  userPattern="uid={0},o=mitelinternet"
>  roleBase="o=mitelinternet"
>  roleSubtree="true"
>  roleSearch="(member={0})"
>  roleName="cn">
>  

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



LDPA Authentication Failure

2013-12-13 Thread Phill Perryman
I have set up the following authentication to the ldap server. I can log
into this server using the LdapAdmin browser ok.

Running 7.0.34 (I think its 34 but I can't bring the server up at the
moment)

I am getting a stack trace

Dec 13, 2013 1:56:35 PM org.apache.catalina.realm.JNDIRealm open
WARNING: Exception performing authentication
javax.naming.CommunicationException: localhost:389 [Root exception is
java.net.ConnectException: Connection refused: connect]
at com.sun.jndi.ldap.Connection.(Unknown Source)

I am not connecting to local host so I don't understand the message. None
of the other files in conf have been touched.

I tried searching and found lots of references but no real solutions.

 
   
 
 debug="99"
 connectionName="cn=xxx,o=mitelinternet"
 connectionPassword="xxx"
 connectionURL="ldap://ottedev02.mitel.com:389";
 alternateURL="ldap://ottedev02.mitel.com:389";
 userPattern="uid={0},o=mitelinternet"
 roleBase="o=mitelinternet"
 roleSubtree="true"
 roleSearch="(member={0})"
 roleName="cn"
 


Regards, Phill


Re: high CPU usage with NIO and 1000+ websockets on Tomcat 7.0.49?

2013-12-13 Thread David kerber

On 12/13/2013 8:12 AM, Bob DeRemer wrote:

Hi Mark (et al),

We’re seeing really high CPU utilization with just a 1000 active
websockets that are sending/receiving 100 byte binary messages.   The
profiling snippet below was with 1000 connections.  If we start to
increase the number of connections, the time spent in the NIO logic
starts to consume the majority of the processing.  As a result, I’m
trying to verify:


How many cores does your cpu have?  You might be thrashing your cpu with 
excessive context switching because of the large number of threads.  If 
that's the case, then throwing more lower-power cores at it may be of use.





·Is this something that can be tuned/improved using Tomcat’s NIO settings?

·Is this a bug in Tomcat 7 (websocket/NIO)?

·Are we hitting some issue with 1000+ highly active NIO sockets?

The nature of this application is that it’s primary functionality is to
process binary messages on (ideally 10 – 20K websockets), forward them
to another server for processing, then send the responses back.  As a
result, the performance of the websocket communication is a critical
factor for success.

Please let me know if you’d like to discuss this – I’m available any time.

Thanks,

Bob

We have been profiling this in YourKit and as we increase the number of
websockets, naturally we see the CPU utilization increase.  The concern
is that we’re seeing this at what seems to be a fairly low number of
websockets.  The YourKit profiling showed 41% of the time being spent in
the following code.  My apologies for the formatting.  I can provide an
attachment out-of-band if it would be helpful.

|
+---org.apache.tomcat.util.net.NioEndpoint$Poller.run()
|  38,594   41 %  |  0  |

|  | |
   |
| |

|  |
+---sun.nio.ch.SelectorImpl.select(long)
|  25,615   27 %  |  0  |

|  | | |

   | | |

|  | |
+---sun.nio.ch.SelectorImpl.lockAndDoSelect(long)
|  25,615   27 %  |  0  |

|  | |
|
| | |

|  | |
+---sun.nio.ch.WindowsSelectorImpl.doSelect(long)
   |  25,615   27 %  | 46  |

|  | |
|
| | |

|  | |
+---sun.nio.ch.WindowsSelectorImpl.resetWakeupSocket()
|  13,681   14 %  |  1,107  |

|  | |
|
| | |

|  | |
+---sun.nio.ch.WindowsSelectorImpl$StartLock.access$300(WindowsSelectorImpl$StartLock)
|  10,826   11 %  |  0  |

|  | |
|
   | | |

|  | |
+---sun.nio.ch.WindowsSelectorImpl.updateSelectedKeys()
|   1,0291 %  |  0  |

|  | | |
   |
 | |

|  | |
+---sun.nio.ch.SelectorImpl.processDeregisterQueue()
|  310 %  |  0  |

|  |
|
| | |

|  |
+---org.apache.tomcat.util.net.NioEndpoint$Poller.processKey(SelectionKey,
NioEndpoint$KeyAttachment)|  11,996   13 %  | 31  |

|  | |
|
| | |

|  | |
+---org.apache.tomcat.util.net.NioEndpoint.processSocket(NioChannel,
SocketStatus, boolean)|  11,778   12 %  |  0  |

|  | | |
|
   | | |

|  | | |
+---org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(Runnable)
|  11,746   12 %  |  0  |

|  | | | | |
   | |  
   |

|  | | | |
+---org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(Runnable,
long, TimeUnit)|  11,746   12 %  |  0  |

|  | | | |
|
| | |

|  | | | |
+---java.util.concurrent.ThreadPoolExecutor.execute(Runnable)
   |  11,746   12 %  | 15  |

|  | | | |
|
| | |

|  | | | |
+---org.apache.tomcat.util.threads.TaskQueue.offer(Object)
|  11,731   12 %  |  0  |

|  | | | |
|
| | |

|  | | | |
  +---org.apache.tomcat.util.threads.TaskQueue.offer(Runnable)  
   |  11,731   12 %  | 46  |

|  | | | |
|
| | |

|  | | | |
+---java.util.concurrent.LinkedBlockingQueue.offer(Object)
|  11,668   12 %  | 15  |

*Bob DeRemer*

*Senior Director, Architecture and Development*

Description: Description: Description: Description:
cid:image001.png@01CBE3DE.51A12030

http://www.thingworx.com 

Skype: bob.deremer.thingworx

O: 610.594.6200 x812

M: 717.881.3986




---

high CPU usage with NIO and 1000+ websockets on Tomcat 7.0.49?

2013-12-13 Thread Bob DeRemer
Hi Mark (et al),

We're seeing really high CPU utilization with just a 1000 active websockets 
that are sending/receiving 100 byte binary messages.   The profiling snippet 
below was with 1000 connections.  If we start to increase the number of 
connections, the time spent in the NIO logic starts to consume the majority of 
the processing.  As a result, I'm trying to verify:


* Is this something that can be tuned/improved using Tomcat's NIO 
settings?

* Is this a bug in Tomcat 7 (websocket/NIO)?

* Are we hitting some issue with 1000+ highly active NIO sockets?

The nature of this application is that it's primary functionality is to process 
binary messages on (ideally 10 - 20K websockets), forward them to another 
server for processing, then send the responses back.  As a result, the 
performance of the websocket communication is a critical factor for success.

Please let me know if you'd like to discuss this - I'm available any time.

Thanks,
Bob


We have been profiling this in YourKit and as we increase the number of 
websockets, naturally we see the CPU utilization increase.  The concern is that 
we're seeing this at what seems to be a fairly low number of websockets.  The 
YourKit profiling showed 41% of the time being spent in the following code.  My 
apologies for the formatting.  I can provide an attachment out-of-band if it 
would be helpful.

|  +---org.apache.tomcat.util.net.NioEndpoint$Poller.run()  
  |  38,594   41 %  |  0  |
|  | |  
  | | |
|  | +---sun.nio.ch.SelectorImpl.select(long)   
  |  25,615   27 %  |  0  |
|  | | |
  | | |
|  | | +---sun.nio.ch.SelectorImpl.lockAndDoSelect(long)
  |  25,615   27 %  |  0  |
|  | |   |  
  | | |
|  | |   +---sun.nio.ch.WindowsSelectorImpl.doSelect(long)  
  |  25,615   27 %  | 46  |
|  | | |
  | | |
|  | | +---sun.nio.ch.WindowsSelectorImpl.resetWakeupSocket()   
  |  13,681   14 %  |  1,107  |
|  | | |
  | | |
|  | | 
+---sun.nio.ch.WindowsSelectorImpl$StartLock.access$300(WindowsSelectorImpl$StartLock)
 |  10,826   11 %  |  0  |
|  | | |
  | | |
|  | | +---sun.nio.ch.WindowsSelectorImpl.updateSelectedKeys()  
  |   1,0291 %  |  0  |
|  | | |
  | | |
|  | | +---sun.nio.ch.SelectorImpl.processDeregisterQueue() 
  |  310 %  |  0  |
|  | |  
  | | |
|  | 
+---org.apache.tomcat.util.net.NioEndpoint$Poller.processKey(SelectionKey, 
NioEndpoint$KeyAttachment)|  11,996   13 %  | 31  |
|  | | |
  | | |
|  | | +---org.apache.tomcat.util.net.NioEndpoint.processSocket(NioChannel, 
SocketStatus, boolean)|  11,778   12 %  |  0  |
|  | | | |  
  | | |
|  | | | 
+---org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(Runnable) 
 |  11,746   12 %  |  0  |
|  | | | | |
  | | |
|  | | | | 
+---org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(Runnable, long, 
TimeUnit)|  11,746   12 %  |  0  |
|  | | | |   |