Re: Help! parallel deployment problem.

2014-11-25 Thread Chris Gamache
Indeed, the affected nodes don't have the newer war at all.

If you don't mind me asking-- if not FarmWebDeployer, what scheme do you use to 
deploy a war across a cluster?


> On Nov 25, 2014, at 11:11 PM, Christopher Schultz 
>  wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> Chris,
> 
>> On 11/24/14 10:55 PM, Chris Gamache wrote:
>> So first, I'd be glad to. Just to be clear-- I'm not in need of a
>> lecture, but will willingly take one if anyone can help me get down
>> to a solution. My first attempt at asking for some assistance was
>> met with crickets. I haven't figured out why when I post (what I
>> think are) well written, well researched and discussion-provoking
>> questions they get no traction but if I cry "the sky is falling"
>> folks are more willing to attempt to lend a hand. Here's my go at
>> attempt #3:
>> 
>> I have a tomcat cluster. It is set up with much care according to 
>> http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html.
>> 
>> It mostly works fine. On occasion (twice a week or so) there will
>> be one or more servers which didn't get the message that a new war
>> was deployed (continuous deployment using the tomcat parallel
>> deployment scheme. e.g. theapp##007.war) and they happily continue
>> to run the old version of the war.
> 
> I presume you have checked that the "affected" nodes are running only
> the old version and not the new version simultaneously, right?
> 
>> In a farm deployment scenario, the master node will announce to the
>> cluster a new artifact is available and then the clustered tomcats
>> will retrieve and deploy the new artifact. I can't pin down the
>> problem, but let just say for argument's sake it is a true
>> link-down situation. There doesn't seem to exist a mechanism to
>> re-announce, or announce at regular intervals. This seems like a
>> real weakness in the scheme. That makes me think I'm missing 
>> something obvious. If it works like it says it should in the docs
>> I shouldn't be having this issue. Either there's something wrong
>> with my config or there's a problem with tomcat. Based on the hair
>> I have left after pulling mine out, I'm leaning toward a problem
>> with tomcat. Is anyone leveraging FarmWebDeployer and Parallel
>> Deployment in their architecture successfully? If so, DenverCoder9,
>> what did you see?!?
> 
> Sorry, we don't use the FarmWebDeployer, so I can only give you
> theoretical advice.
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
> 
> iQIcBAEBCAAGBQJUdVLXAAoJEBzwKT+lPKRYtA0P/2mRSjJAoDGkAGeYxJX+2kAI
> ttgljunyS4HfzEJnujaqrkr4ljF+v3Vex8gzjkPe6bM8iatJZL1xtNOun67RyWL8
> /QJuzBzhfZBw9esPyLHKvptK6VzvgvsQFWKilwflQbl34NT8avMz4mfJEJZUBmGu
> DS+Yc9kYL1UiNxOtC/QJuMASCtZQ8yq1yZvX9qTZ6mxT4DEZOXKVazmCAwp/vWED
> LuU7UJc1xujsg7b/xR3TxrXS1kv/o+LvfbIPNIbFmJDXOUq4NkfT88SBiQcU/RL5
> 82QiZ+sZSSMUUlxdBmYO17t8Y1DWS0Bs0wQ4D70EYXumoEmE81GZTUIRPiLBr7wg
> yqoopXdIXV9mfxKwdrqFrqE6yIO1uxN3QL/0E2ycdq+stR8WwuIZ1yA7t4Bl/MPJ
> uqH2Mjh8oBBX9H+X4JEduZhXPFTOYIJMIOSdE9VKxW0BVMcEmoXMKbuqb0ZwdulK
> QGA/+b5y9FGO+zne1DTC4KTDVqCrBULfhfobCO4XA1x61JXiBGNdVJZX/ifTamS0
> h7o9BusfICldbNBaJNXFDhsH7KoyPUj+hp6qVNmCSpyNFuhkwj+MJ549z4j711NN
> 26rDJySiVXTgpkSGg9m/M1HstkomLdscPKti6S9esuclK1PXod5mJJD6zH7tKcJG
> a7OOhexas0v2sN+OMcX7
> =SW8s
> -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: java.lang.IllegalStateException: Calling [asyncComplete()] is not valid for a request with Async state [COMPLETING]

2014-11-25 Thread Vicky
Thanks Mark. However i don't think, i am calling it twice, anyway i'll
double check, if there are any implicit calls.

Is there a way i can add a defensive check to allow calling complete, only
if not already done. Something like isComplete() or any other way?

Vicky

On Tue, Nov 25, 2014 at 8:36 PM, Mark Thomas  wrote:

> On 25/11/2014 13:01, Vicky wrote:
> > Hi Folks,
> >
> > I am using Tomcat 7.0.42, in embedded mode, using NIO connector. Running
> on
> > a linux box.
> >
> > I use request.startAsync() to create an AsyncContext. And call complete()
> > once everything is done. But complete() is called via a separate thread.
> >
> > Any idea why am i getting this exception?
>
> The only way that can happen is if you call complete() more that once.
>
> Mark
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: URL Mapping for filter not the same on tomcat as it is on TomEE?

2014-11-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Zack,

On 11/24/14 3:05 PM, zack6849 wrote:
> Hello, i've found some strange issue with the url mapping with
> tomcat, i've tested this on tomcat8 and TomEE, it seems easily
> reproducable.
> 
> I have a Filter listening to requests matching "/uploads/*" (all
> files inside of my uploads directory"

Note that the url-mapping applies to the URL and has nothing to do
with files. If you happen to have a file in the /uploads directory,
that may cause other behavior to occur, but the filter-mapping only
applies to the URL pattern and doesn't match "files".

> On TomEE, this filter is fired for requests just as one would
> expect, however on tomcat8, it does *not*
> 
> Example:
> 
> /uploads/test.jpg as a file request, the filter fires on TomEE, but
> not tomcat, same code, only difference being the servlet mapping.

So the code is the same, but the servlet mapping is different.

At first, you were talking about Filter mappings and now you are saying:

1. The mapping is for a Servlet
2. The Servlet mapping is "different"

Are the servlet mappings really different? If so, how?

> Does anyone know what could be causing this?

Well, since TomEEE uses Tomcat internally, I would suspect that they
would behave identically in these cases.

When you run under TomEE your Filter fires, and under tomcat it does
not fire? Is anything happening that would cause *another* filter to
fire and stop the request?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUdVXhAAoJEBzwKT+lPKRY2PwP/j83ru6frNeEQ7jEK7hKbclm
SlO9tRn9nMzPEUVZkpb81jmbz8W9LvxPzA1z31UE/Y0IbPH+HzzWPzATmX+nra12
efrzlJvcjYdzwKz7dAN2LpRXPGfZWGPHPtxplmLvc0t0SdKcLOXG54TsKe5969hg
1sGytkuet1fvNKw07dJFK58HR8hFW6EQp4jee2wQz7xJZhrYHrNWsCt7s5EVXhnO
toCGEZsaHSX8GdYLeDXcPd5uXLBUU4VRkR8xK1GXVEkCwb5tyqyS4/GgHukf8PJU
fMlXnyeAbAXAQ3Gf4fzQYXUG98mxG2/hlFbu1ff9sCgpuiBrl28fuarvq6XKWbFB
LfMiS65WR69n/TRo6tVl+L/7GAJ3bxLLVSYscfvQcK9Fn8V13eF/PLPFjeDB+DBS
KQEcSPgYxG8ae/zluENDnuHssBatMMZ8e4fne3OyWuCiITB+KeJeGKuHEZsm7E/s
zNp7EwFVkCy7sG2byoIt7uteQU5k7WXmiLirMJyGDiFdJi9+Zrmp6kXomLLlC82/
6+WJ+5VBZelgQnlWc9zbZ0/k/INp60KGye5WaW+KU2jDkoWjqs+MM16nSY0+Ra1Q
zeomV4CGcwg45N71esLJfNVt95yNRM2wP49BrAivbtWklETnMQHtye32l2D2aX4j
nQuqWX734uA1HuhI8xP0
=5foY
-END PGP SIGNATURE-

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



Re: How can code in a Realm gain access to a Globally Named Resource

2014-11-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Vince,

On 11/25/14 9:00 PM, vince.w...@thomsonreuters.com wrote:
> Web applications gain access to Globally Named JDBC Resources 
>  by adding a  to context.xml
> 
> Then using code like:
> 
> Context initContext = new InitialContext(); dbLookupStr =
> "java:comp/env/" + dbResourceName; ds =
> (DataSource)initContext.lookup(dbLookupStr);
> 
> HOW CAN code in a custom Realm gain access to one of those same 
> Globally named database connection pools ?

What's wrong with the code above?

> Extra info included here for background: I have a custom realm that
> I created by extending JDBCRealm it does its own authentication
> and uses JDBCRealm's getRoles() to do the authorization. Although
> it works much of the time, the inherited getRoles method causes 
> problems. I've decided to re-write my realm without extending 
> JDBCRealm,  thus I need to write my own JDBC authorization code, 
> hence the above question.

JDBCRealm should probably die, and you probably shouldn't be using it.

Why not extend DataSourceRealm instead? You'll get DataSource access
for free ;)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUdVRIAAoJEBzwKT+lPKRY8z4P/12ZMvXrmT4SJt/BLNhUJEMX
j1rqGcZdKPH17pacMSfUMLciVvSLOZbsNoV2mgwUw+EfZVCUuL1i2Tk52vH2swa5
l2pgQI0zJB2nREzP1jZLpnVXi2lB5L+GL2TV3WE7Mr+nG03lSCN3RB/4hUEdRgcU
ZblJ5Dz62Jx/Vi+9d/qBYi68jSvgXLwQcrx+eFvYeKpTylSghkkn+mzbSgGW4RXL
lfpMm+q+una4KpCCLZP40BWcGyx57loFakyucLjsuvDjKQmLbX8Ay4WU7R1sXX2O
J+CZzzBqHOCU8Q9Snmt3xaYcZ+0De5UIYI17ztdKCD703a4evytwSXZ1tEpg3vYE
lHNGIKcW/q6ABOt0eWxFTj/wjTCYn3rYhcv+mEPV0c6HPkJ9DqFKh0+efSnFsOnW
CNWF9eH3Y64zmWh7DQ2AF+Aij4mtXof9YYl6Q6oAL4XBw8vMajwSek9dpXZYDKi0
RkI5GhzWPP1xUx8FDfQfnfjJmHAKMIaK330EwX0RhJH9yoX+1vG5XCPT+/KV7Xfj
ZCOz90SiPr2KxLAtijL79p98nWIB4w1GSNaN0z0ePrup1J+Kkfh2AqL4i/jmdXK8
qQJ4TGJczgq6NZZbg+t6SkPA0nRN18f42Aq8yguwE7cYXb66rkfLUpxcqc28kdCO
irKlHlgNrxDzSH0pwAM8
=RqZF
-END PGP SIGNATURE-

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



Re: tomcat7 shutdown himself without trace

2014-11-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Métairie,

On 11/25/14 5:26 PM, Métairie, Stéphane wrote:
> hello
> 
> all the tcp 8080 connection are closed by "I don't know"
> 
> tcp  329  0 myserver_tomcat6.net:webcache
> remoteclient.net.:43139 CLOSE_WAIT  - CLOSE_WAIT The remote end has
> shut down, waiting for the socket to close.
> 
> tcp0  0 myserver_tomcat6.net:webcache
> remoteclient.net:47375 SYN_RECV- SYN_RECV

The above doesn't tell me anything at all.

> A connection request has been received from the network.

Is that part of the output of netstat or something?

> reason why my thread felt to minimun

What reason do think there is?

> I think it's not a tomcat6 issue but a firewall issue

Okay. Check the firewall?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUdVNHAAoJEBzwKT+lPKRYyWgP/2G806wluJiaDK0jnmikZGZE
t8JgSsPMJdV/+YQK4A7Tl7d7m82UaDdAnehzhe/57+YRS4O7Vw2CKdvFmZ3k3DOo
jvwW+sMmNSW6Ag7R4BESJBHVhIrD2du3VaIhEZ8p7hQkEocJpWCM/tUDc4yOvOsL
rIuKmq36XjlkjbJLExH9lK88IBWtkTlDkv940klkye6/lIRjSE8oNNiLLlnswnj/
B/13qLqnb/AMaLCNRWYe+YB3vMibY4b4CFEUE9B128PpzylGYxw53Rx5dkrWzO/k
tkKT33eTKlm3G1cyo2ObXXg2sC5DCtVvrh8sr185mzPbEP3rNgesBUxQjYb6dUt4
3wRkw2qEQvTCECoZPRd9oG7MSCoYBj6SCf7SK2lsTZfGz+UxiuaQXodZqvS2yBIb
MREbHb6cHlML+wgqbpd06bqCtMslkVqLj5xcq8JYD7/GFdzAUFxkICTCk07ie3gb
Cejb7MSkZG0wkNyEQxFrdmTNrzQlU+GXKH7k0PnQMRhOUEDzula+G+HD3MNtVW1B
rEVE5Ecs5OnVr70uz83OQz01MKEFHP+AmrkQX2OL1Th7a0vmPEPvV7K3cEcmqqNw
JDNxwqmzr4kWFVFSypqjkiPmtd0E27LDjQm3BzSY6tJ3vwy7q6HCBI7w8+Ncb2IC
kr1mgfweXLwQ/M7mCVlY
=jiRl
-END PGP SIGNATURE-

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



Re: Help! parallel deployment problem.

2014-11-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Chris,

On 11/24/14 10:55 PM, Chris Gamache wrote:
> So first, I'd be glad to. Just to be clear-- I'm not in need of a
> lecture, but will willingly take one if anyone can help me get down
> to a solution. My first attempt at asking for some assistance was
> met with crickets. I haven't figured out why when I post (what I
> think are) well written, well researched and discussion-provoking
> questions they get no traction but if I cry "the sky is falling"
> folks are more willing to attempt to lend a hand. Here's my go at
> attempt #3:
> 
> I have a tomcat cluster. It is set up with much care according to 
> http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html.
> 
> It mostly works fine. On occasion (twice a week or so) there will
> be one or more servers which didn't get the message that a new war
> was deployed (continuous deployment using the tomcat parallel
> deployment scheme. e.g. theapp##007.war) and they happily continue
> to run the old version of the war.

I presume you have checked that the "affected" nodes are running only
the old version and not the new version simultaneously, right?

> In a farm deployment scenario, the master node will announce to the
> cluster a new artifact is available and then the clustered tomcats
> will retrieve and deploy the new artifact. I can't pin down the
> problem, but let just say for argument's sake it is a true
> link-down situation. There doesn't seem to exist a mechanism to
> re-announce, or announce at regular intervals. This seems like a
> real weakness in the scheme. That makes me think I'm missing 
> something obvious. If it works like it says it should in the docs
> I shouldn't be having this issue. Either there's something wrong
> with my config or there's a problem with tomcat. Based on the hair
> I have left after pulling mine out, I'm leaning toward a problem
> with tomcat. Is anyone leveraging FarmWebDeployer and Parallel
> Deployment in their architecture successfully? If so, DenverCoder9,
> what did you see?!?

Sorry, we don't use the FarmWebDeployer, so I can only give you
theoretical advice.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUdVLXAAoJEBzwKT+lPKRYtA0P/2mRSjJAoDGkAGeYxJX+2kAI
ttgljunyS4HfzEJnujaqrkr4ljF+v3Vex8gzjkPe6bM8iatJZL1xtNOun67RyWL8
/QJuzBzhfZBw9esPyLHKvptK6VzvgvsQFWKilwflQbl34NT8avMz4mfJEJZUBmGu
DS+Yc9kYL1UiNxOtC/QJuMASCtZQ8yq1yZvX9qTZ6mxT4DEZOXKVazmCAwp/vWED
LuU7UJc1xujsg7b/xR3TxrXS1kv/o+LvfbIPNIbFmJDXOUq4NkfT88SBiQcU/RL5
82QiZ+sZSSMUUlxdBmYO17t8Y1DWS0Bs0wQ4D70EYXumoEmE81GZTUIRPiLBr7wg
yqoopXdIXV9mfxKwdrqFrqE6yIO1uxN3QL/0E2ycdq+stR8WwuIZ1yA7t4Bl/MPJ
uqH2Mjh8oBBX9H+X4JEduZhXPFTOYIJMIOSdE9VKxW0BVMcEmoXMKbuqb0ZwdulK
QGA/+b5y9FGO+zne1DTC4KTDVqCrBULfhfobCO4XA1x61JXiBGNdVJZX/ifTamS0
h7o9BusfICldbNBaJNXFDhsH7KoyPUj+hp6qVNmCSpyNFuhkwj+MJ549z4j711NN
26rDJySiVXTgpkSGg9m/M1HstkomLdscPKti6S9esuclK1PXod5mJJD6zH7tKcJG
a7OOhexas0v2sN+OMcX7
=SW8s
-END PGP SIGNATURE-

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



How can code in a Realm gain access to a Globally Named Resource

2014-11-25 Thread vince.webb
Hello
Web applications gain access to Globally Named JDBC Resources  
 by adding a  to context.xml

Then using code like:

Context initContext = new InitialContext();
dbLookupStr = "java:comp/env/" + dbResourceName;
ds = (DataSource)initContext.lookup(dbLookupStr);

HOW CAN code in a custom Realm gain access to one of those same Globally named 
database connection pools ?

###

Extra info included here for background: I have a custom realm that I created 
by extending JDBCRealm it does its own authentication and uses JDBCRealm's 
getRoles() to do the authorization. Although it works much of the time, the 
inherited getRoles method causes problems. I've decided to re-write my realm 
without extending JDBCRealm,  thus I need to write my own JDBC authorization 
code, hence the above question.

Thanks in advance
Vince






This e-mail is for the sole use of the intended recipient and contains 
information that may be privileged and/or confidential. If you are not an 
intended recipient, please notify the sender by return e-mail and delete this 
e-mail and any attachments. Certain required legal entity disclosures can be 
accessed on our website.


RE: tomcat7 shutdown himself without trace

2014-11-25 Thread Métairie , Stéphane
hello

all the tcp 8080 connection are closed by "I don't know"

tcp  329  0 myserver_tomcat6.net:webcache  remoteclient.net.:43139 
CLOSE_WAIT  -
CLOSE_WAIT
The remote end has shut down, waiting for the socket to close.
 
tcp0  0 myserver_tomcat6.net:webcache  remoteclient.net:47375 
SYN_RECV-
SYN_RECV
A connection request has been received from the network.

reason why my thread felt to minimun
I think it's not a tomcat6 issue but a firewall issue



From: Christopher Schultz [ch...@christopherschultz.net]
Sent: Tuesday, November 25, 2014 10:30 PM
To: Tomcat Users List
Subject: Re: tomcat7 shutdown himself without trace

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Métairie,

On 11/25/14 7:47 AM, Métairie, Stéphane wrote:
> Sorry it's not tomcat7 but tomcat6
>
> Tomcat Version : Apache Tomcat/6.0.24 Servlet Specification Version
> : 2.5 JSP version : 2.1
>
> java version "1.7.0_21" Java(TM) SE Runtime Environment (build
> 1.7.0_21-b11) Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01,
> mixed mode)
>
>
> Server.xml   className="org.apache.catalina.core.AprLifecycleListener"
> SSLEngine="on" />  className="org.apache.catalina.core.JasperListener" />  className="org.apache.catalina.core.JreMemoryLeakPreventionListener"
> />  className="org.apache.catalina.mbeans.ServerLifecycleListener" />
>  className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
> />   auth="Container" 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="HTTP/1.1" connectionTimeout="2" redirectPort="8443"
> />  />   className="org.apache.catalina.realm.UserDatabaseRealm"
> resourceName="UserDatabase"/>  appBase="webapps" unpackWARs="true" autoDeploy="true"
> xmlValidation="false" xmlNamespaceAware="false">  className="org.apache.catalina.valves.AccessLogValve"
> directory="logs" prefix="localhost_access_log." suffix=".txt"
> pattern="%t resp[%s] [%a] spentTime[%D] '%r' - bytes[%b]
> thread[%I]" resolveHosts="false"/>   
> 
>
> Tomcat6.conf CATALINA_BASE="/usr/share/tomcat6"
> CATALINA_HOME="/usr/share/tomcat6"
> JASPER_HOME="/usr/share/tomcat6"
> CATALINA_TMPDIR="/var/cache/tomcat6/temp" JAVA_OPTS="${JAVA_OPTS}
> -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory
> -server -Xms1024m -Xmx1024m -XX:NewSize=512m -XX:MaxNewSize=512m
> -XX:PermSize=512m -XX:MaxPermSize=512m"
> CATALINA_OPTS="${CATALINA_OPTS} -Dcom.sun.management.jmxremote
> -Dcom.sun.management.jmxremote.port=
> -Dcom.sun.management.jmxremote.authenticate=false
> -Dcom.sun.management.jmxremote.ssl=false" TOMCAT_USER="tomcat"
> SECURITY_MANAGER="false" SHUTDOWN_WAIT="30" SHUTDOWN_VERBOSE=false
> CATALINA_PID="/var/run/tomcat6.pid"
>
>
> -Original Message- From: André Warnier
> [mailto:a...@ice-sa.com] Sent: mardi 25 novembre 2014 13:33 To:
> Tomcat Users List Subject: Re: tomcat7 shutdown himself without
> trace
>
> Métairie wrote:
>> Hi all
>>
>> We have a tomcat7 standalone in Redhat6.
>>
>> Sometime the Tomcat7 suddenly stop to reply to all requests, but
>> all server parameters are ok (cpu, memory, disk, ... all are ok).
>> There is no error inside the logs. No exception, nothing.
>>
>> The http-thread do not reply anymore, because the pool is fallen
>> to a minimum to 5 or 6 threads. I guess all http-thread are
>> killed without any reason.
>>
>
> Can you paste the server.xml file here ? (Remove all comments,
> domain names and other confidential information if any)
>
> To save time for everyone in the long run, can you also provide : -
> the exact version of Tomcat used (7.y.z) - the JVM version used
>
> (You should be able to see all that by going to the Tomcat bin
> directory and executing "version.sh")
>
> There may be a reason for the Tomcat threads disappearing : if the
> minimum you set in the configuration is the above 5-6, and if the
> threads have nothing to do (Tomcat does not receive any requests
> anymore, due to some network issue e.g.) then the threads would
> "naturally" die, and Tomcat would not necessarily start new ones to
> replace them, since there is no need to.
>
> Also maybe helpful : when the case occurs (Tomcat not responding),
> run the command : netstat -pan --tcp and check if anything unusual
> appears there (like hundreds of connections to the Tomcat HTTP
> port, in some unexpected state).

