Re: Running chat.xhtml example returns: Info: WebSocket closed

2014-03-24 Thread Kanagavelu Sugumar
Team,

1) I downloaded "apache-tomcat-7.0.52" to my windows 7 (32 bit machine);
2) Then i ran C:\apache-tomcat-7.0.52\bin\startup.bat
3) Now trying http://localhost:8080/examples/websocket/chat.xhtml on chrome
browser, I am getting

Info: WebSocket closed

in the big textArea.

localhost_access_log.2014-03-22.txt shows the below.

127.0.0.1 - - [22/Mar/2014:01:22:01 +0530] "GET
/examples/websocket/chat.xhtml HTTP/1.1" 304 -

127.0.0.1 - - [22/Mar/2014:01:22:02 +0530] "GET /examples/websocket/chat
HTTP/1.1" 404 997

I am new to WebSocket, and want to try the TOMCAT examples. Pls help.


On Mon, Mar 24, 2014 at 2:16 PM, Kanagavelu Sugumar
wrote:

> Team,
>
> 1) I downloaded "apache-tomcat-7.0.52" to my windows 7 (32 bit machine);
> 2) Then i ran C:\apache-tomcat-7.0.52\bin\startup.bat
> 3) Now trying http://localhost:8080/examples/websocket/chat.xhtml on
> chrome browser, I am getting
>
> Info: WebSocket closed
>
> in the big textArea.
>
> localhost_access_log.2014-03-22.txt shows the below.
>
> 127.0.0.1 - - [22/Mar/2014:01:22:01 +0530] "GET
> /examples/websocket/chat.xhtml HTTP/1.1" 304 -
>
> 127.0.0.1 - - [22/Mar/2014:01:22:02 +0530] "GET /examples/websocket/chat
> HTTP/1.1" 404 997
>
> I am new to WebSocket, and want to try the TOMCAT examples. Pls help.
>


Is it possible to have unpackWAR not unpacking anything, even in work folder?

2014-03-24 Thread Sebastien Tardif
I was glad to discover that an option called  unpackWAR exists, because my War 
has thousands of files and my configuration use a slow share drive, and so 
that's taking a very long time to unpack... but when I use the option it still  
unpack but in a more hidden place, called the "work' folder.

Is it possible to have unpackWAR really not unpacking?


Apache / Tomcat consultant needed?

2014-03-24 Thread Matthew Turany
Hi,

Apologies if this is the wrong place to post this and if so it would be
great if you could let me know where I should direct it.

We're a software developer located in Australia, one of our products uses
Apache as a reverse proxy to multiple tomcat instances each supporting
numerous customers. We would like to engage a 'expert' in both Apache and
Tomcat that can review the current configuration(s) and advise on
configuration changes (if any) for maximising performance, security, and
any other areas needed / observed.

There are no known issues at the moment, and this would primarily be a
review / health check.
For further information please reply to this post.

Cheers,
Matt


Re: CSRF protection in Tomcat 7

2014-03-24 Thread Akash Jain
On Mon, Mar 24, 2014 at 1:37 PM, Konstantin Kolinko
wrote:

> 2014-03-25 0:24 GMT+04:00 Akash Jain :
> > Yes, it uses LinkedHashMap internally which is not thread safe.
> >
> http://tomcat.10.x6.nabble.com/CsrfPreventionFilter-LRU-cache-td2113069.html
> >
>
> A 3 years old thread?
>
> The rules here:
> http://tomcat.apache.org/lists.html#tomcat-users
>
> -> 1. your version = ?
> -> 6. don't top-post.
>
> Version used is 7.0.52 ..its old thread but I want to know if Tomcat's
inbuilt CSRF filter is thread safe or not ? As there are other CSRF
protection mechanism like spring security's , so if tomcat is good then we
need not consider other options.

The source code is available (both downloadable and online from svn).
> All necessary syncs are there.
>
>
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/filters/CsrfPreventionFilter.java?annotate=1148471&diff_format=l#l313
>
> So you are saying its thread safe as per the diff ?


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


Re: CSRF protection in Tomcat 7

2014-03-24 Thread Akash Jain
On Mon, Mar 24, 2014 at 1:33 PM, Daniel Mikusa wrote:

> On Mar 24, 2014, at 4:24 PM, Akash Jain  wrote:
>
> > Yes, it uses LinkedHashMap internally which is not thread safe.
> >
> http://tomcat.10.x6.nabble.com/CsrfPreventionFilter-LRU-cache-td2113069.html
>
> First, please don't top post.  The convention adopted by this list is to
> reply inline or at the bottom.
>
> I don't see what you mean here.  Using LinkedHashMap does not
> automatically mean there will be threading issues and the link you've
> referenced is not discussing a threading issue.
>
> Can you explain your concern more?
>

Version used is 7.0.52 ..its old thread but I want to know if Tomcat's
inbuilt CSRF filter is thread safe or not ? As there are other CSRF
protection mechanism like spring security's , so if tomcat is good then we
need not consider other options.

>
> Dan
>
>
> >
> >
> > On Mon, Mar 24, 2014 at 1:09 PM, Daniel Mikusa  >wrote:
> >
> >> On Mar 24, 2014, at 3:49 PM, Akash Jain 
> wrote:
> >>
> >>> How can I prevent CSRF protection using Tomcat 7 ?
> >>>
> >>> I have heard that tomcat 7 provides CSRF filter
> >>>
> >>
> http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/filters/CsrfPreventionFilter.html
> >>
> >> Yes.  The manager application uses it.  You could look at the source
> code,
> >> if you need an example.
> >>
> >>> But is it thread safe ?
> >>
> >> I do not know off the top of my head.  Is there a reason that you are
> >> asking?  Have you seen something that would indicate that it is not?
> >>
> >> Dan
> >>
> >>> Or shall we do a custom protection in our spring 3 application ?
> >>
> >>
> >> -
> >> 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: CSRF protection in Tomcat 7

2014-03-24 Thread Konstantin Kolinko
2014-03-25 0:24 GMT+04:00 Akash Jain :
> Yes, it uses LinkedHashMap internally which is not thread safe.
> http://tomcat.10.x6.nabble.com/CsrfPreventionFilter-LRU-cache-td2113069.html
>

A 3 years old thread?

The rules here:
http://tomcat.apache.org/lists.html#tomcat-users

-> 1. your version = ?
-> 6. don't top-post.

