RE: Tomcat 8 Application dispatcherServlet Stats

2016-01-25 Thread Theo Sweeny
Chris,

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: 25 January 2016 23:29
To: Tomcat Users List 
Subject: Re: Tomcat 8 Application dispatcherServlet Stats

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Theo,

On 1/25/16 4:12 AM, Theo Sweeny wrote:
> Hi Chris -
>
> On 1/14/16 5:53 AM, Theo Sweeny wrote:
>> Hello Kyohei,
>>
>> -Original Message- From: Kyohei Nakamura
>> [mailto:nakamura.kyohei@gmail.com] Sent: 14 January 2016
>> 09:59 To: Tomcat Users List  Subject:
>> Re: Tomcat 8 Application dispatcherServlet Stats
>>
>> What does "response time" mean?
>>
>> The "Processing time" include a time that is from the end of service
>> method of servlet instance until the end of
>> StandardWrapperValve#invoke().
>>
>>
>> 2016-01-14 17:27 GMT+09:00 Theo Sweeny :
>>
>>> Hello Kyohei,
>>>
>>> -Original Message- From: Kyohei Nakamura
>>> [mailto:nakamura.kyohei@gmail.com] Sent: 14 January 2016
>>> 06:45 To: Tomcat Users List  Subject:
>>> Re: Tomcat 8 Application dispatcherServlet Stats
>>>
>>> Hello
>>>
>>> The "Processing time" metric represents the execution time of
>>> StandardWrapperValve#invoke(). This is the execution time of the
>>> servlet and filters. This value of "Processing time" is the total
>>> time of each request execution time.
>>>
>>> What is the dispatcherServlet? If dispatcherServlet accept all
>>> request as a front controller(like Spring's DispatcherServlet), then
>>> this value is the total execution time of all request that the
>>> context receive.
>>>
>>>
>>> 2016-01-13 20:19 GMT+09:00 Theo Sweeny
>>> :
>>>
 Hello - at the moment stats can be found for Tomcat 8 web services
 using the manager UI /manager/status/all

 Is the "Processing time" metric found under dispatcherServlet [ / ]
 subsection, the total time take to serve all requests, including
 the response time for each request?

 Regards,

 Theo
>>>
>>> Does the total execution time for each request include the response
>>> time?
>>>
>>> Thank you,
>>>
>>> Theo
>>>
>>
>> I think indirectly you have answered my question. From a network
>> perspective you have the initial connection time to send the request
>> (request time), then you have the time to process the request, and
>> finally response time back to the client. Both the processing time
>> and response time for the purpose of this task are merged under the
>> umbrella of response time. So going full circle - the
>> dispatcherServlet Processing time fits the bill of response time.
>
> There is a case where this might not actually give you what you are
> looking for -- which sounds essentially like the amount of time the
> server spent processing that request.
>
> If StandardWrapperValve only times how long invoke() takes and (and I
> haven't read the code, so I'm not sure) some component in Tomcat
> executes *after* invoke() completes for the purposes of flushing any
> buffered data back to the client, then "Processing Time" may be off by
> the amount of time it takes Tomcat to flush those buffers back to the
> client. If you have big buffers or slow clients, this could add up
> quickly.
>
> -chris
>
> Thanks for the reply. I've done some further digging into the
> Application List Startup Time. Here is one example from the Tomcat
> Manager -
>
> localhost/account-information-bs-1.1##v1.1.1 Start time: Fri Jan 22
> 13:26:17 GMT 2016 Startup time: 33 ms TLD scan time: 0 ms
>
> When the startup time is compared back to the catalina.out log for the
> same webapp, the time is dramatically more (307,324 ms) as seen here -
>
> 22-Jan-2016 13:26:17.204 INFO [localhost-startStop-15]
> org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
> application archive
> /opt/tomcat/webapps/account-information-bs-1.1##v1.1.1.war has
> finished in 307,324 ms
>
> Any ideas why such a difference exists?

The above is the time it takes to deploy the application, not the time it takes 
to service a request (or a whole bunch of requests over a period of time).

Maybe I don't understand your question?

- -chris

Sorry - I went off topic a bit. Yes the original question was regarding request 
processing time. The latter question is regarding start up time, which you 
mentioned as one being the startup time and the other the deployment time.

Thanks for the help.

Theo

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

Avios Group (AGL) Ltd is a limited company registered in England (registered 
number 2260073 and VAT number 512566754) whose registered address is Astral 
Towers, Betts Way, London Road, Crawley, West Sussex RH10 9XY . Avios Group 
(AGL) Limited is part of the IAG group of companies This email and any 

Re: Deployment of WEB App from ANT build fails with IOException.

2016-01-25 Thread Karl Hauschildt
Hmmm... It appears that the requests are coming in as the tomcatadmin user
which makes sense as that's what the deploy task is configured to use. In
this cased, the target box is Linux and there is no tomcatadmin setup. When
the sysadmin's get in ...

On Mon, Jan 25, 2016 at 7:17 AM, Mark Thomas  wrote:

> On 25/01/2016 12:02, Karl Hauschildt wrote:
> > Specifically what would I do to enable the logging? I raised the level(s)
> > to FINEST and DEBUG wherever I saw them at something higher.
> > Thanks again.
>
> http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html#Access_Log_Valve
>
> Mark
>
>
> >
> > On Mon, Jan 25, 2016 at 6:57 AM, Mark Thomas  wrote:
> >
> >> On 25/01/2016 11:42, Karl Hauschildt wrote:
> >>> Hi Mark:
> >>>
> >>> This is what I have in the tomcat-users.xml. And I've tried pairing it
> >> down
> >>> to all the various combo's per suggestions in searches. Behavior never
> >>> changes.
> >>>
> >>> 
> >>> 
> >>> 
> >>> 
> >>>  >>> roles="manager-gui,manager-script,manager-jmx,manager-status"/>
> >>>
> >>> Thanks for taking the time to think about this.
> >>
> >> OK. Make sure you have actually removed all the XML comment markers from
> >> around those entries.
> >>
> >> Next, be aware that allocating the manager-gui and manager-script roles
> >> to the same user exposes you to CSRF attacks. Not necessarily an issue
> >> as long as you are a) aware and b) careful (i.e. if you connect to the
> >> manager gui don't do anything else in the same browser and close the
> >> browser completely when you are done.
> >>
> >> After that, I'd modify your access log configuration to log the name of
> >> the authenticated user and then see what it says when you try and
> deploy.
> >>
> >> Mark
> >>
> >>
> >>>
> >>> On Mon, Jan 25, 2016 at 2:41 AM, Mark Thomas 
> wrote:
> >>>
>  On 24 January 2016 21:49:40 GMT+00:00, Karl Hauschildt <
>  karl.hauschi...@gmail.com> wrote:
> >
> >
> > Background:
> >
> > JAVA Web application, Eclipse workspace with an ANT build.xml.
> >
> > Using Windows, this project builds using java 1.7, deploys to
> multiple
> > Solaris environments running Tomcat 5, 6 or 7 and runs cleanly.
> >
> >
> >
> > I have to deploy the preceding to a Linux environment with Tomcat 8.
> > Which
> > is running JAVA 1.8
> >
> >
> >
> > Problem:
> >
> > The deploy task fails with: BUILD FAILED java.io.IOException:
> Error
> > writing request body to server
> >
> > Looking in the Tomcat, localhost.log, I see: "PUT
> > /manager/deploy?path=%2FFXInSite=true HTTP/1.1" 403 3196
> >
> > The other logs contain no errors or warnings.
> >
> >
> >
> > Investigations:
> >
> > I have set the Tomcat (catalina) logging levels to DEBUG and FINEST.
> >
> > I can get into the tomcat and the manager on the same port as what
> the
> > delpoyment uses.
> >
> > The user that Tomcat is running under ( not root ) has full
> permissions
> > to
> > all folders.
> >
> > I have compared the server.xml and web.xml configuration files
> between
> > Linux
> > and Solaris and they are essentially identical.
> >
> > Google searches for anything to do with ANT and the delpoy task,
> Tomcat
> > 403
> > errors, permissions have been unsucessful.
> >
> >
> >
> > Thank you for your time and consideration.
> 
>  What user have you configured for the deploy task?
> 
>  What roles have you configured for that user?
> 
>  Mark
> 
> 
> 
>  -
>  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>  For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> >>>
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Synchronous Tomcat cluster

2016-01-25 Thread João Sávio
Hello guys

I'm trying to setup a Tomcat cluster to be synchronous (default uses
channelSendOptions=8, which is asynchronous). Some time ago, I had issues
with session replication, I asked on this list, and using the configuration
channelSendOptions="6" solved my issues. However, now, during load tests I
can observe that the session is not replicated on all cases during load
tests.