When disaster strikes, is the JVM process still running, or is the
process completely gone?

Does the Tomcat log say anything about it trying to shut down?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUdPTpAAoJEBzwKT+lPKRYNMEP/2DXRJAhiYz205iXYx5HkZE3
xU0RIMdT7AF1C4afSQM40aeFJswITlcTdAGxiGoRRh6Ubimyl6r7f+bd+hdQflYP
d65QUy11JfshDT4vyHjxEhZTCG8aDQ3dJcQBGOpbe/Lx7s8SgrLIk8TzJRiBalLc
QAwnm8K1A2aWcTIrnxO5G4S

Re: tomcat7 shutdown himself without trace

2014-11-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Métairie,

On 11/25/14 7:47 AM, Métairie, Stéphane wrote:
> Sorry it's not tomcat7 but tomcat6
> 
> Tomcat Version : Apache Tomcat/6.0.24 Servlet Specification Version
> : 2.5 JSP version : 2.1
> 
> java version "1.7.0_21" Java(TM) SE Runtime Environment (build
> 1.7.0_21-b11) Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01,
> mixed mode)
> 
> 
> Server.xml   className="org.apache.catalina.core.AprLifecycleListener"
> SSLEngine="on" />  className="org.apache.catalina.core.JasperListener" />  className="org.apache.catalina.core.JreMemoryLeakPreventionListener"
> />  className="org.apache.catalina.mbeans.ServerLifecycleListener" /> 
>  className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
> />   auth="Container" 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="HTTP/1.1" connectionTimeout="2" redirectPort="8443"
> />  />   className="org.apache.catalina.realm.UserDatabaseRealm" 
> resourceName="UserDatabase"/>  appBase="webapps" unpackWARs="true" autoDeploy="true" 
> xmlValidation="false" xmlNamespaceAware="false">  className="org.apache.catalina.valves.AccessLogValve"
> directory="logs" prefix="localhost_access_log." suffix=".txt"
> pattern="%t resp[%s] [%a] spentTime[%D] '%r' - bytes[%b]
> thread[%I]" resolveHosts="false"/>
> 
> 
> Tomcat6.conf CATALINA_BASE="/usr/share/tomcat6" 
> CATALINA_HOME="/usr/share/tomcat6" 
> JASPER_HOME="/usr/share/tomcat6" 
> CATALINA_TMPDIR="/var/cache/tomcat6/temp" JAVA_OPTS="${JAVA_OPTS}
> -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory
> -server -Xms1024m -Xmx1024m -XX:NewSize=512m -XX:MaxNewSize=512m
> -XX:PermSize=512m -XX:MaxPermSize=512m" 
> CATALINA_OPTS="${CATALINA_OPTS} -Dcom.sun.management.jmxremote
> -Dcom.sun.management.jmxremote.port=
> -Dcom.sun.management.jmxremote.authenticate=false
> -Dcom.sun.management.jmxremote.ssl=false" TOMCAT_USER="tomcat" 
> SECURITY_MANAGER="false" SHUTDOWN_WAIT="30" SHUTDOWN_VERBOSE=false 
> CATALINA_PID="/var/run/tomcat6.pid"
> 
> 
> -Original Message- From: André Warnier
> [mailto:a...@ice-sa.com] Sent: mardi 25 novembre 2014 13:33 To:
> Tomcat Users List Subject: Re: tomcat7 shutdown himself without
> trace
> 
> Métairie wrote:
>> Hi all
>> 
>> We have a tomcat7 standalone in Redhat6.
>> 
>> Sometime the Tomcat7 suddenly stop to reply to all requests, but
>> all server parameters are ok (cpu, memory, disk, ... all are ok).
>> There is no error inside the logs. No exception, nothing.
>> 
>> The http-thread do not reply anymore, because the pool is fallen
>> to a minimum to 5 or 6 threads. I guess all http-thread are
>> killed without any reason.
>> 
> 
> Can you paste the server.xml file here ? (Remove all comments,
> domain names and other confidential information if any)
> 
> To save time for everyone in the long run, can you also provide : -
> the exact version of Tomcat used (7.y.z) - the JVM version used
> 
> (You should be able to see all that by going to the Tomcat bin
> directory and executing "version.sh")
> 
> There may be a reason for the Tomcat threads disappearing : if the
> minimum you set in the configuration is the above 5-6, and if the
> threads have nothing to do (Tomcat does not receive any requests
> anymore, due to some network issue e.g.) then the threads would
> "naturally" die, and Tomcat would not necessarily start new ones to
> replace them, since there is no need to.
> 
> Also maybe helpful : when the case occurs (Tomcat not responding),
> run the command : netstat -pan --tcp and check if anything unusual
> appears there (like hundreds of connections to the Tomcat HTTP
> port, in some unexpected state).