The source code is available (both downloadable and online from svn).
All necessary syncs are there.

http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/filters/CsrfPreventionFilter.java?annotate=1148471&diff_format=l#l313

Best regards,
Konstantin Kolinko

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



Re: tomcat 7 Manager access

2014-03-24 Thread Mark Eggers

Please don't top-post.

On 3/24/2014 1:19 PM, Berg, James wrote:

I posted my entire tomcat-users.xml.  I took out all of the comments
to try to avoid the error. :-) Jim


Did you edit your server.xml file? However I imagine this error in 
server.xml would trigger other issues . . .


Start with a fresh copy of Tomcat 7.0.52, and insert your users. Make no 
other changes. Run Tomcat. Post the log (catalina.out) in the body of 
your message if you have an error.


/mde/



-Original Message- From: Mark Eggers
[mailto:its_toas...@yahoo.com] Sent: Monday, March 24, 2014 4:17 PM
To: Tomcat Users List Subject: Re: tomcat 7 Manager access

On 3/24/2014 12:30 PM, Berg, James wrote:


When I try to navigate to the any of the Manager links from the
first page, I get a login popup. I have tried all of the usernames
in the tomcat-users.xml and all I get back is a fresh login popup.
It looks like there is a bug in the
org.apache.tomcat.util.digester.Digester for 7.0.52 which is
stopping the Memory User Database Realm from loading.  Before I
unjar the tomcat-util.jar file.  Is there something that I am doing
wrong? Thanks in advance, Jim

Tomcat 7.0.52  port 8181.

Java 7 u51

Tomcat-users.xml

 
  

Catalina log messages about errors:

Multiple instances of this:

Mar 24, 2014 1:35:21 PM org.apache.tomcat.util.digester.Digester
fatalError SEVERE: Parse Fatal Error at line 28 column 3: The
string "--" is not permitted within comments.
org.xml.sax.SAXParseException; lineNumber: 28; columnNumber: 3; The
string "--" is not permitted within comments.

Finally get this:

SEVERE: Failed to start
"org.apache.catalina.realm.UserDatabaseRealm/1.0" realm
org.apache.catalina.LifecycleException: Failed to start component
[Realm[UserDatabaseRealm]]



Well since your posted file is not 28 lines long, then I'm guessing
that this is not your entire tomcat-users.xml file.

What is on line 28 of the file?

The message seems to be pretty clear. You have a '--' string in your
XML comments that the parser is objecting to.

I have no such issues with Tomcat 7.0.52 / JRE 1.7.0_52 / Fedora 20.

. . . just my two cents. /mde/




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



Re: CSRF protection in Tomcat 7

2014-03-24 Thread Daniel Mikusa
On Mar 24, 2014, at 4:24 PM, Akash Jain  wrote:

> Yes, it uses LinkedHashMap internally which is not thread safe.
> http://tomcat.10.x6.nabble.com/CsrfPreventionFilter-LRU-cache-td2113069.html

First, please don’t top post.  The convention adopted by this list is to reply 
inline or at the bottom.

I don’t see what you mean here.  Using LinkedHashMap does not automatically 
mean there will be threading issues and the link you’ve referenced is not 
discussing a threading issue.

Can you explain your concern more?

Dan


> 
> 
> On Mon, Mar 24, 2014 at 1:09 PM, Daniel Mikusa wrote:
> 
>> On Mar 24, 2014, at 3:49 PM, Akash Jain  wrote:
>> 
>>> How can I prevent CSRF protection using Tomcat 7 ?
>>> 
>>> I have heard that tomcat 7 provides CSRF filter
>>> 
>> http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/filters/CsrfPreventionFilter.html
>> 
>> Yes.  The manager application uses it.  You could look at the source code,
>> if you need an example.
>> 
>>> But is it thread safe ?
>> 
>> I do not know off the top of my head.  Is there a reason that you are
>> asking?  Have you seen something that would indicate that it is not?
>> 
>> Dan
>> 
>>> Or shall we do a custom protection in our spring 3 application ?
>> 
>> 
>> -
>> 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: CSRF protection in Tomcat 7

2014-03-24 Thread Akash Jain
Yes, it uses LinkedHashMap internally which is not thread safe.
http://tomcat.10.x6.nabble.com/CsrfPreventionFilter-LRU-cache-td2113069.html


On Mon, Mar 24, 2014 at 1:09 PM, Daniel Mikusa wrote:

> On Mar 24, 2014, at 3:49 PM, Akash Jain  wrote:
>
> > How can I prevent CSRF protection using Tomcat 7 ?
> >
> > I have heard that tomcat 7 provides CSRF filter
> >
> http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/filters/CsrfPreventionFilter.html
>
> Yes.  The manager application uses it.  You could look at the source code,
> if you need an example.
>
> > But is it thread safe ?
>
> I do not know off the top of my head.  Is there a reason that you are
> asking?  Have you seen something that would indicate that it is not?
>
> Dan
>
> > Or shall we do a custom protection in our spring 3 application ?
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


RE: tomcat 7 Manager access

2014-03-24 Thread Berg, James
I posted my entire tomcat-users.xml.  I took out all of the comments to try to 
avoid the error.
:-)
Jim

-Original Message-
From: Mark Eggers [mailto:its_toas...@yahoo.com] 
Sent: Monday, March 24, 2014 4:17 PM
To: Tomcat Users List
Subject: Re: tomcat 7 Manager access

On 3/24/2014 12:30 PM, Berg, James wrote:
>
> When I try to navigate to the any of the Manager links from the first 
> page, I get a login popup. I have tried all of the usernames in the 
> tomcat-users.xml and all I get back is a fresh login popup.  It looks 
> like there is a bug in the org.apache.tomcat.util.digester.Digester
> for 7.0.52 which is stopping the Memory User Database Realm from 
> loading.  Before I unjar the tomcat-util.jar file.  Is there something 
> that I am doing wrong? Thanks in advance, Jim
>
> Tomcat 7.0.52  port 8181.
>
> Java 7 u51
>
> Tomcat-users.xml
>
>rolename="tomcat"/>   rolename="manager-script"/>   rolename="manager-jmx"/>  password="tomcat" roles="tomcat,manager-gui"/>  username="tcmanagersc" password="tomcat"
> roles="tomcat,manager-script"/>  password="tomcat" roles="tomcat,manager-status"/>  username="tcmanagerj" password="tomcat" roles="tomcat,manager-jmx"/> 
>  
> 
>
> Catalina log messages about errors:
>
> Multiple instances of this:
>
> Mar 24, 2014 1:35:21 PM org.apache.tomcat.util.digester.Digester
> fatalError SEVERE: Parse Fatal Error at line 28 column 3: The string 
> "--" is not permitted within comments. org.xml.sax.SAXParseException;
> lineNumber: 28; columnNumber: 3; The string "--" is not permitted 
> within comments.
>
> Finally get this:
>
> SEVERE: Failed to start
> "org.apache.catalina.realm.UserDatabaseRealm/1.0" realm
> org.apache.catalina.LifecycleException: Failed to start component 
> [Realm[UserDatabaseRealm]]
>

