[Bug 53074] [websocket] java.net.SocketTimeoutException: Read timed caused by server.xml' connectTimeout

2012-05-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53074

--- Comment #3 from Mark Thomas  ---
I've been thinking about this and I think the following is the way to go.

1. Make the connection timeout infinite.
2. Add an idle timeout to the WebSocket implementation (defaults to infinite)
that times out if there is no input or output after a predefined amount of
time. This should be configurable per connection.
3. Add a "ping every n milliseconds" feature (disabled by default) to save
applications re-inventing the wheel.

Thoughts?

As an aside, 1) will be tricky with the APR/native connector. That needs some
separate work. I'll start a thread on that on the dev list.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 53074] [websocket] java.net.SocketTimeoutException: Read timed caused by server.xml' connectTimeout

2012-05-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53074

--- Comment #4 from Jean-Francois Arcand  ---
Hi Mark,

+1 for making the connection timeout infinite. +1 also to add support for
websocket timeout property/attribute (will be really useful). 

Not sure for the ping ... some applications don't need ping or that extra
traffic on the wire. At least this should be configurable.

Thanks for the work.

-- Jeanfrancois

-- 
You are receiving this mail because:
You are the assignee for the bug.


RE: svn commit: r1335546 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java

2012-05-15 Thread Filip Hanik (mailing lists)
Yes we should. I can do it today, unless you beat me to it