When disaster strikes, is the JVM process still running, or is the
process completely gone?

Does the Tomcat log say anything about it trying to shut down?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUdPTpAAoJEBzwKT+lPKRYNMEP/2DXRJAhiYz205iXYx5HkZE3
xU0RIMdT7AF1C4afSQM40aeFJswITlcTdAGxiGoRRh6Ubimyl6r7f+bd+hdQflYP
d65QUy11JfshDT4vyHjxEhZTCG8aDQ3dJcQBGOpbe/Lx7s8SgrLIk8TzJRiBalLc
QAwnm8K1A2aWcTIrnxO5G4S4/n/QYsL65un0hTOmy5RygGHRdgVQt47mz6wSDKiv
KH4kD8cdjyBtIGUHpxzqwsDWuEOOvv3xLnvktpPKNDzB46E42J8lT89MJOECj9/R
IJIhdStfB2EWQ26AYBHd1X8vDe2Lp3uLj3ZQzGfNivaceN/5GVYgCf/NqrI4+/pd
ihx4isu3xTXt6dYOf3aLCzFR5LzVUSrt207OwXJaOC+0kl7Jgv7liXYaOEF0KqAf
3jEy/7ZBToZwwl/YSebbkqWvDEfM/IhpkbQVOvgAatmLCY7f6aGmTt116hQ8j14z
W+Z/9CT3Qmc5qGtQfki/wkc9bsKPgHiaifdaW+acLBPvUC5oOoO02wU8ujPPG0Zw
oJd8+Pnxc6/LndaVl3AqRBzHV4OL1cAH1cnnIguGVzew/fV1Mq+NFBlho7hIkBfb
UhlSgwi6CDsyG6XJG6XCWIJ5452g/fFOnD8UC6XYVSusCflsMEXRfaD7tIi9KqtO
nYOvgxNpIC65QFeiIIF0
=t9jE
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...