Here is the only change I made from the default configuration:




On logs, I can see errors on "Error Msg":


Jan 25, 2016 2:52:10 PM
org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor report
INFO: ThroughputInterceptor Report[
Tx Msg:63301 messages
Sent:227.38 MB (total)
Sent:75.83 MB (application)
Time:5.67 seconds
Tx Speed:40.11 MB/sec (total)
TxSpeed:13.38 MB/sec (application)
Error Msg:39
Rx Msg:20 messages
Rx Speed:0.00 MB/sec (since 1st msg)
Received:227.72 MB]

So, do you know other configuration that I should change in order to
mitigate this?

Thanks
João


Re: TLSv1.2 handshake failure on outgoing connections

2016-01-25 Thread Hrivnak, Dan
Thank you Chris! I’m glad to hear that Tomcat should have nothing to do with 
this as that helps narrow down what I should look at. The unit test (really an 
integration test) spins up an app server using Guice and makes a call to the 
same remote service (verified same URL, certificate chains, etc). The only 
difference I can find is that one is running within Tomcat and one isn’t. The 
actual client code is using Axis 2 to call a SOAP service, so the raw HTTP 
connection code is inside the Axis library unfortunately.

Thanks again for your help!

Dan Hrivnak





On 1/22/16, 2:36 PM, "Christopher Schultz"  wrote:

>Dan,
>
>On 1/21/16 2:57 PM, Hrivnak, Dan wrote:
>> Environments:
>> * Mac OS X 10.10.5; Tomcat 7.0.67, 8.0.30; Java 1.8.0_60
>> * RHEL 6 (Kernel 2.6.32); Tomcat 7.0.67; Java 1.8.0_60
>> 
>> Problem:
>> Making an outgoing HTTPS connection from Axis2 client code living inside the 
>> war, I get a failure during the TLSv1.2 handshake saying “Could not generate 
>> DH keypair”. Unlike most examples I found online, there was no additional 
>> information about the key size. The same client code when run from a unit 
>> test using plain Java works just fine. Below are snippets of one difference 
>> I noticed with the Server key in the logs:
>> 
>> 
>> 
>> Running from within Tomcat:
>> *** ECDH ServerKeyExchange
>> Signature Algorithm SHA1withRSA
>> Server key: Sun EC public key, 256 bits
>>   public x coord: 
>> 112918107330736490567973848952126837545983212398065462286267971433368342872647
>>   public y coord: 
>> 30155777565237297899065179509488316850099974838272315813007505317208002177712
>>   parameters: secp256r1 [NIST P-256, X9.62 prime256v1] (1.2.840.10045.3.1.7)
>> http-bio-8080-exec-6, handling exception: java.lang.RuntimeException: Could 
>> not generate DH keypair
>> %% Invalidated:  [Session-4, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384]
>> http-bio-8080-exec-6, SEND TLSv1.2 ALERT:  fatal, description = 
>> internal_error
>> 
>> 
>> 
>> Running from plain Java (within IntelliJ as a JUnit test in case that 
>> matters):
>> *** ECDH ServerKeyExchange
>> Signature Algorithm SHA1withRSA
>> Server key: EC Public Key
>> X: 
>> 726ad077a87d97604c4507989bb1d6c4715ee23399e42543e19dc39048abe3cb
>> Y: 
>> 904cde963f872bd32691e86565e6f0ab09ebf833ee93edd0200a9d81299410e2
>> 
>> *** ServerHelloDone
>> *** ECDHClientKeyExchange
>> ECDH Public value:  { 4, 19, 187, 197, 193, 165, 157, 121, 79, 161, 160, 25, 
>> 239, 100, 105, 199, 101, 160, 54, 96, 128, 159, 61, 83, 144, 237, 233, 235, 
>> 118, 100, 47, 50, 85, 98, 192, 79, 174, 211, 10, 218, 35, 207, 203, 3, 88, 
>> 41, 100, 126, 223, 10, 139, 18, 101, 59, 243, 152, 125, 4, 241, 201, 153, 
>> 232, 172, 74, 0 }
>> main, WRITE: TLSv1.2 Handshake, length = 70
>> 
>> 
>> Note the difference in the "Server key". Is Tomcat somehow intercepting the 
>> outgoing connection and handling it itself? If so, where would I configure 
>> the security settings for that type of connection? Everything I've been able 
>> to find relates to configuring Tomcat as the server not as the client for 
>> SSL/TLS-related things. Please let me know if there is more information that 
>> would help!
>
>Tomcat has no part in this conversation.
>
>Something definitely looks fishy, here. What does your unit test code
>look like? What about the code that runs from within the webapp?
>
>Are you sure you are contacting the same URL in both cases?
>
>-chris
>
>-
>To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>For additional commands, e-mail: users-h...@tomcat.apache.org
>

