Tomcat 6.0.14 startup on Windows

2007-11-26 Thread Bruce
I am using tomcat6w.exe to setup and configure. I would like to start up 
Tomcat as a service with an icon on my taskbar.


The help says this is possible with the //MS// option. However, there is 
no explanation or example of where to put the option. I have tried 
putting it everywhere I think it should go. Does anyone here know?


Related (I think) issue: I have Tomcat set to startup type, "Automatic." 
The only argument on the startup tab is "start" When Tomcat starts, I 
get a command window that needs to be minimized. The last line says, 
"INFO: server startup in 1059 seconds." If I close the window, Tomcat 
stops. I do not want my customers to be seeing this window. Is there any 
way of getting rid of this window and still have Tomcat running?


Thanks in advance.

Bruce


Re: Tomcat 6.0.14 startup on Windows

2007-11-26 Thread Bruce

IT WORKS! Thanks for the information.

Now, if only I could get the icon on the taskbar, I would be completely 
happy. But, I'm happy now.


Bruce


Caldarale, Charles R wrote:
From: Bruce [mailto:[EMAIL PROTECTED] 
Subject: Tomcat 6.0.14 startup on Windows


The help says this is possible with the //MS// option. 



Can't answer that one.

  
When Tomcat starts, I get a command window that needs 
to be minimized.



You appear to have the "Allow service to interact with desktop" check
box set inside the Log On tab of tomcat6w.  Just clear it, and the
window will not be created.

 - Chuck


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

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


Re: Tomcat 6.0.14 startup on Windows

2007-11-26 Thread Bruce

Thank you for the tip. I'll try it.



Bill Barker wrote:
"Bruce" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
  

I am using tomcat6w.exe to setup and configure. I would like to start up
Tomcat as a service with an icon on my taskbar.

The help says this is possible with the //MS// option. However, there is
no explanation or example of where to put the option. I have tried
putting it everywhere I think it should go. Does anyone here know?




Such as it is, the documentation is at 
http://commons.apache.org/daemon/procrun.html.



  

Related (I think) issue: I have Tomcat set to startup type, "Automatic."
The only argument on the startup tab is "start" When Tomcat starts, I
get a command window that needs to be minimized. The last line says,
"INFO: server startup in 1059 seconds." If I close the window, Tomcat
stops. I do not want my customers to be seeing this window. Is there any
way of getting rid of this window and still have Tomcat running?

Thanks in advance.

Bruce







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


Re: Tomcat 6.0.14 startup on Windows

2007-11-27 Thread Bruce

Thank you. That might be what I am looking for.



zhongliang zhang wrote:

C:\apache-tomcat-6.0.14\bin>tomcat6 //IS//Tomcat6 --DisplayName="Apache Tomcat 6
" --Install="c:\apache-tomcat-6.0.14\bin\tomcat6.exe" --Jvm=auto --StartMode=jvm
 --StopMode=jvm --StartClass=org.apache.catalina.startup.Bootstrap --StartParams
=start --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop

You can add other params with the format "--option" that listed at 
http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html




_
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


Every couple hours, Tomcat stops

2009-12-19 Thread Bruce

I have an installation where Tomcat stops every couple hours.

   * Tomcat 6.0.18
   * Windows XP pro 2.3GHz, 2G memory
   * The application is in a .war file.
   * This app reads and writes to a MySQL database on the same machine.

What happens is that the application will run for about 3 hours or so. 
Suddenly, it stops responding. When that happens, the operator opens the 
"Config Tomcat" application (\Tomcat 6.0\bin\tomcat6w.exe) She then 
stops Tomcat and then re-starts Tomcat. And, Tomcat will run for another 
3 hours or so.


I went into server.xml and set connectionTimout="200" Tomcat still 
stops.


I have a dozen similar setups. None of them have this problem. In fact, 
Tomcat has run for months on some of the installations.


Does anyone know how to fix this problem?

Thanks in advance.

Bruce





Re: Every couple hours, Tomcat stops

2009-12-19 Thread Bruce

Juha Laiho wrote:

Bruce wrote:

I have an installation where Tomcat stops every couple hours.

   * Tomcat 6.0.18
   * Windows XP pro - 2.3GHz, 2G memory
   * The application is in a .war file.
   * This app reads and writes to a MySQL database on the same machine.

What happens is that the application will run for about 3 hours or 
so. Suddenly, it stops responding.


A thread dump of the hung Tomcat might well bring more light to the 
situation. To me at least this sounds like a thread starvation issue 
(for some reason, the request processing threads are not recycled to 
serve future requests). The thread dump might well bring insight as to 
what the reason might be.


One reason for the starvation might be some deadlock situation across 
separate threads accessing the database.


Other things to check are the memory and CPU usage of the hung Tomcat 
process - they might also provide some more clues.


While it was down I checked both mysqld-nt and tomcat6 processes and 
they are both running (11,076k & 92,996k respectively).  Both have 
priorities set to normal.


I will do a re-install of Tomcat before I get involved with a thread 
dump. My reason is that the other sites do not have a problem and this 
problem may be a simple case of corrupted files.


Bruce





Re: Every couple hours, Tomcat stops - FIXED

2009-12-22 Thread Bruce

Juha,

The problem is fixed. My customer's site has been up for 24 hours with 
no problems.


The problem became apparent when I went to the JVM line in 
localhost:8080/manager/status. That was showing .5 MB free memory.


I went to the configure Tomcat. I clicked on the Java tab. Set the 
"Initial memory pool" at 512. Set the maximum memory pool to 1024.


The program runs fine now.

Thank you for your help and suggestions.

Bruce




Juha Laiho wrote:

Bruce wrote:

I have an installation where Tomcat stops every couple hours.

   * Tomcat 6.0.18
   * Windows XP pro 2.3GHz, 2G memory
   * The application is in a .war file.
   * This app reads and writes to a MySQL database on the same machine.

What happens is that the application will run for about 3 hours or 
so. Suddenly, it stops responding.


A thread dump of the hung Tomcat might well bring more light
to the situation. To me at least this sounds like a thread starvation
issue (for some reason, the request processing threads are not
recycled to serve future requests). The thread dump might well bring
insight as to what the reason might be.

One reason for the starvation might be some deadlock situation across
separate threads accessing the database.

Other things to check are the memory and CPU usage of the hung
Tomcat process - they might also provide some more clues.




Re: New Install - Manager/html issue

2022-06-13 Thread Bruce Gavin
That might be the problem!  A different machine.

> On 13 Jun 2022, at 17:41, Mark Thomas  wrote:
> 
> Where are you trying to access the Manager from? The same machine as you 
> installed Tomcat or a different one?
> 
> Mark
> 
> 
>> On 13/06/2022 17:28, brucetobyga...@me.com.INVALID wrote:
>> Chris
>> Both BASE and Home point to the same.  I used the attached 
>> https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-10-on-ubuntu-20-04
>> -Original Message-
>> From: Christopher Schultz 
>> Sent: 13 June 2022 17:22
>> To: users@tomcat.apache.org
>> Subject: Re: New Install - Manager/html issue
>> Bruce,
>>> On 6/13/22 11:29, brucetobyga...@me.com.INVALID wrote:
>>> Tomcat is installed in opt/tomcat and the webapps directory contains
>>> docs  examples  host-manager  manager  ROOT
>> I think that's CATALINA_HOME not CATALINA_BASE. IIRC, Ubuntu installs Tomcat 
>> into /opt/tomcat but has separate directory structure for CATALINA_BASE. 
>> Normally, the examples, manager, and host-manager applications wouldn't be 
>> enabled by default.
>> Have a look at the Ubuntu package documentation for how to enable those 
>> applications -- and only enable the ones you actually need.
>> -chris
>>> -Original Message-
>>> From: Mark Thomas 
>>> Sent: 13 June 2022 16:23
>>> To: users@tomcat.apache.org
>>> Subject: Re: New Install - Manager/html issue
>>> 
>>> On 13/06/2022 14:17, brucetobyga...@me.com.INVALID wrote:
>>>> I have just installed Apache Tomcat 10.0.22 on Ubuntu 22.04.
>>>> However, when I click on the Manager link I get a 404 /manager/html
>>>> is not available and the description is "The origin server did not
>>>> find a current representation for the target resource or is not willing to 
>>>> disclose that one exists"
>>>> 
>>>> Any idea how I can resolve the issue?
>>> 
>>> How did you install Tomcat?
>>> 
>>> What is the contents of the $CATALINA_BASE/webapps directory?
>>> 
>>> 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
>> -
>> 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: New Install - Manager/html issue

2022-06-13 Thread Bruce Gavin
A different machine 

> On 13 Jun 2022, at 17:41, Mark Thomas  wrote:
> 
> Where are you trying to access the Manager from? The same machine as you 
> installed Tomcat or a different one?
> 
> Mark
> 
> 
>> On 13/06/2022 17:28, brucetobyga...@me.com.INVALID wrote:
>> Chris
>> Both BASE and Home point to the same.  I used the attached 
>> https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-10-on-ubuntu-20-04
>> -Original Message-
>> From: Christopher Schultz 
>> Sent: 13 June 2022 17:22
>> To: users@tomcat.apache.org
>> Subject: Re: New Install - Manager/html issue
>> Bruce,
>>> On 6/13/22 11:29, brucetobyga...@me.com.INVALID wrote:
>>> Tomcat is installed in opt/tomcat and the webapps directory contains
>>> docs  examples  host-manager  manager  ROOT
>> I think that's CATALINA_HOME not CATALINA_BASE. IIRC, Ubuntu installs Tomcat 
>> into /opt/tomcat but has separate directory structure for CATALINA_BASE. 
>> Normally, the examples, manager, and host-manager applications wouldn't be 
>> enabled by default.
>> Have a look at the Ubuntu package documentation for how to enable those 
>> applications -- and only enable the ones you actually need.
>> -chris
>>> -Original Message-
>>> From: Mark Thomas 
>>> Sent: 13 June 2022 16:23
>>> To: users@tomcat.apache.org
>>> Subject: Re: New Install - Manager/html issue
>>> On 13/06/2022 14:17, brucetobyga...@me.com.INVALID wrote:
>>>> I have just installed Apache Tomcat 10.0.22 on Ubuntu 22.04.
>>>> However, when I click on the Manager link I get a 404 /manager/html
>>>> is not available and the description is "The origin server did not
>>>> find a current representation for the target resource or is not willing to 
>>>> disclose that one exists"
>>>> Any idea how I can resolve the issue?
>>> How did you install Tomcat?
>>> What is the contents of the $CATALINA_BASE/webapps directory?
>>> 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
>> -
>> 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: New Install - Manager/html issue

2022-06-13 Thread Bruce Gavin
Thanks Mark

Have altered to read

   sameSiteCookies="strict" />

  https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-10-on-ubuntu-20-04
>>>> -Original Message-
>>>> From: Christopher Schultz 
>>>> Sent: 13 June 2022 17:22
>>>> To: users@tomcat.apache.org
>>>> Subject: Re: New Install - Manager/html issue
>>>> Bruce,
>>>>> On 6/13/22 11:29, brucetobyga...@me.com.INVALID wrote:
>>>>> Tomcat is installed in opt/tomcat and the webapps directory contains
>>>>> docs  examples  host-manager  manager  ROOT
>>>> I think that's CATALINA_HOME not CATALINA_BASE. IIRC, Ubuntu installs 
>>>> Tomcat into /opt/tomcat but has separate directory structure for 
>>>> CATALINA_BASE. Normally, the examples, manager, and host-manager 
>>>> applications wouldn't be enabled by default.
>>>> Have a look at the Ubuntu package documentation for how to enable those 
>>>> applications -- and only enable the ones you actually need.
>>>> -chris
>>>>> -Original Message-
>>>>> From: Mark Thomas 
>>>>> Sent: 13 June 2022 16:23
>>>>> To: users@tomcat.apache.org
>>>>> Subject: Re: New Install - Manager/html issue
>>>>> 
>>>>> On 13/06/2022 14:17, brucetobyga...@me.com.INVALID wrote:
>>>>>> I have just installed Apache Tomcat 10.0.22 on Ubuntu 22.04.
>>>>>> However, when I click on the Manager link I get a 404 /manager/html
>>>>>> is not available and the description is "The origin server did not
>>>>>> find a current representation for the target resource or is not willing 
>>>>>> to disclose that one exists"
>>>>>> 
>>>>>> Any idea how I can resolve the issue?
>>>>> 
>>>>> How did you install Tomcat?
>>>>> 
>>>>> What is the contents of the $CATALINA_BASE/webapps directory?
>>>>> 
>>>>> 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
>>>> -
>>>> 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
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 



Re: New Install - Manager/html issue

2022-06-13 Thread Bruce Gavin
Thanks for all you help.  I have just reinstalled it and it now works

> On 13 Jun 2022, at 18:44, Bruce Gavin  wrote:
> 
> Thanks Mark
> 
> Have altered to read
> 
>   sameSiteCookies="strict" />
>  allow=".*"/>
>   sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer>
> 
> 
> But still no luck?
> 
>> On 13 Jun 2022, at 18:20, Mark Thomas  wrote:
>> 
>> Take a look in manager/META-INF/context.xml. You'll need to adjust the 
>> RemoteAddrValve
>> 
>> Mark
>> 
>> 
>> On 13/06/2022 18:00, Bruce Gavin wrote:
>>> That might be the problem!  A different machine.
>>>> On 13 Jun 2022, at 17:41, Mark Thomas  wrote:
>>>> 
>>>> Where are you trying to access the Manager from? The same machine as you 
>>>> installed Tomcat or a different one?
>>>> 
>>>> Mark
>>>> 
>>>> 
>>>>> On 13/06/2022 17:28, brucetobyga...@me.com.INVALID wrote:
>>>>> Chris
>>>>> Both BASE and Home point to the same.  I used the attached 
>>>>> https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-10-on-ubuntu-20-04
>>>>> -Original Message-
>>>>> From: Christopher Schultz 
>>>>> Sent: 13 June 2022 17:22
>>>>> To: users@tomcat.apache.org
>>>>> Subject: Re: New Install - Manager/html issue
>>>>> Bruce,
>>>>>> On 6/13/22 11:29, brucetobyga...@me.com.INVALID wrote:
>>>>>> Tomcat is installed in opt/tomcat and the webapps directory contains
>>>>>> docs  examples  host-manager  manager  ROOT
>>>>> I think that's CATALINA_HOME not CATALINA_BASE. IIRC, Ubuntu installs 
>>>>> Tomcat into /opt/tomcat but has separate directory structure for 
>>>>> CATALINA_BASE. Normally, the examples, manager, and host-manager 
>>>>> applications wouldn't be enabled by default.
>>>>> Have a look at the Ubuntu package documentation for how to enable those 
>>>>> applications -- and only enable the ones you actually need.
>>>>> -chris
>>>>>> -Original Message-
>>>>>> From: Mark Thomas 
>>>>>> Sent: 13 June 2022 16:23
>>>>>> To: users@tomcat.apache.org
>>>>>> Subject: Re: New Install - Manager/html issue
>>>>>> 
>>>>>> On 13/06/2022 14:17, brucetobyga...@me.com.INVALID wrote:
>>>>>>> I have just installed Apache Tomcat 10.0.22 on Ubuntu 22.04.
>>>>>>> However, when I click on the Manager link I get a 404 /manager/html
>>>>>>> is not available and the description is "The origin server did not
>>>>>>> find a current representation for the target resource or is not willing 
>>>>>>> to disclose that one exists"
>>>>>>> 
>>>>>>> Any idea how I can resolve the issue?
>>>>>> 
>>>>>> How did you install Tomcat?
>>>>>> 
>>>>>> What is the contents of the $CATALINA_BASE/webapps directory?
>>>>>> 
>>>>>> 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
>>>>> -
>>>>> 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
>> 
>> -
>> 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



Juvenile & Unprofessional (was Re: B

2006-07-22 Thread Bruce Miller

Nikola Milutinovic wrote:

Could this person (inject other undesirable word) please consider the
fact that women are in the user's group also.  


--

I fail to see any reason for the subject. It is not spam and it
is a real question and it is not an accidental reply to some
other message.


Apparently the reason was that the juvenile didn't get an
instant response to a question with a relevant subject,
so reposted the question with a subject designed to draw
the attention of the like-minded.

What is particularly disappointing is that he was
rewarded for his strategy.


This is bizarre.

Nix.


--
[EMAIL PROTECTED]
http://math.nist.gov/~BMiller/

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Handling file downloads?

2006-09-01 Thread Bruce Miller

Matthias Klein wrote:

Hi everyone,

What is the best method of handling files that are to be offered for 
download?


I have a web application that uses JSF as presentation framework. This 
web app is available as both stand-alone application in Tomcat as well 
as portlet deployed within a portlet container that relies on tomcat.


This app is supposed to deliver files. For instance, it renders a button 
or link and when a user clicks on it, one of the two following things 
should happen:

1. the file is offered for download so the user can just download it
2. the file is a html file and should be displayed in a new browser 
window, thereby obtaining embedded objects (e.g. images that the html 
file refers to)


The first approach that occurs to me would be that
your button/link is to a url (w/ the filename as a query parameter)
handled by a servlet that decides (presumably based on session info)
whether it falls into case 1 or 2.

If case 1, it could then copy the data out to the response,
with the appropriate mime type.

For case 2, it could build & return the html page, but
it would probably be better redirect to another url
(w/ appropriate parameters).  That url could be handled
by a servlet or jsp that personalizes the html as appropriate.

Actually, case 1 could be handled by an internal redirect
as well; but then, in principle, you've got a url to the
datafile w/o protection, even though the user doesn't (easily)
see it.

I'd be interested in hearing of any weaknesses (or strengths)
to this approach.

However, this functionality should be offered to users depending on 
their access rights. If user B is not allowed to download file X, he 
should not be able to.


What is the best method / way of handling this?

The simple way of storing all files in something like 
%CATALINA_HOME%/webapps/files and then just render a download link 
referring to a file within won't work because everyone could access the 
files via URL. (Plus I don't like storing the files within 
CATALINA_HOME. What if I want to store them anywhere in the file system 
of the host?)


In addition, some files have to be altered for some persons (e.g. before 
being delivered to user A, file X.html has to be processed and altered 
to meet the needs of user A. ONLY user A should see the altered X.html 
(X_altered_for_user_A.html).


So this above approach looks "dirty" to me and doesn't live up to my 
expectations. But how does one deal with this "offering files for 
download" issue in a good, elegant way?


There must be some nice way because like every CMS that uses tomcat 
offers just that. Any idea?


Thanks a lot

Matt


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
[EMAIL PROTECTED]
http://math.nist.gov/~BMiller/

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDBC Resources, context file, Tomcat 5.0.x -> 5.5.x

2005-12-19 Thread Bruce Tong
Here's an example that's working for me.









On 12/19/05, Diego Ballve <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I'm trying to migrate a context descriptor for a webapp named omar, from
> Tomcat 5.0.x to 5.5.x but I had no luck. This is my new
> /conf/Catalina/localhost/omar.xml:
>
> 
>type="javax.sql.DataSource"
> url="jdbc:hsqldb:/home/diego/omar/3.0-beta1/data/registry/omar"
> driverClassName="org.hsqldb.jdbcDriver"
> username="sa" password=""
> maxWait="3000" maxIdle="100" maxActive="50"
> removeAbandoned="true" removeAbandonedTimeout="60"
> logAbandoned="true"/>
> 
>
> When I try to start the server i get the following in catalina.out:
> Cannot create JDBC driver of class '' for connect URL 'null'
> at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(
> BasicDataSource.java:780)
> ...
> which I believe indicates that my resource params were ignored
> (considering: class '').
>
> I've tried versions 5.5.9 and 5.5.14-beta. I'm sure the file gets
> digested (I had invalid docBase before and I could see the message) and
> I'm also sure the jdbc driver jar is in common/lib.
>
> Has anybody succeeded with defining jdbc resource in a context file? Can
> anybody spot what I am doing wrong? Do you have any hints on how/what to
> debug to find out what's wrong?
>
> Thanks,
> Diego
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--

Bruce Tong


Re: Tomcat Datasource , can we define them in war file (whithout accessing to Admin console)?

2006-01-03 Thread Bruce Tong
On 12/26/05, Legolas Woodland <[EMAIL PROTECTED]> wrote:
>
> Is it possible to make a data-source without admin console ?
> I mean by defining the data-source in web.xml or in Context.xml (i think
> i read somewhere that we could put context.xml into meta-inf folder and
> it will act like Context definition in admin console).


Yes, you can define your datasource in the application's
META-INF/context.xml file. There are examples on the web, but I can provide
an example if you contact me directly. I'd post a link but I'm writing this
in a hurry.

is it mandatory that Tomcat shared library folder contain my database
> jdbc driver to have data-source ?
> I mean can we bundle , our JDBC driver inside war file and define the
> data-source in war file too ?


I've not tried that but have assumed it's possible.

--

Bruce Tong


How to run a thread on app startup

2006-04-03 Thread Bruce McGuire

Hello.

I need to have an application that has a seperate thread that loads 
when tomcat loads. It scans my db every once in a while, to find out 
if any new info has to be processed.


I have tried to find out from the docs how to do this, but I can't 
find it.


Thanks for your help,

Bruce.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to run a thread on app startup

2006-04-03 Thread Bruce McGuire

Hello Tim.

Thanks for the information.

Bruce.

Tim Lucia wrote:

Google for ServletContextListener 


-Original Message-
From: Bruce McGuire [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 03, 2006 3:31 PM

To: users@tomcat.apache.org
Subject: How to run a thread on app startup

 


Hello.

I need to have an application that has a seperate thread that loads 
when tomcat loads. It scans my db every once in a while, to find out 
if any new info has to be processed.


I have tried to find out from the docs how to do this, but I can't 
find it.


Thanks for your help,

Bruce.

   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 





Re: How to run a thread on app startup

2006-04-03 Thread Bruce McGuire

Hello  Rodrigo.

Thanks very much for the information.

Bruce.

Asensio, Rodrigo wrote:


I figured out that the best way to do that is with a variable of type
InheritableThreadLocal that keeps a copy per thread.

We have 4 webapps over the same framework and all works in the same way.
The servlet creates a new instance of MyApplication and sets this
"singleton by thread" in the MyApplication class
Application.set(myApplication)
After that, all threads created based in the servlet thread will have
the same copy of your App.

Regards



Rodrigo Asensio
Fuel Management Services
Gilbarco Veeder Root
phone: +1 336 547 5023


-Original Message-----
From: Bruce McGuire [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 03, 2006 3:31 PM

To: users@tomcat.apache.org
Subject: How to run a thread on app startup

 


Hello.

I need to have an application that has a seperate thread that loads 
when tomcat loads. It scans my db every once in a while, to find out 
if any new info has to be processed.


I have tried to find out from the docs how to do this, but I can't 
find it.


Thanks for your help,

Bruce.

   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


This message (including any attachments) contains confidential 
and/or proprietary information intended only for the addressee.  
Any unauthorized disclosure, copying, distribution or reliance on 
the contents of this information is strictly prohibited and may 
constitute a violation of law.  If you are not the intended 
recipient, please notify the sender immediately by responding to 
this e-mail, and delete the message from your system.  If you 
have any questions about this e-mail please notify the sender 
immediately.  

Ce message (ainsi que les eventuelles pieces jointes) est 
exclusivement adresse au destinataire et contient des 
informations confidentielles. La copie, la communication ou la 
distribution du contenu de ce message sans l'accord prealable de 
l'expediteur sont strictement interdits et peuvent constituer un 
delit. Si vous n'etes pas destinataire de ce message, merci de le 
detruire et d'avertir l'expediteur. Si vous avez des questions se 
rapportant a ce courrier electronique, merci de bien vouloir 
notifier 
l'expediteur immediatement.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 





Re: How to run a thread on app startup

2006-04-03 Thread Bruce McGuire

Hello Jim.

Actually, I have never heard of Quartz. I will look it up and consider it.

Thanks,

Bruce.

Jim Freeby wrote:

Have you considered using Quartz to run recurring jobs? 


It comes with a Servlet that can be used to initialize your jobs when Tomcat 
starts up :)

-Original Message-
From: Asensio, Rodrigo [mailto:[EMAIL PROTECTED]
Sent: Monday, April 03, 2006 12:51 PM
To: Tomcat Users List
Subject: RE: How to run a thread on app startup


I didn't use ServletContextlistener beause my inner classes don't know
anything about a servlet or http (MVC) and the core is used across
services, swing and swt applications, etc.

-Original Message-----
From: Bruce McGuire [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 03, 2006 3:46 PM

To: Tomcat Users List
Subject: Re: How to run a thread on app startup

Hello  Rodrigo.

Thanks very much for the information.

Bruce.

Asensio, Rodrigo wrote:

 

I figured out that the best way to do that is with a variable of type 
InheritableThreadLocal that keeps a copy per thread.


We have 4 webapps over the same framework and all works in the same
   


way.
 

The servlet creates a new instance of MyApplication and sets this 
"singleton by thread" in the MyApplication class

Application.set(myApplication)
After that, all threads created based in the servlet thread will have 
the same copy of your App.


Regards

---
-

Rodrigo Asensio
Fuel Management Services
Gilbarco Veeder Root
phone: +1 336 547 5023


-Original Message-
From: Bruce McGuire [mailto:[EMAIL PROTECTED]
Sent: Monday, April 03, 2006 3:31 PM
To: users@tomcat.apache.org
Subject: How to run a thread on app startup



   


Hello.

I need to have an application that has a seperate thread that loads 
when tomcat loads. It scans my db every once in a while, to find out 
if any new info has to be processed.


I have tried to find out from the docs how to do this, but I can't 
find it.


Thanks for your help,

Bruce.

  

 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


This message (including any attachments) contains confidential and/or 
proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on the 
contents of this information is strictly prohibited and may constitute 
a violation of law.  If you are not the intended recipient, please 
notify the sender immediately by responding to this e-mail, and delete 
the message from your system.  If you have any questions about this 
e-mail please notify the sender immediately.


Ce message (ainsi que les eventuelles pieces jointes) est exclusivement
   



 

adresse au destinataire et contient des informations confidentielles. 
La copie, la communication ou la distribution du contenu de ce message 
sans l'accord prealable de l'expediteur sont strictement interdits et 
peuvent constituer un delit. Si vous n'etes pas destinataire de ce 
message, merci de le detruire et d'avertir l'expediteur. Si vous avez 
des questions se rapportant a ce courrier electronique, merci de bien 
vouloir notifier l'expediteur immediatement.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




   




This message (including any attachments) contains confidential 
and/or proprietary information intended only for the addressee.  
Any unauthorized disclosure, copying, distribution or reliance on 
the contents of this information is strictly prohibited and may 
constitute a violation of law.  If you are not the intended 
recipient, please notify the sender immediately by responding to 
this e-mail, and delete the message from your system.  If you 
have any questions about this e-mail please notify the sender 
immediately.  

Ce message (ainsi que les eventuelles pieces jointes) est 
exclusivement adresse au destinataire et contient des 
informations confidentielles. La copie, la communication ou la 
distribution du contenu de ce message sans l'accord prealable de 
l'expediteur sont strictement interdits et peuvent constituer un 
delit. Si vous n'etes pas destinataire de ce message, merci de le 
detruire et d'avertir l'expediteur. Si vous avez des questions se 
rapportant a ce courrier electronique, merci de bien vouloir 
notifier 
l'expediteur immediatement.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


!DSPAM:44317d0f80311804284693!


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 





Re: How to run a thread on app startup --- SOLVED

2006-04-04 Thread Bruce McGuire

Hello.

My thanks to everyone for their assistance. The ServletContextListener 
works just fine to run my thread in the background when tomcat starts up 
and closes.


Thanks very much.

Bruce.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JspC from ant fails on JSPs that use custom taglib in Tomcat 5.5.12

2006-04-27 Thread Bruce Mundin
 
Hi
We have been effected by the bug #37054
(http://issues.apache.org/bugzilla/show_bug.cgi?id=37084). 
When we run our ant script to build the site using JspC  it fails just
as outlined in the bug above.
We were using Tomcat 5.5.9 and we are hoping to upgrade to 5.5.12 but
there seem to be many issues related to the Classloaders.
Does any one have any experience of this and or solutions?
Additionally we have encountered problems, after upgrading to 5.5.12
with the custom class loader which is part of an Eclipse plugin (see
http://www.sysdeo.com/eclipse/tomcatplugin).
We have now found that jasper when called from ant has a class path
problem.
See (http://issues.apache.org/bugzilla/show_bug.cgi?id=37084)
 
Is it possible they are related?
Does any one have a patch for it?
 
 
Bruce Mundin
Senior Developer - Passenger Transport Information
Action Information Management (AIM)
- A Trapeze Group Company
www.aimltd.co.uk or www.trapezegroup.co.uk
(0)1225 711200 Ext 248
 


This email message contains confidential information and is intended for the 
use of its intended recipient only.  Access to this email by anyone else is 
unauthorised.  If you are not the intended recipient you are hereby notified 
that any use, disclosure, copying or distribution or any action taken or 
omitted to be taken in reliance on it is strictly prohibited.

If this communication has been sent to you in error, please notify us 
immediately.

Action Information Management Ltd.
129 Devizes Road, Hilperton, Trowbridge, Wiltshire BA14 7SZ.
Tel: +44 (0) 1225 711200
Fax: +44 (0) 1225 711222
Website www.aimltd.co.uk
email: [EMAIL PROTECTED]


Resource vs. RealPath

2006-05-06 Thread Bruce Miller

Hi Tomcatters;
 A seemingly naive question:
I've got various configuration data, tucked away
under /WEB-INF/.

If I use context.getRealPath(datapath), I can check the
timestamp, so that I know if it needs to be re-read.
However, this fails if we're serving from a .war file
(in which case, presumably it won't need re-reading?)

OTOH, context.getResourceAsStream(datapath) gives no
means to check the timestamp, but will work from .war.

An obvious solution is to use getRealPath to check the
timestamp and getResourceAsStream to read it.
But this seems to mix modes of thinking (A Resource being
something more abstract?).  Experience tells me this
can often lead to problems down the line...

So the question is: Am I missing something?
Is there some other Best Practices approach to this
rather simple situation?

Thanks in advance;
--
[EMAIL PROTECTED]
http://math.nist.gov/~BMiller/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Resource vs. RealPath

2006-05-06 Thread Bruce Miller

Tim Funk wrote:

You'll need to clean the following up but you can use this:

Date lastModified =
  new Date(servletContext
 .getResource()
 .openConnection()
 .getLastModified());


Ah! I did miss that...  However...
Openning a connection seems potentially
more expensive than "merely" getting the timestamp on a file.
(I was planning on checking this at the beginning of every request,
and by the time this application is finished, there could
end up several levels of resources that might occasionally
get updated).
Is this likely to be an issue?

Thanks, in any case, though.


-Tim

Bruce Miller wrote:


Hi Tomcatters;
 A seemingly naive question:
I've got various configuration data, tucked away
under /WEB-INF/.

If I use context.getRealPath(datapath), I can check the
timestamp, so that I know if it needs to be re-read.
However, this fails if we're serving from a .war file
(in which case, presumably it won't need re-reading?)

OTOH, context.getResourceAsStream(datapath) gives no
means to check the timestamp, but will work from .war.

An obvious solution is to use getRealPath to check the
timestamp and getResourceAsStream to read it.
But this seems to mix modes of thinking (A Resource being
something more abstract?).  Experience tells me this
can often lead to problems down the line...

So the question is: Am I missing something?
Is there some other Best Practices approach to this
rather simple situation?

Thanks in advance;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
[EMAIL PROTECTED]
http://math.nist.gov/~BMiller/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Content negotiation, getMimeType

2006-05-08 Thread Bruce Miller

Hello again;
 My app needs a custom content negotiation where URI's
that correspond to xml (but without explicit extension)
are XSLT'd to html or xhtml (custom since I need browser
sniffing to decide about MathML).  I'll also be dealing
with pre-built pages and caching.

I gather from the list archives that there is no built-in
content negotiation that I can hook into, and that filters
are the way to go.   That's easy enough, but I don't see
how to write a url-pattern that matches _missing_ extension,
so I guess I should filter _everything_.

I can easily check for an existing static xml file,
but if it's not found, I need to handle the following cases:
 * servlets: chain, capturing the output, and if we
   get XML, transform it.
 * images, other static types; preferably by redirect(?)
   to get clean/fast/cachable processing.
I'd _really_ like to avoid extra processing in the last
case, but how do I recognize them? By using
servletcontext.getMimeType(file) ?

I seem to be sliding (again :>) into using File based
approaches rather than resources, so I'm not sure if
things will work in .war.  Also, this seems to move
the mappings out of web.xml and into the code.

So, questions are: do I make sense? Is this a sane approach?
What am I missing?

And, again, thanks in advance!
--
[EMAIL PROTECTED]
http://math.nist.gov/~BMiller/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ant deploy task and cluster-wide (farm) deployment

2006-05-21 Thread Bruce Miller

Tim Lucia wrote:

Push or pull, when it gets there, it gets there correctly (md5sum-s match).
The problem, I think, is that the file appears in the file system before it
is received in its entirety.  I don't know why -- maybe the nature of samba
is to write, close, open-for-append, ... ?  If I copy FROM Linux ("pull")
then I do not have this problem, it's only when pushing to the linux file
system mounted via samba from Windows.  I've tried this numerous times,
because I have a strong desire to automate the build and deploy process as
much as possible -- saves me from having to do it myself ;-)  I haven't 100%
isolated the exact circumstances. 


I've been sleeping through most of this discussion, but
this last bit reminds me of an "old school" ploy that might help:
 Copy/transfer the file to some inactive filename 
 (eg. a tmp file, or something otherwise safe),

 then when the transfer is complete,
 rename (mv) to the target filename 
the latter generally happens atomically enough to avoid a lot

of such issues.

'Course, you may have already thought of this, and it isn't 100%
foolproof...



--
[EMAIL PROTECTED]
http://math.nist.gov/~BMiller/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to package tomcat with an embedded app for distribution

2006-06-14 Thread Bruce Heath

Hi All,

I would like to package up tomcat (with my web app installed in webapps) 
and make the whole thing ready to install by users.
Essentially I would like the same installer that installs tomcat, to 
install tomcat with my app already there.


Is there a way to do this?

Thanks

Bruce

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Bruce Bowie is out of the office.

2008-05-29 Thread bruce . bowie

I will be out of the office starting  29/05/2008 and will not return until
02/06/2008.

In my absense, please contact Alan Patterson or Laszlo Tovari.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Newbie, tomcat performance tuning

2009-11-18 Thread Bruce Foster
HI,

I'm new to the list and tomcat.


I have a web application deployed in tomcat 6. this application is
quite CPU hungry and I would like to optimise the tomcat accordingly.

I'm expecting to have 200 concurrent connections to the server at
peak, not much for a standard web application but ours is imagery
based and bit resource hungry.

Can you guide me where and what parameters that  I can tweak in tomcat
to get high performance? for eg, JVM memory, threads, etc etc



My server configuration;

tomcat 6.0
2 x quard core xenon processor (8 core)
12 GB ram
SAS Dirve (15k rpm), RAID
Windows 2003 server, 64 bit
NO other application running on this server.


-- 
Thanks

Bruce
NSW Australia

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



Re: Newbie, tomcat performance tuning

2009-11-19 Thread Bruce Foster
Thanks Everyone who responded. Just great.

OK, looks like I got lot of home work to do now; if I were to summarize,

1. Need to get JDK and not JRE, latest version of JDK and use the
"server" version

2. Look at the connector pool

3. Need to modify the heap size, with 12GB ram and NO other
application running I will allocate 6GB ram as Max and Min for JVM.

do I need to look at the server threads? if yes then where to I set
that option?

read somewhere tomcat with 8 thread (8 core processor), how do I
configure that option?


Thanks

Bruce





On Thu, Nov 19, 2009 at 3:54 AM, Christopher Schultz
 wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Bruce,
>
> On 11/18/2009 9:48 AM, Bruce Foster wrote:
>> I'm new to the list and tomcat.
>
> Welcome!
>
>> I have a web application deployed in tomcat 6. this application is
>> quite CPU hungry and I would like to optimise the tomcat accordingly.
>>
>> I'm expecting to have 200 concurrent connections to the server at
>> peak, not much for a standard web application but ours is imagery
>> based and bit resource hungry.
>
> Can you be more specific about what resources your webapp is hungry for?
>
> If a typical request needs 10MiB of memory to process an image, then
> you'll need to make sure that 50MiB * 200 requests = 10GiB of heap space
> is available to your webapp.
>
> Can your webapp handle 200 simultaneous requests? Consider using a
> load-testing tool such as JMeter to see how your webapp performs under
> load. Watch heap usage (in the JVM! 'Task Manager' is not useful, here),
> CPU utilization, disk usage, etc. to see what appears to be your
> limiting resource(s) and then tackle those.
>
> You already know the number of concurrent requests you are expecting at
> peak (200), so you have sort of set that requirement already (though I
> might allocate 225 or 250 just in case you get some bursts in there).
>
> Memory (and GC behavior) is really the only thing you can tune at the
> JVM level. Generally speaking, more heap space is better if you're going
> to need it. Also, setting the min and max heap sizes to the same values
> will avoid heap re-sizing which just wastes time if you know you want
> that memory dedicated to the heap anyway.
>
> Hope that helps,
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAksEUPEACgkQ9CaO5/Lv0PBqMwCfaTsem7ypj+aPTloqlDDKGI69
> zXQAn1UjW0kB5q3RvppuLCjRwT9CJ6YT
> =t0x1
> -END PGP SIGNATURE-
>
> -----
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>



-- 
Thanks

Bruce
NSW Australia

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



64bit Tomcat for Windows

2009-11-19 Thread Bruce Foster
Hi List,

I have another thread running and someone suggested to use 64bit JDK
on my Windows 2003 server 64 bit.

Wonder, if there is a 64 bit installer for Tomcat on Windows. I see my
current tomcat is running x86 folder in 32 bit mode.


-- 
Thanks

Bruce
NSW Australia

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



Address based security profile?

2009-06-16 Thread Bruce Edge
Hi,
I have tomcat working with ssl, but I'd like to allow localhost clients to
use no authentication.

Is it possible to deploy the same service with authentication to external
addresses and no auth to 127.0.0.1?
If this is in the docs, could someone send me a link to this section?

Thanks

-Bruce


Mix http and https on one tomcat server?

2009-06-17 Thread Bruce Edge
Is it possible to deploy both http and https on the same tomcat instance?
I'd like to expose https to the external IP addr and http to 127.0.0.1.

How is this configured in the xerver.xml file?

I'm using apache cxf if that matters.

Thanks

-Bruce

P.S. Apologies if this is a resend, I have just joined and I'm not sure if
my first post got through.


Re: Mix http and https on one tomcat server?

2009-06-17 Thread Bruce Edge
On Wed, Jun 17, 2009 at 8:39 AM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Bruce Edge [mailto:bruce.e...@gmail.com]
> > Subject: Mix http and https on one tomcat server?
> >
> > Is it possible to deploy both http and https on the same
> > tomcat instance?
>
> Of course.
>
> Read the doc:
> http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html
> http://tomcat.apache.org/tomcat-6.0-doc/config/http.html#SSL%20Support
>
>  - Chuck
>

I assume that I need a different connector for each, so I changed the 8080
redirector in server.xml:

to:


My ssl connector is:



However, I don't see where I designate the difference between a local
address, 127.0.0.1, and an external address.

I've defined 2  blocks in web.xml:


  /*   <- Is this what needs to refer to
the internal vs. external address?  127.0.0.1:8080/*
?



I also have 2 roles setup in tomcat-users.xml which are referenced by the
above 2  blocks.


I have this in web.xml for the ssl passwd:
  
BASIC
   
but can it be setup to _not_ require a password for localhost access? Where
do I make this role specific?


In short, I want:
localhost - no auth, no ssl
external - passwd auth and ssl

I can get one or the other but not both at the same time.

-Bruce


Re: Mix http and https on one tomcat server?

2009-06-18 Thread Bruce Edge
On Wed, Jun 17, 2009 at 9:37 AM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Bruce Edge [mailto:bruce.e...@gmail.com]
> > Subject: Re: Mix http and https on one tomcat server?
>

<...snip...>


>
> > but can it be setup to _not_ require a password for localhost access?
>
> Not without some additional configuration.  Don't try to do this at the
>  level - it's unlikely that you'll ever be able to get it to
> work.  Instead, use a filter or  to check the client's IP address,
> and set the role in the Session object if it's localhost.
>


How do I set the role in a valve?

I can do this:



but does that really do anything if I'm already accepting connections from
127.*?


What do you mean by a filter?

Sorry, I'm really new at this. I'm a C++/gSOAP web services guy whose in the
middle of a toolset change :-)

-Bruce



>
> > In short, I want:
> > localhost - no auth, no ssl
> > external - passwd auth and ssl
>
> I suspect you're going to have to use SSL for any protected webapp,
> regardless of the client's IP address.
>
> You might want to look at http://securityfilter.sourceforge.net/ to see if
> it will do more of what you want.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Mix http and https on one tomcat server?

2009-06-18 Thread Bruce Edge
On Thu, Jun 18, 2009 at 2:10 PM, André Warnier  wrote:

> André Warnier wrote:
>
> Ooops. I forgot to add this : in the /thewebapp-internal, you should also
> have a filter, this time which /blocks/ the request if it does /not/ come
> from 127.0.0.1.  Otherwise people not from 127.0.0.1 would be able to hit it
> directly, just by knowing the /thewebapp-internal URL.
>
André,
thanks for your help.If I deploy the app twice, would I not need to provide
a different deployment url for the 2nd instance?
In which case I could direct the internal clients to this unprotected url
directly without using a filter.

I'd like to not have 2 copies of the app running as there is global state in
there that I would have to sync between instances.

Can I write a custom valve that does this by alters the role ?
Would this be a matter of defining a new class, say
org.apache.catalina.valves.ValveMine and bundling it with the war, or would
it need to go in a jar in CATALINA_HOME/libs?

All I need to know then is how to change the role within the Valve.

-Bruce


Re: Mix http and https on one tomcat server?

2009-06-18 Thread Bruce Edge
Securityfilter seems like overkill. I'd like to try the custom Valve first.

Any idea how I can get at the Role from the Valve invoke method?

public void invoke(Request arg0, Response arg1) throws IOException,
ServletException {

Can I drill down into the Request and find the role?

-Bruce


On Thu, Jun 18, 2009 at 2:33 PM, André Warnier  wrote:

> Bruce Edge wrote:
>
>>
>>>  André,
>> thanks for your help.
>>
>
> Well actually, forget all I said, it turns out that it was mostly nonsense.
>  The problem is, that if you use the container (Tomcat) based
> authentication, then the authentication will happen anyway, before it even
> gets to the servlet filter.
>
> So it is really a  which you need.
> A  "happens" at an earlier stage, before the webapp (and filters)
> are involved, so that would be early enough.
>
> Or else, you have to go for .. well yes, a servlet filter which does
> authentication (instead of the normal Tomcat auth stuff).
> There is something like that called SecurityFilter.
> (Here : http://securityfilter.sourceforge.net/)
>
> Don't let this put you down though.  Doing authentication via a filter like
> SecurityFilter is a lot more flexible than with the embedded container
> method.
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Custom valve, how to change role?

2009-06-18 Thread Bruce Edge
In an attempt, possibly misguided, to try avoid using securityfilter, I'm
trying to write a valve to bypass the ssl authentication requirements of a
service based on remote host addr.

I've implemented a LocalValve that extends ValveBase and implements Valve.

Given that I must implement this:
public void invoke(Request arg0, Response arg1) throws IOException,
ServletException {

I assume that the Response arg contains some element that will eventually
lead me to the role?
It's not immediately obvious how to get at the role form the Response.

Does anyone know the object navigation path to get at this? Response ->
something ->  -> something else -> role

...or am I completely off in left field and should scrap this before someone
gets hurt and just use securityfilter?

-Bruce


Re: Custom valve, how to change role?

2009-06-19 Thread Bruce Edge
On Thu, Jun 18, 2009 at 3:28 PM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Bruce Edge [mailto:bruce.e...@gmail.com]
> > Subject: Custom valve, how to change role?
> >
> > ...or am I completely off in left field and should scrap
> > this before someone gets hurt and just use securityfilter?
>
> If you really insist on differentiating internal and external requests,
> then quite likely you should just use securityfilter - it should be a *lot*
> easier.  Writing a custom valve ties you into Tomcat, and possibly a
> particular version of Tomcat, since valves are not part of the servlet spec
> (filters are).
>
> If you really want to write a valve, look at the source for something that
> is related to what you want, such as:
>  org/apache/catalina/authenticator/SingleSignOn.java
> and related files.
>
> Personally, I'd just have the internal requests authenticate like everyone
> else.


I'm starting to agree with you. This was a relatively simple thing back when
I was using gSOAP. Since everything else is so much easier in the java world
I assumed this would be too. In any case, thanks for all the pointers.

-Bruce

>
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


tomcat-users.xml and manager role

2009-09-09 Thread Bruce Nourish
Hi,

I have a 6.0.20 Tomcat binary distribution downloaded and untarred
directly from the Tomcat site. My system is Ubuntu 8.04 with Java
version 1.5.0_16. When I configure the manager role precisely as
directed in the 401 Error message:




I am still unable to access the manager -- the basic auth dialog box
just keeps coming back. I have restarted Tomcat after making this
change. Looking at the documentation, I see discussion of MemoryRealm,
but judging by the comments in server.xml this information is out of
date: Tomcat is instead using UserDatabaseRealm. I can't find any
solutions in the Tomcat wiki, mailing lists, or the internet at large.
There is nothing that looks relevant or non-routine in the logs.

Could someone please explain what is going on here, and what I need to
do to fix it?

Bruce

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



Re: tomcat-users.xml and manager role

2009-09-09 Thread Bruce Nourish
Yup, looks like I'm just retarded. Thanks.

On Wed, Sep 9, 2009 at 12:02 PM, Caldarale, Charles
R wrote:
>> From: bruce.nour...@gmail.com [mailto:bruce.nour...@gmail.com]
>> On Behalf Of Bruce Nourish
>> Subject: tomcat-users.xml and manager role
>>
>> 
>> 
>
> A common error is to forget to remove the comment characters from around the 
>  and  elements.  Post your entire tomcat-users.xml so we can look 
> at it.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
> MATERIAL and is thus for use only by the intended recipient. If you received 
> this in error, please contact the sender and delete the e-mail and its 
> attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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



java.lang.OutOfMemoryError: PermGen space

2009-09-16 Thread Bruce Wayne
Hello,

I am running Red Hat Linux 2.6.18-164.el5 #1 SMP  x86_64 x86_64 x86_64
GNU/Linux with Tomcat 6 as seen below:

# /opt/tomcat/bin/version.sh
Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:   /usr/java/jdk1.6.0_16
Server version: Apache Tomcat/6.0.20
Server built:   May 14 2009 01:13:50
Server number:  6.0.20.0
OS Name:Linux
OS Version: 2.6.18-164.el5
Architecture:   amd64
JVM Version:1.6.0_16-b01
JVM Vendor: Sun Microsystems Inc.

My JAVA_OPTS are:
JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true -Dfile.encoding=UTF-8 -server
-Xms2048m -Xmx2048m -XX:NewSize=1024m -XX:MaxNewSize=1024m
-XX:PermSize=1024m -XX:MaxPermSize=1024m -XX:+DisableExplicitGC"

My system has 6GB of RAM.

I keep getting the following error:

java.lang.OutOfMemoryError: PermGen space
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:621)

java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
java.net.URLClassLoader.access$000(URLClassLoader.java:56)
java.net.URLClassLoader$1.run(URLClassLoader.java:195)

java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
java.lang.ClassLoader.loadClass(ClassLoader.java:307)
java.lang.ClassLoader.loadClass(ClassLoader.java:252)

java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.(LookupEnvironment.java:87)
org.eclipse.jdt.internal.compiler.Compiler.(Compiler.java:261)

org.eclipse.jdt.internal.compiler.Compiler.(Compiler.java:153)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


Any help would be appreciated!

Thanks!


Application Logout Issues

2009-09-16 Thread Bruce Wayne
Users keep getting logged out of our Java apps within a minute or two for no
apparent reason.Below are my settings, any help would be appreciated.

I am running Red Hat Linux 2.6.18-164.el5 #1 SMP  x86_64 x86_64 x86_64
GNU/Linux with Tomcat 6 as seen below:
# /opt/tomcat/bin/version.sh
Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:   /usr/java/jdk1.6.0_16
Server version: Apache Tomcat/6.0.20
Server built:   May 14 2009 01:13:50
Server number:  6.0.20.0
OS Name:Linux
OS Version: 2.6.18-164.el5
Architecture:   amd64
JVM Version:1.6.0_16-b01
JVM Vendor: Sun Microsystems Inc.
My system has 6GB of RAM.

I have tried various JAVA_OPTS, the most current one is at the bottom:
#JAVA_OPTS="$JAVA_OPTS -Xmx3072M -Xms3072M"
#JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true -Dfile.encoding=UTF-8
-server -Xms2048m -Xmx2048m -XX:NewSize=1024m -XX:MaxNewSize=1024m
-XX:PermSize=1024m -XX:MaxPermSize=1024m -XX:+DisableExplicitGC"
#JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true -Dfile.encoding=UTF-8
-server -Xms2048m -Xmx2048m -XX:NewSize=1024m -XX:MaxNewSize=1024m
-XX:PermSize=1024m -XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled -XX:+UseConcMarkSweepGC"
#JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true -Dfile.encoding=UTF-8
-server -Xms2048m -Xmx2048m -XX:NewSize=1024m -XX:MaxNewSize=1024m
-XX:PermSize=1024m -XX:MaxPermSize=1024m -XX:+UseConcMarkSweepGC"
JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true -Dfile.encoding=UTF-8 -server
-Xms2048m -Xmx2048m -XX:NewSize=1024m -XX:MaxNewSize=1024m
-XX:PermSize=1024m -XX:MaxPermSize=1024m"

My timeout settings are as follows:
# grep -i timeout conf/*
conf/server.xml:   connectionTimeout="2"
conf/server.xml:   acceptCount="10" debug="0"
connectionTimeout="6"/>
conf/web.xml:  
conf/web.xml:30



Thanks!


Re: Application Logout Issues

2009-09-16 Thread Bruce Wayne
Turned out to be the load-balancer in front of the server farm...thanks
for helping out.

On Wed, Sep 16, 2009 at 10:11 AM, Michael Ludwig  wrote:

> Bruce Wayne schrieb:
>
>> Users keep getting logged out of our Java apps within a minute or two
>> for no apparent reason.
>>
>
> All of your apps? How many? All different? Do they share some
> configuration?
>
> The reason for this is likely to be found in your applications, not in
> the OS or the JVM.
>
>  I have tried various JAVA_OPTS, the most current one is at the bottom:
>>
>
> Your JAVA_OPTS are most likely absolutely irrelevant.
>
>  My timeout settings are as follows:
>> # grep -i timeout conf/*
>> conf/server.xml:   connectionTimeout="2"
>> conf/server.xml:   acceptCount="10" debug="0"
>> connectionTimeout="6"/>
>>
>
> Irrelevant.
>
>  conf/web.xml:30
>>
>
> Relevant, but this is the default - 30 minutes.
>
> --
> Michael Ludwig
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: java.lang.OutOfMemoryError: PermGen space

2009-09-16 Thread Bruce Wayne
What's "too many classes" ? I have JConsole running, and I see that across
my 8 apps on one server, 14,000 classes are loaded. Heap usage is around
1GB.With the settings below, I am not seeing PermGen errors as of yet,
although it's too early to tell, I will have to let the app run for 24
hours.
JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true -Dfile.encoding=UTF-8 -server
-Xms1024m -Xmx3012m -XX:NewSize=512m -XX:MaxNewSize=1024m -XX:PermSize=512m
-XX:MaxPermSize=1024m"


On Wed, Sep 16, 2009 at 10:44 AM, Jeffrey Janner <
jeffrey.jan...@polydyne.com> wrote:

> Charles -
> My other post didn't make it back yet.
> Now I'm getting confused, because the same doc I referenced below, which
> treats Heap and PermGen separately in Appendix B, says this in Chapter
> 3:
> "The detail message PermGen space indicates that the permanent
> generation is full. The permanent generation is the area of the heap
> where class and method objects are stored. If an application loads a
> very large number of classes, then the size of the permanent generation
> might need to be increased using the -XX:MaxPermSize option."
> http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/memleaks.html
> That is specifically about the error Bruce is seeing.
> But, yes, it appears he's loading too many classes, or reloading them,
> or something.
> Something else Bruce can look into is if his apps are using common jar
> files that can be loaded into Shared space.
> Jeff
>
> -Original Message-
> From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com]
> Sent: Wednesday, September 16, 2009 9:31 AM
> To: Tomcat Users List
> Subject: RE: java.lang.OutOfMemoryError: PermGen space
>
> Chuck -
> I couldn't tell from the post if the Architecture line meant hardware,
> OS, or JVM.  And I'm under the impression from multiple re-reads of the
> Java tuning docs that ALL generations are drawn from the heap, including
> PermGen.
> Yes, using Jconsole or better is what he needs to do.
>
> Bruce-
> Here is another good read.  Direct from Sun:
> http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/tools.html
> Jeff
>
>
> -Original Message-
> From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
> Sent: Wednesday, September 16, 2009 9:04 AM
> To: Tomcat Users List
> Subject: RE: java.lang.OutOfMemoryError: PermGen space
>
> > From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com]
> > Subject: RE: java.lang.OutOfMemoryError: PermGen space
> >
> > You don't say if the JVM is 32-bit or 64-bit
>
> Actually, he did:
>
> > Architecture:   amd64
> > JVM Version:1.6.0_16-b01
> > JVM Vendor: Sun Microsystems Inc.
>
> The architecture would be x86 for a 32-bit JVM on Intel/AMD.
>
> > 1) By splitting the Heap in half between NewGen and PermGen
>
> This is not correct.  The -Xmx size does not include the PermGen size.
>
> Again, use JConsole or equivalent to verify that the requested heap
> sizes are being used.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
>
> ***  NOTICE
> *
> This message is intended for the use of the individual or entity to
> which
> it is addressed and may contain information that is privileged,
> confidential, and exempt from disclosure under applicable law.  If the
> reader of this message is not the intended recipient or the employee or
> agent responsible for delivering this message to the intended recipient,
>
> you are hereby notified that any dissemination, distribution, or copying
>
> of this communication is strictly prohibited.  If you have received this
>
> communication in error, please notify us immediately by reply or by
> telephone (call us collect at 512-343-9100) and immediately delete this
> message and all its attachments.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
>
> ***  NOTICE  *
> This message is intended for the use of the individual or entity to which
> it is 

Tomcat 7 Cluster Issue

2012-03-09 Thread Bruce Pease

at
org.apache.catalina.tribes.transport.nio.NioSender.completeConnect(NioSender.
java:151)

at
org.apache.catalina.tribes.transport.nio.NioSender.process(NioSender.java:92)

at
org.apache.catalina.tribes.transport.nio.ParallelNioSender.doLoop(ParallelNio
Sender.java:142)

... 28 more

 

Isapi worker.properties:

worker.list=cluster

 

# base settings

worker.foundation.type=ajp13

worker.foundation.connect_timeout=6

worker.foundation.connection_pool_size=100

worker.foundation.connection_pool_timeout=30

worker.foundation.socket_keepalive=false

worker.foundation.socket_timeout=300

worker.foundation.lbfactor=5

 

# worker 1 of cluster

worker.tomcat1.reference=worker.foundation

worker.tomcat1.host=10.103.4.70

worker.tomcat1.port=10109

worker.tomcat1.activation=A

 

# worker 2 of cluster

worker.tomcat2.reference=worker.foundation

worker.tomcat2.host=10.103.4.70

worker.tomcat2.port=10209

worker.tomcat2.activation=A

 

# define the load balancer

worker.cluster.type=lb

worker.cluster.method=B

worker.cluster.balance_workers=tomcat1,tomcat2

 

 

server.xml instance 1:





  

  

  

  

  

  



  

  







  





  

  

  



  

  

  













  

  



  

  



  



  



 

Server xml instance 2:





  

  

  

  

  

  



  

  







  





  

  

  



  

  

  













  

  



  

  



  



  



 

 

 

 

 

 

Bruce D. Pease
Technical Team Lead - Web Applications
CruiseOne(r) <http://www.cruiseone.com/>  & Cruises Inc(tm)
<http://www.cruisesinc.com/> 
1201 W. Cypress Creek Road, Suite 100
Fort Lauderdale, FL 33309-1955
954-958-3654 (direct) | 954-958-3665 (fax)
bpe...@wth.com <mailto:ssza...@wth.com> 

 



RE: Tomcat 7 Cluster Issue

2012-03-09 Thread Bruce Pease
I can try the rollback the jdk, and try that.  However, the issue doesn't
appear to be jdk related.  

The migration was performed by completely removing the old containers,
installing tomcat 7 instances, updating all configuration using the ones
released in tomcat 7 version, recompiling all applications with jdk 1.7 and
tomcat 7 dependencies, and redeploying the applications.

-Original Message-
From: Daniel Mikusa [mailto:dmik...@vmware.com] 
Sent: Friday, March 09, 2012 1:02 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 Cluster Issue

On Fri, 2012-03-09 at 08:38 -0800, Bruce Pease wrote:
> Good Morning:
>
>
>
> I recently upgraded my tomcat containers from tomcat 6 to tomcat 
> 7.0.26, and the jdk from 1.6 to 1.7.

This is a major jump for both Tomcat & the JVM.  Have you considered rolling
back one of them to the previous version?

For example, roll back the JDK to 1.6 and try just the upgrade to Tomcat
7.0.26.

Also, from a Tomcat standpoint, how did you perform the migration?  In
particular with your configuration files?

Dan


> I am now seeing a clustering issue when I start a second instance on 
> the same server.  I have tried a few variations of the config 
> (address="auto", address="the ip", no address entry, different ports,
> etc.) with no success.  I have included the configurations and error 
> messages below.  Thank you in advance for your assistance.
>
>
>
> Error:
>
> Mar 09, 2012 11:16:16 AM 
> org.apache.catalina.tribes.transport.nio.NioReceiver
> listen
>
> SEVERE: Unable to process request in NioReceiver
>
> java.net.SocketException: Invalid argument: no further information
>
> at sun.nio.ch.Net.setIntOption0(Native Method)
>
> at sun.nio.ch.Net.setSocketOption(Net.java:279)
>
> at
> sun.nio.ch.SocketChannelImpl.setOption(SocketChannelImpl.java:175)
>
> at
> sun.nio.ch.SocketAdaptor.setIntOption(SocketAdaptor.java:296)
>
> at
> sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:396)
>
> at
>
org.apache.catalina.tribes.transport.nio.NioReceiver.listen(NioReceiver.java:
> 308)
>
> at
> org.apache.catalina.tribes.transport.nio.NioReceiver.run(NioReceiver.j
> ava:418
> )
>
> at java.lang.Thread.run(Thread.java:722)
>
>
>
> SEVERE: Unable to send message through cluster sender.
>
> org.apache.catalina.tribes.ChannelException: Send failed, attempt:2 
> max:1; Faulty members:tcp://{10, 103, 4, 70}:4021;
>
> at
> org.apache.catalina.tribes.transport.nio.ParallelNioSender.doLoop(Para
> llelNio
> Sender.java:187)
>
> at
> org.apache.catalina.tribes.transport.nio.ParallelNioSender.sendMessage
> (Parall
> elNioSender.java:89)
>
> at
> org.apache.catalina.tribes.transport.nio.PooledParallelSender.sendMess
> age(Poo
> ledParallelSender.java:54)
>
> at
> org.apache.catalina.tribes.transport.ReplicationTransmitter.sendMessag
> e(Repli
> cationTransmitter.java:79)
>
> at
> org.apache.catalina.tribes.group.ChannelCoordinator.sendMessage(Channe
> lCoordi
> nator.java:78)
>
> at
> org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(Ch
> annelIn
> terceptorBase.java:79)
>
> at
> org.apache.catalina.tribes.group.interceptors.MessageDispatchIntercept
> or.send
> Message(MessageDispatchInterceptor.java:77)
>
> at
> org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(Ch
> annelIn
> terceptorBase.java:79)
>
> at
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.sendM
> essage(
> TcpFailureDetector.java:89)
>
> at
> org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(Ch
> annelIn
> terceptorBase.java:79)
>
> at
> org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:2
> 24)
>
> at
> org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:1
> 82)
>
> at
> org.apache.catalina.ha.tcp.SimpleTcpCluster.send(SimpleTcpCluster.java
> :804)
>
> at
> org.apache.catalina.ha.session.DeltaManager.getAllClusterSessions(Delt
> aManage
> r.java:830)
>
> at
> org.apache.catalina.ha.session.DeltaManager.startInternal(DeltaManager
> .java:7
> 98)
>
> at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>
> at
> org.apache.catalina.core.StandardContext.startInternal(Standa

RE: Tomcat 7 Cluster Issue

2012-03-12 Thread Bruce Pease
You are correct.  I rolled back the jdk7 change, and the session replication
fired up without error.  I will hold off on the jdk 7 upgrade until I see the
okay on a subsequent release.  Thanks.

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Saturday, March 10, 2012 5:26 AM
To: Tomcat Users List
Subject: Re: Tomcat 7 Cluster Issue

On 09/03/2012 18:33, Bruce Pease wrote:
> I can try the rollback the jdk, and try that.  However, the issue 
> doesn't appear to be jdk related.

Plenty of changes to NIO in Java 7 AFAIK.
Let us know if Java 6 + Tomcat 7 presents the same problem.


p

> The migration was performed by completely removing the old containers, 
> installing tomcat 7 instances, updating all configuration using the 
> ones released in tomcat 7 version, recompiling all applications with 
> jdk 1.7 and tomcat 7 dependencies, and redeploying the applications.
> 
> -Original Message-
> From: Daniel Mikusa [mailto:dmik...@vmware.com]
> Sent: Friday, March 09, 2012 1:02 PM
> To: Tomcat Users List
> Subject: Re: Tomcat 7 Cluster Issue
> 
> On Fri, 2012-03-09 at 08:38 -0800, Bruce Pease wrote:
>> Good Morning:
>>
>>
>>
>> I recently upgraded my tomcat containers from tomcat 6 to tomcat 
>> 7.0.26, and the jdk from 1.6 to 1.7.
> 
> This is a major jump for both Tomcat & the JVM.  Have you considered 
> rolling back one of them to the previous version?
> 
> For example, roll back the JDK to 1.6 and try just the upgrade to 
> Tomcat 7.0.26.
> 
> Also, from a Tomcat standpoint, how did you perform the migration?  In 
> particular with your configuration files?
> 
> Dan
> 
> 
>> I am now seeing a clustering issue when I start a second instance on 
>> the same server.  I have tried a few variations of the config 
>> (address="auto", address="the ip", no address entry, different ports,
>> etc.) with no success.  I have included the configurations and error 
>> messages below.  Thank you in advance for your assistance.
>>
>>
>>
>> Error:
>>
>> Mar 09, 2012 11:16:16 AM
>> org.apache.catalina.tribes.transport.nio.NioReceiver
>> listen
>>
>> SEVERE: Unable to process request in NioReceiver
>>
>> java.net.SocketException: Invalid argument: no further information
>>
>> at sun.nio.ch.Net.setIntOption0(Native Method)
>>
>> at sun.nio.ch.Net.setSocketOption(Net.java:279)
>>
>> at
>> sun.nio.ch.SocketChannelImpl.setOption(SocketChannelImpl.java:175)
>>
>> at
>> sun.nio.ch.SocketAdaptor.setIntOption(SocketAdaptor.java:296)
>>
>> at
>> sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:396)
>>
>> at
>>
>
org.apache.catalina.tribes.transport.nio.NioReceiver.listen(NioReceiver.java:
>> 308)
>>
>> at
>> org.apache.catalina.tribes.transport.nio.NioReceiver.run(NioReceiver.
>> j
>> ava:418
>> )
>>
>> at java.lang.Thread.run(Thread.java:722)
>>
>>
>>
>> SEVERE: Unable to send message through cluster sender.
>>
>> org.apache.catalina.tribes.ChannelException: Send failed, attempt:2 
>> max:1; Faulty members:tcp://{10, 103, 4, 70}:4021;
>>
>> at
>> org.apache.catalina.tribes.transport.nio.ParallelNioSender.doLoop(Par
>> a
>> llelNio
>> Sender.java:187)
>>
>> at
>> org.apache.catalina.tribes.transport.nio.ParallelNioSender.sendMessag
>> e
>> (Parall
>> elNioSender.java:89)
>>
>> at
>> org.apache.catalina.tribes.transport.nio.PooledParallelSender.sendMes
>> s
>> age(Poo
>> ledParallelSender.java:54)
>>
>> at
>> org.apache.catalina.tribes.transport.ReplicationTransmitter.sendMessa
>> g
>> e(Repli
>> cationTransmitter.java:79)
>>
>> at
>> org.apache.catalina.tribes.group.ChannelCoordinator.sendMessage(Chann
>> e
>> lCoordi
>> nator.java:78)
>>
>> at
>> org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(C
>> h
>> annelIn
>> terceptorBase.java:79)
>>
>> at
>> org.apache.catalina.tribes.group.interceptors.MessageDispatchIntercep
>> t
>> or.send
>> Message(MessageDispatchInterceptor.java:77)
>>
>> at
>> org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(C
>> h
>> annelIn
>> terceptorBase.java:79)

RE: Tomcat 7 Cluster Issue

2012-03-12 Thread Bruce Pease
I am using a windows 2003 server 32 bit standard edition SP2 with IIS 6.  I
have an isapi_redirect.dll v.1.2.31 communicating to tomcat via ajp1.3.  JDK
version was 7.03, and tomcat version is 7.0.26.  Tomcat is installed as a
service using the service.bat, and I am running two containers in the
clustered environment.  Session replication is in memory, and communication
is limited to within the server, i.e. not to any external server. 

I can provide complete configuration files or more detail if needed.

Thanks very much for your help.

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Monday, March 12, 2012 5:13 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 Cluster Issue

On 12/03/2012 17:30, Pid * wrote:
> I will try to reproduce using your config, shortly.

The only warning I get on OSX with JDK 1.7.0 is that FarmWarDeployer only
works when the Cluster is defined inside a Host.

Can you provide as much detail as possible about your OS & JDK 7 version
please?


p

>>> className="org.apache.catalina.ha.deploy.FarmWarDeployer"
 tempDir="/tmp/war-temp/" deployDir="/tmp/war-deploy/"
 watchDir="/tmp/war-listen/" watchEnabled="false"/>

>>> className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderLi
 st
 e
 ner"/>

>>> className="org.apache.catalina.ha.session.ClusterSessionListener"/>

  

  >>> className="org.apache.catalina.realm.LockOutRealm">

>>> className="org.apache.catalina.realm.UserDatabaseRealm"
 resourceName="UserDatabase"/>

  

  >> unpackWARs="true"
 autoDeploy="true">

>>> className="org.apache.catalina.valves.AccessLogValve" directory="logs"
 prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t 
 "%r" %s %b"/>

  



-- 

[key:62590808]



Velocity Logging

2013-03-27 Thread Bruce Pease
I am using Wicket 1.4.22 with Tomcat 7.0.37 and JDK 1.6.0_33.  The recent
upgrade to Tomcat created an issue where the cannot 

be undeployed unless the app is shut down due to the Wicket dependency
velocity logging in use (1.4).  

 

We are running a web application under tomcat using the wicket framework.  A
requirement for Wicket is the velocity libraries.  The velocity framework is
auto loading and writing to a log in the conf directory.  Since it is in use
I am unable to undeploy the web application.  So, I am looking for a way to
turn off the velocity logging.  Previous version of tomcat does not have this
issue (7.0.26).

 

Thanks in advance for your help.

 

Bruce D. Pease
Technical Team Lead - Web Applications
CruiseOne(r) <http://www.cruiseone.com/>  & Cruises Inc(tm)
<http://www.cruisesinc.com/> 
1201 W. Cypress Creek Road, Suite 100
Fort Lauderdale, FL 33309-1955
954-958-3654 (direct) | 954-958-3665 (fax)
bpe...@wth.com <mailto:ssza...@wth.com> 

 



RE: Velocity Logging

2013-03-28 Thread Bruce Pease
Since we are not using velocity we were able to remove the velocity
libraries, and this issue was resolved.  

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Wednesday, March 27, 2013 2:38 PM
To: Tomcat Users List
Subject: Re: Velocity Logging

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Bruce,

On 3/27/13 10:16 AM, Bruce Pease wrote:
> I am using Wicket 1.4.22 with Tomcat 7.0.37 and JDK 1.6.0_33.  The 
> recent upgrade to Tomcat created an issue where the cannot
> 
> be undeployed unless the app is shut down due to the Wicket dependency 
> velocity logging in use (1.4).
> 
> 
> 
> We are running a web application under tomcat using the wicket 
> framework.  A requirement for Wicket is the velocity libraries.
> The velocity framework is auto loading and writing to a log in the 
> conf directory.  Since it is in use I am unable to undeploy the web 
> application.  So, I am looking for a way to turn off the velocity 
> logging.  Previous version of tomcat does not have this issue 
> (7.0.26).

1. Wrong mailing list? (This is for Tomcat, maybe you want Velocity?) 2.
Sounds like you are putting your Velocity and/or logging libraries in a
shared location.. is that the case? If so, stop doing that.

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

iQIcBAEBCAAGBQJRUzyIAAoJEBzwKT+lPKRYVSUQAKVhSnphqObwNZ1ZIJ1hXYOq
t3obA4/yWgKsOjBNlih8bye4bszVLvw3ETXeD5znTax5Pl3R/h9Gv5t84xTQ468d
eyzXvde5G7JfAURk3Lh47smaEdAuNSg4dVlDO+1SzIzkxsKrOOOFvvf69LDUpouY
EWAt27OYfP5UdGqn+TN8TYok87qWhdzMwELvHhWIBq84zUYp4iIrla2CYwpzCje+
yUfi9Qysb/U9dcqSnfmTM2GYZw+KaP0NXZXjfUdNk5B6C1I5YuNoWtOrFZhtwKru
S2OWocAhzEG02JEW+qdcEu4QaPA3KmrvGPNjJ9KTZHOVfDAonMS6Zk6XCFsBdwWi
rP2wIvaPwVYMrkrQBBPaLBttpNPRVI+DRxcheNqWT5r3kiPOP8f8nY1dR7OwTq/x
bsTxej0B0beMz9yIMVmw3gIELMOceFz2ufyBOYWpXWH/hTNw7yWnfSvmLyLJyzp0
0DMBK3svg3ZOqoJq/VVe9e8yHyq1PaSA76k+vqUmcFhoo0gX+4YzQ3fKyTe+XYME
YKpuTxeagxmmx+nPe10QIaOxhxGL8iDfs7GCHAxsDQbiRgae0ViRSHbLBpRDLI40
Vhc2KDf0OItvKRsf2+tZMy0LUHKdfy33ZUHKOkXEMlaXbK6AcX3GS8jJ4JA7x5aq
hD4PWviP7S6ZVO6/7sYL
=cE0X
-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



Tomcat 7 Cluster Issue

2011-02-22 Thread Bruce Pease
Good Afternoon:

 

I am running Windows server 2008 with Oracle/Sun jdk 1.6u24 and Tomcat 7.0.8.
Windows server 2008 multicast is defaulted on.  I am attempting to set up a
cluster (config that currenly works in Windows server 2000 and tomcat 6), and
getting the exception listed below.  I haven't been able to find a
configuration change from Tomcat 6 to 7 that might be causing this error.  I
have included the cluster configuration as well.  Any assistance would be
appreciated.  

 




































 

Feb 22, 2011 5:48:11 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
startInternal

SEVERE: Unable to start cluster.

org.apache.catalina.tribes.ChannelException: java.net.SocketException: An
operation was attempted on something that is not a socket; No faulty members
identified.

at
org.apache.catalina.tribes.group.ChannelCoordinator.internalStart(ChannelCoor
dinator.java:178)

at
org.apache.catalina.tribes.group.ChannelCoordinator.start(ChannelCoordinator.
java:99)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelIntercep
torBase.java:150)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelIntercep
torBase.java:150)

at
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor.star
t(MessageDispatchInterceptor.java:153)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelIntercep
torBase.java:150)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelIntercep
torBase.java:150)

at
org.apache.catalina.tribes.group.GroupChannel.start(GroupChannel.java:416)

at
org.apache.catalina.ha.tcp.SimpleTcpCluster.startInternal(SimpleTcpCluster.ja
va:671)

at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1026)

at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)

at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1035)

at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291
)

at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:4
43)

at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:724
)

at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at
org.apache.catalina.startup.Catalina.start(Catalina.java:620)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.
java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:304)

at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

 

Bruce D. Pease
Technical Team Lead - Web Applications
CruiseOne(r) <http://www.cruiseone.com/>  & Cruises Inc(tm)
<http://www.cruisesinc.com/> 
1201 W. Cypress Creek Road, Suite 100
Fort Lauderdale, FL 33309-1955
954-958-3654 (direct) | 954-958-3665 (fax)
bpe...@wth.com <mailto:ssza...@wth.com> 

 



RE: Tomcat 7 Cluster Issue

2011-02-23 Thread Bruce Pease
Thanks, that seems to have fixed the issue.  I'm assuming this won't be a
problem since we only have a single NIC with multiple IPs on that machine.
I'll test session failover and verify it.  Thanks very much!

-Original Message-
From: Filip Hanik - Dev Lists [mailto:devli...@hanik.com] 
Sent: Tuesday, February 22, 2011 6:49 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat 7 Cluster Issue

It can probably be fixed, there are a few references to this
http://www.techienuggets.com/CommentDetail?tx=355312
https://issues.jboss.org/browse/JGRP-777

I'd have to reproduce it, so that I can fix it/work around it. I will 
open a bugzilla item with this

In the meantime, does this still happen if you remove the "bind" attribute?

best
Filip


On 02/22/2011 04:02 PM, Bruce Pease wrote:
> Good Afternoon:
>
>
>
> I am running Windows server 2008 with Oracle/Sun jdk 1.6u24 and Tomcat
7.0.8.
> Windows server 2008 multicast is defaulted on.  I am attempting to set up a
> cluster (config that currenly works in Windows server 2000 and tomcat 6),
and
> getting the exception listed below.  I haven't been able to find a
> configuration change from Tomcat 6 to 7 that might be causing this error.
I
> have included the cluster configuration as well.  Any assistance would be
> appreciated.
>
>
>
>  channelSendOptions="11">
>  expireSessionsOnShutdown="true" notifyListenersOnReplication="true"/>
>
>   className="org.apache.catalina.tribes.group.GroupChannel">
>
>   className="org.apache.catalina.tribes.membership.McastService"
> address="228.0.0.45"  bind="10.103.4.70" port="45564" frequency="500"
> dropTime="3000"/>
>
>   className="org.apache.catalina.tribes.transport.nio.NioReceiver"
> address="10.103.4.70"  port="4220" autoBind="100" selectorTimeout="100"
> maxThreads="6"/>
>
>   className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>
>   className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
>
>  
>
>  
className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/
>
>>  
>  
className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Int
> erceptor"/>
>
>  
className="org.apache.catalina.tribes.group.interceptors.ThroughputIntercepto
> r"/>
>
>  
>
>   className="org.apache.catalina.ha.tcp.ReplicationValve"
> filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
>
>   className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
>
>   className="org.apache.catalina.ha.deploy.FarmWarDeployer"
> tempDir="/tmp/war-temp/"  deployDir="/tmp/war-deploy/"
> watchDir="/tmp/war-listen/" watchEnabled="false"/>
>
>  
className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
>
>   className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>
> 
>
>
>
> Feb 22, 2011 5:48:11 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
> startInternal
>
> SEVERE: Unable to start cluster.
>
> org.apache.catalina.tribes.ChannelException: java.net.SocketException: An
> operation was attempted on something that is not a socket; No faulty
members
> identified.
>
>  at
>
org.apache.catalina.tribes.group.ChannelCoordinator.internalStart(ChannelCoor
> dinator.java:178)
>
>  at
>
org.apache.catalina.tribes.group.ChannelCoordinator.start(ChannelCoordinator.
> java:99)
>
>  at
>
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelIntercep
> torBase.java:150)
>
>  at
>
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelIntercep
> torBase.java:150)
>
>  at
>
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor.star
> t(MessageDispatchInterceptor.java:153)
>
>  at
>
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelIntercep
> torBase.java:150)
>
>  at
>
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelIntercep
> torBase.java:150)
>
>  at
> org.apache.catalina.t

IIS7/isapi/tomcat performance

2011-02-28 Thread Bruce Pease
Good Afternoon:

 

I am attempting to run a Windows x64 server with IIS7 and Tomcat 7.  I have
64 bit versions of JDK (1.6.26) and Tomcat (7.0.8).  The server is set up
with IIS using ajp1.3 to a local cluster of Tomcat servers.  In performance
tests I have found the configuration runs dramatically slower than it's
corresponding server in 32 bit Windows on 2000 Server and Tomcat 6.  Is there
a way to improve performance or is there an issue with this setup on Windows
64 IIS 7?

 

Thanks,

 

Bruce D. Pease
Technical Team Lead - Web Applications
CruiseOne(r) <http://www.cruiseone.com/>  & Cruises Inc(tm)
<http://www.cruisesinc.com/> 
1201 W. Cypress Creek Road, Suite 100
Fort Lauderdale, FL 33309-1955
954-958-3654 (direct) | 954-958-3665 (fax)
bpe...@wth.com <mailto:ssza...@wth.com> 

 



RE: IIS7/isapi/tomcat performance

2011-02-28 Thread Bruce Pease
Perhaps my point is being missed here.  The issue is moving from 32 bit is
slower in 64 bit (4-500% if you need a number).  Components are the same,
setup is the same, database is the same, environment is the same, tests are
the same, network is the same.  I'm basically looking to see if anyone is
using a similar setup, and has been able to get it to perform well.

-Original Message-
From: Tony Anecito [mailto:adanec...@yahoo.com] 
Sent: Monday, February 28, 2011 1:40 PM
To: Tomcat Users List
Subject: Re: IIS7/isapi/tomcat performance

I agree with Charles. I run a performance Testing group for a fortune 50
company 
and do alot of performance testing for different designs/implementation for
my 
own startup and we can not help you without further info.

Client side setup (Browser/version?)
Test cases
Network speed
Tomcat Setup (startup command line with jdk options)
Extending logging options such as request time for tomcat
Make sure your logging is set to error and not debug level on your processes 
(IIS, Tomcat, Database?)

I would use yslow with FF to get page sizes and other info. developers seem
to 
forget that the bandwidth is limited and 1MB pages are too big. Sometimes
images 
are small but the javascript is quite big especially when calling web
services 
directly,
For the middle tier a code profiler like visualvm helps quite a bit.

The key thing is narrow it down tier by tier then focus on the tier where you

see the biggest gains.
If manually you see x seconds then that is the best it will be before you
start 
tuning.
Gains in code will always be larger than that by configuration tuning unless 
logging level is set to high especially for jdbc calls.

Good luck,
Tony Anecito (JavaOne 2010 "I am the future of Java winner")
Founder,
MyUniPortal (JavaOne 2010 "Duke's Award Winner")
http://www.myuniportal.com


 


- Original Message 
From: "Caldarale, Charles R" 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 11:15:40 AM
Subject: RE: IIS7/isapi/tomcat performance

> From: Bruce Pease [mailto:bpe...@wth.com] 
> Subject: IIS7/isapi/tomcat performance

> In performance tests I have found the configuration runs
> dramatically slower than it's corresponding server in 32
> bit Windows on 2000 Server and Tomcat 6.

Until you quantify "dramatically", better describe your testing scenario 
(including configurations of all components), eliminate as many moving pieces
as 
you can (e.g., try Tomcat standalone), and do some basic bottleneck analysis,

there's not much anyone can help you with.

- Chuck


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


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


  

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


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



RE: IIS7/isapi/tomcat performance

2011-02-28 Thread Bruce Pease
Thanks for the insight.  It looks like we are going to go with server 2003 32
bit.  I found some references that suggest ajp 1.3 has a performance issue in
64 bit server 2008.

-Original Message-
From: Tony Anecito [mailto:adanec...@yahoo.com] 
Sent: Monday, February 28, 2011 3:01 PM
To: Tomcat Users List
Subject: Re: IIS7/isapi/tomcat performance

I forgot to mention new versions of Windows are slower than XP. So that would

contribute to your issues. Windows 7 got better but not as fast as 32-bit.

Also, you might want to measure from tomcat perspective so you have a new 
baseline.

Regards,
-Tony



- Original Message 
From: Tony Anecito 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 12:57:03 PM
Subject: Re: IIS7/isapi/tomcat performance

Since the memory pointers are larger you may need to increase your heap size
but 

you can compress the address pointers.

Also, if you use JNI and it is 32-bit then you will have unexpected issues
same 
thing with any native libs your try to use.

Generally it will be up to 20% slower due to the pointers.

Recommend you stick to 32-bit if your app fits within the memory space for 
32-bit. I have heard that 64-bit jvm for version 7 might be faster than
32-bit.

Good Luck,
-Tony



- Original Message 
From: Tony Anecito 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 12:40:43 PM
Subject: Re: IIS7/isapi/tomcat performance

JVM settings should not be the same.

Regards,
-Tony



- Original Message 
From: Bruce Pease 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 11:46:35 AM
Subject: RE: IIS7/isapi/tomcat performance

Perhaps my point is being missed here.  The issue is moving from 32 bit is
slower in 64 bit (4-500% if you need a number).  Components are the same,
setup is the same, database is the same, environment is the same, tests are
the same, network is the same.  I'm basically looking to see if anyone is
using a similar setup, and has been able to get it to perform well.

-Original Message-
From: Tony Anecito [mailto:adanec...@yahoo.com] 
Sent: Monday, February 28, 2011 1:40 PM
To: Tomcat Users List
Subject: Re: IIS7/isapi/tomcat performance

I agree with Charles. I run a performance Testing group for a fortune 50
company 
and do alot of performance testing for different designs/implementation for
my 
own startup and we can not help you without further info.

Client side setup (Browser/version?)
Test cases
Network speed
Tomcat Setup (startup command line with jdk options)
Extending logging options such as request time for tomcat
Make sure your logging is set to error and not debug level on your processes 
(IIS, Tomcat, Database?)

I would use yslow with FF to get page sizes and other info. developers seem
to 
forget that the bandwidth is limited and 1MB pages are too big. Sometimes
images 
are small but the javascript is quite big especially when calling web
services 
directly,
For the middle tier a code profiler like visualvm helps quite a bit.

The key thing is narrow it down tier by tier then focus on the tier where you

see the biggest gains.
If manually you see x seconds then that is the best it will be before you
start 
tuning.
Gains in code will always be larger than that by configuration tuning unless 
logging level is set to high especially for jdbc calls.

Good luck,
Tony Anecito (JavaOne 2010 "I am the future of Java winner")
Founder,
MyUniPortal (JavaOne 2010 "Duke's Award Winner")
http://www.myuniportal.com


 


- Original Message 
From: "Caldarale, Charles R" 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 11:15:40 AM
Subject: RE: IIS7/isapi/tomcat performance

> From: Bruce Pease [mailto:bpe...@wth.com] 
> Subject: IIS7/isapi/tomcat performance

> In performance tests I have found the configuration runs
> dramatically slower than it's corresponding server in 32
> bit Windows on 2000 Server and Tomcat 6.

Until you quantify "dramatically", better describe your testing scenario 
(including configurations of all components), eliminate as many moving pieces
as 
you can (e.g., try Tomcat standalone), and do some basic bottleneck analysis,

there's not much anyone can help you with.

- Chuck


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


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


      

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


-
To unsub

RE: IIS7/isapi/tomcat performance

2011-03-01 Thread Bruce Pease
I'm just curious if anyone is using a 64 bit version of Linux, and has seen
performance degradation.  We are looking to move off the Windows platform
eventually anyway.

-Original Message-
From: Tony Anecito [mailto:adanec...@yahoo.com] 
Sent: Tuesday, March 01, 2011 4:34 PM
To: Tomcat Users List
Subject: Re: IIS7/isapi/tomcat performance

Hi Chris,

I used Tomcat separately because JBoss was always somewhat behind the current

production version of Tomcat. Eventually I will remove JBoss and use JDBC
from 
Tomcat to my database to reduce memory footprint and improve performance. I
am 
only using EJB's in JBoss right now.

Best practice regarding memory settings is set the min.max to be the same so
the 
CPU is not busy allocating memory. There are other settings one can use just 
trial and error or keep testing till you get the best configuration for your 
app. I know each jvm release gets better so less tuning is needed as what I 
think you are trying to say.

I went up to 1,000 client threads before I stopped.

Since I met my first goal I like to get 10X better on the next one if
possible 
and from what you told me I might be able to make it. I can get close if I
went 
to a i7 980 or Sandy Bridge system instead of the slower AMD processor. To me

that is cheating since I believe through tuning and code changes one should
be 
able to get there.

I will look for the pdf again if it is the one I am thinking of for
ApacheHttp 
commons testing then I am on the same track regarding setup and usage of the 
client program.

Regards,
-Tony




- Original Message 
From: Christopher Schultz 
To: Tomcat Users List 
Sent: Tue, March 1, 2011 2:17:46 PM
Subject: Re: IIS7/isapi/tomcat performance

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tony,

Good thing these are marked as [OT]... we have totally hijacked Bruce's
thread. Maybe we should start another.

On 3/1/2011 4:07 PM, Tony Anecito wrote:
> I am just trying to figure out what is the fastest was to handle my app. I
was 

> shooting for less than 1msec at Tomcat which I not have done. Now I want to
get 
>
> to 100 microseconds. Years ago from an logical architecture standpoint It
was:
> 1. Apache web server - JBoss, then 
> 2. Apache - Tomcat - JBoss
> 3. APR/Tomcat - JBoss. 

Do you mean you are using Tomcat out in front of JBoss? Why not just use
JBoss directly? That'll probably buy you more than any other
configuration change.

> I currently am using 200MB xmx, xms, -server, NUMA, and set my new
generation 
>to 
>
> be large since my objects are short lived. I do not remember my other
settings. 
>
> I am beginning to think simpler is better for settings since at 1msec or
less 
> any time spent by the processor might be wasted time.

Generally speaking, you should let the GC configure itself unless you
really know what you are doing or have to work around some specific problem.

> I am very curious how you got 50K requests per second.

You'll have to be more specific. Do you mean in my performance tests?
Which one? Did you read all of the setup info in the earlier slides?

> I can get 1K per second on my AMD 6 core system. What was your client
setup?

It's all in the PDF.

> I ran my client on the same
> server as my APR/Tomcat-JBoss and I am setting up the client on a laptop so
I 
>am 
>
> not sharing resources. For the client I am using ApacheHttp class running
in 
> Eclipse and launch each http request in a different thread.

How many threads are you talking about using, here?

> I ended 
> up configuring Tomcat for 400 connections which made a big difference. I
still 

> have alot more testing/tuning to do and I hope to get to it over the next 
>couple 
>
> of evenings.

100 microseconds seems like an arbitrary target. Where did it come from?

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

iEYEARECAAYFAk1tYnoACgkQ9CaO5/Lv0PDVpwCgvlpUZcm4uZd/do+EeYuu/dte
o2QAn3XHEdvKFVwFUR2VdLDnBghXlP03
=ov34
-END PGP SIGNATURE-

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


  

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


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



log4j config

2011-05-16 Thread Bruce Pease
I have an issue with log4j 1.2.16 where the max file size on the rolling file
appender is not working (also not on 1.2.15)  However, when I go back to my
previous log4j version (1.2.9), the file backups do work.  Was there a config
change, or is this a known issue?  My config is below:

 

log4j.rootLogger=INFO, VerboseLog, FatalLog

 

log4j.appender.VerboseLog=org.apache.log4j.RollingFileAppender

log4j.appender.VerboseLog.Threshold=DEBUG

log4j.appender.VerboseLog.Append=true

log4j.appender.VerboseLog.MaxFileSize=10MB

log4j.appender.VerboseLog.MaxBackupIndex=10

log4j.appender.VerboseLog.File=C:/var/tomcat1/logs/travel.log

log4j.appender.VerboseLog.layout=org.apache.log4j.PatternLayout

log4j.appender.VerboseLog.layout.ConversionPattern=%d [%-5p] %c -%m%n

 

log4j.appender.FatalLog=org.apache.log4j.RollingFileAppender

log4j.appender.FatalLog.Threshold=FATAL

log4j.appender.FatalLog.MaxFileSize=5MB

log4j.appender.FatalLog.MaxBackupIndex=2

log4j.appender.FatalLog.File=C:/var/tomcat1/logs/travel.fatal.log

log4j.appender.FatalLog.layout=org.apache.log4j.PatternLayout

log4j.appender.FatalLog.layout.ConversionPattern=%d [%-5p] %c -%m%n

 

# Add your packages here that you want to debug:

log4j.logger.org.apache=FATAL

 

Bruce D. Pease
Technical Team Lead - Web Applications
CruiseOne(r) <http://www.cruiseone.com/>  & Cruises Inc(tm)
<http://www.cruisesinc.com/> 
1201 W. Cypress Creek Road, Suite 100
Fort Lauderdale, FL 33309-1955
954-958-3654 (direct) | 954-958-3665 (fax)
bpe...@wth.com <mailto:ssza...@wth.com> 

 



Newbie Help - Up and Running with Tomcat on Windows

2014-02-24 Thread Bruce Whealton
Hello all,
   I have had a difficult time getting Tomcat to start.  I first tried 
installing it with xampp.  I had a hunch that the problem was that there might 
be a port conflict, so I tried a different ports but still it would not start 
from the xampp control panel.  BTW, this is trying to run on Windows 8.1.
   I also downloaded the full version of Netbeans which includes Tomcat 
and and Glassfish server bundled with the download.  I am fairly certain that I 
told it to install Tomcat during the installation.  
 I thought that maybe GlassFish server is interfering with Tomcat, but 
I only got that server when I installed Netbeans and I had trouble getting 
Tomcat to start even before installing Netbeans which integrated GlassFish 
server.  
   It might be something as obvious as not having Java EE installed 
separately.  Perhaps Tomee+ will provide all that is needed.
Thanks in advance for any feedback,  and help,
Bruce
-
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: Newbie Help - Up and Running with Tomcat on Windows

2014-02-25 Thread Bruce Whealton
Thanks for the response, Daniel.  At this point, I don't know if I would
need more of the JEE container.  Perhaps when I learn more I'll find a need
for more services and features.  I know that one app I had in mind to
install on my server, would run in a Tomcat environment (not sure if that is
the right word).  The application is called Jena and it has various features
and/or components that are part of the Semantic Web related technologies.
Bruce

++++
Bruce M Whealton
Web/ App/Software Developer with skills in Web Design
http://futurewavewebdevelopment.com
Online resume: http://futurewavewebdevelopment.com/myinfo/bw-cv-resume
Call or Text: 919-714-9993


-Original Message-
From: Daniel Mikusa [mailto:dmik...@gopivotal.com] 
Sent: Tuesday, February 25, 2014 7:56 AM
To: Tomcat Users List
Subject: Re: Newbie Help - Up and Running with Tomcat on Windows

On Feb 25, 2014, at 2:02 AM, Bruce Whealton 
wrote:

> Hello all,
>   I have had a difficult time getting Tomcat to start.  I first
tried installing it with xampp.  I had a hunch that the problem was that
there might be a port conflict, so I tried a different ports but still it
would not start from the xampp control panel.  BTW, this is trying to run on
Windows 8.1.
>   I also downloaded the full version of Netbeans which includes
Tomcat and and Glassfish server bundled with the download.  I am fairly
certain that I told it to install Tomcat during the installation.  
> I thought that maybe GlassFish server is interfering with Tomcat,
but I only got that server when I installed Netbeans and I had trouble
getting Tomcat to start even before installing Netbeans which integrated
GlassFish server.  

It's difficult for us to comment when you're using a third party installer
for Tomcat.  I'd suggest using the standard Tomcat install process (i.e.
download & unzip) instead.

   http://tomcat.apache.org/tomcat-7.0-doc/RUNNING.txt

If you'd prefer an installer, Tomcat also has a Windows installer.  It is
listed as "32-bit/64-bit Windows Service Installer" on the downloads page.
Instructions for the installer are here.

  http://tomcat.apache.org/tomcat-7.0-doc/setup.html#Windows 

If you have a problem with either install method, just post to the list and
someone will be able to help.

>   It might be something as obvious as not having Java EE installed
separately.  Perhaps Tomee+ will provide all that is needed.

What specifically do you need?  Tomcat is not a full JEE container.  It
implements the Servlet, JSP, EL and WebSockets specs.

  http://tomcat.apache.org/whichversion.html

If you need more then you could look at something like Apache Tomee or
Apache Geronimo.

Dan

> Thanks in advance for any feedback,  and help, Bruce
> -
> 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


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



Newbie question: Installing Java EE

2014-03-01 Thread Bruce Whealton
Hello all,
 Recently, I downloaded Java EE with the SDK.  When I went to
install it, it could not find the Java Run-time, the JRE.  I have Java SE
with the JDK installed and have used Java on my system.   When I installed
Java SE it included the JRE. Perhaps the problem is that I have Java SE
1.7u51 and the latest version of Java EE is 1.7u45, I believe.  So, I guess
when installing Java EE, the installer expects you to already have the Java
Run time installed?  
 Next question is with regard to the server.  Is there any
reason one would run both Tomcat and Glass-Fish server?  I'm not really sure
what the differences between these two are.  Also, there is the issue of
ports.  When I installed Tomcat it runs on port 8080 (and a couple other
ports).  In a production environment one doesn't typically see the port
specified in a link.  Do we serve web pages using Tomcat on port 80 in a
production environment or how is this handled?  You can't have two servers
running on the same machine using the same port.
Thanks,
Bruce

++++
Bruce M Whealton
Web/ App/Software Developer with skills in Web Design
http://futurewavewebdevelopment.com
Online resume: http://futurewavewebdevelopment.com/myinfo/bw-cv-resume
Call or Text: 919-714-9993




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



Trouble shooting refused connections

2014-03-05 Thread Bruce Weertman
Hey All:

We have a load balancer talking with tomcat’s running on multiple backend 
tomcat servers. The
tomcats are running web service applications. In doing testing, and as reported 
by customers,
we occasionally see refused connections. Not real often, but enough to be a 
head ache. 
We’re not sure where the problem is coming from. Suspects include (1) firewall, 
(2) load balancer 
(3) tomcat and perhaps the (4) the web app.  The volume of traffic is so high, 
that it becomes
a needle in a hay stack issue.

We are using the BIO connector and everything is HTTP. Our typical hit rates 
are dozens per second.

In my experimentation with Tomcat, if it runs out of threads and the accept 
queue fills,
there is no indication in (for example) catalina.out.

(see acceptCount and maxConnections in 
http://tomcat.apache.org/tomcat-7.0-doc/config/http.html)

In production  maxConnections is the default of 200, but when looking at the 
number of connections
being processed by tomcat it’s rarely more than a couple dozen per instance. 
There’s always 
the possibility that it occasionally spikes. 

Anyway, the question is:  Is there any good way to see if tomcat is going into 
a state where it’s not accepting connections?
How would would I see this? Is it possible to see this ? 

Thanks for any help!
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Trouble shooting refused connections

2014-03-06 Thread Bruce Weertman
Thanks for the replies. Here’s some more info. 
> Bruce,
> 
> On 3/5/14, 1:11 PM, Bruce Weertman wrote:
>> We have a load balancer talking with tomcat’s running on multiple 
>> backend tomcat servers. The tomcats are running web service 
>> applications. In doing testing, and as reported by customers, we 
>> occasionally see refused connections. Not real often, but enough
>> to be a head ache.
>> 
>> We’re not sure where the problem is coming from. Suspects include
>> (1) firewall, (2) load balancer (3) tomcat and perhaps the (4) the
>> web app.  The volume of traffic is so high, that it becomes a
>> needle in a hay stack issue.
> 
> Can you describe your setup in a bit more detail? What kind of lb? How
> many of them? Any fronting web server(s)? How many? How many Tomcat
> instances?

There’s no front end servers. We used to do that via AJP, mod_jk and apache
but now we just have a single generic http load balancer. If a backend 
it unavailable, it will send traffic to another server. We have ~5 instances 
give or take. 

Everything’s Linux except osx for development and the testing (see below).

> What is/are your  configuration(s)?

Pretty simple, nothing much to see here accept the keep alive

 <% 
long t0 = System.currentTimeMillis(); 
Thread.sleep(5000l); 
long t1 = System.currentTimeMillis();
%>Slept for <%= t1 - t0 %> milliseconds

I then have a very simple BASH script that looks like:

#!/bin/ti
for i in {0..20}
do
wget —tries=1 -O file${i}.txt "http://localhost:8080/myapp/sleep.jsp"; &
done

After running this file, I end up with something like 8 files successfully 
downloaded.
Naively, I would think that I’d get 6. Changing localhost to the host name,
I do in fact get 6. So going to localhost must have a connection queuing effect
(at the OS level) that is different from going through the interface card.
The point is, the thread limit did it’s thing. Requests were rejected.

LOOKING in the logs directory, specifically catalina.out, I do not see
any indication that tomcat ran out of threads! It says nothing about
rejected connections! EEEK. Bad stuff could be happening all the time
and I would never know. What am I missing?  There’s got to be some
way to see this stuff.

> 
>> In production maxConnections is the default of 200, but when
>> looking at the number of connections being processed by tomcat it’s
>> rarely more than a couple dozen per instance. There’s always the
>> possibility that it occasionally spikes.
> 
> What is the resolution of the data you have? Are you sampling with
> some regularity?

It’s really just spot checking using JMX and looking at the tomcat 
server-status page.

> 
>> Anyway, the question is:  Is there any good way to see if tomcat
>> is going into a state where it’s not accepting connections? How
>> would would I see this? Is it possible to see this ?
> 
> Sure: connect to a specific Tomcat. If you get a "connection refused",
> then you are in this state.

Well of course, but this doesn’t happen very often. 

> 
> Your load balancer should have a setting where you can choose a
> back-end server explicitly if you want to go through the lb, or you
> can just contact one directly.

Of course, I can talk to back ends directly or not. 

> 
> - -chris


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



Re: Trouble shooting refused connections

2014-03-07 Thread Bruce Weertman
Chris;

> Just curious: why do you have maxKeepAliveRequests=1? That's... not
> terribly efficient.

That’s a good question and perhaps we should revisit it.
I’m a little fuzzy on the reasoning (it was a while ago that we did this),
but I believe it was so that we would have a more even distribution to our back
ends.  The requests often take a bit of time to complete (10’s of seconds) and 
are large.
So it’s not like a web page where there’s 50 2k gif files to download or that
sort of thing. It’s one big blob of data at a time. REST services basically.

> Are you using the native/APR connector or the Java blocking-I/O (BIO)
> connector? You can tell from the startup messages or if you do a
> thread dump, the names of the threads will tell you apr versus bio.
> 

BIO

> Hmm... Tomcat used to complain when you hit maxConnections. Perhaps
> that it gone, or perhaps it only was for certain connectors, or maybe
> without using an executor (and an executor is always used since Tomcat
> 7... maybe Tomcat 6).

I would think so. Perhaps I’m missing anything obvious. Anyway, I really doubt
I’m running out of threads. Between the threads and the queue, I should be
able to do 300 connections. 

I guess I should have started out with this: it’s tomcat 7 fairly recent builds 
(< yr old).
I should go through the source and see if I can spot that.

> 
> You might want to set up something like Nagios to watch all the time.
> You can set alarms for high-usage of the connection pool.

Not a bad idea. 

> I was wondering if you could connect through the lb to a specific
> backend server, because it's possible that the lb is the one refusing
> the connections for some reason and not Tomcat itself.

Yup, and in the end this is probably the case.  Thanks for the help.
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Browsers suddenly start timing out when accessing port 80 of secure site

2014-06-19 Thread Bruce Lombardi
We have a Java application running on Tomcat 7.0.52 on an Amazon Web
Services EC2 Windows 2008 R2 server. Tomcat is setup so that our application
is the root application and is accessible from port 80. The application and
Tomcat are configured with SSL so that whenever anyone types in the url for
the site (e.g. www.something.net) Tomcat will switch into HTTPS and use port
8443.

This all works fine, but it seems that if for some reason a browser times
out when accessing the site, it will never connect to the site again, and
any attempt to connect using www.something.net will show that the connection
has timed out. Yet if you put in the port number (e.g.,
www.something.net:8443) it comes up right away. We have seen this happen on
both Chrome (Version 35.0.1916.153 m) and Firefox (Version 30.0).

On Chrome I was able to get the browser to connect to the site by going to
Settings > Advanced > Clear Browser Data and clearing browser history,
download history, cookies, and cached images and files. Once I did that the
site came up immediately with www.something.net and switch to HTTPS as it is
supposed to do.

On Firefox, I get the same thing. It will not connect unless I add the port.
I tried clearing cached web content, setting the cache limit to zero, and
clearing offline web content. None of this worked. Re-installing Firefox did
work.

It took me several months to encounter this problem. But other users have
encountered it right away (e.g., when setting up a new machine).

Using browser development tools and Tomcat logs, I was able to see the
following:

. When working chrome send get to url. Tomcat responds with HTTP 302
and redirects to the secure port. The Tomcat localhost_access_log reflects
these transmissions.

. When not working, Firefox sends get to url, but no response is
returned. The Tomcat localhost_access_log is blank.

Can anyone shed any light on this? Is this a Tomcat issue or something to do
with the browsers? Is there anything I can look for in the logs that may
help?

Bruce



RE: Browsers suddenly start timing out when accessing port 80 of secure site

2014-06-23 Thread Bruce Lombardi
Moving the SSL port from 8443 to 443 has solved the problem. It appears that 
when the url www.something.net is entered, Firefox remembers that this is an 
SSL site and automatically add the "s" to get https. In fact after the timeout 
the url line in the browser shows https:www.something.net. Obviously, this is 
defaulting to the standard SSL port (443), which does not work if 8443 is used. 
Moving the port to 443 solved the problem.

If you read about setting up Tomcat, the default SSL port is 8443. Maybe this 
is done for testing, but it never seems to be explained that there might be 
problems with 8443.

- Bruce

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Friday, June 20, 2014 10:51 AM
To: Tomcat Users List
Subject: Re: Browsers suddenly start timing out when accessing port 80 of 
secure site

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jeffrey,

On 6/20/14, 10:24 AM, Jeffrey Janner wrote:
>> -Original Message- From: Bruce Lombardi 
>> [mailto:brlom...@gmail.com] Sent: Thursday, June 19, 2014 11:33 AM 
>> To: users@tomcat.apache.org Subject: Browsers suddenly start timing 
>> out when accessing port 80 of secure site
>> 
>> We have a Java application running on Tomcat 7.0.52 on an Amazon Web 
>> Services EC2 Windows 2008 R2 server. Tomcat is setup so that our 
>> application is the root application and is accessible from port 80. 
>> The application and Tomcat are configured with SSL so that whenever 
>> anyone types in the url for the site (e.g.
>> www.something.net) Tomcat will switch into HTTPS and use port 8443.
>> 
>> This all works fine, but it seems that if for some reason a browser 
>> times out when accessing the site, it will never connect to the site 
>> again, and any attempt to connect using www.something.net will show 
>> that the connection has timed out.
>> Yet if you put in the port number (e.g., www.something.net:8443) it 
>> comes up right away. We have seen this happen on both Chrome (Version 
>> 35.0.1916.153 m) and Firefox (Version 30.0).
>> 
>> On Chrome I was able to get the browser to connect to the site by 
>> going to Settings > Advanced > Clear Browser Data and clearing 
>> browser history, download history, cookies, and cached images and 
>> files. Once I did that the site came up immediately with 
>> www.something.net and switch to HTTPS as it is supposed to do.
>> 
>> On Firefox, I get the same thing. It will not connect unless I add 
>> the port. I tried clearing cached web content, setting the cache 
>> limit to zero, and clearing offline web content. None of this worked. 
>> Re-installing Firefox did work.
>> 
>> It took me several months to encounter this problem. But other users 
>> have encountered it right away (e.g., when setting up a new machine).
>> 
>> Using browser development tools and Tomcat logs, I was able to see 
>> the following:
>> 
>> . When working chrome send get to url. Tomcat responds
>> with HTTP 302 and redirects to the secure port. The Tomcat 
>> localhost_access_log reflects these transmissions.
>> 
>> . When not working, Firefox sends get to url, but no
>> response is returned. The Tomcat localhost_access_log is blank.
>> 
>> Can anyone shed any light on this? Is this a Tomcat issue or 
>> something to do with the browsers? Is there anything I can look for 
>> in the logs that may help?
>> 
>> Bruce
> 
> Sounds like a browser issue to me

+1

I've found that many browsers cache responses - including error responses -- 
longer than one might expect. Try a complete page-refresh using SHIFT-CTRL-R 
(or SHIFT-CMD-R), and if that doesn't work, clear all cache and possibly 
restart the browser if that doesn't work.

> , Bruce, unless you've got something else in your topology that could 
> be causing the issue. Say a proxy, for instance? Also, are you sure on 
> the subsequent attempts that your URL starts off with http:// and not 
> https://.  It's a pretty easy detail to overlook.
> 
> And on a just curious basis:  Why redirect to 8443 instead of the 
> standard HTTPS port of 443? Then you wouldn't need the port number in 
> the URL.

+1

(And if you can't because you already have a web server running, try routing 
the Tomcat traffic through the web server.)

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

iQIcBAEBCAAGBQJTpEpnAAoJEBzwKT+lPKRYeroP/3aB7wYetmOZLNdiP6IeIDwK
wBbvKC9wtoyA6hyelCIR5juIqC7ovSA31J1UxtvubWxiJYO2cy04V7RoBPEprgtj
QHRmgt5Kppet300fTR

Re: Browsers suddenly start timing out when accessing port 80 of secure site

2014-06-24 Thread Bruce Lombardi
Thanks for the response Konstantinos. I'll look into the HSTS header. The 
behavior you describe may be what is happening.

Bruce

Sent from my iPad

> On Jun 24, 2014, at 8:51 AM, Konstantin Preißer  wrote:
> 
> Hi,
> 
>> -Original Message-
>> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
>> Sent: Tuesday, June 24, 2014 2:42 PM
>> To: Tomcat Users List
>> Subject: Re: Browsers suddenly start timing out when accessing port 80 of
>> secure site
>> 
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA256
>> 
>> Bruce,
>> 
>>> On 6/23/14, 2:30 PM, Bruce Lombardi wrote:
>>> Moving the SSL port from 8443 to 443 has solved the problem. It
>>> appears that when the url www.something.net is entered, Firefox
>>> remembers that this is an SSL site and automatically add the "s"
>>> to get https. In fact after the timeout the url line in the
>>> browser shows https:www.something.net. Obviously, this is
>>> defaulting to the standard SSL port (443), which does not work if
>>> 8443 is used. Moving the port to 443 solved the problem.
>>> 
>>> If you read about setting up Tomcat, the default SSL port is 8443.
>>> Maybe this is done for testing, but it never seems to be explained
>>> that there might be problems with 8443.
>> 
>> I have never experienced the behavior you describe. Certain clients do
>> cache responses from servers, so it's possible that you had a bad setup
>> at some point that redirected :80 -> :443 and then Firefox wouldn't
>> forget that response and change to :8443.
> 
> It might also be possible that the website used HSTS which forces compliant 
> browsers (hopefully IE too in near future) to only view a site in HTTPS. I 
> haven't tested how Firefox handles this, but I can imagine that when the 
> website on :8443 sets an HSTS header and the user enters "www.example.com", 
> that Firefox automatically switches this to "https://www.example.com/"; which 
> is Port 443.
> 
> 
> Regards,
> Konstantin Preißer
> 
> 
> -
> 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



Intermittent Digest Authentication User Lockout

2013-11-18 Thread Bruce Weertman
I am running into an intermittent problem with Digest-Authentication. This is 
with tomcat 7.0.39

The issue appears to be that clients will occasionally get locked out for 5 
minutes. The problem
appears to happen with there is a combination of good password and then bad 
password, or the
other way round. We have also seen the problem happen when our load balancer is 
not sticky. 

My understanding is that digest-auth really should not work if the 
load-balancer is not sticky since there need to be information
sent from the server to the client in order to make the authentication. We have 
since made our load balancer sticky, hoping that 
this would resolve the issue. 

Actually, I should make a clarification here. It’s not “clients” that are 
getting locked out. It is “users”. 

Once a user gets into a bad state the account gets locked out until a 5 minute 
period goes by. 

Looking at the tomcat source code, I see DigestAuthenticator.java line 147: 
protected long nonceValidity = 5 * 60 * 1000;

Sorry if this sounds confused - I’m confused. I can say this. We’re seeing 
users get locked out for
5 minutes at a time. Having the load balancer not being sticky would definitely 
cause the problem,
but after making them sticky, we still see the problem with at least one client 
program. The client
programs are mostly non-webbrowser based.

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



Re: Intermittent Digest Authentication User Lockout

2013-11-18 Thread Bruce Weertman
I’ll answer my own question.

Short story: Everything was working as designed.

The problem, as we now understand it, was in fact due to the LockOutRealm

http://tomcat.apache.org/tomcat-7.0-doc/config/realm.html#LockOut_Realm_-_org.apache.catalina.realm.LockOutRealm

The load balancer not being sticky was causing bad authentications to be sent 
to the
backend tomcats. Eventually, enough bad requests were being sent to the backends
that they would each lock out. Sometimes, by luck authentications would work 
due to
the Load Balancer sending requests back to the same backend as the originating 
response.
That all makes sense. Has nothing to do with the  nonceValidity timeout. 

Also, for some reason, the client software would try 20 times before giving up 
on a bad
password. Not sure why it did that, but the effect was to lockout the back end 
tomcat.
We need to modify the client to prevent this from happening. 

Thanks,
-Bruce

On Nov 18, 2013, at 10:29 AM, Bruce Weertman  wrote:

> I am running into an intermittent problem with Digest-Authentication. This is 
> with tomcat 7.0.39
> 
> The issue appears to be that clients will occasionally get locked out for 5 
> minutes. The problem
> appears to happen with there is a combination of good password and then bad 
> password, or the
> other way round. We have also seen the problem happen when our load balancer 
> is not sticky. 
> 
> My understanding is that digest-auth really should not work if the 
> load-balancer is not sticky since there need to be information
> sent from the server to the client in order to make the authentication. We 
> have since made our load balancer sticky, hoping that 
> this would resolve the issue. 
> 
> Actually, I should make a clarification here. It’s not “clients” that are 
> getting locked out. It is “users”. 
> 
> Once a user gets into a bad state the account gets locked out until a 5 
> minute period goes by. 
> 
> Looking at the tomcat source code, I see DigestAuthenticator.java line 147: 
> protected long nonceValidity = 5 * 60 * 1000;
> 
> Sorry if this sounds confused - I’m confused. I can say this. We’re seeing 
> users get locked out for
> 5 minutes at a time. Having the load balancer not being sticky would 
> definitely cause the problem,
> but after making them sticky, we still see the problem with at least one 
> client program. The client
> programs are mostly non-webbrowser based.
> 
> Thanks



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



GoDaddy SSL cert update from SHA1 to SHA2

2014-12-18 Thread Bruce Kostival
Tomcat 6.0.x
Windows Server 2008
Running Java 7
Home grown app written in STS

Running HTTPS with SHA1 cert
Obtained SHA2 cert from GoDaddy by sending CSR generated from original 
keystore.  Removed existing aliases from original keystore and loaded new root 
and domain cert to keystore.
Trying to run up the new cert gives me this error:

SEVERE: Error starting endpoint
java.io.IOException: jsse.invalid_ssl_conf
at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.checkConfig(JSSESocketFactory.java:846)
at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:522)
at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:156)
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:565)
at 
org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:207)
at org.apache.catalina.connector.Connector.start(Connector.java:1196)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:540)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: javax.net.ssl.SSLException: No available certificate or key 
corresponds to the SSL cipher suites which are enabled.

I feel like I'm missing something basic in the keystore.  Any ideas?
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: GoDaddy SSL cert update from SHA1 to SHA2

2014-12-18 Thread Bruce Kostival
Thanks Igor I'll poke around based on your input.

From: Igor Cicimov 
Sent: Thursday, December 18, 2014 15:49
To: Tomcat Users List
Subject: Re: GoDaddy SSL cert update from SHA1 to SHA2

On Fri, Dec 19, 2014 at 9:28 AM, Bruce Kostival <
bkosti...@universallumpers.com> wrote:
>
> Tomcat 6.0.x
> Windows Server 2008
> Running Java 7
> Home grown app written in STS
>
> Running HTTPS with SHA1 cert
> Obtained SHA2 cert from GoDaddy by sending CSR generated from original
> keystore.  Removed existing aliases from original keystore and loaded new
> root and domain cert to keystore.
> Trying to run up the new cert gives me this error:
>
> SEVERE: Error starting endpoint
> java.io.IOException: jsse.invalid_ssl_conf
> at
> org.apache.tomcat.util.net.jsse.JSSESocketFactory.checkConfig(JSSESocketFactory.java:846)
> at
> org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:522)
> at
> org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:156)
> at
> org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
> at
> org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:565)
> at
> org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:207)
> at
> org.apache.catalina.connector.Connector.start(Connector.java:1196)
> at
> org.apache.catalina.core.StandardService.start(StandardService.java:540)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Caused by: javax.net.ssl.SSLException: No available certificate or key
> corresponds to the SSL cipher suites which are enabled.
>
> I feel like I'm missing something basic in the keystore.  Any ideas?
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
> Just guessing but based on the cause given in the above error you probably
have ciphers set in your connector using 128 bit key, something like this:

   ciphers="SSL_RSA_WITH_RC4_128_MD5,
   SSL_RSA_WITH_RC4_128_SHA,
   TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
   TLS_ECDHE_RSA_WITH_RC4_128_SHA,
   TLS_ECDH_ECDSA_WITH_RC4_128_SHA,
   TLS_ECDH_RSA_WITH_RC4_128_SHA"

In that case try to change that to match your new 256 bit key now. Of
course take care of the proper cipher suit names for BIO/NIO or APR
connector since they differ (the above example is for BIO/NIO connector).

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



Re: GoDaddy SSL cert update from SHA1 to SHA2

2014-12-19 Thread Bruce Kostival
And how do I get the Private Key back?  Its definitely not there.


From: Igor Cicimov 
Sent: Thursday, December 18, 2014 17:52
To: Tomcat Users List
Subject: Re: GoDaddy SSL cert update from SHA1 to SHA2

On Fri, Dec 19, 2014 at 9:56 AM, Bruce Kostival <
bkosti...@universallumpers.com> wrote:
>
> Thanks Igor I'll poke around based on your input.
> 
> From: Igor Cicimov 
> Sent: Thursday, December 18, 2014 15:49
> To: Tomcat Users List
> Subject: Re: GoDaddy SSL cert update from SHA1 to SHA2
>
> On Fri, Dec 19, 2014 at 9:28 AM, Bruce Kostival <
> bkosti...@universallumpers.com> wrote:
> >
> > Tomcat 6.0.x
> > Windows Server 2008
> > Running Java 7
> > Home grown app written in STS
> >
> > Running HTTPS with SHA1 cert
> > Obtained SHA2 cert from GoDaddy by sending CSR generated from original
> > keystore.  Removed existing aliases from original keystore and loaded new
> > root and domain cert to keystore.
> > Trying to run up the new cert gives me this error:
> >
> > SEVERE: Error starting endpoint
> > java.io.IOException: jsse.invalid_ssl_conf
> > at
> >
> org.apache.tomcat.util.net.jsse.JSSESocketFactory.checkConfig(JSSESocketFactory.java:846)
> > at
> >
> org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:522)
> > at
> >
> org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:156)
> > at
> > org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
> > at
> > org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:565)
> > at
> > org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:207)
> > at
> > org.apache.catalina.connector.Connector.start(Connector.java:1196)
> > at
> > org.apache.catalina.core.StandardService.start(StandardService.java:540)
> > at
> > org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
> > at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
> > at java.lang.reflect.Method.invoke(Unknown Source)
> > at
> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> > Caused by: javax.net.ssl.SSLException: No available certificate or key
> > corresponds to the SSL cipher suites which are enabled.
> >
> > I feel like I'm missing something basic in the keystore.  Any ideas?
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> > Just guessing but based on the cause given in the above error you
> probably
> have ciphers set in your connector using 128 bit key, something like this:
>
>ciphers="SSL_RSA_WITH_RC4_128_MD5,
>SSL_RSA_WITH_RC4_128_SHA,
>TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
>TLS_ECDHE_RSA_WITH_RC4_128_SHA,
>TLS_ECDH_ECDSA_WITH_RC4_128_SHA,
>TLS_ECDH_RSA_WITH_RC4_128_SHA"
>
> In that case try to change that to match your new 256 bit key now. Of
> course take care of the proper cipher suit names for BIO/NIO or APR
> connector since they differ (the above example is for BIO/NIO connector).
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
> Another possibility is that you have removed the private key used to
generate the new CSR by removing the old aliases from the keystore.

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



Does Tomcat8 NIO2 connector support Apache CometEvent?

2016-11-01 Thread Bruce Huang
se.getOutputStream();
servletOutputStream.write(triggerMessage);
servletOutputStream.flush();
servletOutputStream.close();

comet.close(); // add for NIO2
connections.remove(deviceId);
}
}


Thanks,
Bruce


Re: Does Tomcat8 NIO2 connector support Apache CometEvent?

2016-11-01 Thread Bruce Huang
Mark Thomas  於 2016年11月1日 週二 下午6:06寫道:

> On 01/11/2016 09:44, Bruce Huang wrote:
> > Hi all,
> >
> > We have a simple servlet which implements Apache CometEvent for long
> > polling connection on tomcat8. It works well when we used
> > org.apache.coyote.http11.Http11NioProtocol, however, we have now changed
> to
> > using org.apache.coyote.http11.Http11Nio2Protocol and it will not work
> > properly.
> >
> > Tomcat: v8.0.23
> > JDK: v1.8.0_45
> > OS: Windows server 2008 R2
>
> The first thing to do is to test the latest 8.0.x release.
>
> Keep in mind that Comet is deprecated so if there is still a bug in
> 8.0.x, fixing it might not be a priority. Switching back to NIO may be a
> better option.
>
> Mark
>
>
Thanks for your suggestion.

I have tested on 8.0.38 release, but it even can't close the comet
properly. On 8.0.23, after OutputStream.close(), I have to do event.close()
to make the END event to be fired correctly.

ServletOutputStream servletOutputStream =
event.getHttpServletResponse().getOutputStream();

servletOutputStream.write(triggerMessage);
servletOutputStream.flush();
servletOutputStream.close();

event.close(); // add for NIO2

I found that the event.close() won't work from v8.0.27~8.0.38 and I could
make the comet to be connected start from v8.0.9 to v8.0.38, but
event.setTimeout() are not working on both of them.

Since our server is running on Windows platform, we have to switch to NIO2
for this issue
http://tomcat.10.x6.nabble.com/Tomcat-8-uses-high-CPU-td5049333.html

Bruce


> >
> > The connector setting as below:
> >
> >  > protocol="org.apache.coyote.http11.Http11Nio2Protocol"
> >maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
> >clientAuth="false" sslProtocol="TLS" connectionTimeout="6"
> >keystoreFile="D:\localhost.jks" keystorePass="**" />
> >
> > The timeout of the event will not work as we have set it to 300
> seconds(by
> > event.setTimeout(30)), the comet connection will be disconnected
> after
> > 60 seconds which I believe is the connector connection timeout. And there
> > will have thrown an exception as below
> >
> > 28-Oct-2016 15:04:33.748 SEVERE [http-nio2-8443-exec-5]
> > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process
> Error
> > reading request, ignored
> > java.lang.IllegalStateException: Reading not allowed due to timeout or
> > cancellation
> > at
> > sun.nio.ch
> .AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:249)
> > at
> > sun.nio.ch
> .AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297)
> > at
> > org.apache.tomcat.util.net
> .SecureNio2Channel.read(SecureNio2Channel.java:792)
> > at
> > org.apache.tomcat.util.net
> .Nio2Endpoint.awaitBytes(Nio2Endpoint.java:871)
> > at
> >
> org.apache.coyote.http11.Http11Nio2Protocol$Http11ConnectionHandler.release(Http11Nio2Protocol.java:180)
> > at
> >
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:722)
> > at
> > org.apache.tomcat.util.net
> .Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1073)
> > at
> > org.apache.tomcat.util.net
> .Nio2Endpoint$SocketProcessor.run(Nio2Endpoint.java:1032)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> > at
> >
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> > at java.lang.Thread.run(Thread.java:745)
> >
> > If the client makes the comet connection again after this, and the other
> > client tries to send message. The comet will be END immediately and
> > connection disconnected.
> >
> >
> > The Connect servlet as below
> >
> > public class Connect extends HttpServlet implements CometProcessor {
> >
> > ...
> >
> > public void event(CometEvent event) throws IOException,
> > ServletException {
> > HttpServletRequest request = event.getHttpServletRequest();
> > HttpServletResponse response = event.getHttpServletResponse();
> > if (event.getEventType() == CometEvent.EventType.BEGIN) {
> > String deviceid = request.getParameter("id");
> > MessageSender.getInstance().addConnection(deviceid, event);
> > request

Re: Does Tomcat8 NIO2 connector support Apache CometEvent?

2016-11-02 Thread Bruce Huang
Rémy Maucherat  於 2016年11月2日 週三 下午5:28寫道:

> 2016-11-02 5:19 GMT+01:00 Bruce Huang :
>
> > Thanks for your suggestion.
> >
> > I have tested on 8.0.38 release, but it even can't close the comet
> > properly. On 8.0.23, after OutputStream.close(), I have to do
> event.close()
> > to make the END event to be fired correctly.
> >
> > ServletOutputStream servletOutputStream =
> > event.getHttpServletResponse().getOutputStream();
> >
> > servletOutputStream.write(triggerMessage);
> > servletOutputStream.flush();
> > servletOutputStream.close();
> >
> > event.close(); // add for NIO2
> >
>
> Why is it "add for NIO2" ? When closing comet, you should use event.close()
> (why do you think this API exists ?) *and* flushing+closing the streams is
> often a problem. Although I understand the systematic stream close (and
> flush, sometimes) comes from java.io, it is useless in Servlets and
> sometimes harmful.


When I used comet in NIO protocol, I only do flush and close the stream.
The END event will be fired after the stream to be closed and I do
event.close() there. In NIO2, however, close stream will not fire the END
event, so I had realized that I must do event.close() after the trigger has
sent.


>
>
>
> > I found that the event.close() won't work from v8.0.27~8.0.38 and I could
> > make the comet to be connected start from v8.0.9 to v8.0.38, but
> > event.setTimeout() are not working on both of them.
> >
> > Since our server is running on Windows platform, we have to switch to
> NIO2
> > for this issue
> > http://tomcat.10.x6.nabble.com/Tomcat-8-uses-high-CPU-td5049333.html
> >
> > What is the error(s) you get with the latest 8.0 build ?
>
>
I have followed your suggestion, not to do flush and close stream, just do
event.close() as below.

HttpServletResponse response = event.getHttpServletResponse();
response.addHeader("Content-Length", Integer.toString(
triggerMessage.length));
response.addHeader("Content-Language", "en-US");
ServletOutputStream servletOutputStream = response.getOutputStream();
servletOutputStream.write(triggerMessage);
event.close();

Before v8.0.26, after event.close(), I will received END event. After
v8.0.27 to v8.0.38(latest build), the END event will be fired about 20
seconds later after event.close() and the below exception will be thrown.

03-Nov-2016 11:39:40.961 SEVERE [http-nio2-8443-exec-5]
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process Error
reading request, ignored
java.lang.IllegalStateException: Reading not allowed due to timeout or
cancellation
at
sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:249)
at
sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297)
at
org.apache.tomcat.util.net.SecureNio2Channel.read(SecureNio2Channel.java:792)
at
org.apache.tomcat.util.net.Nio2Endpoint.awaitBytes(Nio2Endpoint.java:871)
at
org.apache.coyote.http11.Http11Nio2Protocol$Http11ConnectionHandler.release(Http11Nio2Protocol.java:180)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:722)
at
org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1073)
at
org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.run(Nio2Endpoint.java:1032)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

If I do not send any trigger to Trigger servlet, the comet from client will
be disconnected after 20 seconds, I will received END event and the same
exception as above will be thrown.

Thanks,
Bruce


> Since Comet is removed in 8.5 (deprecated in 8.0) and NIO2 was new in 8.0,
> it's not a very good combo for support of the feature, but we can give it a
> shot.
>
> Rémy
>


Get fail response by using the Tomcat manager command to deploy a war

2017-04-07 Thread Bruce Huang
Hi all,

I want to use the tomcat supported manager command

 to deploy a war file. The Tomcat server is Tomcat v8.0.23.

The application is sure to be deployed and started successfully, I,
however, got the failed message of the response as below

*FAIL - Deployed application at context path /test but context failed to
start*

The way I used is the HttpURLConnection in Java to PUT a file by an HTTP
request as below code


public void execute(ResponseHandler handler) throws IOException {

String deployURL =
"http://localhost/manager/text/deploy?update=true&path=/test";
final HttpURLConnection hconn = (HttpURLConnection) (new
URL(deployURL)).openConnection();

try (FileInputStream fsInput = new FileInputStream(deployedPackage)) {
final long contentLength = fsInput.getChannel().size();

hconn.setAllowUserInteraction(false);
hconn.setDoInput(true);
hconn.setUseCaches(false);
hconn.setDoOutput(true);
hconn.setRequestMethod("PUT");
hconn.setRequestProperty("Content-Type", "application/octet-stream");
hconn.setRequestProperty("Content-Length", "" + contentLength);
hconn.setFixedLengthStreamingMode(contentLength);
hconn.setRequestProperty("User-Agent", "Catalina-Ant-Task/1.0");

// Set up an authorization header with our credentials
final String input = this.username + ":" + this.password;
final String output =
Base64.getEncoder().encodeToString(input.getBytes(StandardCharsets.ISO_8859_1));
hconn.setRequestProperty("Authorization", "Basic " + output);

// Establish the connection with the server
hconn.connect();

try (BufferedInputStream istream = new
BufferedInputStream(fsInput, 1024);
BufferedOutputStream ostream = new
BufferedOutputStream(hconn.getOutputStream(), 1024)) {
final byte buffer[] = new byte[1024];
while (true) {
int n = istream.read(buffer);
if (n < 0) {
break;
}
ostream.write(buffer, 0, n);
}
}
}

String response = new String();

// Process the response message
try (InputStreamReader reader = new
InputStreamReader(hconn.getInputStream(), "utf-8")) {
final StringBuilder buff = new StringBuilder();
while (true) {
int ch = reader.read();
if (ch < 0) {
break;
} else {
buff.append((char) ch);
}
}
handler.handle(buff.toString());
}

hconn.disconnect();}


The target URL is *http://localhost/manager/text/deploy?update=true&path=/test
* for
deploying a war file to a context path "test". And the *deployedPackage* is
a File with the size amount 130 MB.

Is there anything I miss to set up or do it in the wrong way?

Thanks


Re: Get fail response by using the Tomcat manager command to deploy a war

2017-04-09 Thread Bruce Huang
Hi Christopher,

I have checked the tomcat log, there is no error as below and the
application is started successfully.

Manager.log

09-Apr-2017 17:37:53.295 INFO [http-nio-3030-exec-342]
org.apache.catalina.core.ApplicationContext.log Manager: stop: Stopping web
application '/2.1.2-C1'
09-Apr-2017 17:38:23.769 INFO [http-nio-3030-exec-326]
org.apache.catalina.core.ApplicationContext.log Manager: deploy: Deploying
web application '/2.1.2-C1'
09-Apr-2017 17:38:23.769 INFO [http-nio-3030-exec-326]
org.apache.catalina.core.ApplicationContext.log Manager: Uploading WAR file
to D:\CI\Tomcat8\CI6\apache-tomcat-8.0.23\webapps\2.1.2-C1.war.tmp

localhost.log

09-Apr-2017 17:37:53.344 INFO [http-nio-3030-exec-342]
org.apache.catalina.core.ApplicationContext.log Shutting down log4j
09-Apr-2017 17:38:05.573 INFO [http-nio-3030-exec-342]
org.apache.catalina.core.ApplicationContext.log Closing Spring root
WebApplicationContext
09-Apr-2017 17:43:05.372 INFO [localhost-startStop-32]
org.apache.catalina.core.ApplicationContext.log No Spring
WebApplicationInitializer types detected on classpath
09-Apr-2017 17:43:05.833 INFO [localhost-startStop-32]
org.apache.catalina.core.ApplicationContext.log Initializing Spring root
WebApplicationContext
09-Apr-2017 17:44:00.206 INFO [localhost-startStop-32]
org.apache.catalina.core.ApplicationContext.log Initializing log4j from
[D:\CI\Tomcat8\CI6\apache-tomcat-8.0.23\webapps\2.1.2-C1\WEB-INF\classes\log4j.properties]

catalina.log

09-Apr-2017 17:38:34.989 INFO
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.startup.HostConfig.undeploy Undeploying context
[/2.1.2-C1]
09-Apr-2017 17:38:45.037 INFO [localhost-startStop-32]
org.apache.catalina.startup.HostConfig.deployWAR Deploying web application
archive D:\CI\Tomcat8\CI6\apache-tomcat-8.0.23\webapps\2.1.2-C1.war
09-Apr-2017 17:43:05.365 INFO [localhost-startStop-32]
org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned
for TLDs yet contained no TLDs. Enable debug logging for this logger for a
complete list of JARs that were scanned but no TLDs were found in them.
Skipping unneeded JARs during scanning can improve startup time and JSP
compilation time.
09-Apr-2017 17:44:01.106 INFO [localhost-startStop-32]
org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
application archive
D:\CI\Tomcat8\CI6\apache-tomcat-8.0.23\webapps\2.1.2-C1.war has finished in
316,068 ms


The log from my app for deploying the war file

2017-04-09 17:38:23,766 [main] INFO c.u.m.i.deployer.catalina.DeployTask -
Deployed pacakge to
http://localhost:3030/manager/text/deploy?update=true&path=/2.1.2-C1
Sun Apr 09 17:38:24 CST 2017 -> FAIL - Deployed application at context path
/2.1.2-C1 but context failed to start

It looks like the deploying and uploading is started at around 17:38:23,
and at the 17:38:24 the response is received and says failed to start. At
17:38:34, the app went to undeploying and at 17:38:45 it went to
deploying and started successfully.

Is that because my webapp taking too much time to be undeployed?

Thanks


Christopher Schultz  於 2017年4月7日 週五 下午9:25寫道:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Bruce,
>
> On 4/7/17 4:08 AM, Bruce Huang wrote:
> > I want to use the tomcat supported manager command
> > <https://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Supported
> _Manager_Commands>
> >
> >
> to deploy a war file. The Tomcat server is Tomcat v8.0.23.
> >
> > The application is sure to be deployed and started successfully,
> > I, however, got the failed message of the response as below
> >
> > *FAIL - Deployed application at context path /test but context
> > failed to start*
> >
> > The way I used is the HttpURLConnection in Java to PUT a file by an
> > HTTP request as below code
>
> Re-read the error message you got. The upload was fine. The
> application just didn't start properly. So the problem isn't with the
> upload/deploy... it's with the application itself.
>
> Do onto the server and look at the log files to find out why the
> application failed to start.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJY55NWAAoJEBzwKT+lPKRY23cQAKYEyu0KdyZeSSthSTrE+bCU
> EgQEuFr36EjsdTc3hW8UYjJITzRgvjj7OUd/D/TTQmW9PsiRQQNmrjYDigpmnE6w
> PlxkqhskbXX1iHJTcuIHKtUxvIGe67zMeJsZE2mlklOM9bJuPBcrORse185EBJyq
> 543TZ/2GZkOqf3MuoKDTvrpaKL/hm70IeoMXKLv7MPEDMw/+MTI1OeNag/4pCgtw
> b2WnemWNIO16msvaWWE7ZK7rcroQgX4ky2CvZ0COJjy2St8PfsnaBAYmzD1PCPtu
> IkHdPHb8oAtJJoANPAmAQolg4SbNlzm9xL78tJvwgiY7hA8HKBC4STiIc7zM88nm
> JhmzIfFScLGAEQ/qG4dGxTHctT4F/eE/DrTxKXwMai7z2Y1KjHfW7mn4eGmTIBLO
> 2hWrTnfGUqhe/wM9D0nJJ8NuTCEt44JKSlMoBVqCzybHemykZKafxcKSa9ne5Yev

Re: Get fail response by using the Tomcat manager command to deploy a war

2017-04-24 Thread Bruce Huang
Thanks for the information that Chris has provided.

I have found that the deployment has not always being succeeded.

The situation is, if I hit the /stop and then /deploy?update=true, even I
always got a fail message as below

*FAIL - Deployed application at context path /test but context failed to
start*

But, sometimes the deployment works and sometimes it doesn't. If it is
failed to deploy, the folder of the web application will have a file
remains which is the \WEB-INF\lib\licensor-1.0.0-RC.jar.

What if I hit the /stop and then /undeploy before doing the
/deploy?update=true, the response of the /undeploy request is always as
below

FAIL - Unable to delete
[D:\Tomcat8\apache-tomcat-8.0.23\webapps\test]. The continued presence
of this file may cause problems.

And yes, the file remains is \WEB-INF\lib\licensor-1.0.0-RC.jar.

The licensor-1.0.0-RC.jar(Developed by ourself) dependents to the
bouncycastle <https://www.bouncycastle.org/> and log4j2
<https://logging.apache.org/log4j/2.x/> as below pom shows.




org.apache.logging.log4j
log4j
${log4j.version}
pom
import




org.bouncycastle
bcprov-jdk15on
1.51


org.bouncycastle
bcprov-ext-jdk15on
1.51


org.bouncycastle
bcpg-jdk15on
1.51



org.apache.logging.log4j
log4j-core


org.apache.logging.log4j
log4j-api


org.apache.logging.log4j
log4j-jcl


org.apache.logging.log4j
log4j-slf4j-impl



com.google.guava
guava
18.0



org.apache.commons
commons-lang3



commons-cli
commons-cli
1.2


commons-configuration
commons-configuration
1.10



junit
junit
4.12
test


org.hamcrest
hamcrest-core
1.3
test


org.mockito
mockito-core
1.10.19
test


And our webapp uses log4j 1.2 as the logging system, the pom as below


com.company
licensor
1.0.0-RC
log4j
log4j
1.2.14

As mentioned above, everytime when we try to undeploy the webapp from
tomcat manager, it always failed to undeploy the webapp and return the
failed message as below

FAIL - Unable to delete
[D:\Tomcat8\apache-tomcat-8.0.23\webapps\test]. The continued presence
of this file may cause problems.

The remains file is always the WEB-INF\lib\licensor-1.0.0-RC.jar and it
always being locked and unable to be deleted until we have shutdown the
tomcat.

The tomcat log only complains about the directory could not be completely
deleted.

19-Apr-2017 18:49:56.976 INFO
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.startup.HostConfig.undeploy Undeploying context
[/2.2]
19-Apr-2017 18:49:56.981 SEVERE
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.startup.ExpandWar.deleteDir
[D:\CI\Tomcat8\CI1\apache-tomcat-8.0.23\webapps\2.2\WEB-INF\lib] could
not be completely deleted. The presence of the remaining files may
cause problems
19-Apr-2017 18:49:56.982 SEVERE
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.startup.ExpandWar.deleteDir
[D:\CI\Tomcat8\CI1\apache-tomcat-8.0.23\webapps\2.2\WEB-INF] could not
be completely deleted. The presence of the remaining files may cause
problems
19-Apr-2017 18:49:56.982 SEVERE
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.startup.ExpandWar.deleteDir
[D:\CI\Tomcat8\CI1\apache-tomcat-8.0.23\webapps\2.2] could not be
completely deleted. The presence of the remaining files may cause
problems
19-Apr-2017 18:49:56.983 SEVERE
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.startup.ExpandWar.delete
[D:\CI\Tomcat8\CI1\apache-tomcat-8.0.23\webapps\2.2] could not be
completely deleted. The presence of the remaining files may cause
problems

Is there any conflict problem if the webapp is using log4j 1.2 and its
dependency lib has log4j2? Or the bouncycastle has some file locking issue
(Since it seems to contain some native code)?

Any help is appreciated

Bruce Huang  於 2017年4月9日 週日 下午7:47寫道:

> Hi Christopher,
>
> I have checked the tomcat log, there is no error as below and the
> application is started successfully.
>
> Manager.log
>
> 09-Apr-2017 17:37:53.295 INFO [http-nio-3030-exec-342]
> org.apache.catalina.core.ApplicationContext.log Manager: stop: Stopping web
> application '/2.1.2-C1'
> 09-Apr-2017 17:38:23.769 INFO [http-nio-3030-exec-326]
> org.apache.catalina.core.ApplicationContext.log Manager: deploy: Deploying
> web application '/2.1.2-C1'
> 09-Apr-2017 17:38:23.769 INFO [http-nio-3030-exec-326]
> org.apache.catalina.cor

The GET request encounters 400 Bad Request from a URL with Chinese words on Tomcat 8.0.43

2017-07-31 Thread Bruce Huang
Hi all,

We have placed a file named 檔名.txt into
the \apache-tomcat-8.0.43\webapps\Apps folder. And our client app can
retrieve the file by an HTTP GET request from the URL, for example,
http://192.168.1.1/Apps/檔名.txt (The 檔名 are two Chinese words)

When it was on tomcat v8.0.23, everything works fine. However, after we
have migrated to the v8.0.43, the client app will receive response with
HTTP 400 Bad Request. The code that our client app used as below. Looks
like that it didn't encode the URL path and only translate the whitespace
to %20.

Is there any solution that we can configure the tomcat 8.0.43 to make this
case works as usual(On tomcat v8.0.23), since there are lots of client
app deployed?

SpaceToTwenty(szServerPath, szBuf, MAXURLSIZE);

memset(szServerPath, 0, MAXURLSIZE);

strcpy(szServerPath, szBuf);



memset(szSendBuf, 0, SEND_BUF_SIZE);

// the buffer for sending to the socket

sprintf(szSendBuf, "GET %s HTTP/1.1\r\nHost:%s\r\n"

   "Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n"

   "Accept-Language: zh-tw,en-us;q=0.7,en;q=0.3\r\n"

   "Accept-Encoding: gzip, deflate\r\n"

   "Connection: keep-alive\r\n\r\n",

   szServerPath, szServerIP);

LOG(LOG_ERROR, "[DL_Download] szServerPath: %s, szServerIP: %s,",

szServerPath, szServerIP);

// create a socket for sending request

SockCtx = SOCKET_Create(szServerIP, iServerPort, bSSLEnable,
CERTF_PATH);

if (SockCtx == NULL)

{

LOG(LOG_ERROR, "[DL_Download] Socket Create Error!!!\n");

iReturn = _ERROR;

goto FUNC_EXIT;

}



SOCKET_Send(SockCtx, szSendBuf, strlen(szSendBuf));

memset(szRecvBuf, 0, RECV_BUF_SIZE);

iRecvBytes = SOCKET_Recv(SockCtx, szRecvBuf, sizeof(szRecvBuf));

if (iRecvBytes <= 0)

{

LOG(LOG_ERROR, "[DL_Download] Socket Recv Error!!!
iRecvBytes = %d\n",iRecvBytes);

iReturn = _ERROR;

goto FUNC_EXIT;

}



memset(szHttpStatus, 0, sizeof(szHttpStatus));

strncpy(szHttpStatus, szRecvBuf, strstr(szRecvBuf, "\r\n") -
szRecvBuf);

// here it will receive the HTTP 400 Bad Request on the tomcat
v8.0.43

// the szHttpStatus is 400

if (strstr(szHttpStatus, "200 OK") == NULL)

{

LOG(LOG_ERROR, "[DL_Download] Http Status != 200, Status =
%s\n",szHttpStatus);

iReturn = _ERROR;

goto FUNC_EXIT;

}



int SpaceToTwenty(char* szSrc, char* szDst, int iLen)

{

int iReturn = _SUCCESS;

char* c1;

char* c2;

char* c;

int new_string_length = 0;



for (c = szSrc; *c != '\0'; c++)

{

if (*c == ' ')

new_string_length += 2;

new_string_length++;

}



if (new_string_length >= iLen)

func_exit(_ERROR);



memset(szDst, 0, iLen);

for (c1 = szSrc, c2 = szDst; *c1 != '\0'; c1++)

{

if (*c1 == ' ')

{

c2[0] = '%';

c2[1] = '2';

c2[2] = '0';

c2 += 3;

}

else

    {

*c2 = *c1;

c2++;

}

}

*c2 = '\0';

FUNC_EXIT:

return iReturn;

}




Thanks,

Bruce


Re: The GET request encounters 400 Bad Request from a URL with Chinese words on Tomcat 8.0.43

2017-08-04 Thread Bruce Huang
Mark Thomas  於 2017年8月1日 週二 下午7:37寫道:

> On 01/08/17 03:26, Bruce Huang wrote:
> > Hi all,
> >
> > We have placed a file named 檔名.txt into
> > the \apache-tomcat-8.0.43\webapps\Apps folder. And our client app can
> > retrieve the file by an HTTP GET request from the URL, for example,
> > http://192.168.1.1/Apps/檔名.txt (The 檔名 are two Chinese words)
> >
> > When it was on tomcat v8.0.23, everything works fine. However, after we
> > have migrated to the v8.0.43, the client app will receive response with
> > HTTP 400 Bad Request. The code that our client app used as below. Looks
> > like that it didn't encode the URL path and only translate the whitespace
> > to %20.
> >
> > Is there any solution that we can configure the tomcat 8.0.43 to
> make this
> > case works as usual(On tomcat v8.0.23), since there are lots of client
> > app deployed?
>
> Sorry, no. This is part of the fix for CVE-2016-6816.
>
> Options have since been added to allow some illegal characters through
> but they will not be sufficient to allow the full range of UTF-8 bytes.
>
> The fix was added to 8.0.39 so any version up to 8.0.38 should work for
> you.
>
> You might be able to put a more lenient reverse proxy in front of Tomcat
> which will accept these characters and then pass the request (correctly
> encoded) to Tomcat. However that depends on finding a suitable reverse
> proxy.
>
> Mark
>

Hi Mark,

Thanks for the reply. We will try to stay with the version 8.0.38 before we
migrate all our app clients.

For those who search for this, the configuration property is  tomcat.
util.http.parser.HttpParser. requestTargetAllow
<https://tomcat.apache.org/tomcat-8.5-doc/config/systemprops.html#Other>


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

André Warnier (tomcat)  於 2017年8月1日 週二 下午8:10寫道:

> On 01.08.2017 04:26, Bruce Huang wrote:
> > Hi all,
> >
> > We have placed a file named 檔名.txt into
> > the \apache-tomcat-8.0.43\webapps\Apps folder. And our client app can
> > retrieve the file by an HTTP GET request from the URL, for example,
> > http://192.168.1.1/Apps/檔名.txt (The 檔名 are two Chinese words)
>
> This is one of those cases where it can get very confusing very quickly,
> because of the
> multiple opportunities for things to get encoded/decoded or not, and to be
> /seen/ as
> encoded/decoded or not. (Such as : are we really seeing the above URL as
> you meant to send
> it, or are we seeing some other form, as encoded by the email systems
> in-between ?)
>
> Strictly speaking, according to the relevant Internet HTTP RFCs (and which
> ones are
> relevant can be yet another confusing matter), you MAY NOT include the
> above Chinese
> characters directly in a URL string. The set of characters/bytes allowed
> in a URL string
> is very restrictive, and in any case does not include even the individual
> bytes which
> would result from encoding the above Unicode characters as UTF-8.
> (See : https://tools.ietf.org/html/rfc3986#section-2)
>
> Before you send out this URL from the client, you would have to :
> - encode the above Chinese characters as a UTF-8 byte sequence. This would
> probably result
> in 3 bytes or more per character, so let's say 6 bytes in total.
> - then, for each of the 6 bytes, you would have to check if they are
> within the range of
> bytes allowed in a URL, and if not, /that/ byte should be encoded/escaped
> as a "%xy"
> 3-character ASCII byte sequence. (There are many existing functions to do
> that).
>
> Then on the server side receiving this URL, the opposite transformation
> should take place :
> - the first step would be to "%-decode" the URL string, to restore the
> original bytes
> which the client wanted to send. To my knowledge, all HTTP servers do that.
>
> - then, the server and the application would have to /assume/ that URLs
> received from your
> clients are always Unicode, UTF-8 encoded.  That is (still) not the
> default in HTTP (the
> default is still ISO-8859-1). (And there is no mechanism in the current
> RFCs, that allow
> either client or server to indicate, in the request itself, what character
> set the request
> URL really is written in, or should be).
> But you can force Tomcat to assume this, see :
> http://tomcat.apache.org/tomcat-8.0-doc/config/http.html#Common_Attributes
> --> URIEncoding
> (and there is also "useBodyEncodingForURI", but that does not apply in
> your particular case)
> - the next step would thus be for the app

Socket Exception

2006-03-13 Thread Pease, Bruce - FLL
I'm using tomcat 4.1.29, and seeing socket exceptions.  I have a struts
action chain where a controller action distributes requests to child
actions.  At the action return of the forward, the socket exception occurs.
Any ideas?  Thanks.

Bruce D. Pease
Java Developer
CruiseOne/Cruises, Inc.
954-958-3654
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 



Tomcat in the development envrionment (avoiding undepoly / deploy)

2005-10-21 Thread Bruce E. Stemplewski
I have just installed Tomcat on my XP local workstation.   I just 
starting working with PHP using Ecplise.  The only way I can get Tomcat 
to recognize changes to my development directory and files is to 
undeploy the directory and deploy the directory again.  Is there any way 
to avoid this? 


P.S.  I guess it's obvious that I am just getting started with Tomcat. :)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat in the development envrionment (avoiding undepoly / deploy)

2005-10-21 Thread Bruce E. Stemplewski

Bruce E. Stemplewski wrote:

I have just installed Tomcat on my XP local workstation.   I just 
starting working with PHP using Ecplise.  The only way I can get 
Tomcat to recognize changes to my development directory and files is 
to undeploy the directory and deploy the directory again.  Is there 
any way to avoid this?

P.S.  I guess it's obvious that I am just getting started with Tomcat. :)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Ah just did some searching and found that Tomcat is for Java and I 
should be running Apache for PHP? 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Expected Release Date

2011-09-21 Thread Wilde, Bruce R.
When is Tomcat version 6.0.34 expected to be released?
Bruce



RE: Availability of Tomcat 5.5.34

2011-09-26 Thread Wilde, Bruce R.
Great! 
Now, when is the Security update going to release the change for 6.0.34
baseline? 


V/R,
Bruce

-Original Message-
Sent: Friday, September 23, 2011 7:22 AM
To: Tomcat Users List
Subject: Re: Availability of Tomcat 5.5.34

Tomcat 5.5.34 was released and announced yesterday...

-
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: Incorporating changes and compiling Tomcat

2011-09-28 Thread Wilde, Bruce R.
So, what are security minded system administrators to do about
mitigating CVE-2011-3190 against V6.0.33?

>From the
http://tomcat.apache.org/security-6.html#Fixed_in_Apache_Tomcat_6.0.34_(
not_yet_released) page

"Mitigation options:

Upgrade to Tomcat 6.0.34. [Ed. What is the expected release
date?]
Apply the appropriate patch. [Ed. Patch provides 2 java source
files; requiring a re-compilation]
Configure both Tomcat and the reverse proxy to use a shared
secret.
... 
Use the org.apache.jk.server.JkCoyoteHandler (BIO) AJP connector
implementation.
...
"

V/R,
Bruce

-Original Message-
From: users-return-228011-BRUCE.R.WILDE=saic@tomcat.apache.org
[mailto:users-return-228011-BRUCE.R.WILDE=saic@tomcat.apache.org] On
Behalf Of Pid
Sent: Wednesday, September 28, 2011 1:34 PM
To: Tomcat Users List
Subject: Re: Incorporating changes and compiling Tomcat

On 27/09/2011 21:58, gilbert.be...@bcbssc.com wrote:
> Can any one please direct me to instructions on how to incorporate
fixes and then recompile.  Target OS is Windows Server 2003.  Thanks!

Note: Tomcat doesn't issue patches, a new version is released.
Unless you are planning to write patches yourself, you should just
download the latest version.


p



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



error creating connection pool

2018-02-13 Thread Bruce L. Riddle
We are running a CDC Application PHIN MS that uses Tomcat 8.5.11.

As the application starts, we are getting a message that says

'error creating connection pool for dbid.'


Our assumption is that the message is coming from TomCat.  Please,

what does the message mean and how to we research a possible

resolution?


Thanks.


A segment from the LOG:


ocalhost-startStop-1|02/13|08:28:35|Processing folderMap: 
C:\PHINMS3.0/config/sender/foldermap.xml|
localhost-startStop-1|02/13|08:28:35|Loading decryption keystore|
localhost-startStop-1|02/13|08:28:35|=== Spawning queue 0 |
Thread-6|02/13|08:28:35|Initializing requeue cachepath from 
C:\PHINMS3.0/\shared\requeueCache|
Thread-6|02/13|08:28:35|Spawning multi database poller 1...|
Thread-7|02/13|08:28:35|Connection established|
Thread-7|02/13|08:28:35|Waiting for records ...|
localhost-startStop-1|02/13|08:28:35|Error creating connection pool for dbid: 
NHSCR_DB|
localhost-startStop-1|02/13|08:28:35||

Bruce



Bruce Riddle
NHSCR / Dartmouth College
Phone: 603-653-6620
PO Box 186, Hanover NH 03755

STATEMENT OF CONFIDENTIALITY: This email may contain
privileged and confidential information and is intended for use only by the
individual(s) to whom it is addressed.  You are hereby notified
that any unauthorized distribution or copying of this
transmission is prohibited. If you have received this message
in error, please contact the sender immediately and
delete this electronic message
and any attachments from your system.