Re: Deploying .ca-bundle file & .crt file as SSL certificates

2014-11-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

To whom it may concern,

On 11/25/14 3:32 AM, Kernel freak wrote:
> I don't have the server.key and server.crt. I have root access to
> server, I can generate my own if necessary. I only have .crt and
> .ca-bundle file. Can you tell me what to do. Thank you very much
> for your help.

If you don't have the server's key but you have the server's
certificate, then you must start all over again because the key is
half of a paired key.

Did you generate the CSR yourself? With what key did you generate that
CSR? If someone else generated the CSR, go ask them where the key is
that they used.

If you have lost the key then you must redo the whole process,
starting with generating a new key and CSR, then get the CSR signed.
Then, import the signed certificate back into the same keystore. Then,
configure Tomcat to use that keystore.

The instructions on the Tomcat users' guide are fairly straightforward
even if they don't explain the intricacies of public key
infrastructure -- that's outside the scope of the users' guide.

Thanks,
- -chris

> On Mon, Nov 24, 2014 at 7:48 PM, Christopher Schultz < 
> ch...@christopherschultz.net> wrote:
> 
> Niranjan,
> 
> On 11/24/14 10:51 AM, Niranjan Babu Bommu wrote:
 I think you have create a keystore from the cert, please
 follow these instruction and ket me know.
 
 Create store with temporary key inside:
 
 keytool -genkey -alias  -keystore
 yourkeystore.jks -storepass Hello1 Then delete existing
 entry:
 
 keytool -delete -alias temp -keystore yourkeystore.jks
 -storepass Hello1 Now you've got empty store. You can check
 that it's empty:
 
 keytool -list -keystore yourkeystore.jks -storepass Hello1
 Then import your certificate to the store:
 
 keytool -import -alias   -file cert_file.crt
 -keypass