Well since your posted file is not 28 lines long, then I'm guessing that this 
is not your entire tomcat-users.xml file.

What is on line 28 of the file?

The message seems to be pretty clear. You have a '--' string in your XML 
comments that the parser is objecting to.

I have no such issues with Tomcat 7.0.52 / JRE 1.7.0_52 / Fedora 20.

. . . just my two cents.
/mde/

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




-

This e-mail and any files transmitted with it may contain privileged or 
confidential information.  It is solely for use by the individual for whom it 
is intended, even if addressed incorrectly.  If you received this e-mail in 
error, please notify the sender; do not disclose, copy, distribute, or take any 
action in reliance on the contents of this information; and delete it fromyour 
system. Any other use of this e-mail is prohibited.

Thank you for your compliance.

-



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



Re: tomcat 7 Manager access

2014-03-24 Thread Mark Eggers

On 3/24/2014 12:30 PM, Berg, James wrote:


When I try to navigate to the any of the Manager links from the first
page, I get a login popup. I have tried all of the usernames in the
tomcat-users.xml and all I get back is a fresh login popup.  It looks
like there is a bug in the org.apache.tomcat.util.digester.Digester
for 7.0.52 which is stopping the Memory User Database Realm from
loading.  Before I unjar the tomcat-util.jar file.  Is there
something that I am doing wrong? Thanks in advance, Jim

Tomcat 7.0.52  port 8181.

Java 7 u51

Tomcat-users.xml

  



Catalina log messages about errors:

Multiple instances of this:

Mar 24, 2014 1:35:21 PM org.apache.tomcat.util.digester.Digester
fatalError SEVERE: Parse Fatal Error at line 28 column 3: The string
"--" is not permitted within comments. org.xml.sax.SAXParseException;
lineNumber: 28; columnNumber: 3; The string "--" is not permitted
within comments.

Finally get this:

SEVERE: Failed to start
"org.apache.catalina.realm.UserDatabaseRealm/1.0" realm
org.apache.catalina.LifecycleException: Failed to start component
[Realm[UserDatabaseRealm]]



Well since your posted file is not 28 lines long, then I'm guessing that 
this is not your entire tomcat-users.xml file.


What is on line 28 of the file?

The message seems to be pretty clear. You have a '--' string in your XML 
comments that the parser is objecting to.


I have no such issues with Tomcat 7.0.52 / JRE 1.7.0_52 / Fedora 20.

. . . just my two cents.
/mde/

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



Re: CSRF protection in Tomcat 7

2014-03-24 Thread Daniel Mikusa
On Mar 24, 2014, at 3:49 PM, Akash Jain  wrote:

> How can I prevent CSRF protection using Tomcat 7 ?
> 
> I have heard that tomcat 7 provides CSRF filter
> http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/filters/CsrfPreventionFilter.html

Yes.  The manager application uses it.  You could look at the source code, if 
you need an example.

> But is it thread safe ?

I do not know off the top of my head.  Is there a reason that you are asking?  
Have you seen something that would indicate that it is not?

Dan

> Or shall we do a custom protection in our spring 3 application ?


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



Re: CSRF protection in Tomcat 7

2014-03-24 Thread Akash Jain
Thanks.
Do you know if tomcat 7 inbuilt CSRF has nonce thread safe issue ?


On Mon, Mar 24, 2014 at 12:52 PM, Rossen Stoyanchev <
rstoyanc...@gopivotal.com> wrote:

> Spring Security provides CSRF protection as well:
>
> http://docs.spring.io/spring-security/site/docs/3.2.2.RELEASE/reference/htmlsingle/#csrf
>
>
> On Mon, Mar 24, 2014 at 3:49 PM, Akash Jain 
> wrote:
>
> > How can I prevent CSRF protection using Tomcat 7 ?
> >
> > I have heard that tomcat 7 provides CSRF filter
> >
> >
> http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/filters/CsrfPreventionFilter.html
> >
> > But is it thread safe ?
> >
> > Or shall we do a custom protection in our spring 3 application ?
> >
>


Re: CSRF protection in Tomcat 7

2014-03-24 Thread Rossen Stoyanchev
Spring Security provides CSRF protection as well:
http://docs.spring.io/spring-security/site/docs/3.2.2.RELEASE/reference/htmlsingle/#csrf


On Mon, Mar 24, 2014 at 3:49 PM, Akash Jain  wrote:

> How can I prevent CSRF protection using Tomcat 7 ?
>
> I have heard that tomcat 7 provides CSRF filter
>
> http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/filters/CsrfPreventionFilter.html
>
> But is it thread safe ?
>
> Or shall we do a custom protection in our spring 3 application ?
>


CSRF protection in Tomcat 7

2014-03-24 Thread Akash Jain
How can I prevent CSRF protection using Tomcat 7 ?

I have heard that tomcat 7 provides CSRF filter
http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/filters/CsrfPreventionFilter.html

But is it thread safe ?

Or shall we do a custom protection in our spring 3 application ?


tomcat 7 Manager access

2014-03-24 Thread Berg, James

When I try to navigate to the any of the Manager links from the first page, I 
get a login popup. I have tried all of the usernames in the tomcat-users.xml 
and all I get back is a fresh login popup.  It looks like there is a bug in the 
org.apache.tomcat.util.digester.Digester for 7.0.52 which is stopping the 
Memory User Database Realm from loading.  Before I unjar the tomcat-util.jar 
file.  Is there something that I am doing wrong?
Thanks in advance,
Jim

Tomcat 7.0.52  port 8181.

Java 7 u51

Tomcat-users.xml















Catalina log messages about errors:

Multiple instances of this:

Mar 24, 2014 1:35:21 PM org.apache.tomcat.util.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 28 column 3: The string "--" is not permitted 
within comments.
org.xml.sax.SAXParseException; lineNumber: 28; columnNumber: 3; The string "--" 
is not permitted within comments.

Finally get this:

SEVERE: Failed to start "org.apache.catalina.realm.UserDatabaseRealm/1.0" realm
org.apache.catalina.LifecycleException: Failed to start component 
[Realm[UserDatabaseRealm]]





-

This e-mail and any files transmitted with it may contain privileged or 
confidential information.  It is solely for use by the individual for whom it 
is intended, even if addressed incorrectly.  If you received this e-mail in 
error, please notify the sender; do not disclose, copy, distribute, or take any 
action in reliance on the contents of this information; and delete it fromyour 
system. Any other use of this e-mail is prohibited.

Thank you for your compliance.

-



Re: Detecting out-of-memory condition

2014-03-24 Thread Howard W. Smith, Jr.
On Mon, Mar 24, 2014 at 1:57 PM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: James H. H. Lampert [mailto:jam...@touchtonecorp.com]
> > Subject: Detecting out-of-memory condition
>
> > We have noticed that after a certain amount of continuous uptime, Tomcat
> > eventually runs out of memory.
>
> Your app has a memory leak.
>

I agree. My app runs well after/during continuous uptime, but about a month
ago, a certain part of the app was used for annual reporting. Keep-alive
session is available when accessing/using that part of the app, and there
is a heck of amount of data being selected from database and/or stored in
@SessionScoped beans. A memory leak was exposed in that part of the app.
it's on my to-do list to review and refactor that part of the app to
avoid/fix the memory leak in the future.


Re: consultation on Manager Tomcat 7.0.29

2014-03-24 Thread Daniel Mikusa
On Mar 24, 2014, at 1:29 PM, Jose Irrazabal  wrote:

> Hi All,
> 
> I use Apache Tomcat/7.0.29 to deploy my applications and I would like to
> know about the information that is displayed in the Server Status in the
> Manager of Tomcat in the option "http-bio-8080" where I see the Threads
> this way: Max threads: 200 Current thread count: 190 Current thread busy:
> 189. The Tomcat in a moment is stopped, and visualizing The Threads are
> processes with state S and I would like to know what it means and how it
> could improve performance.

You can get more information by taking thread dumps of the process.

   
http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F

See this section for some pointers on reading thread dumps.

   http://wiki.apache.org/tomcat/HowTo#How_do_I_read_a_Java_thread_dump_.3F

The thread dumps should give you a better idea as to what each thread is doing. 
 With more information, you can better understand what is going on and more 
accurately determine where to go from there.

As far as performance, it’s great that you want to improve it, but improving 
performance can mean a lot of things.  What is it specifically that you want to 
improve?  Are you trying to reduce memory consumption, reduce CPU consumption, 
reduce GC overhead, reduce request handling time for X URL, etc?

Dan

PS 7.0.29 is pretty old.  You should strongly consider upgrading to get all the 
latest bug and security fixes.

> 
> Any information will be of great help.
> 
> 
> I will appreciate any help. Thanking You!
> 
> 
> Jose Irrazabal


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



Re: Detecting out-of-memory condition

2014-03-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

James,

On 3/24/14, 1:38 PM, James H. H. Lampert wrote:
> We have noticed that after a certain amount of continuous uptime,
> Tomcat eventually runs out of memory.

:(

> Now, I was always taught that the only thing that's supposed to be 
> capable of causing a memory leak in Java is unintended object
> retention.

the only difference between a memory leak and simply not having enough
memory is intent: if the objects are retained unintentionally, then
it's a leak. If they are retained intentionally, then you need a
bigger heap (or more memory-efficient methods) ;)

Do you have any idea what the cause in your particular case?

> At any rate, is there a good way specific to Tomcat, to detect an 
> out-of-memory condition, so that Tomcat can be shut down (abended
> if necessary) and restarted?

Any chance you are coming to ApacheCon in Denver? I'll be covering
this in one of my talks.

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

iQIcBAEBCAAGBQJTMHQIAAoJEBzwKT+lPKRYIskP/jXB8By9A9vsLkA+p+JN7tp6
8lo4E5iLyprlDeX0TU9MK9EzG4qKePIuoFEGUZ5CAO/cQGS3ZgnfStCO2o3kpXi0
Mr3UJ1O2DCFg+VByQnNYFZ9yH+E/9ScMgqyQI3y4Xmhg6hX2RMJywL4K03pieeJA
kvAKL72QzAW+nSUVFb+7K3MWhpQSghUCJoxJD1bR19Gm/VuiuVqSXClAVn3yjCG0
zKjUWdb1KRpRsvJ6zqEHKOr/bcYgf9QsKikI3R8WaAxq2gCLoFrwSOLDPevcIW5c
EXdGgOjV9VwvaOGaUp5K1q9afoaMMWSN/PGlMtWQS3OIsQCvlWBDL/HPLY97La/e
F72TBdBxoohdRPImqBCDWboZLDioTNSv/9bFg+2tQfOVA8Y1rc1btuZMhj4wp3lI
3A/8MWC7HcpFACSsMDbbwgOa62EAIQcSnEBhWPfQAZ+Tmm9SdqgEDx6U22F+2axq
Hm53JE3RIu7RIxDehzsbwzYNf4NKYTFg6QdTnFCPbu92tKSWPC/mytrAhjhy18hr
k5vYecspwA2FdW6E2E1KWCWmlMVM4/s2V7aLuK5MtN0nd4dcN9amwX1Yyi9A0O+0
2M86wItN50Q1wDrSi3LNG3WSJTf/aRkjrUA5A6tnQUgGv7nrTD0efnsK8voQmFPP
v4vmUV30v+QztRx34rni
=FKKG
-END PGP SIGNATURE-

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



Re: Fwd: mod_jk release

2014-03-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Chris,

On 3/24/14, 6:27 AM, chris derham wrote:
> I had a email thread going a while back - 
> http://tomcat.10.x6.nabble.com/64bit-windows-mod-jk-connector-download-for-apache-httpd-2-4-td4893904.html.
>
> 
The thread ended with Christopher Schultz and mladen suggesting that I
> ask the maintainer of apache lounge to include builds of mod_jk on
> his site. He did this at the time and all was good.
> 
> He just sent me an email, saying that he just put up a new build
> of mod_jk, and asking me to forward to the list.
> 
> == Updated to 1.2.39 in all flavors:
> 
> VC11: 2.4 Win32/64 VC10: 2.2/2.4 Win32/Win64. 
> ==
> 
> My question is how should I do this?