All information in this message is confidential and may be legally privileged. 
Only intended recipients are authorized to use it.

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



Re: switching between Java8 and Java 7 under tomcat7 leads to error

2016-01-25 Thread Karl Hauschildt
Be careful. The only real way to know what tomcat is using is to get into
the manager who will display the java version it is using. Their startup
script makes some determination on the fly.

On Mon, Jan 25, 2016 at 1:34 PM, George Sexton 
wrote:

>
>
> On 1/25/2016 3:52 AM, Christoph P.U. Kukulies wrote:
>
>> Thanks. Will give that a try.
>>
>> How can I tell, which java engine Tomcat is actually using?
>>
>> At a CMD prompt I'm getting:
>>
>>
>> C:\> java -version
>> java version "1.8.0_71"
>> Java(TM) SE Runtime Environment (build 1.8.0_71-b15)
>> Java HotSpot(TM) 64-Bit Server VM (build 25.71-b15, mixed mode)
>>
>
> If you have a utility that shows what open files the Tomcat process has,
> that would work. Alternatively, get the Manager application running and see
> what information it provides under the Server Status screen.
>
>
>
>
>> --
>> Christoph
>>
>>
>> At Am 22.01.2016 um 18:28 schrieb George Sexton:
>>
>>>
>>>
>>> On 1/22/2016 6:06 AM, Christoph P.U. Kukulies wrote:
>>>
 Windows 7:

 Today I installed Java 8 on my windows 7 machine and did an upgrade of
 the CMS at the same time (from OpenCMS 9.5.2 to 9.5.3).
 After the Java update and the CMS update suddenly my tomcat 6.0.39
 didn't start any longer. The service gave an error at start time:

 Der Dienst "Apache Tomcat 6.0 Tomcat6" wurde mit folgendem
 dienstspezifischem Fehler beendet: Unzulässige Funktion..


>>> I've seen this on Windows when upgrading the JRE. The solution that
>>> worked for me (multiple times) was to uninstall Java, and then re-install
>>> it. Make sure you grab the correct version (x86, x64) to go with your
>>> Tomcat install.
>>>
>>>
>>>
>>> My thoughts came to tomcat6 possibly not being compatible with Java8 and
 so I decided to install tomcat 7.0 which started fine.

 When starting my CMS system again I now found that it did some
 unpleasant things for which I wanted to rule out tomcat7 being the culprit
 and switch the jvm.dll in the tomcat7 configurator to the jre1.7
 jvm.dll.

 Then suddenly I got the same error as under tomcat6.0 when I tried to
 start tomcat7 again.

 Could it be that the Java8 installer screws the existing Java 7 ? Or
 does it change some global parameters that tomcat reads at start time.


 Thanks.

 --
 Christoph



>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
> --
> George Sexton
> *MH Software, Inc.*
> Voice: 303 438 9585
> http://www.mhsoftware.com
>


Re: ids of all active sessions

2016-01-25 Thread João Sávio
I think you can also retrieve them via JMX

Regards

2016-01-23 9:05 GMT-02:00 Kaouthar Ghorbel :

> thanks Thomas ☺
>
> 2016-01-18 10:02 GMT+01:00 Thomas Scheffler  >:
>
> > Am 18.01.16 um 09:35 schrieb Kaouthar Ghorbel:
> >
> >> Hello everyone I want to retrieve the ids of all active sessions in the
> >> servlet.
> >>
> >> thanks for your help :)
> >>
> >>
> > Hi Kaouthar,
> >
> > look for the HttpSessionListener and collect that information on your
> own:
> >
> >
> >
> https://tomcat.apache.org/tomcat-8.0-doc/servletapi/javax/servlet/http/HttpSessionListener.html
> >
> > regards,
> >
> > Thomas
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>


Re: switching between Java8 and Java 7 under tomcat7 leads to error

2016-01-25 Thread George Sexton



On 1/25/2016 3:52 AM, Christoph P.U. Kukulies wrote:

Thanks. Will give that a try.

How can I tell, which java engine Tomcat is actually using?

At a CMD prompt I'm getting:


C:\> java -version
java version "1.8.0_71"
Java(TM) SE Runtime Environment (build 1.8.0_71-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.71-b15, mixed mode)


If you have a utility that shows what open files the Tomcat process has, 
that would work. Alternatively, get the Manager application running and 
see what information it provides under the Server Status screen.





--
Christoph


At Am 22.01.2016 um 18:28 schrieb George Sexton:



On 1/22/2016 6:06 AM, Christoph P.U. Kukulies wrote:

Windows 7:

Today I installed Java 8 on my windows 7 machine and did an upgrade 
of the CMS at the same time (from OpenCMS 9.5.2 to 9.5.3).
After the Java update and the CMS update suddenly my tomcat 6.0.39 
didn't start any longer. The service gave an error at start time:


Der Dienst "Apache Tomcat 6.0 Tomcat6" wurde mit folgendem 
dienstspezifischem Fehler beendet: Unzulässige Funktion..




I've seen this on Windows when upgrading the JRE. The solution that 
worked for me (multiple times) was to uninstall Java, and then 
re-install it. Make sure you grab the correct version (x86, x64) to 
go with your Tomcat install.




My thoughts came to tomcat6 possibly not being compatible with Java8 
and so I decided to install tomcat 7.0 which started fine.


When starting my CMS system again I now found that it did some 
unpleasant things for which I wanted to rule out tomcat7 being the 
culprit
and switch the jvm.dll in the tomcat7 configurator to the jre1.7 
jvm.dll.


Then suddenly I got the same error as under tomcat6.0 when I tried 
to start tomcat7 again.


Could it be that the Java8 installer screws the existing Java 7 ? Or 
does it change some global parameters that tomcat reads at start time.



Thanks.

--
Christoph





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



--
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com


Re: switching between Java8 and Java 7 under tomcat7 leads to error

2016-01-25 Thread Terence M. Bandoian

On 1/25/2016 12:34 PM, George Sexton wrote:



On 1/25/2016 3:52 AM, Christoph P.U. Kukulies wrote:

Thanks. Will give that a try.

How can I tell, which java engine Tomcat is actually using?

At a CMD prompt I'm getting:


C:\> java -version
java version "1.8.0_71"
Java(TM) SE Runtime Environment (build 1.8.0_71-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.71-b15, mixed mode)


If you have a utility that shows what open files the Tomcat process 
has, that would work. Alternatively, get the Manager application 
running and see what information it provides under the Server Status 
screen.




Also, the Tomcat Windows Service Installer includes a configuration 
utility (I'm not sure about the zip downloads).  In the Java tab of the 
utility, the JVM may be selected.


-Terence Bandoian
/http://www.tmbsw.com/
/





--
Christoph


At Am 22.01.2016 um 18:28 schrieb George Sexton:



On 1/22/2016 6:06 AM, Christoph P.U. Kukulies wrote:

Windows 7:

Today I installed Java 8 on my windows 7 machine and did an upgrade 
of the CMS at the same time (from OpenCMS 9.5.2 to 9.5.3).
After the Java update and the CMS update suddenly my tomcat 6.0.39 
didn't start any longer. The service gave an error at start time:


Der Dienst "Apache Tomcat 6.0 Tomcat6" wurde mit folgendem 
dienstspezifischem Fehler beendet: Unzulässige Funktion..




I've seen this on Windows when upgrading the JRE. The solution that 
worked for me (multiple times) was to uninstall Java, and then 
re-install it. Make sure you grab the correct version (x86, x64) to 
go with your Tomcat install.




My thoughts came to tomcat6 possibly not being compatible with 
Java8 and so I decided to install tomcat 7.0 which started fine.


When starting my CMS system again I now found that it did some 
unpleasant things for which I wanted to rule out tomcat7 being the 
culprit
and switch the jvm.dll in the tomcat7 configurator to the jre1.7 
jvm.dll.


Then suddenly I got the same error as under tomcat6.0 when I tried 
to start tomcat7 again.


Could it be that the Java8 installer screws the existing Java 7 ? 
Or does it change some global parameters that tomcat reads at start 
time.



Thanks.

--
Christoph





-
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: Query regarding HAProxy + Embedded Tomcat(8.0.20)

2016-01-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mohammad,

On 1/24/16 12:11 PM, Mohammad Salman wrote:
> Hi Chris, i am using Embedded-tomcat via spring-boot. So most the
> configuration is automatically done by it.
> 
> i have configured only maxThread value to 1000 thread per host.

You can't set the maximum number of threads for a host, only for a
connector (which must be attached to a service, not a host).

I don't see any 1s timeouts that you have configured in HAproxy.
That's why I was wondering what is being configured on the Tomcat side
(specifically, the keep-alive timeout).

If you have 1 connections from HAProxy ( x 3 ) then each Tomcat
server should have 3 connections available. The number of threads
is not important unless you are really using a significant number of
those 3 connections simultaneously, or if you are using the BIO
connector (which requires one thread for each connection).

> I have managed to get some configuration via jConsole. PFA
> screenshot.

Non-text attachments are stripped from the list, so nothing came through
.

- -chris

> On Sat, Jan 23, 2016 at 2:07 AM, Christopher Schultz 
>  > wrote:
> 
> Mohammad,
> 
> On 1/21/16 2:02 PM, Mohammad Salman wrote:
>> Hi, I am seeing periodic latency spikes in HAProxy logs. Latency
>> spike correspond to high *TC* (Backend connect time ) times (all
>> ranging
> from
>> *1000-1010* ms). Suspecting some kind of timeout happening but
> doesnt know
>> which one.
>> 
>> Following is the HAProxy configuration Current HAProxy config
>> timeouts:
>> 
>> retries 3 timeout http-request10s timeout
>> queue   1m timeout connect 10s timeout client
>> 1m timeout server  5m timeout http-keep-alive 100s 
>> timeout check   10s maxconn 1
>> 
>> while analyzing HAProxy logs, i have seen a pattern in TC
>> occurances. each tomcat server have TC for all HAproxy at some
>> second. so issues seems to be with tomcat config.
>> 
>> 
>> i am using default config of embedded tomcat (8.0.20)
>> 
>> in my infra, there are 3 HAProxy servers(for load balancing) 3
>> embedded tomcat servers
>> 
>> Please suggest if someone knows whats going wrong in the system
>> ?
> 
> What is your Tomcat  configuration?
> 
> -chris
> 
> -
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>  For additional
> commands, e-mail: users-h...@tomcat.apache.org 
> 
> 
> 
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlamsPUACgkQ9CaO5/Lv0PB6CQCfVzLrw7m9jZ5u7Ohd5zMhzCmO
GZAAn1JER6i00uYdJeQ1AOaUQ5ci2fkM
=+1YU
-END PGP SIGNATURE-

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



Re: TLSv1.2 handshake failure on outgoing connections

2016-01-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dan,

On 1/25/16 9:28 AM, Hrivnak, Dan wrote:
> Thank you Chris! I’m glad to hear that Tomcat should have nothing
> to do with this as that helps narrow down what I should look at.
> The unit test (really an integration test) spins up an app server
> using Guice and makes a call to the same remote service (verified
> same URL, certificate chains, etc). The only difference I can find
> is that one is running within Tomcat and one isn’t. The actual
> client code is using Axis 2 to call a SOAP service, so the raw HTTP
> connection code is inside the Axis library unfortunately.

You might want to check the effective system properties to see if
there is a JVM-wide trust store in use, or any other TLS-related
properties. For instance, it's possible to enable/disable protocols
and such using system properties, and it's also possible to configure
everything explicitly using code.

Tomcat does the latter for incoming connections, but, as I mentioned,
doesn't have any hooks into outgoing connections. You should be
dealing with JSSE, though through Axis in your case.

Good luck,
- -chris

-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlamrZ4ACgkQ9CaO5/Lv0PDUYwCgtYzYzC/ZhuqxUX3/8PkF5rEF
ETEAn0a92HLNgFmIK0z/4zWsv4qP2YAz
=svtS
-END PGP SIGNATURE-

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



Re: Deployment of WEB App from ANT build fails with IOException.

2016-01-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Karl,

On 1/25/16 7:41 AM, Karl Hauschildt wrote:
> Hmmm... It appears that the requests are coming in as the
> tomcatadmin user which makes sense as that's what the deploy task
> is configured to use. In this cased, the target box is Linux and
> there is no tomcatadmin setup. When the sysadmin's get in ...

Remember that the username used for HTTP authentication has no
connection to system-level users. The username used in the Ant tasks
to deploy your web applications only has to agree with those users you
have configured in conf/tomcat-users.xml (on the target server where
the manager app is actually running). Also remember that Tomcat won't
re-load conf/tomcat-users.xml while it's running... you'll have to
bounce Tomcat to pick-up any changes you make.

Hope that helps,
- -chris

> On Mon, Jan 25, 2016 at 7:17 AM, Mark Thomas 
> wrote:
> 
>> On 25/01/2016 12:02, Karl Hauschildt wrote:
>>> Specifically what would I do to enable the logging? I raised
>>> the level(s) to FINEST and DEBUG wherever I saw them at
>>> something higher. Thanks again.
>> 
>> http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html#Access_Log_
Valve
>>
>>
>> 
Mark
>> 
>> 
>>> 
>>> On Mon, Jan 25, 2016 at 6:57 AM, Mark Thomas 
>>> wrote:
>>> 
 On 25/01/2016 11:42, Karl Hauschildt wrote:
> Hi Mark:
> 
> This is what I have in the tomcat-users.xml. And I've tried
> pairing it
 down
> to all the various combo's per suggestions in searches.
> Behavior never changes.
> 
>   rolename="manager-script"/>  
>   username="tomcatadmin" password="tomcatpwd" 
> roles="manager-gui,manager-script,manager-jmx,manager-status"/>
>
>
> 
Thanks for taking the time to think about this.
 
 OK. Make sure you have actually removed all the XML comment
 markers from around those entries.
 
 Next, be aware that allocating the manager-gui and
 manager-script roles to the same user exposes you to CSRF
 attacks. Not necessarily an issue as long as you are a) aware
 and b) careful (i.e. if you connect to the manager gui don't
 do anything else in the same browser and close the browser
 completely when you are done.
 
 After that, I'd modify your access log configuration to log
 the name of the authenticated user and then see what it says
 when you try and
>> deploy.
 
 Mark
 
 
> 
> On Mon, Jan 25, 2016 at 2:41 AM, Mark Thomas
> 
>> wrote:
> 
>> On 24 January 2016 21:49:40 GMT+00:00, Karl Hauschildt < 
>> karl.hauschi...@gmail.com> wrote:
>>> 
>>> 
>>> Background:
>>> 
>>> JAVA Web application, Eclipse workspace with an ANT
>>> build.xml.
>>> 
>>> Using Windows, this project builds using java 1.7,
>>> deploys to
>> multiple
>>> Solaris environments running Tomcat 5, 6 or 7 and runs
>>> cleanly.
>>> 
>>> 
>>> 
>>> I have to deploy the preceding to a Linux environment
>>> with Tomcat 8. Which is running JAVA 1.8
>>> 
>>> 
>>> 
>>> Problem:
>>> 
>>> The deploy task fails with: BUILD FAILED
>>> java.io.IOException:
>> Error
>>> writing request body to server
>>> 
>>> Looking in the Tomcat, localhost.log, I see: "PUT 
>>> /manager/deploy?path=%2FFXInSite=true HTTP/1.1"
>>> 403 3196
>>> 
>>> The other logs contain no errors or warnings.
>>> 
>>> 
>>> 
>>> Investigations:
>>> 
>>> I have set the Tomcat (catalina) logging levels to
>>> DEBUG and FINEST.
>>> 
>>> I can get into the tomcat and the manager on the same
>>> port as what
>> the
>>> delpoyment uses.
>>> 
>>> The user that Tomcat is running under ( not root ) has
>>> full
>> permissions
>>> to all folders.
>>> 
>>> I have compared the server.xml and web.xml
>>> configuration files
>> between
>>> Linux and Solaris and they are essentially identical.
>>> 
>>> Google searches for anything to do with ANT and the
>>> delpoy task,
>> Tomcat
>>> 403 errors, permissions have been unsucessful.
>>> 
>>> 
>>> 
>>> Thank you for your time and consideration.
>> 
>> What user have you configured for the deploy task?
>> 
>> What roles have you configured for that user?
>> 
>> Mark
>> 
>> 
>> 
>> -
- 
>>
>> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail:
>> users-h...@tomcat.apache.org
>> 
>> 
> 
 
 
 ---
- --

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

Re: Tomcat 8 Application dispatcherServlet Stats

2016-01-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Theo,

On 1/25/16 4:12 AM, Theo Sweeny wrote:
> Hi Chris -
> 
> On 1/14/16 5:53 AM, Theo Sweeny wrote:
>> Hello Kyohei,
>> 
>> -Original Message- From: Kyohei Nakamura
>> [mailto:nakamura.kyohei@gmail.com] Sent: 14 January 2016
>> 09:59 To: Tomcat Users List  Subject:
>> Re: Tomcat 8 Application dispatcherServlet Stats
>> 
>> What does "response time" mean?
>> 
>> The "Processing time" include a time that is from the end of
>> service method of servlet instance until the end of
>> StandardWrapperValve#invoke().
>> 
>> 
>> 2016-01-14 17:27 GMT+09:00 Theo Sweeny :
>> 
>>> Hello Kyohei,
>>> 
>>> -Original Message- From: Kyohei Nakamura
>>> [mailto:nakamura.kyohei@gmail.com] Sent: 14 January 2016
>>> 06:45 To: Tomcat Users List  Subject:
>>> Re: Tomcat 8 Application dispatcherServlet Stats
>>> 
>>> Hello
>>> 
>>> The "Processing time" metric represents the execution time of 
>>> StandardWrapperValve#invoke(). This is the execution time of
>>> the servlet and filters. This value of "Processing time" is the
>>> total time of each request execution time.
>>> 
>>> What is the dispatcherServlet? If dispatcherServlet accept all
>>> request as a front controller(like Spring's DispatcherServlet),
>>> then this value is the total execution time of all request that
>>> the context receive.
>>> 
>>> 
>>> 2016-01-13 20:19 GMT+09:00 Theo Sweeny
>>> :
>>> 
 Hello - at the moment stats can be found for Tomcat 8 web
 services using the manager UI /manager/status/all
 
 Is the "Processing time" metric found under dispatcherServlet
 [ / ] subsection, the total time take to serve all requests,
 including the response time for each request?
 
 Regards,
 
 Theo
>>> 
>>> Does the total execution time for each request include the
>>> response time?
>>> 
>>> Thank you,
>>> 
>>> Theo
>>> 
>> 
>> I think indirectly you have answered my question. From a network 
>> perspective you have the initial connection time to send the
>> request (request time), then you have the time to process the
>> request, and finally response time back to the client. Both the
>> processing time and response time for the purpose of this task
>> are merged under the umbrella of response time. So going full
>> circle - the dispatcherServlet Processing time fits the bill of
>> response time.
> 
> There is a case where this might not actually give you what you are
> looking for -- which sounds essentially like the amount of time the
> server spent processing that request.
> 
> If StandardWrapperValve only times how long invoke() takes and (and
> I haven't read the code, so I'm not sure) some component in Tomcat
> executes *after* invoke() completes for the purposes of flushing
> any buffered data back to the client, then "Processing Time" may be
> off by the amount of time it takes Tomcat to flush those buffers
> back to the client. If you have big buffers or slow clients, this
> could add up quickly.
> 
> -chris
> 
> Thanks for the reply. I've done some further digging into the
> Application List Startup Time. Here is one example from the Tomcat
> Manager -
> 
> localhost/account-information-bs-1.1##v1.1.1 Start time: Fri Jan 22
> 13:26:17 GMT 2016 Startup time: 33 ms TLD scan time: 0 ms
> 
> When the startup time is compared back to the catalina.out log for
> the same webapp, the time is dramatically more (307,324 ms) as seen
> here -
> 
> 22-Jan-2016 13:26:17.204 INFO [localhost-startStop-15]
> org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
> application archive
> /opt/tomcat/webapps/account-information-bs-1.1##v1.1.1.war has
> finished in 307,324 ms
> 
> Any ideas why such a difference exists?

The above is the time it takes to deploy the application, not the time
it takes to service a request (or a whole bunch of requests over a
period of time).

Maybe I don't understand your question?

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlamr9YACgkQ9CaO5/Lv0PAWvQCeJKCPfuDt8NQo6wMHE31C4CXO
Fv4AoKy2REEfUU2YSBpKL28a8RsbhcoX
=s4au
-END PGP SIGNATURE-

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



Re: Deployment of WEB App from ANT build fails with IOException.

2016-01-25 Thread Konstantin Kolinko
2016-01-25 0:49 GMT+03:00 Karl Hauschildt :
>
>
> Background:
>
> JAVA Web application, Eclipse workspace with an ANT build.xml.
>
> Using Windows, this project builds using java 1.7, deploys to multiple
> Solaris environments running Tomcat 5, 6 or 7 and runs cleanly.
>
>
>
> I have to deploy the preceding to a Linux environment with Tomcat 8. Which
> is running JAVA 1.8
>
>
>
> Problem:
>
> The deploy task fails with: BUILD FAILED java.io.IOException: Error
> writing request body to server
>
> Looking in the Tomcat, localhost.log, I see: "PUT
> /manager/deploy?path=%2FFXInSite=true HTTP/1.1" 403 3196

Note that the above URL can be used only with Tomcat 6 and earlier.

Once you fix your users, you have to change the url in your Ant task,
or you would end up with error 404.

Migration guide:
http://tomcat.apache.org/migration-7.html#Manager_application


> The other logs contain no errors or warnings.

[...]

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



RE: Tomcat 8 Application dispatcherServlet Stats

2016-01-25 Thread Theo Sweeny
Hi Chris -

On 1/14/16 5:53 AM, Theo Sweeny wrote:
> Hello Kyohei,
>
> -Original Message-
> From: Kyohei Nakamura [mailto:nakamura.kyohei@gmail.com]
> Sent: 14 January 2016 09:59
> To: Tomcat Users List 
> Subject: Re: Tomcat 8 Application dispatcherServlet Stats
>
> What does "response time" mean?
>
> The "Processing time" include a time that is from the end of service method 
> of servlet instance until the end of StandardWrapperValve#invoke().
>
>
> 2016-01-14 17:27 GMT+09:00 Theo Sweeny :
>
>> Hello Kyohei,
>>
>> -Original Message-
>> From: Kyohei Nakamura [mailto:nakamura.kyohei@gmail.com]
>> Sent: 14 January 2016 06:45
>> To: Tomcat Users List 
>> Subject: Re: Tomcat 8 Application dispatcherServlet Stats
>>
>> Hello
>>
>> The "Processing time" metric represents the execution time of
>> StandardWrapperValve#invoke().
>> This is the execution time of the servlet and filters.
>> This value of "Processing time" is the total time of each request
>> execution time.
>>
>> What is the dispatcherServlet?
>> If dispatcherServlet accept all request as a front controller(like
>> Spring's DispatcherServlet), then this value is the total execution
>> time of all request that the context receive.
>>
>>
>> 2016-01-13 20:19 GMT+09:00 Theo Sweeny :
>>
>>> Hello - at the moment stats can be found for Tomcat 8 web services
>>> using the manager UI /manager/status/all
>>>
>>> Is the "Processing time" metric found under dispatcherServlet [ / ]
>>> subsection, the total time take to serve all requests, including the
>>> response time for each request?
>>>
>>> Regards,
>>>
>>> Theo
>>
>> Does the total execution time for each request include the response time?
>>
>> Thank you,
>>
>> Theo
>>
>
> I think indirectly you have answered my question. From a network
> perspective you have the initial connection time to send the request
> (request time), then you have the time to process the request, and
> finally response time back to the client. Both the processing time and
> response time for the purpose of this task are merged under the
> umbrella of response time. So going full circle - the
> dispatcherServlet Processing time fits the bill of response time.

There is a case where this might not actually give you what you are looking for 
-- which sounds essentially like the amount of time the server spent processing 
that request.

If StandardWrapperValve only times how long invoke() takes and (and I haven't 
read the code, so I'm not sure) some component in Tomcat executes *after* 
invoke() completes for the purposes of flushing any buffered data back to the 
client, then "Processing Time" may be off by the amount of time it takes Tomcat 
to flush those buffers back to the client. If you have big buffers or slow 
clients, this could add up quickly.

-chris

Thanks for the reply. I've done some further digging into the Application List 
Startup Time. Here is one example from the Tomcat Manager -

localhost/account-information-bs-1.1##v1.1.1
Start time: Fri Jan 22 13:26:17 GMT 2016 Startup time: 33 ms TLD scan time: 0 ms

When the startup time is compared back to the catalina.out log for the same 
webapp, the time is dramatically more (307,324 ms) as seen here -

22-Jan-2016 13:26:17.204 INFO [localhost-startStop-15] 
org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application 
archive /opt/tomcat/webapps/account-information-bs-1.1##v1.1.1.war has finished 
in 307,324 ms

Any ideas why such a difference exists?

Regards,

Theo

Avios Group (AGL) Ltd is a limited company registered in England (registered 
number 2260073 and VAT number 512566754) whose registered address is Astral 
Towers, Betts Way, London Road, Crawley, West Sussex RH10 9XY . Avios Group 
(AGL) Limited is part of the IAG group of companies 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.


Re: switching between Java8 and Java 7 under tomcat7 leads to error

2016-01-25 Thread Christoph P.U. Kukulies

Thanks. Will give that a try.

How can I tell, which java engine Tomcat is actually using?

At a CMD prompt I'm getting:


C:\> java -version
java version "1.8.0_71"
Java(TM) SE Runtime Environment (build 1.8.0_71-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.71-b15, mixed mode)

--
Christoph


At Am 22.01.2016 um 18:28 schrieb George Sexton:



On 1/22/2016 6:06 AM, Christoph P.U. Kukulies wrote:

Windows 7:

Today I installed Java 8 on my windows 7 machine and did an upgrade 
of the CMS at the same time (from OpenCMS 9.5.2 to 9.5.3).
After the Java update and the CMS update suddenly my tomcat 6.0.39 
didn't start any longer. The service gave an error at start time:


Der Dienst "Apache Tomcat 6.0 Tomcat6" wurde mit folgendem 
dienstspezifischem Fehler beendet: Unzulässige Funktion..




I've seen this on Windows when upgrading the JRE. The solution that 
worked for me (multiple times) was to uninstall Java, and then 
re-install it. Make sure you grab the correct version (x86, x64) to go 
with your Tomcat install.




My thoughts came to tomcat6 possibly not being compatible with Java8 
and so I decided to install tomcat 7.0 which started fine.


When starting my CMS system again I now found that it did some 
unpleasant things for which I wanted to rule out tomcat7 being the 
culprit
and switch the jvm.dll in the tomcat7 configurator to the jre1.7 
jvm.dll.


Then suddenly I got the same error as under tomcat6.0 when I tried to 
start tomcat7 again.


Could it be that the Java8 installer screws the existing Java 7 ? Or 
does it change some global parameters that tomcat reads at start time.



Thanks.

--
Christoph





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



Re: Deployment of WEB App from ANT build fails with IOException.

2016-01-25 Thread Karl Hauschildt
Hi Mark:

This is what I have in the tomcat-users.xml. And I've tried pairing it down
to all the various combo's per suggestions in searches. Behavior never
changes.







Thanks for taking the time to think about this.

On Mon, Jan 25, 2016 at 2:41 AM, Mark Thomas  wrote:

> On 24 January 2016 21:49:40 GMT+00:00, Karl Hauschildt <
> karl.hauschi...@gmail.com> wrote:
> >
> >
> >Background:
> >
> >JAVA Web application, Eclipse workspace with an ANT build.xml.
> >
> >Using Windows, this project builds using java 1.7, deploys to multiple
> >Solaris environments running Tomcat 5, 6 or 7 and runs cleanly.
> >
> >
> >
> >I have to deploy the preceding to a Linux environment with Tomcat 8.
> >Which
> >is running JAVA 1.8
> >
> >
> >
> >Problem:
> >
> >The deploy task fails with: BUILD FAILED java.io.IOException: Error
> >writing request body to server
> >
> >Looking in the Tomcat, localhost.log, I see: "PUT
> >/manager/deploy?path=%2FFXInSite=true HTTP/1.1" 403 3196
> >
> >The other logs contain no errors or warnings.
> >
> >
> >
> >Investigations:
> >
> >I have set the Tomcat (catalina) logging levels to DEBUG and FINEST.
> >
> >I can get into the tomcat and the manager on the same port as what the
> >delpoyment uses.
> >
> >The user that Tomcat is running under ( not root ) has full permissions
> >to
> >all folders.
> >
> >I have compared the server.xml and web.xml configuration files between
> >Linux
> >and Solaris and they are essentially identical.
> >
> >Google searches for anything to do with ANT and the delpoy task, Tomcat
> >403
> >errors, permissions have been unsucessful.
> >
> >
> >
> >Thank you for your time and consideration.
>
> What user have you configured for the deploy task?
>
> What roles have you configured for that user?
>
> Mark
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Deployment of WEB App from ANT build fails with IOException.

2016-01-25 Thread Mark Thomas
On 25/01/2016 11:42, Karl Hauschildt wrote:
> Hi Mark:
> 
> This is what I have in the tomcat-users.xml. And I've tried pairing it down
> to all the various combo's per suggestions in searches. Behavior never
> changes.
> 
> 
> 
> 
> 
>  roles="manager-gui,manager-script,manager-jmx,manager-status"/>
> 
> Thanks for taking the time to think about this.

OK. Make sure you have actually removed all the XML comment markers from
around those entries.

Next, be aware that allocating the manager-gui and manager-script roles
to the same user exposes you to CSRF attacks. Not necessarily an issue
as long as you are a) aware and b) careful (i.e. if you connect to the
manager gui don't do anything else in the same browser and close the
browser completely when you are done.

After that, I'd modify your access log configuration to log the name of
the authenticated user and then see what it says when you try and deploy.

Mark


> 
> On Mon, Jan 25, 2016 at 2:41 AM, Mark Thomas  wrote:
> 
>> On 24 January 2016 21:49:40 GMT+00:00, Karl Hauschildt <
>> karl.hauschi...@gmail.com> wrote:
>>>
>>>
>>> Background:
>>>
>>> JAVA Web application, Eclipse workspace with an ANT build.xml.
>>>
>>> Using Windows, this project builds using java 1.7, deploys to multiple
>>> Solaris environments running Tomcat 5, 6 or 7 and runs cleanly.
>>>
>>>
>>>
>>> I have to deploy the preceding to a Linux environment with Tomcat 8.
>>> Which
>>> is running JAVA 1.8
>>>
>>>
>>>
>>> Problem:
>>>
>>> The deploy task fails with: BUILD FAILED java.io.IOException: Error
>>> writing request body to server
>>>
>>> Looking in the Tomcat, localhost.log, I see: "PUT
>>> /manager/deploy?path=%2FFXInSite=true HTTP/1.1" 403 3196
>>>
>>> The other logs contain no errors or warnings.
>>>
>>>
>>>
>>> Investigations:
>>>
>>> I have set the Tomcat (catalina) logging levels to DEBUG and FINEST.
>>>
>>> I can get into the tomcat and the manager on the same port as what the
>>> delpoyment uses.
>>>
>>> The user that Tomcat is running under ( not root ) has full permissions
>>> to
>>> all folders.
>>>
>>> I have compared the server.xml and web.xml configuration files between
>>> Linux
>>> and Solaris and they are essentially identical.
>>>
>>> Google searches for anything to do with ANT and the delpoy task, Tomcat
>>> 403
>>> errors, permissions have been unsucessful.
>>>
>>>
>>>
>>> Thank you for your time and consideration.
>>
>> What user have you configured for the deploy task?
>>
>> What roles have you configured for that user?
>>
>> Mark
>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
> 


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



Re: Deployment of WEB App from ANT build fails with IOException.

2016-01-25 Thread Karl Hauschildt
Specifically what would I do to enable the logging? I raised the level(s)
to FINEST and DEBUG wherever I saw them at something higher.
Thanks again.

On Mon, Jan 25, 2016 at 6:57 AM, Mark Thomas  wrote:

> On 25/01/2016 11:42, Karl Hauschildt wrote:
> > Hi Mark:
> >
> > This is what I have in the tomcat-users.xml. And I've tried pairing it
> down
> > to all the various combo's per suggestions in searches. Behavior never
> > changes.
> >
> > 
> > 
> > 
> > 
> >  > roles="manager-gui,manager-script,manager-jmx,manager-status"/>
> >
> > Thanks for taking the time to think about this.
>
> OK. Make sure you have actually removed all the XML comment markers from
> around those entries.
>
> Next, be aware that allocating the manager-gui and manager-script roles
> to the same user exposes you to CSRF attacks. Not necessarily an issue
> as long as you are a) aware and b) careful (i.e. if you connect to the
> manager gui don't do anything else in the same browser and close the
> browser completely when you are done.
>
> After that, I'd modify your access log configuration to log the name of
> the authenticated user and then see what it says when you try and deploy.
>
> Mark
>
>
> >
> > On Mon, Jan 25, 2016 at 2:41 AM, Mark Thomas  wrote:
> >
> >> On 24 January 2016 21:49:40 GMT+00:00, Karl Hauschildt <
> >> karl.hauschi...@gmail.com> wrote:
> >>>
> >>>
> >>> Background:
> >>>
> >>> JAVA Web application, Eclipse workspace with an ANT build.xml.
> >>>
> >>> Using Windows, this project builds using java 1.7, deploys to multiple
> >>> Solaris environments running Tomcat 5, 6 or 7 and runs cleanly.
> >>>
> >>>
> >>>
> >>> I have to deploy the preceding to a Linux environment with Tomcat 8.
> >>> Which
> >>> is running JAVA 1.8
> >>>
> >>>
> >>>
> >>> Problem:
> >>>
> >>> The deploy task fails with: BUILD FAILED java.io.IOException: Error
> >>> writing request body to server
> >>>
> >>> Looking in the Tomcat, localhost.log, I see: "PUT
> >>> /manager/deploy?path=%2FFXInSite=true HTTP/1.1" 403 3196
> >>>
> >>> The other logs contain no errors or warnings.
> >>>
> >>>
> >>>
> >>> Investigations:
> >>>
> >>> I have set the Tomcat (catalina) logging levels to DEBUG and FINEST.
> >>>
> >>> I can get into the tomcat and the manager on the same port as what the
> >>> delpoyment uses.
> >>>
> >>> The user that Tomcat is running under ( not root ) has full permissions
> >>> to
> >>> all folders.
> >>>
> >>> I have compared the server.xml and web.xml configuration files between
> >>> Linux
> >>> and Solaris and they are essentially identical.
> >>>
> >>> Google searches for anything to do with ANT and the delpoy task, Tomcat
> >>> 403
> >>> errors, permissions have been unsucessful.
> >>>
> >>>
> >>>
> >>> Thank you for your time and consideration.
> >>
> >> What user have you configured for the deploy task?
> >>
> >> What roles have you configured for that user?
> >>
> >> Mark
> >>
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Deployment of WEB App from ANT build fails with IOException.

2016-01-25 Thread Mark Thomas
On 25/01/2016 12:02, Karl Hauschildt wrote:
> Specifically what would I do to enable the logging? I raised the level(s)
> to FINEST and DEBUG wherever I saw them at something higher.
> Thanks again.

http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html#Access_Log_Valve

Mark


> 
> On Mon, Jan 25, 2016 at 6:57 AM, Mark Thomas  wrote:
> 
>> On 25/01/2016 11:42, Karl Hauschildt wrote:
>>> Hi Mark:
>>>
>>> This is what I have in the tomcat-users.xml. And I've tried pairing it
>> down
>>> to all the various combo's per suggestions in searches. Behavior never
>>> changes.
>>>
>>> 
>>> 
>>> 
>>> 
>>> >> roles="manager-gui,manager-script,manager-jmx,manager-status"/>
>>>
>>> Thanks for taking the time to think about this.
>>
>> OK. Make sure you have actually removed all the XML comment markers from
>> around those entries.
>>
>> Next, be aware that allocating the manager-gui and manager-script roles
>> to the same user exposes you to CSRF attacks. Not necessarily an issue
>> as long as you are a) aware and b) careful (i.e. if you connect to the
>> manager gui don't do anything else in the same browser and close the
>> browser completely when you are done.
>>
>> After that, I'd modify your access log configuration to log the name of
>> the authenticated user and then see what it says when you try and deploy.
>>
>> Mark
>>
>>
>>>
>>> On Mon, Jan 25, 2016 at 2:41 AM, Mark Thomas  wrote:
>>>
 On 24 January 2016 21:49:40 GMT+00:00, Karl Hauschildt <
 karl.hauschi...@gmail.com> wrote:
>
>
> Background:
>
> JAVA Web application, Eclipse workspace with an ANT build.xml.
>
> Using Windows, this project builds using java 1.7, deploys to multiple
> Solaris environments running Tomcat 5, 6 or 7 and runs cleanly.
>
>
>
> I have to deploy the preceding to a Linux environment with Tomcat 8.
> Which
> is running JAVA 1.8
>
>
>
> Problem:
>
> The deploy task fails with: BUILD FAILED java.io.IOException: Error
> writing request body to server
>
> Looking in the Tomcat, localhost.log, I see: "PUT
> /manager/deploy?path=%2FFXInSite=true HTTP/1.1" 403 3196
>
> The other logs contain no errors or warnings.
>
>
>
> Investigations:
>
> I have set the Tomcat (catalina) logging levels to DEBUG and FINEST.
>
> I can get into the tomcat and the manager on the same port as what the
> delpoyment uses.
>
> The user that Tomcat is running under ( not root ) has full permissions
> to
> all folders.
>
> I have compared the server.xml and web.xml configuration files between
> Linux
> and Solaris and they are essentially identical.
>
> Google searches for anything to do with ANT and the delpoy task, Tomcat
> 403
> errors, permissions have been unsucessful.
>
>
>
> Thank you for your time and consideration.

 What user have you configured for the deploy task?

 What roles have you configured for that user?

 Mark



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


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


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