> keypass
 -keystore yourkeystore.jks -storepass Hello1
> 
> Nope: the existing key *and* cert need to be imported
> simultaneously into the keystore. If the OP already has a cert,
> he's already got a key, too.
> 
> The problem is that you probably started with OpenSSL to generate
> your keys and stuff. Here is the proper procedure to import your
> key, certificate, and CA bundle into a Java keystore.
> 
> You'll need these files:
> 
> server.key (this is your server's secret key) server.crt (this is
> your server's certificate, signed by the CA) ca.crt (this is your
> CA's certificate)
> 
> Here is the incantation:
> 
> $ openssl pkcs12 -export -in server.crt -inkey server.key \ 
> -certfile ca.crt -out keystore.p12 -chain
> 
> $ $JAVA_HOME/bin/keytool -importkeystore -srckeystore keystore.p12
> \ -srcstoretype pkcs12 \ -destkeystore keystore.jks
> 
> Now, use keystore.jks in Tomcat's server.xml.
> 
> If you already had created your key and cert request using Java's 
> 'keytool', then you can instead just import the signed certificate 
> into your keystore:
> 
> $ $JAVA_HOME/bin/keytool -importcert -file server.crt \ -keystore
> keystore.jks \ -alias [alias]
> 
> If you used an alias to create the certificate signing request
> (CSR), then use the same alias in the above command.
> 
> -chris
>> 
>> -
>>
>> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
>> 
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUdPOpAAoJEBzwKT+lPKRYVikP/jrxPiejAjwm9B9T4nGDASyZ
BeweTPhXLd1Fg8e95r8K6xBFfZy921Ax+NimRLqTUfU2cCen9YsHB2Xdp0a6xiw4
oC8+e2JlyZhGFhJY2TsgYRpRoqIhhJeluSUpukUYZz73Pq10LHUnetDhsEHwJEtE
uz2ekNcXH1Vr+Fy4k+O+PpFJnl8N5QprjO6PX/WlflrFihFa7bC7l+8FqF4QQ7U1
gw0nKt/0VcYOPepyDfV6VKGD7gBurNmlqrx9GxkYss0YVKghyCDFllNuX9tSw7j7
3PcQu/cmEc6u7CePAY4VCXpMSPNO9Ggn+AnLZxj6FWL09fuUfb3bL/I0kufn4xqE
qeEs/Kb9p8PaGCXOofF9nOsoz1krV5ttS3ei8Ayjt84MgXgge3q3n//ZC/s6EMMd
/zPlPbI3azTi658+R9sCL/jJwRbxzjnpMj/q/ae1jDawkZHYndijiWt6BSVMrfuo
awCDxrzissptgKrgokyeQocHWSyGWpEuYEIRDoS6KzgRQ40iCbaCOYTlJg11yS0Z
0ItdSYURh4b4nPtlwFzvTZ8pzxnO3dDod16NVEScIjEIMAGLFrCpfy+xF3/e+Hof
QXFDzE4XX5WtGIJdSN0g8mRlf3KymkJ+Z4ZnamUprD9NDC7vwCw1nhyBJLGkTHF4
+KKT8HNKTnW71IzKhPai
=WH38
-END PGP SIGNATURE-

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



Re: question

2014-11-25 Thread Gerardo Juarez

Hi, André,

Sorry, my mistake. I did not pay attention to the link which clearly 
says 4x.


Gerardo

On 11/25/2014 03:43 AM, André Warnier wrote:

Hi Gerardo.

The information which you are pointing to below, is relative to Tomcat 
4.1, which has been archived probably more than 10 years ago and is no 
longer being developed or supported.

Please don't do that.

The current version of Tomcat is 8.0, and its documentation can be 
found here :

http://tomcat.apache.org/tomcat-8.0-doc/index.html

Gerardo Juarez wrote:


On 11/24/2014 03:29 PM, Fabio Ricci wrote:

Hi Joe

Yes. You do not need to run apache for html and php (although it 
seems to me more practical).
For PHP you might want to have a look at 
http://php-java-bridge.sourceforge.net/pjb/


Kind regards / Meilleures salutations / Freundliche Grüsse
Fabio Ricci
semweb   Semantic Web Technologies · Records Management
Software systems · ICT coaching · ICT Projects leading www.semweb.ch

Weinmanngasse 26
CH-8700 Küsnacht ZH (Switzerland)

Tel.

+41 (076) 5281961
+39 (389) 0681334

Skype:

semweb-llc

Confidentiality Warning: This message and any attachments are 
intended only for the use of the intended recipients, are 
confidential and maybe privileged. If you are not the intended 
recipient, you are hereby notified that any review, retransmission, 
conversion to hard copy, copying, circulation or other use of this 
message and any attachments is strictly prohibited. If you are not 
the intended recipient, please notify the sender immediately by 
return email, and delete this message and any attachments from your 
system. Thank you.



From: Balderrama, Jose A CTR (US) 
Reply: Tomcat Users List >
Date: 24 November 2014 at 22:17:49
To: users@tomcat.apache.org >
Subject:  question



Can tomcat run php apps and static html pages well?
Or should I run apache as well?


Thanks, Joe

Check the information on Coyote. This is a connector that allows 
Tomcat to serve HTTP requests in addition to servlets and jsps:


http://tomcat.apache.org/tomcat-4.1-doc/config/coyote.html

Gerardo Juárez M.




-
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: java.lang.IllegalStateException: Calling [asyncComplete()] is not valid for a request with Async state [COMPLETING]

2014-11-25 Thread Mark Thomas
On 25/11/2014 13:01, Vicky wrote:
> Hi Folks,
> 
> I am using Tomcat 7.0.42, in embedded mode, using NIO connector. Running on
> a linux box.
> 
> I use request.startAsync() to create an AsyncContext. And call complete()
> once everything is done. But complete() is called via a separate thread.
> 
> Any idea why am i getting this exception?

The only way that can happen is if you call complete() more that once.

Mark


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



Re: Redirecting to default webapp when domain name is entered

2014-11-25 Thread David kerber

On 11/25/2014 8:52 AM, Kernel freak wrote:

Hello,

I have already bought the domain name and the domain-id. Its a dedicated
hosting, and the plan says its allowed to use Apache tomcat. Can you please
tell me what to do to disable the service on port80?


If you don't know, we certainly don't, and you'll need to ask the 
hosting company what the service is, and how to control it.  If you have 
access to the system's configuration settings, you may be able to figure 
out what the service is that is using port 80 (httpd, IIS, or whatever) 
and disable it.  It has nothing to do with Tomcat.





On Tue, Nov 25, 2014 at 2:43 PM, David kerber  wrote:


On 11/25/2014 8:39 AM, Kernel freak wrote:


Hello Andre,

Thank you. I did the changes what you told, but I guess there is some
service running at port 80. Because now when I click domainname.com:80,
it
shows me the message by the hosting company as the "Domain name is already
booked" and all. How can I remove that service which is listening port 80?



You'll have to ask the hosting company.  It may be difficult to convince
them to allow this.





On Tue, Nov 25, 2014 at 1:43 PM, André Warnier  wrote:

  Kernel freak wrote:


  Hello friends,


I already have a project ready for deployment. It is in the form of war
file. Currently I have renamed the war file to ROOT.war and pasted it
inside webapps. I am able to access the webapp by giving
domainname.com:8080.


Instead of that I would just like to use domainname.com and it should
go
to
the webapp. Thank you very much.

System : Debian Wheezy(64 bit)
Apache tomcat : 7.0


  8080 is the port on which Tomcat is listening for requests.

That depends on your own configuration of Tomcat.
In the server.xml file, look for the HTTP  tag, and the
'port="8080"' indicated there.
If there is nothing else on that system that is already using port 80
(another webserver like Apache httpd for example), then change this
Tomcat
port to be 80, save the server.xml file,  restart Tomcat and that's it
(basically).
If Tomcat does not start, look in its logfiles why, and if you do not
understand it, copy the relevant part of the log in a new email to the
list.

If there is already something else on the system listening to port 80,
then it is quite a bit more complicated..

-
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: Redirecting to default webapp when domain name is entered

2014-11-25 Thread Kernel freak
Hello,

I have already bought the domain name and the domain-id. Its a dedicated
hosting, and the plan says its allowed to use Apache tomcat. Can you please
tell me what to do to disable the service on port80?

On Tue, Nov 25, 2014 at 2:43 PM, David kerber  wrote:

> On 11/25/2014 8:39 AM, Kernel freak wrote:
>
>> Hello Andre,
>>
>> Thank you. I did the changes what you told, but I guess there is some
>> service running at port 80. Because now when I click domainname.com:80,
>> it
>> shows me the message by the hosting company as the "Domain name is already
>> booked" and all. How can I remove that service which is listening port 80?
>>
>
> You'll have to ask the hosting company.  It may be difficult to convince
> them to allow this.
>
>
>
>
>> On Tue, Nov 25, 2014 at 1:43 PM, André Warnier  wrote:
>>
>>  Kernel freak wrote:
>>>
>>>  Hello friends,

 I already have a project ready for deployment. It is in the form of war
 file. Currently I have renamed the war file to ROOT.war and pasted it
 inside webapps. I am able to access the webapp by giving
 domainname.com:8080.


 Instead of that I would just like to use domainname.com and it should
 go
 to
 the webapp. Thank you very much.

 System : Debian Wheezy(64 bit)
 Apache tomcat : 7.0


  8080 is the port on which Tomcat is listening for requests.
>>> That depends on your own configuration of Tomcat.
>>> In the server.xml file, look for the HTTP  tag, and the
>>> 'port="8080"' indicated there.
>>> If there is nothing else on that system that is already using port 80
>>> (another webserver like Apache httpd for example), then change this
>>> Tomcat
>>> port to be 80, save the server.xml file,  restart Tomcat and that's it
>>> (basically).
>>> If Tomcat does not start, look in its logfiles why, and if you do not
>>> understand it, copy the relevant part of the log in a new email to the
>>> list.
>>>
>>> If there is already something else on the system listening to port 80,
>>> then it is quite a bit more complicated..
>>>
>>> -
>>> 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: server-status in text format

2014-11-25 Thread Jose Monreal
I was looking for a text format instead of html, because its faster when
you are deploying in 100 servers at the same time, and different services.

I'll try the xml format Konstantin was talking about.

Regards,

Saludos cordiales,

José Ignacio Monreal Bailey  |  Ingeniero Civil en Computación



 *Cuidemos del medio ambiente. Por favor no imprimas este e-mail si no es
 necesario.*

On Fri, Nov 21, 2014 at 3:32 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Jose,
>
> On 11/21/14 10:24 AM, Jose Monreal wrote:
> > Is it possible to get the same information of html manger server
> > status but in text format?
> >
> > Like this curl http://localhost:8080/manager/text/server-status
> >
> > From the documentation it only says From this link, but it doesn't
> > say if its possible to get the info from the text manager. Why it
> > hasn't been developed?
>
> What information in particular are you missing in he text server status?
>
> - -chris
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJUb4U6AAoJEBzwKT+lPKRYqL4P/2Z5mEmeblZTmHGhu5sCQlw5
> j4JSvimQKhdGKPowcD2/FU3QLh4pD2HHrQHGOakt5IYgcc7+uMl+rB/UWj8uXUbe
> 0KDHXovx58E8lUnmyk4/ogrSjDMGqs5nHLNYniULncoLO6L9maudMCcz45q9YcFl
> JYOcNp4iJqTl15u77f6y1goGHv+ac4YQZ0pNOU5mvpbvMHBQeqDifSwRilORV6jz
> to8Jteqzwhp85JFGbEyDSKihRJ7044bEcISLs8kbVEG2xp17iEc3MQ9jB3TQjoCf
> M9nh7YeIwvjs8P6ulPUtAZNTwcJ8FoZk44/XCMWMwloRGtItnhm+f4OPd2vcJSAe
> YWwPU+oWjQfpBt+xl4BQa6j9ARmUYZGiPYDWM3vbwUug0aTOiWxxMdrcpTSfPneT
> OK2bb4heqRE5oN133wd0hQnS/fmcy7Ob/s+irPYFNtwwAI9qXtgdtjQHB56Y+7sh
> StHMb/ANCkMWG9Giz+4yLtKpbChZ3vUQx1p8DPPV76/yeCefrtksmEhy3qRzyTS7
> wb/ST7nR0x1h5MJMnSe2vriMzFlknMA8gRfPLsTMJCqeTrDrHSvKum4GQbexKOSu
> 0ZeVO40+1HLGneGtPBYZpDHKwjX75vr9F17ky9QkYySwq3FHcVbkbASas/8UcPBW
> L99TBiG73uW6LNjpJVjc
> =U9EL
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Redirecting to default webapp when domain name is entered

2014-11-25 Thread David kerber

On 11/25/2014 8:39 AM, Kernel freak wrote:

Hello Andre,

Thank you. I did the changes what you told, but I guess there is some
service running at port 80. Because now when I click domainname.com:80, it
shows me the message by the hosting company as the "Domain name is already
booked" and all. How can I remove that service which is listening port 80?


You'll have to ask the hosting company.  It may be difficult to convince 
them to allow this.





On Tue, Nov 25, 2014 at 1:43 PM, André Warnier  wrote:


Kernel freak wrote:


Hello friends,

I already have a project ready for deployment. It is in the form of war
file. Currently I have renamed the war file to ROOT.war and pasted it
inside webapps. I am able to access the webapp by giving
domainname.com:8080.


Instead of that I would just like to use domainname.com and it should go
to
the webapp. Thank you very much.

System : Debian Wheezy(64 bit)
Apache tomcat : 7.0



8080 is the port on which Tomcat is listening for requests.
That depends on your own configuration of Tomcat.
In the server.xml file, look for the HTTP  tag, and the
'port="8080"' indicated there.
If there is nothing else on that system that is already using port 80
(another webserver like Apache httpd for example), then change this Tomcat
port to be 80, save the server.xml file,  restart Tomcat and that's it
(basically).
If Tomcat does not start, look in its logfiles why, and if you do not
understand it, copy the relevant part of the log in a new email to the list.

If there is already something else on the system listening to port 80,
then it is quite a bit more complicated..

-
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: Redirecting to default webapp when domain name is entered

2014-11-25 Thread Kernel freak
Hello Andre,

Thank you. I did the changes what you told, but I guess there is some
service running at port 80. Because now when I click domainname.com:80, it
shows me the message by the hosting company as the "Domain name is already
booked" and all. How can I remove that service which is listening port 80?

On Tue, Nov 25, 2014 at 1:43 PM, André Warnier  wrote:

> Kernel freak wrote:
>
>> Hello friends,
>>
>> I already have a project ready for deployment. It is in the form of war
>> file. Currently I have renamed the war file to ROOT.war and pasted it
>> inside webapps. I am able to access the webapp by giving
>> domainname.com:8080.
>>
>>
>> Instead of that I would just like to use domainname.com and it should go
>> to
>> the webapp. Thank you very much.
>>
>> System : Debian Wheezy(64 bit)
>> Apache tomcat : 7.0
>>
>>
> 8080 is the port on which Tomcat is listening for requests.
> That depends on your own configuration of Tomcat.
> In the server.xml file, look for the HTTP  tag, and the
> 'port="8080"' indicated there.
> If there is nothing else on that system that is already using port 80
> (another webserver like Apache httpd for example), then change this Tomcat
> port to be 80, save the server.xml file,  restart Tomcat and that's it
> (basically).
> If Tomcat does not start, look in its logfiles why, and if you do not
> understand it, copy the relevant part of the log in a new email to the list.
>
> If there is already something else on the system listening to port 80,
> then it is quite a bit more complicated..
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


java.lang.IllegalStateException: Calling [asyncComplete()] is not valid for a request with Async state [COMPLETING]

2014-11-25 Thread Vicky
Hi Folks,

I am using Tomcat 7.0.42, in embedded mode, using NIO connector. Running on
a linux box.

I use request.startAsync() to create an AsyncContext. And call complete()
once everything is done. But complete() is called via a separate thread.

Any idea why am i getting this exception?

Thanks,
Vicky


RE: tomcat7 shutdown himself without trace

2014-11-25 Thread Métairie , Stéphane
Sorry it's not tomcat7 but tomcat6

Tomcat Version : Apache Tomcat/6.0.24
Servlet Specification Version : 2.5
JSP version : 2.1

java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)