I think you just did. ;)

> Which list should I email? Not sure if this belongs on tomcat users
> mailing list or some other

You can probably only post to the users@ and dev@ mailing lists. I
think it would be okay for you to post to just the users' list with a
subject such as "[ANNOUNCEMENT] mod_jk x.y.z x86-64 builds available"
and then give links to the downloads, the changelog, and maybe a quick
description of what changed. Feel free to steal most of the content
from the existing mod_jk release notification emails.

It would be best if the maintainers themselves could join this mailing
list and post (so they could answer questions if there are any), but
if you are a willing proxy then we'll have to settle.

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

iQIcBAEBCAAGBQJTMHJ4AAoJEBzwKT+lPKRYpgYP/1/5zoXJfFEnGTdRMlENjehs
Nbw4ntp6PeUi2LWX/JEqcfw81d/ZWm0cO4jsBrcFHbZCeB70JO9mkB6Onp3zhm37
rCeXNJQI0vNfVVzO+hJLG3d/6aBxbM9rfpZA5nooVv+2ZxUyFqjtJR9lp9Xt3GuV
hdyuqDx0UWSTmp5DsBz+s9KMM6Pvs6HH5EbwxEdPbD9ITu/8ImipjpfSLhvVF5+v
S8ocgbk4jnsf2ryYAAo6XjaPI5XrMtSPbEN8euRo8RfRuIqU3Syj0xrUeM4Q/VNd
I/Z2nVl3UtL2zus8Jm0+dz78d33N41SRIr4SQLn4E7D0cwFniNp8f3WSB3KlsFYu
PH3UwIOq+H43Njck2I7s18+AEFWK0PnwhDVqNHYuips+sKiTDWO3lMUYBzTygJMj
+xJpD22QOUPnAuf6OI0/K1A4OCNQhDZSDtKkNnqsqck8FB3j8nIM+ceBPwrX+T+R
+JAUI+IXcgQw7o3nngXhdcEu4ETRg50T0AJCssGE8BfxhFrndZy0TARY0PFIRAMX
fA/dkWGYaO5WHgB7U1JB+sa2VDG6bsNrJh3o3aIRjaKrl0Ll5AcxwzWIkBNeBUf2
JEKryV1ahbBPy1Hj55qJpmqUT/NXvn+aDjV3imMDUO74xrnBCUVA4+cP09/BjSex
38JvyhTvjp0l6X5QKUb9
=KXUf
-END PGP SIGNATURE-

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



RE: Detecting out-of-memory condition

2014-03-24 Thread Caldarale, Charles R
> From: James H. H. Lampert [mailto:jam...@touchtonecorp.com] 
> Subject: Detecting out-of-memory condition

> We have noticed that after a certain amount of continuous uptime, Tomcat 
> eventually runs out of memory.

Your app has a memory leak.

> At any rate, is there a good way specific to Tomcat, to detect an 
> out-of-memory condition, so that Tomcat can be shut down (abended if 
> necessary) and restarted?

There's nothing specific to Tomcat, since it's the JVM running out of memory, 
not Tomcat.  Here's a guide for troubleshooting:
http://www.oracle.com/technetwork/java/javase/memleaks-137499.html

 - Chuck


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


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



Re: Could I ask something about tomcat's catalina categorize?

2014-03-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

To whom it may concern,

On 3/24/14, 3:55 AM, jacky...@ifishbone.com wrote:
> Dear Apache SoftwareFundation

FYI this is a communicty of volunteers. None of us speaks for the ASF
itself.

> Could I categorize catalina.out by virtual host ? Is any setting
> can do that?
> 
> I have been finding the answer for two weeks but still got
> nothing.
> 
> Could give me a answer and reply . Thank you very much.

It's very unclear what you are asking. What does "categorize
catalina.out by virtual host" mean? Do you mean you want the messages
written to catalina.out to have the "source" virtual host attached to
them?

The short answer is "no". You probably should do things differently:
use "swallowOutput" on each Context and log each context's System.out
and System.err to a separate file.

Then go fix your web application to stop spewing logs to stdout.

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

iQIcBAEBCAAGBQJTMHDvAAoJEBzwKT+lPKRYmvgQAJzty/GjXbnH8VUuxT79cLbN
fkYxvJnqGZZv8f5fLv6pM4yNmdUIe2QT5DDY5LUd9xrEGfwOgZP/DkHQyDWn5kgK
nv0b2eMeJAGTqV0xhInf9FRbV+4m2GVYDQJyB4A3pLeXqNhL/EyoBupV0sqr781W
4+TwWwYyuWy4jiArUabAJS8TGmlvbemQS3A+ZQ20y8K5drKwoD3ZzlQgI3et0Ico
8cQB20cVb6wH3VAyylGbs+r10P1nOFIRojKJ9bvq2q2yaET7eJ337t1RMqXu4QP4
WmfIQR89QrTUvC7j9Q/qCQBCKo8Bwi47zQtm/1dCBq8ylmEy53CvRc/1Zn8UkJ7R
njy5G9PHyhbkyHPVhG6SkDK3IVfqkP0p1FujeuAfpmZVtcWfUYmGm///+RS1rijL
nf+9clJNSr/wTPYoztY9ugwd9ui40h7ViF9FEvruquokUXRMYJQdtC+VjZ+v0SLO
is/Oy/VeLuzx2vzKyTGDsjFOrBDTFdtWjc0lAZG15ChNKdttqQQSagwfwLsFYZ/q
BKL3nyQ5Xl1TSuBs/uNiPwO9+dAJNuulmHUUOClWXB4aUR23z6DJ1kqDgwypWVwg
fTuZQqlpI9LhKhEflMyEcElJLQcJ6dvFBfS4gMdZrYLePCcIz3c3r32G7LtdyrR/
/k6fPv2UMymZPrfIBGUD
=1tQo
-END PGP SIGNATURE-

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



Detecting out-of-memory condition

2014-03-24 Thread James H. H. Lampert
We have noticed that after a certain amount of continuous uptime, Tomcat 
eventually runs out of memory.


