Re: Tomcat and APR
Peter Lin wrote: yeah, I can do that. ... I assume if i grab the nightly for 5.5.x and APR1.1.x I should be ready to go. In the event I need some assistance, you going to be around Mladen :) ? Well, not at the midnight like your post was, but I'm sure it wasn't a midnight at your time zone :). I've done testing on SLES9/64 with JDK5 and current apr release from apache (apr-1.1.1). The performance is equal or APR is slightly faster, but what's more important is the scalability for keep-alive connections. Now you can have hundreds of keep-alive connections without going over the thread limit. Not sure how to test that, but I suppose that test for standard installation should include much higher maxThreads value then for APR implementation. One other thing. Use some unix for Tomcat, or you will need to patch the APR for windows. The reason is that the APR uses standard windows FD_SETSIZE that is 64. I did recompile the apr with setting the FD_SETSIZE to 16384 before including winsock2.h, so we don't have that limit. I did that because I thought that unixes has unlimited FD_SETSIZE, but it seems that the common value is 1024, so that is probably our limit for now. Think that we'll need multiple Poller threads if higher number is required. Anyhow don't test more then 1024 concurrent users at the moment, or 64 if using vanilla APR on windows. More about testing: Right now the code waits for 50ms (configurable or will be) after the request for another keep-alive request, and then goes to the poller if the client didn't provide the request. So that would be valuable to test actually. Let's say that client sends each request with keep-alive in a 100+ ms rate. Not sure if JMeter can make a pause between the requests, but ab can not, and that is what we need to measure basically, since it's more close to the real-world then simply hitting the Tomcat in a loop. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/tcp DataSenderTest.java
pero2005/04/16 00:06:08 Modified:modules/cluster/test/src/share/org/apache/catalina/cluster/tcp DataSenderTest.java Log: Correct checkKeepAlive New WriteData send also the header Revision ChangesPath 1.3 +9 -9 jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/tcp/DataSenderTest.java Index: DataSenderTest.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/tcp/DataSenderTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- DataSenderTest.java 10 Apr 2005 16:20:46 - 1.2 +++ DataSenderTest.java 16 Apr 2005 07:06:08 - 1.3 @@ -132,7 +132,7 @@ DataSender sender = createMockDataSender(); sender.writeData(new byte[]{ 1,2,3 }) ; ByteArrayOutputStream stream = (ByteArrayOutputStream)sender.getSocket().getOutputStream(); -assertEquals(3,stream.size()); +assertEquals(21,stream.size()); ByteArrayInputStream istream = (ByteArrayInputStream)sender.getSocket().getInputStream(); assertEquals(-1,istream.read()); MockSocket socket =((MockSocket)sender.getSocket()); @@ -163,7 +163,7 @@ sender.openSocket(); sender.writeData(new byte[]{ 1,2,3 }) ; ByteArrayOutputStream stream = (ByteArrayOutputStream)sender.getSocket().getOutputStream(); -assertEquals(3,stream.size()); +assertEquals(21,stream.size()); ByteArrayInputStream istream = (ByteArrayInputStream)sender.getSocket().getInputStream(); assertEquals(3,TcpReplicationThread.ACK_COMMAND.length); assertEquals(TcpReplicationThread.ACK_COMMAND[0],istream.read()); @@ -175,23 +175,23 @@ * Check close socket fro keep alive handling is correct (number of request and timeout * @throws Exception */ -public void testCheckIfCloseSocket() throws Exception { +public void testcheckKeepAlive() throws Exception { DataSender sender = createMockDataSender() ; -assertFalse(sender.checkIfCloseSocket()) ; +assertFalse(sender.checkKeepAlive()) ; sender.setKeepAliveMaxRequestCount(1); sender.keepAliveCount = 1; -assertTrue(sender.checkIfCloseSocket()); +assertTrue(sender.checkKeepAlive()); assertEquals(1,sender.getSocketCloseCounter()); assertEquals(0,sender.getKeepAliveCount()); sender.openSocket(); assertEquals(0,sender.getKeepAliveCount()); sender.setKeepAliveMaxRequestCount(100); sender.keepAliveConnectTime = System.currentTimeMillis() - sender.getKeepAliveTimeout() ; -assertFalse(sender.checkIfCloseSocket()); +assertFalse(sender.checkKeepAlive()); assertTrue(sender.isConnected()); assertEquals(1,sender.getSocketCloseCounter()); sender.keepAliveConnectTime-- ; -assertTrue(sender.checkIfCloseSocket()); +assertTrue(sender.checkKeepAlive()); assertEquals(2,sender.getSocketCloseCounter()); } @@ -233,7 +233,7 @@ */ private void assertPushMessage(DataSender sender) throws IOException { ByteArrayOutputStream stream = pushMessage(sender); -assertEquals(3,stream.size()); +assertEquals(21,stream.size()); assertEquals(1,sender.getKeepAliveCount()); assertEquals(1,sender.getNrOfRequests()); assertEquals(0,sender.getProcessingTime()); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp ReplicationTransmitter.java
pero2005/04/16 00:22:41 Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp ReplicationTransmitter.java Log: Change method names Revision ChangesPath 1.31 +6 -6 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationTransmitter.java Index: ReplicationTransmitter.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationTransmitter.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- ReplicationTransmitter.java 15 Apr 2005 20:14:14 - 1.30 +++ ReplicationTransmitter.java 16 Apr 2005 07:22:41 - 1.31 @@ -425,7 +425,7 @@ time = System.currentTimeMillis(); } try { -byte[] data = createMessageData(message); +byte[] data = serialze(message); String key = getKey(member); IDataSender sender = (IDataSender) map.get(key); sendMessageData(message.getUniqueId(), data, sender); @@ -447,7 +447,7 @@ time = System.currentTimeMillis(); } try { -byte[] data = createMessageData(message); +byte[] data = serialze(message); IDataSender[] senders = getSenders(); for (int i = 0; i senders.length; i++) { @@ -751,13 +751,13 @@ } /** - * Send Message create Timestamp and generate message bytes form msg - * @see XByteBuffer#createDataPackage(byte[]) + * serialze message and add timestamp + * @see GZIPOutputStream * @param msg cluster message * @return cluster message as byte array * @throws IOException */ -protected byte[] createMessageData(ClusterMessage msg) throws IOException { +protected byte[] serialze(ClusterMessage msg) throws IOException { msg.setTimestamp(System.currentTimeMillis()); ByteArrayOutputStream outs = new ByteArrayOutputStream(); ObjectOutputStream out; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterReceiverBase.java
pero2005/04/16 00:23:05 Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterReceiverBase.java Log: Change method names Revision ChangesPath 1.3 +4 -4 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java Index: ClusterReceiverBase.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ClusterReceiverBase.java 15 Apr 2005 20:14:13 - 1.2 +++ ClusterReceiverBase.java 16 Apr 2005 07:23:05 - 1.3 @@ -402,7 +402,7 @@ timeSent = System.currentTimeMillis(); } try { -ClusterMessage message = createRecevierObject(data); +ClusterMessage message = deserialze(data); cluster.receive(message); } catch (Exception x) { log @@ -417,13 +417,13 @@ } /** - * create the receieve cluster message + * deserialze the receieve cluster message * @param data uncompress data * @return * @throws IOException * @throws ClassNotFoundException */ -protected ClusterMessage createRecevierObject(byte[] data) +protected ClusterMessage deserialze(byte[] data) throws IOException, ClassNotFoundException { Object message = null; if (data != null) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp LocalStrings.properties SimpleTcpCluster.java
pero2005/04/16 01:10:48 Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp LocalStrings.properties SimpleTcpCluster.java Log: i18n message change Revision ChangesPath 1.8 +1 -0 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties Index: LocalStrings.properties === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- LocalStrings.properties 15 Apr 2005 20:14:13 - 1.7 +++ LocalStrings.properties 16 Apr 2005 08:10:48 - 1.8 @@ -36,3 +36,4 @@ SimpleTcpCluster.event.log=Cluster receive listener event {0} with data {1} SimpleTcpCluster.getProperty=get property {0} SimpleTcpCluster.setProperty=set property {0}: {1} old value {2} +SimpleTcpCluster.auto.addClusterListener=Add ClusterSessionListener at cluster [{0}:{1,number,integer}] 1.64 +3 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java Index: SimpleTcpCluster.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java,v retrieving revision 1.63 retrieving revision 1.64 diff -u -r1.63 -r1.64 --- SimpleTcpCluster.java 15 Apr 2005 20:14:14 - 1.63 +++ SimpleTcpCluster.java 16 Apr 2005 08:10:48 - 1.64 @@ -634,7 +634,8 @@ // setup the normal Cluster Session Listener (DeltaManager support) if(clusterListeners.size() == 0 ) { if(log.isInfoEnabled()) { - log.info(Add ClusterSessionListener ); + log.info(sm.getString(SimpleTcpCluster.auto.addClusterListener, + clusterReceiver.getHost(),new Integer(clusterReceiver.getPort(; } addClusterListener(new ClusterSessionListener()); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session ManagerBase.java
I also thing, made this check is better, as thing the generator work as aspected !! vote +1 to add the session duplication check again. Peter Bill Barker schrieb: Remy Maucherat [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: pero2005/04/15 13:15:45 Modified:catalina/src/share/org/apache/catalina Cluster.java catalina/src/share/org/apache/catalina/session ManagerBase.java Log: Refactoring and redesign cluster +// FIXME WHy we need no duplication check? Because it would mean id generation is extremely insecure, so we would have more urgent problems ;) I agree with Remy. Before we had the duplication check, we *did* get reports of duplicate ids. I'm -1 for the ManagerBase patch. Rémy - 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: Tomcat and APR
At last week I use very successfull the httperf load tool to simulate sessions request. With httperf you can generate high load and it is easy to configure. You can configure think time between requests. But with session handling on, we see some corrupted requests. http://www.hpl.hp.com/personal/David_Mosberger/httperf.html Peter Mladen Turk schrieb: Peter Lin wrote: yeah, I can do that. ... I assume if i grab the nightly for 5.5.x and APR1.1.x I should be ready to go. In the event I need some assistance, you going to be around Mladen :) ? Well, not at the midnight like your post was, but I'm sure it wasn't a midnight at your time zone :). I've done testing on SLES9/64 with JDK5 and current apr release from apache (apr-1.1.1). The performance is equal or APR is slightly faster, but what's more important is the scalability for keep-alive connections. Now you can have hundreds of keep-alive connections without going over the thread limit. Not sure how to test that, but I suppose that test for standard installation should include much higher maxThreads value then for APR implementation. One other thing. Use some unix for Tomcat, or you will need to patch the APR for windows. The reason is that the APR uses standard windows FD_SETSIZE that is 64. I did recompile the apr with setting the FD_SETSIZE to 16384 before including winsock2.h, so we don't have that limit. I did that because I thought that unixes has unlimited FD_SETSIZE, but it seems that the common value is 1024, so that is probably our limit for now. Think that we'll need multiple Poller threads if higher number is required. Anyhow don't test more then 1024 concurrent users at the moment, or 64 if using vanilla APR on windows. More about testing: Right now the code waits for 50ms (configurable or will be) after the request for another keep-alive request, and then goes to the poller if the client didn't provide the request. So that would be valuable to test actually. Let's say that client sends each request with keep-alive in a 100+ ms rate. Not sure if JMeter can make a pause between the requests, but ab can not, and that is what we need to measure basically, since it's more close to the real-world then simply hitting the Tomcat in a loop. Regards, Mladen. - 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]
DO NOT REPLY [Bug 34481] New: - mod_jk 1.2.10 status worker quick refresh problem
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34481. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34481 Summary: mod_jk 1.2.10 status worker quick refresh problem Product: Tomcat 5 Version: Unknown Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Native:JK AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] I'm testing the load balancing worker. My setup is: 2 hosts running Debian Linux (Sarge), Debian stock install of apache2. Apache2 using prefork workers. I've got two such Linux boxes, my workers.properties is: --- worker.list=lb,status worker.status.type=status worker.node1.port=10900 worker.node1.host=rhubarb worker.node1.type=ajp13 worker.node1.disabled=true worker.node2.port=10900 worker.node2.host=blueberry worker.node2.type=ajp13 worker.lb.balance_workers=node1,node2 worker.lb.type=lb worker.lb.sticky_session=true --- My VirtualHost directive is: --- VirtualHost * ServerName martin.rhubarb.salad.taglab.com ServerAlias martin.rhubarb JKMount /* lb JKMount /status status /VirtualHost -- I start doing some requests to http://martin.rhubarb/test.jsp; and it works fine, the test jsp prints out the session id and some trace output in the log. All requests keep going to the same host. All is fine. --- I look at the http://martin.rhubarb/status page and I can see: node1 ajp13 rhubarb:10900 192.168.100.85:10900Disabled1 1 0 0 0 0 0 node2 ajp13 blueberry:10900 192.168.100.86:10900OK 1 1 15 0 7.1K2.0K0 --- If I refresh the /status page too quickly (click reload before the previous page has loaded), the status can often get reset: --- node1 ajp13 rhubarb:10900 192.168.100.85:10900Disabled1 1 0 00 0 0 node2 ajp13 blueberry:10900 192.168.100.86:10900OK 1 1 0 0 0 0 0 --- Not only that, but sometimes it starts showing the Disabled and OK states completely erratic reporting Disabled or OK on the wrong one. This looks like a thread issue in the status worker since as far as I can tell the actual lb worker continues to work fine. Details of how I installed mod_jk.so: I downloaded the source for the connectors 1.2.10. Compiled and installed it like. $ cd jk/native $ ./configure --with-apxs=/usr/bin/apxs2 $ make $ cp apache-2.0/mod_jk.so /usr/lib/apache2/modules/ -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cluster fixes - Need Coordination of work
Hey Filip, very welcome that you help. Filip Hanik - Dev lists schrieb: I ran some load tests with the pooled mode and the clustering stats are looking good. next week I am expecting to dig a little bit deeper into the code, but so far it is looking pretty good, Well, that a very fine news. I am getting an increased number of incomplete responses, such as 302 redirects from tomcat, but that can also be the load balancer or the client scrambling the headers making an incomplete request. I have tested with the mod_jk 1.2.10 load balancing, Apache 2.0.52/53 (Wndows XP,Suse 9.1) and start next week some tests with Cisco LB in combination with a lot of Apaches/Tomcat ( 8 Apache and every host a 3 cluster tomcats domain ). I don't see those 302. I am glad you removed the compress flag, I am not sure what that was to begin with as if I remember it correctly, messages were already being compressed, and during profiling, this had little impact on performance On my profiling the compress mode is only usefull when you have large replication messages ( 8k bytes), but it use more CPU performance ( 20-30% more). I don't remove the compress flag. I have disable it by default. It is a sender/receiver attribute. The attribute waitForAck and compress was transfered to the Receiver: Receiver className=org.apache.catalina.cluster.tcp.SocketReplicationListener tcpListenAddress=@node.clustertcp.address@ tcpListenPort=@node.clustertcp.port@ doReceivedProcessingStats=true / Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=fastasyncqueue compress=true doTransmitterProcessingStats=true doProcessingStats=true doWaitAckStats=true queueTimeWait=true queueDoStats=true queueCheckLock=true ackTimeout=15000 waitForAck=true autoConnect=false keepAliveTimeout=8 keepAliveMaxRequestCount=-1/ One of my ideas is: Change the cluster protocol that developer can add there own data serialzable/deserialzable format (high risk) Currently header 6 bytes (FLT2002) data.length 4 bytes data, end header 6 bytes (TLF2003) Optimized to header 2 bytes (TC) type 1 byte compressflag 1 byte data.length 4 bytes, data | real uncompressed data.length (4 bytes) data type means user defined type and receiver extract bytes and type and sende it to callback s. ObjectReader or SocketObjectReader compress 1 first data 4 data bytes are the real uncompressed data length. ( Is for better memory management atr recevier side, S. XByteBuffer) overwrite ClusterSender and ClusterReceiver deserizable/seriazable methods - Then we can setup a flag at ClusterMessage or make a on the fly decision to compress data. when changing the code, I was wondering if we can stick to method names that make sense and are logical public int getTimeoutAllSession() If this means return the count of all sessions that have timed out, I would suggest public int getSessionTimeoutCount() No, it is the value of the timeout in sec's that DeltaManager wait after send all session event to one other cluster member. protected ClusterMessage createRecevierObject(byte[] data) do you mean deserialize? as in protected ClusterMessage deserialize(byte[] data) Yes, I have change the names at ClusterReceiverBase and ReplicationTransmitter. Also my favorit names, but time is limit when you refactor code I must admit that I am having a little bit of a hard time reading the code because of the funky naming conventions, do you mind me cleaning up some when I go in and add changes? Yes, feel free to find better names. Please, change the names also inside the mbeans descriptors and testcode. I thing we must coordinate the work. You announce the change name step, than I can stop my redesign and refactorings. I will be pushing for stabilization as opposed to new features and so called refactoring. As an example, to customers stability and speed is more important than features, take MySQL for example. Yes, you are right. But my code changes are important for better understanding and made a clearer semantic to a lot of classes. Other thing is: I want made the cluster faster and easier to extend. I hope we can also port the Remy/Mladens APR sockets to the clustering module. The following cases/classes need help: - SimpleTcpCluster pause/resume senders You also mean that pause Receiver help? Then you must also stop the Membership and that is dangerous. = pause: We can send a message to all other nodes that we are member
DO NOT REPLY [Bug 34481] - mod_jk 1.2.10 status worker quick refresh problem
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34481. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34481 --- Additional Comments From [EMAIL PROTECTED] 2005-04-16 10:34 --- Give the --prefork-enabled flag a chance to disable all threading code. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 34482] New: - status worker Update Worker button should do redirect
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34482. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34482 Summary: status worker Update Worker button should do redirect Product: Tomcat 5 Version: Unknown Platform: Other OS/Version: other Status: NEW Severity: enhancement Priority: P2 Component: Native:JK AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] When using load balanced workers the status worker allows for editing the load balancing details. The Update Worker button currently does a GET request so that if I change a setting and click it the URL becomes something like: /status?cmd=updatew=node2id=1lb=0wf=1wr=wc=wd=on I might at this point be tempted to start refreshing the page, however that would probably trigger the status worker to perform my last Update Worker action over and over again, which doesn't feel right. It would be better if the worker once it has received a command, does a 302 redirect to the base URL, in my case '/status'. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 34481] - mod_jk 1.2.10 status worker quick refresh problem
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34481. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34481 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2005-04-16 10:49 --- The --enable-prefork did not fix it, however I know noticed in the apache error log: [Sat Apr 16 09:44:39 2005] [emerg] No JkShmFile defined in httpd.conf. LoadBalancer will not function properly! Configuring a global JkShmFile makes it start behave properly. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]: Project jakarta-tomcat-jasper_tc5 (in module jakarta-tomcat-jasper_tc5) failed
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 [EMAIL PROTECTED] Project jakarta-tomcat-jasper_tc5 has an issue affecting its community integration. This issue affects 14 projects, and has been outstanding for 11 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - avalon-http-context : Avalon SVN - avalon-http-demo : Avalon SVN - avalon-http-examples : Avalon SVN - avalon-http-impl : Avalon SVN - avalon-http-server : Avalon SVN - avalon-http-servlet : Avalon SVN - avalon-http-static : Avalon SVN - avalon-http-test : Avalon SVN - avalon-planet-facilities : Avalon SVN - jakarta-tomcat-5 : Servlet 2.4 and JSP 2.0 Reference Implementation - jakarta-tomcat-catalina : Servlet 2.4 Reference Implementation - jakarta-tomcat-jasper_tc5 : JavaServer Pages JSP 2.0 implementation (for Tomcat 5.x) - jakarta-tomcat-jk : Connectors to various web servers - metro-reflector-blocks-complete : Avalon SVN Full details are available at: http://brutus.apache.org/gump/public/jakarta-tomcat-jasper_tc5/jakarta-tomcat-jasper_tc5/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Output [jasper-runtime.jar] identifier set to output basename: [jasper-runtime] -DEBUG- Output [jasper-compiler.jar] identifier set to output basename: [jasper-compiler] -DEBUG- Dependency on ant exists, no need to add for property ant.jar. -INFO- Failed with reason build failed -DEBUG- Extracted fallback artifacts from Gump Repository The following work was performed: http://brutus.apache.org/gump/public/jakarta-tomcat-jasper_tc5/jakarta-tomcat-jasper_tc5/gump_work/build_jakarta-tomcat-jasper_tc5_jakarta-tomcat-jasper_tc5.html Work Name: build_jakarta-tomcat-jasper_tc5_jakarta-tomcat-jasper_tc5 (Type: Build) Work ended in a state of : Failed Elapsed: 4 secs Command Line: java -Djava.awt.headless=true -Xbootclasspath/p:/usr/local/gump/public/workspace/xml-xerces2/java/build/xercesImpl.jar org.apache.tools.ant.Main -Dgump.merge=/home/gump/workspaces2/public/gump/work/merge.xml -Dbuild.sysclasspath=only -Djsp-api.jar=/usr/local/gump/public/workspace/jakarta-servletapi-5/jsr152/dist/lib/jsp-api.jar -Dcommons-el.jar=/usr/local/gump/public/workspace/jakarta-commons/el/dist/commons-el.jar -Djasper-compiler-jdt.jar=/usr/local/gump/public/workspace/cocoon/lib/optional/jdtcore-3.0.2.jar -Dant.jar=/usr/local/gump/public/workspace/ant/dist/lib/ant.jar -Dservlet-api.jar=/usr/local/gump/public/workspace/jakarta-servletapi-5/jsr154/dist/lib/servlet-api.jar -Dcompile.source=1.4 dist [Working Directory: /usr/local/gump/public/workspace/jakarta-tomcat-jasper_tc5/jasper2] CLASSPATH: /opt/jdk1.4/lib/tools.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-swing.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-trax.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-junit.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging-api.jar:/usr/local/gump/public/workspace/jakarta-commons/el/dist/commons-el.jar:/usr/local/gump/public/workspace/jakarta-servletapi-5/jsr154/dist/lib/servlet-api.jar:/usr/local/gump/public/workspace/jakarta-servletapi-5/jsr152/dist/lib/jsp-api.jar:/usr/local/gump/public/workspace/cocoon/lib/optional/jdtcore-3.0.2.jar - Buildfile: build.xml build-prepare: [mkdir] Created dir: /home/gump/workspaces2/public/workspace/jakarta-tomcat-jasper_tc5/jasper2/build [mkdir] Created dir: /home/gump/workspaces2/public/workspace/jakarta-tomcat-jasper_tc5/jasper2/build/bin [mkdir] Created dir: /home/gump/workspaces2/public/workspace/jakarta-tomcat-jasper_tc5/jasper2/build/common/classes [mkdir] Created dir: /home/gump/workspaces2/public/workspace/jakarta-tomcat-jasper_tc5/jasper2/build/common/lib [mkdir] Created dir: /home/gump/workspaces2/public/workspace/jakarta-tomcat-jasper_tc5/jasper2/build/shared/classes [mkdir] Created dir: /home/gump/workspaces2/public/workspace/jakarta-tomcat-jasper_tc5/jasper2/build/shared/lib copy-launcher.jars: build-static: [copy] Copying 4 files to /home/gump/workspaces2/public/workspace/jakarta-tomcat-jasper_tc5/jasper2/build/bin build-only: [javac] Compiling 87 source files to
[EMAIL PROTECTED]: Project jakarta-tomcat-jk-native (in module jakarta-tomcat-connectors) failed
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 [EMAIL PROTECTED] Project jakarta-tomcat-jk-native has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 98 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - jakarta-tomcat-jk-native : Connectors to various web servers Full details are available at: http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -INFO- Failed with reason build failed The following work was performed: http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/gump_work/build_jakarta-tomcat-connectors_jakarta-tomcat-jk-native.html Work Name: build_jakarta-tomcat-connectors_jakarta-tomcat-jk-native (Type: Build) Work ended in a state of : Failed Elapsed: Command Line: make [Working Directory: /usr/local/gump/public/workspace/jakarta-tomcat-connectors/jk/native] - Making all in common make[1]: Entering directory `/home/gump/workspaces2/public/workspace/jakarta-tomcat-connectors/jk/native/common' /bin/sh /usr/local/gump/public/workspace/apache-httpd/dest-16042005/build/libtool --silent --mode=compile gcc -I/usr/local/gump/public/workspace/apache-httpd/dest-16042005/include -g -O2 -g -O2 -pthread -DHAVE_APR -I/usr/local/gump/public/workspace/apr/dest-16042005/include/apr-1 -g -O2 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/home/gump/workspaces2/public/workspace/apache-httpd/srclib/pcre -I /opt/jdk1.4/include -I /opt/jdk1.4/include/ -c jk_ajp12_worker.c /usr/local/gump/public/workspace/apache-httpd/dest-16042005/build/libtool: /usr/local/gump/public/workspace/apache-httpd/dest-16042005/build/libtool: No such file or directory make[1]: *** [jk_ajp12_worker.lo] Error 127 make[1]: Leaving directory `/home/gump/workspaces2/public/workspace/jakarta-tomcat-connectors/jk/native/common' make: *** [all-recursive] Error 1 - To subscribe to this information via syndicated feeds: - RSS: http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/rss.xml - Atom: http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/atom.xml == Gump Tracking Only === Produced by Gump version 2.2. Gump Run 2116042005, brutus:brutus-public:2116042005 Gump E-mail Identifier (unique within run) #20. -- Apache Gump http://gump.apache.org/ [Instance: brutus] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
GUMP - Project jakarta-tomcat-jk-native (in module jakarta-tomcat-connectors) failed messages
Hi, I'm getting pretty tired of getting this messages every day. Can we do something so that jk-native is never tried to build at the first place. I'm not even sure if it can be build by ant anyhow. Bill, any clues? Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni Library.java
jfclere 2005/04/16 02:17:38 Modified:jni/java/org/apache/tomcat/jni Library.java Log: print java.library.path when the library cannot be loaded. Revision ChangesPath 1.4 +4 -1 jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Library.java Index: Library.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Library.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Library.java 18 Jan 2005 10:22:32 - 1.3 +++ Library.java 16 Apr 2005 09:17:38 - 1.4 @@ -49,6 +49,9 @@ break; } if (!loaded) { +err += (; +err += System.getProperty(java.library.path); +err += ); throw new UnsatisfiedLinkError(err); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jni build.xml
jfclere 2005/04/16 02:35:57 Modified:jni build.xml Log: Add tc.library.path to help the JVM to find the library. Revision ChangesPath 1.5 +3 -0 jakarta-tomcat-connectors/jni/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/build.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- build.xml 15 Apr 2005 21:57:08 - 1.4 +++ build.xml 16 Apr 2005 09:35:57 - 1.5 @@ -35,6 +35,7 @@ property name=examples.dir value=${build.dest}/examples/ property name=junit.home value=/usr/local/junit3.8/ property name=junit.jar value=${junit.home}/junit.jar/ +property name=tc.library.path value=${basedir}/native/.libs/ !-- The base directory for component sources -- property name=source.home value=java/ @@ -66,6 +67,7 @@ !-- echo message=java.class.path = ${java.class.path}/ -- +echo message=tc.library.path = ${tc.library.path}/ echo message=/ /target @@ -292,6 +294,7 @@ java dir=${examples.dir} classname=org.apache.tomcat.jni.Echo fork=yes failonerror=${test.failonerror} classpath refid=examples.classpath/ +jvmarg value=-Djava.library.path=${tc.library.path}/ /java /target /project - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jni build.xml
jfclere 2005/04/16 02:53:42 Modified:jni build.xml Log: use example instead compile-example (why do with need compile-example?). Revision ChangesPath 1.6 +1 -1 jakarta-tomcat-connectors/jni/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/build.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- build.xml 16 Apr 2005 09:35:57 - 1.5 +++ build.xml 16 Apr 2005 09:53:42 - 1.6 @@ -289,7 +289,7 @@ !-- === -- !-- excutes the examples -- !-- === -- -target name=example-basic depends=compile-examples +target name=example-basic depends=examples echo message=Running Tomcat Native Echo example .../ java dir=${examples.dir} classname=org.apache.tomcat.jni.Echo fork=yes failonerror=${test.failonerror} - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session ManagerBase.java
Bill Barker wrote: Remy Maucherat [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: pero2005/04/15 13:15:45 Modified:catalina/src/share/org/apache/catalina Cluster.java catalina/src/share/org/apache/catalina/session ManagerBase.java Log: Refactoring and redesign cluster +// FIXME WHy we need no duplication check? Because it would mean id generation is extremely insecure, so we would have more urgent problems ;) I agree with Remy. Before we had the duplication check, we *did* get reports of duplicate ids. I'm -1 for the ManagerBase patch. Small precision (I think Bill got it right, but his statement isn't very clear): these duplicate id problems were caused by a race condition during the recycling of session objects (session objects were put twice in the recycled list, sometimes, causing two users with different session ids to share the same session object - this was in the 4.1.18 timeframe). As recycling was removed (since it was a really bad idea), there is now no issue. The session id space is 128bit, populated by a secure (until proven otherwise; some studies tend to show it is good) random generator, so we *cannot* get collisions. Getting collisions would mean the generator is extremely insecure (since I assume the number of ids generated would be on the order of 10^6), and as stated this would mean a much bigger problem than the impact of getting a duplicate id once in a while. Conclusion: any check for duplicate session ids is useless. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jni/native/src network.c
jfclere 2005/04/16 03:31:34 Modified:jni/java/org/apache/tomcat/jni Socket.java jni/native/src network.c Log: Throw an exception when bind() failed. Revision ChangesPath 1.7 +3 -2 jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Socket.java Index: Socket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Socket.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Socket.java 15 Apr 2005 10:26:19 - 1.6 +++ Socket.java 16 Apr 2005 10:31:34 - 1.7 @@ -138,7 +138,8 @@ * This may be where we will find out if there is any other process * using the selected port. */ -public static native int bind(long sock, long sa); +public static native int bind(long sock, long sa) +throws Exception; /** * Listen to a bound socket for connections. 1.7 +3 -1 jakarta-tomcat-connectors/jni/native/src/network.c Index: network.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/network.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- network.c 15 Apr 2005 10:26:19 - 1.6 +++ network.c 16 Apr 2005 10:31:34 - 1.7 @@ -135,7 +135,9 @@ apr_sockaddr_t *a = J2P(sa, apr_sockaddr_t *); UNREFERENCED_STDARGS; -return (jint)apr_socket_bind(s, a); +TCN_THROW_IF_ERR(apr_socket_bind(s, a), s); +cleanup: +return (jint)0; } TCN_IMPLEMENT_CALL(jint, Socket, listen)(TCN_STDARGS, jlong sock, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-connectors/jni/native/src network.c
[EMAIL PROTECTED] wrote: jfclere 2005/04/16 03:31:34 Modified:jni/java/org/apache/tomcat/jni Socket.java jni/native/src network.c Log: Throw an exception when bind() failed. Why did you do that? I mean there is no need to throw an exception if we can get a direct APR status code. The trow is used *only* for functions that return status and fill a single pointer. We are not trying to be Java compatible, but as close to follow the APR api (as is possible). Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-connectors/jni/native/src network.c
Mladen Turk wrote: [EMAIL PROTECTED] wrote: jfclere 2005/04/16 03:31:34 Modified:jni/java/org/apache/tomcat/jni Socket.java jni/native/src network.c Log: Throw an exception when bind() failed. Why did you do that? I mean there is no need to throw an exception if we can get a direct APR status code. The trow is used *only* for functions that return status and fill a single pointer. We are not trying to be Java compatible, but as close to follow the APR api (as is possible). Yes, please don't start adding exception throwing everywhere. I'm only -0 for this particular commit, since there are far worse places to throw something. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni Echo.java
jfclere 2005/04/16 03:46:55 Modified:jni/examples/org/apache/tomcat/jni Echo.java Log: catch the next exception. Revision ChangesPath 1.4 +11 -6 jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni/Echo.java Index: Echo.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni/Echo.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Echo.java 15 Apr 2005 14:24:53 - 1.3 +++ Echo.java 16 Apr 2005 10:46:55 - 1.4 @@ -64,7 +64,7 @@ private long serverSock = 0; private long inetAddress = 0; private long pool = 0; -public Acceptor() { +public Acceptor() throws Exception { try { pool = Pool.create(Echo.echoPool); @@ -80,6 +80,7 @@ } catch( Exception ex ) { ex.printStackTrace(); +throw(new Exception(Can't create Acceptor)); } } @@ -232,10 +233,14 @@ { int i; echoPool = Pool.create(0); -echoAcceptor = new Acceptor(); -echoAcceptor.start(); -echoPoller = new Poller(); -echoPoller.start(); +try { +echoAcceptor = new Acceptor(); +echoAcceptor.start(); +echoPoller = new Poller(); +echoPoller.start(); +} catch (Exception e) { +e.printStackTrace(); +} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 34480] - Parser chokes on tags within HTML comment block
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34480. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34480 --- Additional Comments From [EMAIL PROTECTED] 2005-04-16 14:15 --- Actually you are incorrect. Please read section JSP.1.5.1 of the JSP Spec. Dynamic content that appears within HTML/XML comments, such as actions, scriptlets and expressions, is still processed by the container. As your jsp contains an unbalanced action it will fail to translate. If you want to comment out code you should be using jsp comments. Also, I hope you realize that HTML comments are rendered to the browser and so your comments on usage such as the ones in your example would be visible to any user of your application. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native/common jk_mt.h
mturk 2005/04/16 07:33:27 Modified:jk/native/common jk_mt.h Log: Check if the command was interrupted by a signal before the lock was checked or acquired. Revision ChangesPath 1.19 +11 -5 jakarta-tomcat-connectors/jk/native/common/jk_mt.h Index: jk_mt.h === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_mt.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- jk_mt.h 11 Apr 2005 06:36:02 - 1.18 +++ jk_mt.h 16 Apr 2005 14:33:27 - 1.19 @@ -100,12 +100,14 @@ #define JK_ENTER_LOCK(x, rc)\ do {\ - rc = flock((x), LOCK_EX) == -1 ? JK_FALSE : JK_TRUE; \ + while ((rc = flock((x), LOCK_EX) 0) (errno == EINTR)); \ + rc = rc == 0 ? JK_TRUE : JK_FALSE; \ } while (0) #define JK_LEAVE_LOCK(x, rc)\ do {\ - rc = flock((x), LOCK_UN) == -1 ? JK_FALSE : JK_TRUE; \ + while ((rc = flock((x), LOCK_UN) 0) (errno == EINTR)); \ + rc = rc == 0 ? JK_TRUE : JK_FALSE; \ } while (0) #else @@ -117,7 +119,9 @@ _fl.l_whence = SEEK_SET; \ _fl.l_start = 0; \ _fl.l_len= 1L;\ - rc = fcntl((x), F_SETLKW, _fl) == -1 ? JK_FALSE : JK_TRUE; \ + _fl.l_pid= 0; \ + while ((rc = fcntl((x), F_SETLKW, _fl) 0) (errno == EINTR)); \ + rc = rc == 0 ? JK_TRUE : JK_FALSE; \ } while (0) #define JK_LEAVE_LOCK(x, rc)\ @@ -127,7 +131,9 @@ _fl.l_whence = SEEK_SET; \ _fl.l_start = 0; \ _fl.l_len= 1L;\ - rc = fcntl((x), F_SETLK, _fl) == -1 ? JK_FALSE : JK_TRUE; \ + _fl.l_pid= 0; \ + while ((rc = fcntl((x), F_SETLKW, _fl) 0) (errno == EINTR)); \ + rc = rc == 0 ? JK_TRUE : JK_FALSE; \ } while (0) #endif /* HAVE_FLOCK */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jni/native/src network.c
mturk 2005/04/16 07:47:20 Modified:jni/java/org/apache/tomcat/jni Socket.java jni/native/src network.c Log: Remove unnecessary exceptions for calls that can return negative values as error codes. Revision ChangesPath 1.8 +3 -5 jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Socket.java Index: Socket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Socket.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Socket.java 16 Apr 2005 10:31:34 - 1.7 +++ Socket.java 16 Apr 2005 14:47:20 - 1.8 @@ -138,8 +138,7 @@ * This may be where we will find out if there is any other process * using the selected port. */ -public static native int bind(long sock, long sa) -throws Exception; +public static native int bind(long sock, long sa); /** * Listen to a bound socket for connections. @@ -444,7 +443,6 @@ */ public static native int sendfile(long sock, long file, byte [][] headers, byte[][] trailers, long offset, - int len, int flags) -throws Exception; + int len, int flags); } 1.8 +17 -27jakarta-tomcat-connectors/jni/native/src/network.c Index: network.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/network.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- network.c 16 Apr 2005 10:31:34 - 1.7 +++ network.c 16 Apr 2005 14:47:20 - 1.8 @@ -135,9 +135,7 @@ apr_sockaddr_t *a = J2P(sa, apr_sockaddr_t *); UNREFERENCED_STDARGS; -TCN_THROW_IF_ERR(apr_socket_bind(s, a), s); -cleanup: -return (jint)0; +return (jint)apr_socket_bind(s, a); } TCN_IMPLEMENT_CALL(jint, Socket, listen)(TCN_STDARGS, jlong sock, @@ -214,10 +212,8 @@ UNREFERENCED(o); bytes = (char *)(*e)-GetDirectBufferAddress(e, buf); nbytes = (apr_size_t)(*e)-GetDirectBufferCapacity(e, buf); -if (bytes == NULL || nbytes 0) { -tcn_ThrowAPRException(e, APR_EGENERAL); -return (jint)(-APR_EGENERAL); -} +if (bytes == NULL || nbytes 0) +return (jint)(-APR_EINVAL); if (len 0) nbytes = min(nbytes - offset, (apr_size_t)len); ss = apr_socket_send(s, bytes + offset, nbytes); @@ -241,10 +237,8 @@ UNREFERENCED(o); -if (nvec = APR_MAX_IOVEC_SIZE) { -/* TODO: Throw something here */ -return 0; -} +if (nvec = APR_MAX_IOVEC_SIZE) +return (jint)(-APR_ENOMEM); for (i = 0; i nvec; i++) { ba[i] = (*e)-GetObjectArrayElement(e, bufs, i); vec[i].iov_len = (*e)-GetArrayLength(e, ba[i]); @@ -356,10 +350,8 @@ UNREFERENCED(o); bytes = (char *)(*e)-GetDirectBufferAddress(e, buf); nbytes = (apr_size_t)(*e)-GetDirectBufferCapacity(e, buf); -if (bytes == NULL || nbytes 0) { -tcn_ThrowAPRException(e, APR_EGENERAL); -return (jint)(-APR_EGENERAL); -} +if (bytes == NULL || nbytes 0) +return (jint)(-APR_EINVAL); if (len 0) nbytes = min(nbytes - offset, (apr_size_t)len); @@ -384,10 +376,8 @@ UNREFERENCED(o); bytes = (char *)(*e)-GetDirectBufferAddress(e, buf); nbytes = (apr_size_t)(*e)-GetDirectBufferCapacity(e, buf); -if (bytes == NULL || nbytes 0) { -tcn_ThrowAPRException(e, APR_EGENERAL); -return (jint)(-APR_EGENERAL); -} +if (bytes == NULL || nbytes 0) +return (jint)(-APR_EINVAL); if (len 0) nbytes = min(nbytes - offset, (apr_size_t)len); @@ -503,6 +493,7 @@ apr_off_t off = (apr_off_t)offset; apr_size_t written = (apr_size_t)len; apr_hdtr_t hdrs; +apr_status_t ss; UNREFERENCED(o); @@ -511,10 +502,8 @@ if (trailers) nt = (*e)-GetArrayLength(e, trailers); /* Check for overflow */ -if (nh = APR_MAX_IOVEC_SIZE || nt = APR_MAX_IOVEC_SIZE) { -/* TODO: Throw something here */ -return 0; -} +if (nh = APR_MAX_IOVEC_SIZE || nt = APR_MAX_IOVEC_SIZE) +return (jint)(-APR_ENOMEM); for (i = 0; i nh; i++) { hba[i] = (*e)-GetObjectArrayElement(e, headers, i); @@ -531,10 +520,8 @@ hdrs.trailers = tvec[0]; hdrs.numtrailers = nt; -TCN_THROW_IF_ERR(apr_socket_sendfile(s, f, hdrs, off, - written, (apr_int32_t)flags), i); +ss = apr_socket_sendfile(s, f, hdrs, off, written,
cvs commit: jakarta-tomcat-connectors/jni/native/src network.c
mturk 2005/04/16 07:53:36 Modified:jni/java/org/apache/tomcat/jni Socket.java jni/native/src network.c Log: Add atmark function for querying OOB socket data. Revision ChangesPath 1.9 +17 -9 jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Socket.java Index: Socket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Socket.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Socket.java 16 Apr 2005 14:47:20 - 1.8 +++ Socket.java 16 Apr 2005 14:53:36 - 1.9 @@ -161,6 +161,14 @@ throws Exception; /** + * Query the specified socket if at the OOB/Urgent data mark + * @param sock The socket to query + * @return True if socket is at the OOB/urgent mark, + * otherwise return false. + */ +public static native boolean atmark(long sock); + +/** * Issue a connection request to a socket either on the same machine * or a different one. * @param sock The socket we wish to use for our side of the connection @@ -184,7 +192,7 @@ * @param offset Offset in the byte buffer. * @param len The number of bytes to write; (-1) for full array. * @return The number of bytes send. - * + * */ public static native int send(long sock, byte[] buf, int offset, int len); @@ -205,9 +213,9 @@ * which bytes are to be retrieved; must be non-negative * and no larger than buf.length * @param len The maximum number of buffers to be accessed; must be non-negative - *and no larger than buf.length - offset + *and no larger than buf.length - offset * @return The number of bytes send. - * + * */ public static native int sendb(long sock, ByteBuffer buf, int offset, int len); @@ -226,7 +234,7 @@ * /PRE * @param sock The socket to send the data over. * @param vec The array from which to get the data to send. - * + * */ public static native int sendv(long sock, byte[][] vec); @@ -243,7 +251,7 @@ /** * Read data from a network. - * + * * PRE * This functions acts like a blocking read by default. To change * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK @@ -265,7 +273,7 @@ /** * Read data from a network with timeout. - * + * * PRE * This functions acts like a blocking read by default. To change * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK @@ -289,7 +297,7 @@ /** * Read data from a network. - * + * * PRE * This functions acts like a blocking read by default. To change * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK @@ -312,7 +320,7 @@ /** * Read data from a network with timeout. - * + * * PRE * This functions acts like a blocking read by default. To change * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK 1.9 +1 -1 jakarta-tomcat-connectors/jni/native/src/network.c Index: network.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/network.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- network.c 16 Apr 2005 14:47:20 - 1.8 +++ network.c 16 Apr 2005 14:53:36 - 1.9 @@ -462,7 +462,7 @@ return (jlong)timeout; } -TCN_IMPLEMENT_CALL(jint, Socket, atmark)(TCN_STDARGS, jlong sock) +TCN_IMPLEMENT_CALL(jboolean, Socket, atmark)(TCN_STDARGS, jlong sock) { apr_socket_t *s = J2P(sock, apr_socket_t *); apr_int32_t mark; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni Socket.java
mturk 2005/04/16 08:07:53 Modified:jni/java/org/apache/tomcat/jni Socket.java Log: Oops. Remove duplicate declaration. Revision ChangesPath 1.10 +1 -9 jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Socket.java Index: Socket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Socket.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Socket.java 16 Apr 2005 14:53:36 - 1.9 +++ Socket.java 16 Apr 2005 15:07:53 - 1.10 @@ -400,14 +400,6 @@ public static native int optGet(long sock, int opt); /** - * Query the specified socket if at the OOB/Urgent data mark - * @param sock The socket to query - * @return True if socket is at the OOB/urgent mark, - * otherwise is set to false. - */ -public static native boolean atmark(long sock); - -/** * Setup socket timeout for the specified socket * @param sock The socket to set up. * @param t Value for the timeout in microseconds. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jni/native/src info.c network.c
mturk 2005/04/16 08:46:36 Modified:jni/java/org/apache/tomcat/jni Address.java Sockaddr.java jni/native/src info.c network.c Log: Add missing Address.getip - apr_sockaddr_ip_get call and remove unneeded fields for Sockaddr. Revision ChangesPath 1.3 +11 -1 jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Address.java Index: Address.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Address.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Address.java 14 Jan 2005 14:42:37 - 1.2 +++ Address.java 16 Apr 2005 15:46:36 - 1.3 @@ -24,6 +24,7 @@ public class Address { +static public String APR_ANYADDR = 0.0.0.0; /** * Fill the Address class from apr_sockaddr_t * @param info Sockaddr class to fill @@ -65,6 +66,15 @@ */ public static native String getnameinfo(long sa, int flags); +/** + * Return the IP address (in numeric address string format) in + * an APR socket address. APR will allocate storage for the IP address + * string from the pool of the apr_sockaddr_t. + * @param ss The socket address to reference. + * @return The IP address. + */ +public static native String getip(long sa); + /** * Given an apr_sockaddr_t and a service name, set the port for the service * @param sockaddr The apr_sockaddr_t that will have its port set 1.3 +1 -11 jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Sockaddr.java Index: Sockaddr.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Sockaddr.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Sockaddr.java 14 Jan 2005 14:42:37 - 1.2 +++ Sockaddr.java 16 Apr 2005 15:46:36 - 1.3 @@ -34,16 +34,6 @@ public int port; /** The family */ public int family; -/** How big is the sockaddr we're using? */ -public int salen; -/** How big is the ip address structure we're using? */ -public int ipaddr_len; -/** How big should the address buffer be? 16 for v4 or 46 for v6 - * used in inet_ntop... */ -public int addr_str_len; -/** This points to the IP address structure within the appropriate - * sockaddr structure. */ -public long ipaddr_ptr; /** If multiple addresses were found by apr_sockaddr_info_get(), this * points to a representation of the next address. */ public long next; 1.3 +0 -12 jakarta-tomcat-connectors/jni/native/src/info.c Index: info.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/info.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- info.c17 Jan 2005 07:21:13 - 1.2 +++ info.c16 Apr 2005 15:46:36 - 1.3 @@ -115,10 +115,6 @@ DECLARE_AINFO_FIELD(servname); DECLARE_AINFO_FIELD(port); DECLARE_AINFO_FIELD(family); -DECLARE_AINFO_FIELD(salen); -DECLARE_AINFO_FIELD(ipaddr_len); -DECLARE_AINFO_FIELD(addr_str_len); -DECLARE_AINFO_FIELD(ipaddr_ptr); DECLARE_AINFO_FIELD(next); static int finfo_class_initialized = 0; @@ -173,10 +169,6 @@ GET_AINFO_S(servname); GET_AINFO_I(port); GET_AINFO_I(family); -GET_AINFO_I(salen); -GET_AINFO_I(ipaddr_len); -GET_AINFO_I(addr_str_len); -GET_AINFO_J(ipaddr_ptr); GET_AINFO_J(next); ainfo_class_initialized = 1; @@ -215,10 +207,6 @@ SET_AINFO_S(servname, info-servname); SET_AINFO_I(port, info-port); SET_AINFO_I(family, info-family); -SET_AINFO_I(salen, info-salen); -SET_AINFO_I(ipaddr_len, info-ipaddr_len); -SET_AINFO_I(addr_str_len, info-addr_str_len); -SET_AINFO_J(ipaddr_ptr, P2J(info-ipaddr_ptr)); SET_AINFO_J(next, P2J(info-next)); } 1.10 +12 -0 jakarta-tomcat-connectors/jni/native/src/network.c Index: network.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/network.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- network.c 16 Apr 2005 14:53:36 - 1.9 +++ network.c 16 Apr 2005 15:46:36 - 1.10 @@ -69,6 +69,18 @@ return NULL; } +TCN_IMPLEMENT_CALL(jstring, Address, getip)(TCN_STDARGS, jlong sa) +{ +apr_sockaddr_t *s = J2P(sa, apr_sockaddr_t *); +char *ipaddr; + +UNREFERENCED(o); +if (apr_sockaddr_ip_get(ipaddr, s) == APR_SUCCESS) +
cvs commit: jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni Echo.java
mturk 2005/04/16 08:47:42 Modified:jni/examples/org/apache/tomcat/jni Echo.java Log: Display remote connection socket info. Revision ChangesPath 1.5 +15 -2 jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni/Echo.java Index: Echo.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni/Echo.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Echo.java 16 Apr 2005 10:46:55 - 1.4 +++ Echo.java 16 Apr 2005 15:47:42 - 1.5 @@ -90,6 +90,19 @@ while (true) { long clientSock = Socket.accept(serverSock, pool); System.out.println(Accepted id: + i); +try { +long sa = Address.get(Socket.APR_REMOTE, clientSock); +Sockaddr addr = new Sockaddr(); +if (Address.fill(addr, sa)) { +System.out.println(Host: + Address.getnameinfo(clientSock, 0)); +System.out.println(IP: + Address.getip(sa) + + : + addr.port); +} +} catch (Exception e) { +// Ignore +e.printStackTrace(); +} + Socket.timeoutSet(clientSock, 1000); Worker worker = new Worker(clientSock, i++, this.getClass().getName()); @@ -153,7 +166,7 @@ long clientSock = Poll.socket(desc[n]); int workerId = (int)Poll.data(desc[n]); System.out.println(Poll flags + Poll.events(desc[n])); -remove(clientSock, workerId); +remove(clientSock, workerId); Worker worker = new Worker(clientSock, workerId, this.getClass().getName()); Echo.incThreads(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 34484] New: - Tomcat Coyote connector doesn't play with NVidia onboard ethernet.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34484. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34484 Summary: Tomcat Coyote connector doesn't play with NVidia onboard ethernet. Product: Tomcat 4 Version: 4.1.12 Platform: PC OS/Version: Windows 2000 Status: NEW Severity: normal Priority: P3 Component: Connector:Coyote HTTP/1.1 AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] I upgraded my system to a new motherboard using the NVidia nForce4 ultra chipset. Among other things, this chipset provides a gigabit ethernet port on the motherboard. Great, I can get rid of the ratty old Kingston ethernet card my DSL is plugged into. After installing NVidia's drivers, I found that I could surf the web just fine, and my own java applications could access URL's but Tomcat wouldn't respond to requests - I'm running Tomcat as my web server as well as servlet container through the Coyote connector. I know it's way past time for me to upgrade to 5.0 - I tried a quick installation of it, and it didn't seem to respond with NVidia's ethernet support either. I reverted back to my old PCI ethernet card, and Tomcat's happy again, but it might be nice to use the onboard ethernet. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jni/native/src info.c network.c
mturk 2005/04/16 09:45:13 Modified:jni/examples/org/apache/tomcat/jni Echo.java jni/java/org/apache/tomcat/jni Address.java jni/native/src info.c network.c Log: Add Address.getInfo that creates the Sockaddr object. Revision ChangesPath 1.6 +12 -3 jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni/Echo.java Index: Echo.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni/Echo.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Echo.java 16 Apr 2005 15:47:42 - 1.5 +++ Echo.java 16 Apr 2005 16:45:13 - 1.6 @@ -75,6 +75,14 @@ pool); serverSock = Socket.create(Socket.APR_INET, Socket.SOCK_STREAM, Socket.APR_PROTO_TCP, pool); +long sa = Address.get(Socket.APR_LOCAL, serverSock); +Sockaddr addr = new Sockaddr(); +if (Address.fill(addr, sa)) { +System.out.println(Host: + addr.hostname); +System.out.println(Server: + addr.servname); +System.out.println(IP: + Address.getip(sa) + + : + addr.port); +} Socket.bind(serverSock, inetAddress); Socket.listen(serverSock, 5); } @@ -90,11 +98,12 @@ while (true) { long clientSock = Socket.accept(serverSock, pool); System.out.println(Accepted id: + i); + try { long sa = Address.get(Socket.APR_REMOTE, clientSock); Sockaddr addr = new Sockaddr(); if (Address.fill(addr, sa)) { -System.out.println(Host: + Address.getnameinfo(clientSock, 0)); +System.out.println(Host: + Address.getnameinfo(sa, 0)); System.out.println(IP: + Address.getip(sa) + : + addr.port); } @@ -102,7 +111,7 @@ // Ignore e.printStackTrace(); } - + Socket.timeoutSet(clientSock, 1000); Worker worker = new Worker(clientSock, i++, this.getClass().getName()); 1.4 +8 -2 jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Address.java Index: Address.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/Address.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Address.java 16 Apr 2005 15:46:36 - 1.3 +++ Address.java 16 Apr 2005 16:45:13 - 1.4 @@ -26,13 +26,19 @@ static public String APR_ANYADDR = 0.0.0.0; /** - * Fill the Address class from apr_sockaddr_t + * Fill the Sockaddr class from apr_sockaddr_t * @param info Sockaddr class to fill * @param sa Structure pointer */ public static native boolean fill(Sockaddr info, long sa); /** + * Create the Sockaddr object from apr_sockaddr_t + * @param sa Structure pointer + */ +public static native Sockaddr getInfo(long sa); + +/** * Create apr_sockaddr_t from hostname, address family, and port. * @param hostname The hostname or numeric address string to resolve/parse, or * NULL to build an address that corresponds to 0.0.0.0 or :: 1.4 +29 -0 jakarta-tomcat-connectors/jni/native/src/info.c Index: info.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/info.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- info.c16 Apr 2005 15:46:36 - 1.3 +++ info.c16 Apr 2005 16:45:13 - 1.4 @@ -291,3 +291,32 @@ } return rv; } + +TCN_IMPLEMENT_CALL(jobject, Address, getInfo)(TCN_STDARGS, jlong info) +{ +apr_sockaddr_t *i = J2P(info, apr_sockaddr_t *); +jclass aprSockaddrClass; +jmethodID constructorID = 0; +jobject sockaddrObj = NULL; + +UNREFERENCED(o); + +aprSockaddrClass = (*e)-FindClass(e, TCN_AINFO_CLASS); +if (aprSockaddrClass == NULL) +return NULL; + +/* Find the constructor ID */ +constructorID =
DO NOT REPLY [Bug 34484] - Tomcat Coyote connector doesn't play with NVidia onboard ethernet.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34484. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34484 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2005-04-16 18:48 --- Does netstat say that the addresses are properly bound ? If yes, you might want to check the firewalling features that the NF4 supposedly has, and which could be enabled by default. Anyway, this issue cannot be a Tomcat issue. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: GUMP - Project jakarta-tomcat-jk-native (in module jakarta-tomcat-connectors) failed messages
- Original Message - From: Mladen Turk [EMAIL PROTECTED] To: Tomcat Developers List tomcat-dev@jakarta.apache.org Sent: Saturday, April 16, 2005 2:16 AM Subject: GUMP - Project jakarta-tomcat-jk-native (in module jakarta-tomcat-connectors) failed messages Hi, I'm getting pretty tired of getting this messages every day. Can we do something so that jk-native is never tried to build at the first place. I'm not even sure if it can be build by ant anyhow. It's not built by ant. It's built by buildconf/configure/make. Bill, any clues? Well, getting the httpd group to fix BZ #32787 would help. Maybe changing the nag to go there ;-). Otherwise, you can shut it off by: cvs co gump cd gump/project vi jakarta-tomcat-connectors.xml cvs ci jakara-tomcat-connectors.xml Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message is intended only for the use of the person(s) listed above as the intended recipient(s), and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you may not read, copy, or distribute this message or any attachment. If you received this communication in error, please notify us immediately by e-mail and then delete all copies of this message and any attachments. In addition you should be aware that ordinary (unencrypted) e-mail sent through the Internet is not secure. Do not send confidential or sensitive information, such as social security numbers, account numbers, personal identification numbers and passwords, to us via ordinary (unencrypted) e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni Echo.java
mturk 2005/04/16 10:24:13 Modified:jni/examples/org/apache/tomcat/jni Echo.java Log: Display local socket address too. Revision ChangesPath 1.7 +15 -6 jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni/Echo.java Index: Echo.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/examples/org/apache/tomcat/jni/Echo.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Echo.java 16 Apr 2005 16:45:13 - 1.6 +++ Echo.java 16 Apr 2005 17:24:13 - 1.7 @@ -101,12 +101,21 @@ try { long sa = Address.get(Socket.APR_REMOTE, clientSock); -Sockaddr addr = new Sockaddr(); -if (Address.fill(addr, sa)) { -System.out.println(Host: + Address.getnameinfo(sa, 0)); -System.out.println(IP: + Address.getip(sa) + - : + addr.port); +Sockaddr raddr = new Sockaddr(); +if (Address.fill(raddr, sa)) { +System.out.println(Remote Host: + Address.getnameinfo(sa, 0)); +System.out.println(Remote IP: + Address.getip(sa) + + : + raddr.port); } +sa = Address.get(Socket.APR_LOCAL, clientSock); +Sockaddr laddr = new Sockaddr(); +if (Address.fill(laddr, sa)) { +System.out.println(Local Host: + laddr.hostname); +System.out.println(Local Server: + Address.getnameinfo(sa, 0)); +System.out.println(Local IP: + Address.getip(sa) + + : + laddr.port); +} + } catch (Exception e) { // Ignore e.printStackTrace(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11AprProcessor.java
remm2005/04/16 10:49:19 Modified:http11/src/java/org/apache/coyote/http11 Http11AprProcessor.java Log: - Implement the few missing methods for getRemoteAddr, etc. Revision ChangesPath 1.5 +64 -37 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Index: Http11AprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Http11AprProcessor.java 15 Apr 2005 16:06:30 - 1.4 +++ Http11AprProcessor.java 16 Apr 2005 17:49:19 - 1.5 @@ -40,6 +40,7 @@ import org.apache.coyote.http11.filters.VoidOutputFilter; import org.apache.coyote.http11.filters.BufferedInputFilter; import org.apache.tomcat.jni.Address; +import org.apache.tomcat.jni.Sockaddr; import org.apache.tomcat.jni.Socket; import org.apache.tomcat.util.buf.Ascii; import org.apache.tomcat.util.buf.ByteChunk; @@ -735,7 +736,8 @@ remotePort = -1; localPort = -1; -// Setting up the I/O +// Setting up the socket +this.socket = socket; inputBuffer.setSocket(socket); outputBuffer.setSocket(socket); @@ -993,72 +995,97 @@ } else if (actionCode == ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE) { -// FIXME: Implement getting host address -/* -if ((remoteAddr == null) (socket != null)) { -InetAddress inetAddr = socket.getInetAddress(); -if (inetAddr != null) { -remoteAddr = inetAddr.getHostAddress(); +// Get remote host address +if (remoteAddr == null) { +try { +long sa = Address.get(Socket.APR_REMOTE, socket); +remoteAddr = Address.getip(sa); +} catch (Exception e) { +// Ignore +e.printStackTrace(); } } request.remoteAddr().setString(remoteAddr); -*/ } else if (actionCode == ActionCode.ACTION_REQ_LOCAL_NAME_ATTRIBUTE) { -// FIXME: Implement getting local address -/* -if ((localName == null) (socket != null)) { -InetAddress inetAddr = socket.getLocalAddress(); -if (inetAddr != null) { -localName = inetAddr.getHostName(); +// Get local host name +if (localName == null) { +try { +long sa = Address.get(Socket.APR_LOCAL, socket); +localName = Address.getnameinfo(sa, 0); +} catch (Exception e) { +// Ignore +e.printStackTrace(); } } request.localName().setString(localName); -*/ } else if (actionCode == ActionCode.ACTION_REQ_HOST_ATTRIBUTE) { -// FIXME: Implement -/* -if ((remoteHost == null) (socket != null)) { -InetAddress inetAddr = socket.getInetAddress(); -if (inetAddr != null) { -remoteHost = inetAddr.getHostName(); +// Get remote host name +if (remoteHost == null) { +try { +long sa = Address.get(Socket.APR_REMOTE, socket); +remoteHost = Address.getnameinfo(sa, 0); +} catch (Exception e) { +// Ignore +e.printStackTrace(); } } request.remoteHost().setString(remoteHost); -*/ } else if (actionCode == ActionCode.ACTION_REQ_LOCAL_ADDR_ATTRIBUTE) { -// FIXME: Implement -/* -if (localAddr == null) - localAddr = socket.getLocalAddress().getHostAddress(); +// Get local host address +if (localAddr == null) { +try { +long sa = Address.get(Socket.APR_LOCAL, socket); +Sockaddr addr = new Sockaddr(); +if (Address.fill(addr, sa)) { +localAddr = addr.hostname; +localPort = addr.port; +} +} catch (Exception e) { +// Ignore +e.printStackTrace(); +} +} request.localAddr().setString(localAddr); -*/ } else if (actionCode ==
cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11AprProcessor.java
remm2005/04/16 10:51:48 Modified:http11/src/java/org/apache/coyote/http11 Http11AprProcessor.java Log: - Proper logging. Revision ChangesPath 1.6 +7 -13 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Index: Http11AprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Http11AprProcessor.java 16 Apr 2005 17:49:19 - 1.5 +++ Http11AprProcessor.java 16 Apr 2005 17:51:48 - 1.6 @@ -1001,8 +1001,7 @@ long sa = Address.get(Socket.APR_REMOTE, socket); remoteAddr = Address.getip(sa); } catch (Exception e) { -// Ignore -e.printStackTrace(); +log.warn(Exception getting socket information ,e); } } request.remoteAddr().setString(remoteAddr); @@ -1015,8 +1014,7 @@ long sa = Address.get(Socket.APR_LOCAL, socket); localName = Address.getnameinfo(sa, 0); } catch (Exception e) { -// Ignore -e.printStackTrace(); +log.warn(Exception getting socket information ,e); } } request.localName().setString(localName); @@ -1029,8 +1027,7 @@ long sa = Address.get(Socket.APR_REMOTE, socket); remoteHost = Address.getnameinfo(sa, 0); } catch (Exception e) { -// Ignore -e.printStackTrace(); +log.warn(Exception getting socket information ,e); } } request.remoteHost().setString(remoteHost); @@ -1047,8 +1044,7 @@ localPort = addr.port; } } catch (Exception e) { -// Ignore -e.printStackTrace(); +log.warn(Exception getting socket information ,e); } } @@ -1063,8 +1059,7 @@ Sockaddr addr = Address.getInfo(sa); remotePort = addr.port; } catch (Exception e) { -// Ignore -e.printStackTrace(); +log.warn(Exception getting socket information ,e); } } request.setRemotePort(remotePort); @@ -1081,8 +1076,7 @@ localPort = addr.port; } } catch (Exception e) { -// Ignore -e.printStackTrace(); +log.warn(Exception getting socket information ,e); } } request.setLocalPort(localPort); @@ -1105,7 +1099,7 @@ (SSLSupport.CERTIFICATE_KEY, sslO); } } catch (Exception e) { -log.warn(Exception getting SSL Cert,e); +log.warn(Exception getting SSL Cert, e); } } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat and APR
Mladen Turk wrote: Peter Lin wrote: I've done testing on SLES9/64 with JDK5 and current apr release from apache (apr-1.1.1). The performance is equal or APR is slightly faster, but what's more important is the scalability for keep-alive connections. Now you can have hundreds of keep-alive connections without going over the thread limit. This wouldn't really happen, as keepalive gets a lot more aggressive (ie, timeout is shorter) and keepalive is disabled when the amount of busy threads gets too high. However, this does put some strain on schedulers (should be ok with a modern setup) and resource usage (allocating a thread and all its related resources used for processing isn't insignificant, so dedicating most of these threads to block on a read isn't that great). The point is to allow getting the benefits of keepalive (much better performance for page loading times and network usage) without the cost (besides the cost of keeping a socket open which obviously cannot be avoided). This should be good for one-machine web servers, and should make Tomcat more appealing for that usage. On the other end of the scalability scale, JK has issues if there are too many frontend servers, and actually anytime the amount of processors in Tomcat is not equal to the amount of processors on the front servers. The only workaround for this use is to have processors timeout, but the current implementation will be inefficient with that kind of setup. One other thing. Use some unix for Tomcat, or you will need to patch the APR for windows. The reason is that the APR uses standard windows FD_SETSIZE that is 64. I did recompile the apr with setting the FD_SETSIZE to 16384 before including winsock2.h, so we don't have that limit. I did that because I thought that unixes has unlimited FD_SETSIZE, but it seems that the common value is 1024, so that is probably our limit for now. Think that we'll need multiple Poller threads if higher number is required. Anyhow don't test more then 1024 concurrent users at the moment, or 64 if using vanilla APR on windows. That's the only problem I can see. Could this default value be changed unless there's a really good reason for it ? (from what I can see, higher values work well on my Windows) More about testing: Right now the code waits for 50ms (configurable or will be) after All the configuration should be ok now. This is the JMX view of the APR HTTP connector. Name: Catalina:type=ThreadPool,name=http-8080 modelerType: org.apache.tomcat.util.net.AprEndpoint serverSocketPool: 53067816 running: true firstReadTimeout: 100 soTimeout: 2 threadPriority: 5 port: 8080 currentThreadsBusy: 2 soLinger: -1 maxSpareThreads: 0 maxThreads: 150 pollerSize: 512 pollTime: 10 keepAliveCount: 0 tcpNoDelay: true minSpareThreads: 0 daemon: true paused: false backlog: 100 currentThreadCount: 2 name: http-8080 - firstReadTimeout (in ms): timeout before a socket goes to the poller - currentThreadsBusy: Number of workers doing some processing; it's always +1 compared to what is expected as the acceptor will get a new worker before calling accept on the server socket (so that there's no chance that an accepted socket could wait for a worker to become available) - pollerSize: Maximum amount of sockets which can be placed in the poller, which means the amount of connections which can be keptalive (previously, each one of these would have used a thread) - keepAliveCount: Number of sockets currently in the poller - pollTime (in microseconds): timeout for the poll call Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
test plans for new APR + JNI
I've posted 2 test plans designed to test out concurrent connections. http://cvs.apache.org/~woolfel/native_testplans.zip there's 2 test plans. both use the 20K.png file I created for the previous benchmark. there's 4 thread groups in test plan. the first one has a constant delay of 1second between requests the second has 500ms delay between requests the number of threads go from 250, 500, 1000, 2000 peter lin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 34484] - Tomcat Coyote connector doesn't play with NVidia onboard ethernet.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34484. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34484 [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 34484] - Tomcat Coyote connector doesn't play with NVidia onboard ethernet.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34484. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34484 [EMAIL PROTECTED] changed: What|Removed |Added CC|[EMAIL PROTECTED]| -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] - benchmark on APR stuff
I haven't been able to run the benchmarks so far due to BSOD on my laptop. I suspect SP2, since I just installed it friday and now I get IRQ errors related to the network interface. the test plan is in my apache directory, can someone else run the benchmarks until I figure out how to fix this stupid BSOD nightmare? http://cvs.apache.org/~woolfel/native_testplans.zip peter lin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkMain.java
billbarker2005/04/16 20:41:08 Modified:jk/java/org/apache/jk/common ChannelSocket.java jk/java/org/apache/jk/server JkMain.java Added: jk/java/org/apache/jk/common ChannelNioSocket.java Log: Give Remy something meaningful to benchmark against ;-). On certain (unnamed) broken OSs, it is expensive to have hundreds of threads blocking on reads. Using ChannelNioSocket instead of ChannelSocket means that all active threads are processing requests, so fewer threads are needed. If using a non-broken OS, ChannelNioSocket is probably slower than ChannelSocket. It also has extra GC vs Remy's ChannelAprSocket. Revision ChangesPath 1.54 +2 -0 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java Index: ChannelSocket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- ChannelSocket.java24 Mar 2005 15:31:16 - 1.53 +++ ChannelSocket.java17 Apr 2005 03:41:08 - 1.54 @@ -457,6 +457,8 @@ Socket s; InetAddress ladr = inet; +if(port == 0) +return; if (ladr == null || 0.0.0.0.equals(ladr.getHostAddress())) { ladr = InetAddress.getLocalHost(); } 1.1 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java Index: ChannelNioSocket.java === /* * Copyright 1999-2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jk.common; import java.util.Set; import java.util.Iterator; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.channels.Selector; import java.nio.channels.SelectionKey; import java.nio.channels.ClosedSelectorException; import java.net.URLEncoder; import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.net.SocketException; import javax.management.ListenerNotFoundException; import javax.management.MBeanNotificationInfo; import javax.management.Notification; import javax.management.NotificationBroadcaster; import javax.management.NotificationBroadcasterSupport; import javax.management.NotificationFilter; import javax.management.NotificationListener; import javax.management.ObjectName; import org.apache.commons.modeler.Registry; import org.apache.jk.core.JkHandler; import org.apache.jk.core.Msg; import org.apache.jk.core.MsgContext; import org.apache.jk.core.JkChannel; import org.apache.jk.core.WorkerEnv; import org.apache.coyote.Request; import org.apache.coyote.RequestGroupInfo; import org.apache.coyote.RequestInfo; import org.apache.tomcat.util.threads.ThreadPool; import org.apache.tomcat.util.threads.ThreadPoolRunnable; /* XXX Make the 'message type' pluggable */ /* A lot of the 'original' behavior is hardcoded - this uses Ajp13 wire protocol, TCP, Ajp14 API etc. As we add other protocols/transports/APIs this will change, the current goal is to get the same level of functionality as in the original jk connector. */ /** * Jk can use multiple protocols/transports. * Various container adapters should load this object ( as a bean ), * set configurations and use it. Note that the connector will handle * all incoming protocols - it's not specific to ajp1x. The protocol * is abstracted by MsgContext/Message/Channel. */ /** Accept ( and send ) TCP messages. * * @author Costin Manolache * @author Bill Barker * @jmx:mbean name=jk:service=ChannelNioSocket *description=Accept socket connections * @jmx:notification name=org.apache.coyote.INVOKE * @jmx:notification-handler name=org.apache.jk.JK_SEND_PACKET * @jmx:notification-handler name=org.apache.jk.JK_RECEIVE_PACKET * @jmx:notification-handler name=org.apache.jk.JK_FLUSH */ public class ChannelNioSocket extends JkHandler implements NotificationBroadcaster, JkChannel { private static