Server.xml

  
  
  
  
  
  

  
  



  
  

  

  


Tomcat6.conf
CATALINA_BASE="/usr/share/tomcat6"
CATALINA_HOME="/usr/share/tomcat6"
JASPER_HOME="/usr/share/tomcat6"
CATALINA_TMPDIR="/var/cache/tomcat6/temp"
JAVA_OPTS="${JAVA_OPTS} 
-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory 
-server -Xms1024m -Xmx1024m -XX:NewSize=512m -XX:MaxNewSize=512m 
-XX:PermSize=512m -XX:MaxPermSize=512m"
CATALINA_OPTS="${CATALINA_OPTS} -Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.port= 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false"
TOMCAT_USER="tomcat"
SECURITY_MANAGER="false"
SHUTDOWN_WAIT="30"
SHUTDOWN_VERBOSE=false
CATALINA_PID="/var/run/tomcat6.pid"


-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: mardi 25 novembre 2014 13:33
To: Tomcat Users List
Subject: Re: tomcat7 shutdown himself without trace

Métairie wrote:
> Hi all
> 
> We have a tomcat7 standalone in Redhat6.
> 
> Sometime the Tomcat7 suddenly stop to reply to all requests, but all server 
> parameters are ok (cpu, memory, disk, ... all are ok). There is no error 
> inside the logs. No exception, nothing.
> 
> The http-thread do not reply anymore, because the pool is fallen to a minimum 
> to 5 or 6 threads.
> I guess all http-thread are killed without any reason.
> 