> -Original Message-
> From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
> Sent: Monday, May 14, 2012 5:55 AM
> To: Tomcat Developers List
> Subject: Re: svn commit: r1335546 - /tomcat/trunk/modules/jdbc-
> pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionSta
> te.java
> 
> 2012/5/8  :
> > Author: fhanik
> > Date: Tue May  8 14:17:43 2012
> > New Revision: 1335546
> >
> > URL: http://svn.apache.org/viewvc?rev=1335546&view=rev
> > Log:
> > When a connection is disconnected, make sure we reset the cached
> values. This can happen during a failed validation when reconnect() is
> called.
> >
> 
> Should we include this change into 7.0.x?  It looks OK, but I have not
> tested.
> 
> The svn:externals value in 7.0.x has not been updated yet.
> 
> Best regards,
> Konstantin Kolinko
> 
> >
> > Modified:
> >    tomcat/trunk/modules/jdbc-
> pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionSta
> te.java
> >
> > Modified: tomcat/trunk/modules/jdbc-
> pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionSta
> te.java
> > URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-
> pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionSta
> te.java?rev=1335546&r1=1335545&r2=1335546&view=diff
> >
> 
> ==
> > --- tomcat/trunk/modules/jdbc-
> pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionSta
> te.java (original)
> > +++ tomcat/trunk/modules/jdbc-
> pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionSta
> te.java Tue May  8 14:17:43 2012
> > @@ -110,6 +110,19 @@ public class ConnectionState extends Jdb
> >
> >     }
> >
> > +
> > +    @Override
> > +    public void disconnected(ConnectionPool parent, PooledConnection
> con, boolean finalizing) {
> > +        //we are resetting, reset our defaults
> > +        autoCommit = null;
> > +        transactionIsolation = null;
> > +        readOnly = null;
> > +        catalog = null;
> > +        super.disconnected(parent, con, finalizing);
> > +    }
> > +
> > +
> > +
> >     @Override
> >     public Object invoke(Object proxy, Method method, Object[] args)
> throws Throwable {
> >         String name = method.getName();
> >
> >
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org



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



svn commit: r1338797 - /tomcat/jk/trunk/native/common/jk_util.c

2012-05-15 Thread mturk
Author: mturk
Date: Tue May 15 17:19:03 2012
New Revision: 1338797

URL: http://svn.apache.org/viewvc?rev=1338797&view=rev
Log:
This is just insane. Use memzero instead manually setting each and every struct 
member to zero

Modified:
tomcat/jk/trunk/native/common/jk_util.c

Modified: tomcat/jk/trunk/native/common/jk_util.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_util.c?rev=1338797&r1=1338796&r2=1338797&view=diff
==
--- tomcat/jk/trunk/native/common/jk_util.c (original)
+++ tomcat/jk/trunk/native/common/jk_util.c Tue May 15 17:19:03 2012
@@ -2048,66 +2048,14 @@ void jk_append_libpath(jk_pool_t *p, con
 
 void jk_init_ws_service(jk_ws_service_t *s)
 {
-s->ws_private = NULL;
-s->pool = NULL;
-s->method = NULL;
-s->protocol = NULL;
-s->req_uri = NULL;
-s->remote_addr = NULL;
-s->remote_port = NULL;
-s->remote_host = NULL;
-s->remote_user = NULL;
-s->auth_type = NULL;
-s->query_string = NULL;
-s->server_name = NULL;
-s->server_port = 80;
-s->server_software = NULL;
-s->content_length = 0;
-s->is_chunked = 0;
-s->no_more_chunks = 0;
-s->content_read = 0;
-s->is_ssl = JK_FALSE;
-s->ssl_cert = NULL;
-s->ssl_cert_len = 0;
-s->ssl_cipher = NULL;
-s->ssl_session = NULL;
+memset(s, 0, sizeof(jk_ws_service_t));
+
+s->server_port  = 80;
 s->ssl_key_size = -1;
-s->headers_names = NULL;
-s->headers_values = NULL;
-s->num_headers = 0;
-s->attributes_names = NULL;
-s->attributes_values = NULL;
-s->num_attributes = 0;
-s->route = NULL;
-s->activation = JK_LB_ACTIVATION_TEXT_ACTIVE;
-s->secret = NULL;
-s->reco_buf = NULL;
-s->reco_status = RECO_NONE;
-s->flush_packets = JK_FALSE;
-s->flush_header = JK_FALSE;
-s->extension.reply_timeout = -1;
-s->extension.sticky_ignore = JK_FALSE;
-s->extension.stateless = JK_FALSE;
-s->extension.use_server_error_pages = 0;
-s->extension.activation = NULL;
-s->extension.fail_on_status_size = 0;
-s->extension.fail_on_status = NULL;
-s->extension.session_cookie = NULL;
-s->extension.session_path = NULL;
-s->response_started = JK_FALSE;
-s->response_blocked = JK_FALSE;
-s->http_response_status = JK_HTTP_OK;
-s->uw_map = NULL;
-s->start_response = NULL;
-s->read = NULL;
-s->write = NULL;
-s->flush = NULL;
-s->done = NULL;
-s->disable_reuse = JK_FALSE;
-s->add_log_items = NULL;
-s->next_vhost = NULL;
-s->vhost_to_text = NULL;
-s->vhost_to_uw_map = NULL;
+s->activation   = JK_LB_ACTIVATION_TEXT_ACTIVE;
+s->reco_status  = RECO_NONE;
+s->extension.reply_timeout  = -1;
+s->http_response_status = JK_HTTP_OK;
 }
 
 /* Match = 0, NoMatch = 1, Abort = -1



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



[Bug 53237] New: TCP connections are stuck in SYN_RECV

2012-05-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53237

  Priority: P2
Bug ID: 53237
  Assignee: dev@tomcat.apache.org
   Summary: TCP connections are stuck in SYN_RECV
  Severity: normal
Classification: Unclassified
OS: Linux
  Reporter: wilbra...@iivip.com
  Hardware: All
Status: NEW
   Version: 1.1.22
 Component: Library
   Product: Tomcat Native

Created attachment 28783
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28783&action=edit
test reproduction file

When a TCP connection is opened to a tomcat (6 & 7) instance with tomcat-native
installed, the connection is left in 'SYN_RECV' until a request is made or the
connections is cleared (within 4 minutes on my system).

If tomcat-native is not installed on that same system, the TCP connection goes
to the 'ESTABLISHED' state.

The client system where the connection is originating sees the connection as
'ESTABLISHED' and will get errors if it has waited longer than the time before
the SYN_RECV connection is cleared to make it's request.

I've attached a small program that shows the error scenario.

1)  Compile and run the attached socketTest.java passing in a hostname/ip as
the first argument and a port as the second argument.  i.e.  'java socketTest
 '
2)  Run netstat on the system running tomcat/tomcat-native to see the socket
connection status.  I used a bash while loop: 'while true; do date; netstat |
grep 8080; sleep 10; done'.

With tomcat-native installed I would see:
tcp0  0 :8080 :62848 SYN_RECV

With no tomcat-native installed I would see:
tcp0  0 :8080 :62848 ESTABLISHED

tomcat-native should not prevent these connections from moving to 'ESTABLISHED'

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 53237] TCP connections are stuck in SYN_RECV

2012-05-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53237

--- Comment #1 from wilbra...@iivip.com ---
These symptoms were seen with both tomcat 6 and 7, using tomcat-native 1.1.14
and 1.1.22.  Systems were centOS 4.4 32-bit.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 53231] Suggestion for the Windows 32/64 bit installer - include port 8443 in the configurator

2012-05-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53231

--- Comment #4 from Konstantin Kolinko  ---
Nothing listens on port 8443, so there is no conflict when several instances of
Tomcat are installed with the same value for that port.

The value of "redirectPort" attribute is just a number returned in some server
responses. It could be "-1" in the default server.xml, but I think the current
value is less error prone.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 53237] TCP connections are stuck in SYN_RECV

2012-05-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53237

Konstantin Kolinko  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #2 from Konstantin Kolinko  ---
Your "Send header" code does not send anything, because you are using
BufferedWriter, and it is named "buffered" for a reason. There is also another
buffer inside the OutputStreamWriter class.

Regarding handling of incoming connections that do not send any data - see
description of "deferAccept" attribute in Configuration reference for HTTP
connector.

Bugzilla is not a support forum. If you have other questions please follow on
the users mailing list.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[GUMP@vmgump]: Project tomcat-tc7.0.x-test (in module tomcat-7.0.x) failed

2012-05-15 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-tc7.0.x-test has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 8 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-tc7.0.x-test :  Tomcat 7.x, a web server implementing Java Servlet 
3.0,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp-src.jar.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/build/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-test.html
Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-test (Type: Build)
Work ended in a state of : Failed
Elapsed: 22 mins 11 secs
Command Line: /usr/lib/jvm/java-6-openjdk/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-16052012.jar 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-16052012-native-src.tar.gz
 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-16052012-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar
 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-16052012.jar
 
-Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar
 -Dtest.accesslog=true 
-Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x 
-Dcommons-dbcp.home=/
 srv/gump/public/workspace/commons-dbcp-1.x 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-16052012.jar
 test 
[Working Directory: /srv/gump/public/workspace/tomcat-7.0.x]
CLASSPATH: 
/usr/lib/jvm/java-6-openjdk/lib/tools.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-7.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/servlet-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/outp
 
ut/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-util.jar:/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar:/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-16052012.jar:/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-16052012.jar:/srv/gump/
 public/workspace/junit/dist/junit-16052012.jar
-
[junit] May 16, 2012 4:56:3

[GUMP@vmgump]: Project tomcat-trunk-test (in module tomcat-trunk) failed

2012-05-15 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-trunk-test has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 7 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk-test :  Tomcat 8.x, a web server implementing Java Servlet 
3.1,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on tomcat-trunk-dbcp exists, no need to add for property 
tomcat-dbcp-src.jar.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -DEBUG- Dependency on tomcat-trunk-dbcp exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/build/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/gump_work/build_tomcat-trunk_tomcat-trunk-test.html
Work Name: build_tomcat-trunk_tomcat-trunk-test (Type: Build)
Work ended in a state of : Failed
Elapsed: 23 mins 7 secs
Command Line: /usr/lib/jvm/java-6-openjdk/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-16052012.jar 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-16052012-native-src.tar.gz
 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-16052012-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar
 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-16052012.jar
 
-Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-src.jar
 -Dtest.accesslog=true 
-Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x 
-Dcommons-dbcp.home=/
 srv/gump/public/workspace/commons-dbcp-1.x 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-16052012.jar
 test 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-6-openjdk/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.jar:/srv/gump/public/workspace/tomcat-trunk/outp
 
ut/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-util.jar:/srv/gump/packages/javamail-1.4/mail.jar:/srv/gump/packages/javamail-1.4/lib/mailapi.jar:/srv/gump/packages/jaf-1.1ea/activation.jar:/srv/gump/packages/eclipse/plugins/org
 
.eclipse.jdt.core_3.4.2/jdtcore.jar:/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-16052012.jar:/srv/gump/public/workspace/