Now, I was always taught that the only thing that's supposed to be 
capable of causing a memory leak in Java is unintended object retention.


At any rate, is there a good way specific to Tomcat, to detect an 
out-of-memory condition, so that Tomcat can be shut down (abended if 
necessary) and restarted?


--
James H. H. Lampert

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



consultation on Manager Tomcat 7.0.29

2014-03-24 Thread Jose Irrazabal
Hi All,

I use Apache Tomcat/7.0.29 to deploy my applications and I would like to
know about the information that is displayed in the Server Status in the
Manager of Tomcat in the option "http-bio-8080" where I see the Threads
this way: Max threads: 200 Current thread count: 190 Current thread busy:
189. The Tomcat in a moment is stopped, and visualizing The Threads are
processes with state S and I would like to know what it means and how it
could improve performance.

Any information will be of great help.


I will appreciate any help. Thanking You!


Jose Irrazabal


clustermembers don't detect shutdown of other members

2014-03-24 Thread D.R.
Hi,

we are using tomcat 6.0.39 on linux machines.
I've implemented a clustering via tribes for exchanging messages with
static membership. We are not using mutlicast as it does not work with
linux vserver. We are not using session replication. We just want to
exchange some commands.
Everything works fine, except that the cluster is not informed if a
member from a different machine is shut down.

For example:
I have member1 and member2 on one machine with ip 192.168.0.88 and
member3 and member4 on an other machine with ip 192.168.0.89
If i shutdown member4, member3 calls the memberDisappeared() method of
my membershiplistener.
But this method is not called by the members member1 and member2.
member1 and member2 are still referencing the dead member4, if i call
channel.getmembers()

This is my code for setting up the cluster:

final StandardEngine engine = (StandardEngine)
ServerFactory.getServer().findService(CATALINA_SERVICE).getContainer();

final Container hostContainer = getHostContainer(engine);

_simpleTcpCluster = new SimpleTcpCluster();
_simpleTcpCluster.setProperty("channelStartOptions", 3);//disable
multicast
_simpleTcpCluster.setProperty("channelSendOptions", 8);// ???

final TcpFailureDetector tcpFailureDetector = new TcpFailureDetector();

final MyMessageDispatch15Interceptor messageDispatchInterceptor = new
MyMessageDispatch15Interceptor();
final MyChannelReceiver myChannelReceiver = new
MyChannelReceiver(mysc.getClusterListenAddress());
myChannelReceiver.setPort(_clusterPort);