Can you paste the server.xml file here ?
(Remove all comments, domain names and other confidential information if any)

To save time for everyone in the long run, can you also provide :
- the exact version of Tomcat used (7.y.z)
- the JVM version used

(You should be able to see all that by going to the Tomcat bin directory and 
executing
"version.sh")

There may be a reason for the Tomcat threads disappearing : if the minimum you 
set in the configuration is the above 5-6, and if the threads have nothing to 
do (Tomcat does not receive any requests anymore, due to some network issue 
e.g.) then the threads would "naturally" die, and Tomcat would not necessarily 
start new ones to replace them, since there is no need to.

Also maybe helpful : when the case occurs (Tomcat not responding), run the 
command :
netstat -pan --tcp
and check if anything unusual appears there (like hundreds of connections to 
the Tomcat HTTP port, in some unexpected state).


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

--

**
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error, please notify the system manager. 
This footnote also confirms that this email message has been swept by the 
mailgateway
**


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



Re: Redirecting to default webapp when domain name is entered

2014-11-25 Thread André Warnier

Kernel freak wrote:

Hello friends,

I already have a project ready for deployment. It is in the form of war
file. Currently I have renamed the war file to ROOT.war and pasted it
inside webapps. I am able to access the webapp by giving domainname.com:8080.


Instead of that I would just like to use domainname.com and it should go to
the webapp. Thank you very much.

System : Debian Wheezy(64 bit)
Apache tomcat : 7.0



8080 is the port on which Tomcat is listening for requests.
That depends on your own configuration of Tomcat.
In the server.xml file, look for the HTTP  tag, and the 'port="8080"' indicated 
there.
If there is nothing else on that system that is already using port 80 (another webserver 
like Apache httpd for example), then change this Tomcat port to be 80, save the server.xml 
file,  restart Tomcat and that's it (basically).
If Tomcat does not start, look in its logfiles why, and if you do not understand it, copy 
the relevant part of the log in a new email to the list.


If there is already something else on the system listening to port 80, then it is quite a 
bit more complicated..


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



Re: tomcat7 shutdown himself without trace

2014-11-25 Thread André Warnier

Métairie wrote:

Hi all

We have a tomcat7 standalone in Redhat6.

Sometime the Tomcat7 suddenly stop to reply to all requests, but all server 
parameters are ok (cpu, memory, disk, ... all are ok). There is no error inside 
the logs. No exception, nothing.

The http-thread do not reply anymore, because the pool is fallen to a minimum 
to 5 or 6 threads.
I guess all http-thread are killed without any reason.



Can you paste the server.xml file here ?
(Remove all comments, domain names and other confidential information if any)

To save time for everyone in the long run, can you also provide :
- the exact version of Tomcat used (7.y.z)
- the JVM version used

(You should be able to see all that by going to the Tomcat bin directory and executing 
"version.sh")


There may be a reason for the Tomcat threads disappearing : if the minimum you set in the 
configuration is the above 5-6, and if the threads have nothing to do (Tomcat does not 
receive any requests anymore, due to some network issue e.g.) then the threads would 
"naturally" die, and Tomcat would not necessarily start new ones to replace them, since 
there is no need to.


Also maybe helpful : when the case occurs (Tomcat not responding), run the 
command :
netstat -pan --tcp
and check if anything unusual appears there (like hundreds of connections to the Tomcat 
HTTP port, in some unexpected state).



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



Redirecting to default webapp when domain name is entered

2014-11-25 Thread Kernel freak
Hello friends,

I already have a project ready for deployment. It is in the form of war
file. Currently I have renamed the war file to ROOT.war and pasted it
inside webapps. I am able to access the webapp by giving domainname.com:8080.


Instead of that I would just like to use domainname.com and it should go to
the webapp. Thank you very much.

System : Debian Wheezy(64 bit)
Apache tomcat : 7.0


tomcat7 shutdown himself without trace

2014-11-25 Thread Métairie , Stéphane
Hi all

We have a tomcat7 standalone in Redhat6.

Sometime the Tomcat7 suddenly stop to reply to all requests, but all server 
parameters are ok (cpu, memory, disk, ... all are ok). There is no error inside 
the logs. No exception, nothing.

The http-thread do not reply anymore, because the pool is fallen to a minimum 
to 5 or 6 threads.
I guess all http-thread are killed without any reason.

Could you help please?

--

**
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error, please notify the system manager. 
This footnote also confirms that this email message has been swept by the 
mailgateway
**


Re: Help! parallel deployment problem.

2014-11-25 Thread Mark Thomas
On 25/11/2014 03:55, Chris Gamache wrote:
> So first, I'd be glad to. Just to be clear-- I'm not in need of a lecture,
> but will willingly take one if anyone can help me get down to a solution.
> My first attempt at asking for some assistance was met with crickets.

Your first question was very specific:

My question is directed to other tomcat admins out there who are
handling this scenario gracefully. What are you doing to handle this
problem?


I'd take the lack of response as meaning no other admins are handling
this scenario gracefully. That doesn't surprise me the feature isn't
that widely used.

> I
> haven't figured out why when I post (what I think are) well written, well
> researched and discussion-provoking questions they get no traction

It got no traction as you asked a specific question that I suspect
no-one had an answer to.

> but if I
> cry "the sky is falling" folks are more willing to attempt to lend a hand.

Because you are asking much broader, less specific question.

You have gone from "How are other folks handling this?" to "Is this the
expected behaviour? Is there a bug here?". Those are very different
questions.

> Here's my go at attempt #3:
> 
> I have a tomcat cluster. It is set up with much care according to
> http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html.
> 
> It mostly works fine. On occasion (twice a week or so) there will be one or
> more servers which didn't get the message that a new war was deployed
> (continuous deployment using the tomcat parallel deployment scheme. e.g.
> theapp##007.war) and they happily continue to run the old version of the
> war.
> 
> In a farm deployment scenario, the master node will announce to the cluster
> a new artifact is available and then the clustered tomcats will retrieve
> and deploy the new artifact. I can't pin down the problem, but let just say
> for argument's sake it is a true link-down situation. There doesn't seem to
> exist a mechanism to re-announce, or announce at regular intervals.

You could always check the source code to be sure. From memory, it
should be fairly obvious from the message types whether or not such a
feature exists.

> This seems like a real weakness in the scheme.

Agreed.

> That makes me think I'm missing something obvious.

Probably not.

> If it works like it says it should in the docs I
> shouldn't be having this issue.

The docs don't appear to cover this scenario.

> Either there's something wrong with my
> config or there's a problem with tomcat. Based on the hair I have left
> after pulling mine out, I'm leaning toward a problem with tomcat. Is anyone
> leveraging FarmWebDeployer and Parallel Deployment in their architecture
> successfully? If so, DenverCoder9, what did you see?!?

I know the parallel deployment works with the FarmWarDeployer since I
tested that when I wrote the parallel deployment implementation. I
didn't test behaviour with failed nodes.

Mark


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



Re: question

2014-11-25 Thread André Warnier

Hi Gerardo.

The information which you are pointing to below, is relative to Tomcat 4.1, which has been 
archived probably more than 10 years ago and is no longer being developed or supported.

Please don't do that.

The current version of Tomcat is 8.0, and its documentation can be found here :
http://tomcat.apache.org/tomcat-8.0-doc/index.html

Gerardo Juarez wrote:


On 11/24/2014 03:29 PM, Fabio Ricci wrote:

Hi Joe

Yes. You do not need to run apache for html and php (although it seems 
to me more practical).
For PHP you might want to have a look at 
http://php-java-bridge.sourceforge.net/pjb/


Kind regards / Meilleures salutations / Freundliche Grüsse
Fabio Ricci
semweb   
Semantic Web Technologies · Records Management
Software systems · ICT coaching · ICT Projects leading   
www.semweb.ch


Weinmanngasse 26
CH-8700 Küsnacht ZH (Switzerland)

Tel.

+41 (076) 5281961
+39 (389) 0681334

Skype:

semweb-llc

Confidentiality Warning: This message and any attachments are intended 
only for the use of the intended recipients, are confidential and 
maybe privileged. If you are not the intended recipient, you are 
hereby notified that any review, retransmission, conversion to hard 
copy, copying, circulation or other use of this message and any 
attachments is strictly prohibited. If you are not the intended 
recipient, please notify the sender immediately by return email, and 
delete this message and any attachments from your system. Thank you.



From: Balderrama, Jose A CTR (US) 
Reply: Tomcat Users List >
Date: 24 November 2014 at 22:17:49
To: users@tomcat.apache.org >
Subject:  question



Can tomcat run php apps and static html pages well?
Or should I run apache as well?


Thanks, Joe

Check the information on Coyote. This is a connector that allows Tomcat 
to serve HTTP requests in addition to servlets and jsps:


http://tomcat.apache.org/tomcat-4.1-doc/config/coyote.html

Gerardo Juárez M.




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



Re: Deploying .ca-bundle file & .crt file as SSL certificates

2014-11-25 Thread Kernel freak
Hello Christopher,

I don't have the server.key and server.crt. I have root access to server, I
can generate my own if necessary. I only have .crt and .ca-bundle file. Can
you tell me what to do. Thank you very much for your help.

On Mon, Nov 24, 2014 at 7:48 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Niranjan,
>
> On 11/24/14 10:51 AM, Niranjan Babu Bommu wrote:
> > I think you have create a keystore from the cert, please follow
> > these instruction and ket me know.
> >
> > Create store with temporary key inside:
> >
> > keytool -genkey -alias  -keystore yourkeystore.jks
> > -storepass Hello1 Then delete existing entry:
> >
> > keytool -delete -alias temp -keystore yourkeystore.jks -storepass
> > Hello1 Now you've got empty store. You can check that it's empty:
> >
> > keytool -list -keystore yourkeystore.jks -storepass Hello1 Then
> > import your certificate to the store:
> >
> > keytool -import -alias   -file cert_file.crt -keypass
> keypass
> > -keystore yourkeystore.jks -storepass Hello1
>
> Nope: the existing key *and* cert need to be imported simultaneously
> into the keystore. If the OP already has a cert, he's already got a
> key, too.
>
> The problem is that you probably started with OpenSSL to generate your
> keys and stuff. Here is the proper procedure to import your key,
> certificate, and CA bundle into a Java keystore.
>
> You'll need these files:
>
> server.key (this is your server's secret key)
> server.crt (this is your server's certificate, signed by the CA)
> ca.crt (this is your CA's certificate)
>
> Here is the incantation:
>
> $ openssl pkcs12 -export -in server.crt -inkey server.key \
>-certfile ca.crt -out keystore.p12 -chain
>
> $ $JAVA_HOME/bin/keytool -importkeystore -srckeystore keystore.p12 \
>  -srcstoretype pkcs12 \
>  -destkeystore keystore.jks
>
> Now, use keystore.jks in Tomcat's server.xml.
>
> If you already had created your key and cert request using Java's
> 'keytool', then you can instead just import the signed certificate
> into your keystore:
>
> $ $JAVA_HOME/bin/keytool -importcert -file server.crt \
>  -keystore keystore.jks \
>  -alias [alias]
>
> If you used an alias to create the certificate signing request (CSR),
> then use the same alias in the above command.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJUc32WAAoJEBzwKT+lPKRYn5UP/RynvOjSw2UlMn4wwPlvWIQC
> EiyfUjHaSK3YSCniGK9yiDuwEshXjAE88aEFptmnhcgZnJpJ1o0ybbdw5xZLk+Vv
> 68XDqnuD1klYsmufnDKETKTEpQk4aMke8jHUdbLtx4/TtK0aKZirEKzmDrXFlBDI
> YvEdlBvhH494Q/fvm0ARBdV1I8nwSt33DQ8WPcAMNVdgJzla7BcgAqupkBiMCpD4
> 49BDOyDZmiulFzL0Co6d2bEx/yWHECx1Zu/gfH6NXjeJ/UgZNkn9aABS8RsO+sa5
> Oq/AJvXTgcKGUUQpBPOVcmhOrjgG9jYyMd9TfYZHllNQDqbBL7MgpkmXiSEGusAg
> zvsfiksWEhDj4xremuQHVstCV4FZYqyLKjfBbiYABfZ50mOoYgF4J+sN97/CVo8F
> pp29hiDN7YnqPCJzlWFi0DRPOFjJX2CFXyzoxkDvx/5gXhn8ZoPwU7i6gGxmcMg1
> 52xPXjEPBbf/q+MbwxUfRRBvNTzXB+b3hU5aN5HHpflqxodasNod+kW7VWnZZZI/
> aCq5kKdXX7VQFfsEtWJnPYDe2yCj/KHzLCDAJMJA8iLpMUrN1Xb8jEOOe0vq5h60
> vFUiFMrEyWOv7BPVszsnDx1EO8tDpDZS766/AigtYxGJzAF0DS8wNX9awCGYknxB
> zSoDIu3mfw1r3546epjF
> =IeMh
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>