final StaticMembershipInterceptor staticMembershipInterceptor = new
StaticMembershipInterceptor();
final  Tuple2> members = getMembers();
for(final Member member : members.getB()){
if (member.isReady()) {
LOGGER.info("[" + mysc.getStoreGroupId() + "-app] adding static
member: " + MyMembershipListener.getMemberId(member));
staticMembershipInterceptor.addStaticMember(member);
} else {
LOGGER.info("[" + mysc.getStoreGroupId() + "-app] static member
not ready: " + MyMembershipListener.getMemberId(member) + ", not
added");  //this is never called
}
}
tcpFailureDetector.setNext(staticMembershipInterceptor);
staticMembershipInterceptor.setPrevious(tcpFailureDetector);
staticMembershipInterceptor.setNext(messageDispatchInterceptor);
messageDispatchInterceptor.setPrevious(staticMembershipInterceptor);
_myMembershipService = new MyMembershipService(members.getA());
//   
myMembershipService.setMcastBindAddress(mysc.getClusterListenAddress());   
//forces an error

_clusterChannel = new MyGroupChannel();
_clusterChannel.setMembershipService(_myMembershipService);
_clusterChannel.setChannelReceiver(myChannelReceiver);
_clusterChannel.addInterceptor(tcpFailureDetector);
_clusterChannel.addInterceptor(staticMembershipInterceptor);
_clusterChannel.addInterceptor(messageDispatchInterceptor);
_clusterChannel.addMembershipListener(_mbrListener);
_clusterChannel.addChannelListener(_msgListener);

_simpleTcpCluster.setChannel(_clusterChannel);
hostContainer.setCluster(_simpleTcpCluster);

try {
_clusterChannel.start(Channel.DEFAULT);
} catch (ChannelException e) {
e.printStackTrace();
}

final Member[] group = _clusterChannel.getMembers();
if(group.length < 1){
LOGGER.info("[" + mysc.getStoreGroupId() + "-app] did not find any
other cluster-members");   
} else {
LOGGER.info("[" + mysc.getStoreGroupId() + "-app] found the
following cluster-members:");
for(final Member m : group){
LOGGER.info("[" + mysc.getStoreGroupId() + "-app] name: " +
m.getName() + ", port: " + m.getPort() + ", uniqueid: " +
MyMembershipListener.getMemberId(m));
}
}

Any help is welcome.


With kind regards
Dave








Re: Concurrency - Servlet created instances accessing static classes

2014-03-24 Thread Mark Thomas
On 24/03/2014 16:08, John Smith wrote:
> I should know this, but I want to confirm with smarter people on the board.
> 
> Assume the following:
> 1. Servlet receives an HTTP POST request. doPost(...) is called.
> 2. doPost(..) instantiates class X with each request
> 3. Class X calls a static method of class Y
> 
> Assuming I have no synchronization in the method signature or body of Y,
> there is a danger of concurrency issues or thread safety issues. Many
> instances of X can call Y's static method at the same time, causing BAD
> THINGS to happen.

It depends on how Y's static method is written.

If the method is thread-safe - no issue. If it isn't thread-safe then
you have a problem.

Mark


> 
> True? I swear I used to know this but I've worked on so much stuff for this
> project in the last few months it simply fell out of my brain :). I'm also
> aware that the answer to this is often "it depends" but I'm looking for the
> general case answer.
> 
> TIA
> John
> 


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



RE: Concurrency - Servlet created instances accessing static classes

2014-03-24 Thread Caldarale, Charles R
> From: John Smith [mailto:tomcat.ran...@gmail.com] 
> Subject: Concurrency - Servlet created instances accessing static classes

> Assume the following:
> 1. Servlet receives an HTTP POST request. doPost(...) is called.
> 2. doPost(..) instantiates class X with each request

First terminology problem: class X isn't instantiated here, an object of type 
class X is instantiated.

> 3. Class X calls a static method of class Y

Second terminology problem: classes don't make calls, threads do.

> Assuming I have no synchronization in the method signature or body of Y,
> there is a danger of concurrency issues or thread safety issues. Many
> instances of X can call Y's static method at the same time, causing BAD
> THINGS to happen.

The type, state, or condition of X is irrelevant; it's the fact that multiple 
threads may be calling Y's static method concurrently that is the issue.  
Whether or not that is safe is entirely dependent on the code inside Y.

 - Chuck


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



Re: Concurrency - Servlet created instances accessing static classes

2014-03-24 Thread J Java
if you are accessing any static variables in method Y,it can cause
concurrency issues.
Thanks,
Shailesh.


On Mon, Mar 24, 2014 at 9:38 PM, John Smith  wrote:

> I should know this, but I want to confirm with smarter people on the board.
>
> Assume the following:
> 1. Servlet receives an HTTP POST request. doPost(...) is called.
> 2. doPost(..) instantiates class X with each request
> 3. Class X calls a static method of class Y
>
> Assuming I have no synchronization in the method signature or body of Y,
> there is a danger of concurrency issues or thread safety issues. Many
> instances of X can call Y's static method at the same time, causing BAD
> THINGS to happen.
>
> True? I swear I used to know this but I've worked on so much stuff for this
> project in the last few months it simply fell out of my brain :). I'm also
> aware that the answer to this is often "it depends" but I'm looking for the
> general case answer.
>
> TIA
> John
>


Concurrency - Servlet created instances accessing static classes

2014-03-24 Thread John Smith
I should know this, but I want to confirm with smarter people on the board.

Assume the following:
1. Servlet receives an HTTP POST request. doPost(...) is called.
2. doPost(..) instantiates class X with each request
3. Class X calls a static method of class Y

Assuming I have no synchronization in the method signature or body of Y,
there is a danger of concurrency issues or thread safety issues. Many
instances of X can call Y's static method at the same time, causing BAD
THINGS to happen.

True? I swear I used to know this but I've worked on so much stuff for this
project in the last few months it simply fell out of my brain :). I'm also
aware that the answer to this is often "it depends" but I'm looking for the
general case answer.

TIA
John


RE: [Bug 56301] Websockets not working after 8.0.0-RC10

2014-03-24 Thread Caldarale, Charles R
> From: Cyril Auburtin [mailto:cyril.aubur...@gmail.com] 
> Subject: Re: [Bug 56301] Websockets not working after 8.0.0-RC10

> Tomcat 8.0.0-RC10 is the stable version or is it 8.0.3?

No version of Tomcat 8 has been released as stable.  Look here:
http://tomcat.apache.org/whichversion.html
for the definitions of alpha, beta, and stable releases.  Note that release 
candidates are not releases, but just an early look at a forthcoming release 
(hence the use of the term "candidate").

 - 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: [Bug 56301] Websockets not working after 8.0.0-RC10

2014-03-24 Thread Cyril Auburtin
Thanks Mark for your useful reply,
I thought the 8.0.1 version was supposed to be more stable than RCs? I'm
still not sure about what you said about it

I would first want to have an easy and stable servlet embedded server, it
could be tomcat, glassfish or any other. Once I have this, I would be glad
to take part in development
Tomcat 8.0.0-RC10 is the stable version or is it 8.0.3?

Thanks


2014-03-24 13:41 GMT+01:00 Mark Thomas :

> On 22/03/2014 19:15, Cyril Auburtin wrote:
> > Hi, thanks for your reply
> >
> > please see https://issues.apache.org/bugzilla/attachment.cgi?id=31426with
> > the tomcat 8.0.1 (http://search.maven.org/#browse%7C-317025378)
> > and https://issues.apache.org/bugzilla/attachment.cgi?id=31427 with
> tomcat
> > 8.0.0-RC10
> >
> > There's clearly a reply in the latter case.
> >
> > the version is the only thing changed between the 2 screenshots, I
> > carefully did mvn clean too
> > the code is here https://github.com/n11/mongo-cli-java it runs very
> simply
> > with tomcat embedded that you may know well
>
> Given that you are comparing an RC with an early beta release it isn't
> surprising that things might have changed.
>
> What have you done to investigate why the behaviour is different? Or are
> you expecting someone in this list to clone your app from GitHub and
> debug it for you?
>
> Have you compared your code with the various examples in Tomcat's unit
> tests to see if there are any obvious differences in how things are
> configured?
>
> How much have you researched how WebSocket Endpoints are deployed in
> Tomcat so you have a better idea of where to start looking from problems?
>
> Mark
>
>
>
> >
> >
> > 2014-03-22 19:20 GMT+01:00 Mark Thomas :
> >
> >> On 22/03/2014 16:17, Cyril Auburtin wrote:
> >>> Hi, this issue concerns the tomcat-embed server, (likely also the
> normal
> >>> tomcat server)
> >>> after version 8.0.1, websockets can't be estblished like before.
> >>>
> >>> I tried from a simple websocket example (standard java websocket
> >>> implemented in tomcat8
> >>> http://www.oracle.com/technetwork/articles/java/jsr356-1937161.html)
> >>> and noticed it from my project https://github.com/n11/mongo-cli-java,
> >>> working untill apache version 8.0.0-RC10 (see pom.xml)
> >>>
> >>> It seems there's a breaking change between 8.0.0-RC10 and 8.0.1
> >>>
> >>> screenshot: https://issues.apache.org/bugzilla/attachment.cgi?id=31423
> >>
> >> Which indicates your WebSocket request received a 404 response so this
> >> isn't a WebSocket problem at all.
> >>
> >> Mark
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: [Bug 56301] Websockets not working after 8.0.0-RC10

2014-03-24 Thread Mark Thomas
On 22/03/2014 19:15, Cyril Auburtin wrote:
> Hi, thanks for your reply
> 
> please see https://issues.apache.org/bugzilla/attachment.cgi?id=31426 with
> the tomcat 8.0.1 (http://search.maven.org/#browse%7C-317025378)
> and https://issues.apache.org/bugzilla/attachment.cgi?id=31427 with tomcat
> 8.0.0-RC10
> 
> There's clearly a reply in the latter case.
> 
> the version is the only thing changed between the 2 screenshots, I
> carefully did mvn clean too
> the code is here https://github.com/n11/mongo-cli-java it runs very simply
> with tomcat embedded that you may know well

Given that you are comparing an RC with an early beta release it isn't
surprising that things might have changed.

What have you done to investigate why the behaviour is different? Or are
you expecting someone in this list to clone your app from GitHub and
debug it for you?

Have you compared your code with the various examples in Tomcat's unit
tests to see if there are any obvious differences in how things are
configured?

How much have you researched how WebSocket Endpoints are deployed in
Tomcat so you have a better idea of where to start looking from problems?

Mark



> 
> 
> 2014-03-22 19:20 GMT+01:00 Mark Thomas :
> 
>> On 22/03/2014 16:17, Cyril Auburtin wrote:
>>> Hi, this issue concerns the tomcat-embed server, (likely also the normal
>>> tomcat server)
>>> after version 8.0.1, websockets can't be estblished like before.
>>>
>>> I tried from a simple websocket example (standard java websocket
>>> implemented in tomcat8
>>> http://www.oracle.com/technetwork/articles/java/jsr356-1937161.html)
>>> and noticed it from my project https://github.com/n11/mongo-cli-java,
>>> working untill apache version 8.0.0-RC10 (see pom.xml)
>>>
>>> It seems there's a breaking change between 8.0.0-RC10 and 8.0.1
>>>
>>> screenshot: https://issues.apache.org/bugzilla/attachment.cgi?id=31423
>>
>> Which indicates your WebSocket request received a 404 response so this
>> isn't a WebSocket problem at all.
>>
>> Mark
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
> 


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



Re: Could I ask something about tomcat's catalina categorize?

2014-03-24 Thread Jacky_He
Forgive my rude . I should specific clearly about what I using before 
asking .

Thany you very much for giving detailed explain and suggestions , 

I woud try the "SwallowOutput " attribute for my tomcat environment and do 
some testing later .

Sincerely Thank you for reply  .

Tomcat version : 6.0.24
JVM version : JDK 1.6.0_17
Platform : RHEL 5



Re: Could I ask something about tomcat's catalina categorize?

2014-03-24 Thread André Warnier

jacky...@ifishbone.com wrote:
Dear Apache SoftwareFundation 

Could I categorize catalina.out by virtual host ? Is any setting can do 


that? I have been finding the answer for two weeks but still got nothing.

Could give me a answer and reply . Thank you very much.


Hi.

When asking such type of question (and in fact for just about any type of question), 
please indicate clearly

- what version of Tomcat you are using
- what Java JVM version it runs under
- what platform it is running on (Linux ? Windows ? other ?)

It saves everyone a lot of time, which they can then spend better answering your real 
question.


Let's suppose in the meantime, that this is a Linux platform (it is different 
under Windows).

"catalina.out" is the logfile which, by default under Linux, receives the stdout and 
stderr output of the Java JVM which runs Tomcat.  In other words, it is "global", and not 
"per virtual host".
Where "catalina.out" really ends up, is determined by the (tomcat_dir)/bin/catalina.sh 
script, which itself may be (and generally is) run by a system startup script located in 
/etc/init.d (under Linux).


This being said, what in the end arrives on the stdout and stderr of the Java JVM which 
runs Tomcat, depends very much of your Tomcat logging configuration.


Unfortunately the Tomcat logging configuration, whilst it is very powerful and flexible, 
is also horribly complicated (by the usual standards of application logging).


So, the good news is that you can probably achieve what you want; and the bad news is that 
it needs some serious work and preliminary study of the documentation and configuration files.
Another bit of goods news is that there is quite a bit of on-line documentation available; 
and another bit of bad news is that there is too much of it, and as a result it ends up 
being somewhat confusing.
The final bit of good news is that provided you are working for a big enough organisation, 
and provided that you are willing to spend the time needed to overcome the initial 
learning curve, you can probably build a whole career on becoming your organisation's 
Tomcat logging specialist.


A good place to start is here :
http://wiki.apache.org/tomcat/FAQ/Logging

and then this :
http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_java.util.logging_%28default%29

and also, view the file : /etc/tomcat-x/conf/logging.properties
  and look at what is happening for "localhost" (the "default virtual host" of 
Tomcat)

and also view this page : 
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Attributes

 and in particular the "swallowOutput" attribute

So in fact it is a bit of a recursive process :
- setting the "swallowOutput" attribute to true, for all the web applications that run 
within the virtual host, so that whatever these applications write via system.out and 
system.err - which, mind you, they should not really be doing but they do anyway - ends up 
in the web application logfile, instead of in the Java JVM's stdout and stderr logfile
- then set up your Tomcat logging configuration so that all the logging of the web 
applications of a given virtual host end up in a logfile specific to this virtual host
- and then figure out a decent way of managing these virtual host logfiles over time, 
which is not helped by the standard default way in which Tomcat handles logfiles


Good luck.


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



Fwd: mod_jk release

2014-03-24 Thread chris derham
All,

I had a email thread going a while back -
http://tomcat.10.x6.nabble.com/64bit-windows-mod-jk-connector-download-for-apache-httpd-2-4-td4893904.html.
The thread ended with Christopher Schultz and mladen suggesting that I
ask the maintainer of apache lounge to include builds of mod_jk on his
site. He did this at the time and all was good.

He just sent me an email, saying that he just put up a new build of
mod_jk, and asking me to forward to the list.

==
Updated to 1.2.39 in all flavors:

VC11: 2.4 Win32/64
VC10: 2.2/2.4 Win32/Win64.
==

My question is how should I do this? Which list should I email? Not
sure if this belongs on tomcat users mailing list or some other

Suggestions welcome

Thanks

Chris

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



Re: Could I ask something about tomcat's catalina categorize?

2014-03-24 Thread Jacky_He
Dear Apache SoftwareFundation 

Could I categorize catalina.out by virtual host ? Is any setting can do 

that? I have been finding the answer for two weeks but still got nothing.

Could give me a answer and reply . Thank you very much.

Could I ask something about tomcat's catalina categorize?

2014-03-24 Thread Jacky_He
Dear Apache SoftwareFundation 

Could I categorize catalina.out by virtual host ? Is any setting can do 

that? I have been finding the answer for two weeks but still got nothing.

Could give me a answer and reply . Thank you very much.



Could I ask something about tomcat's catalina categorize?

2014-03-24 Thread Jacky_He
Dear Apache SoftwareFundation 

Could I categorize catalina.out by virtual host ? Is any setting can do 
that?

I have been finding the answer for two weeks but still got nothing.

Could give me a answer and reply . Thank you very much.