Re: [Tomcat 8.0.x trunk] APR sendfile problem
On 12/10/2013 23:27, Konstantin Preißer wrote: -Original Message- From: Ognjen Blagojevic [mailto:ognjen.d.blagoje...@gmail.com] Sent: Sunday, October 13, 2013 12:11 AM To: Tomcat Developers List Subject: Re: [Tomcat 8.0.x trunk] APR sendfile problem Konstantin, On 12.10.2013 3:52, Konstantin Preißer wrote: I also tried this now with trunk (r1531312) and Native 1.1.29 RC on Windows 8 64-bit with Java 1.7.0_40, and can confirm the behavior: With the above configuration for a SSL HTTP APR connector, I cannot receive the contents of /docs/manager-howto.html, whereas it works if I either add useSendfile=true or useSendfile=false. Thank you for verifying. I now re-read the docs, and realized that sendfile is not allowed with HTTPS, so one should always add useSendfile=false to HTTPS APR connector. It is strange that useSendfile=true, and not adding attribute useSendfile at all behaves differently, but this is, IMO, minor issue in interpreting server.xml. BTW, if I revert the changes in r1530269 (in AprEndpoint) then that specific issue does no longer appear when useSendfile attribute is not specified on the SSL connector - then Firefox shows the correct contents if I request /docs/manager-howto.html. Thanks - that tells me where to look. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [Tomcat 8.0.x trunk] APR sendfile problem
On 13/10/2013 09:21, Mark Thomas wrote: On 12/10/2013 23:27, Konstantin Preißer wrote: -Original Message- From: Ognjen Blagojevic [mailto:ognjen.d.blagoje...@gmail.com] Sent: Sunday, October 13, 2013 12:11 AM To: Tomcat Developers List Subject: Re: [Tomcat 8.0.x trunk] APR sendfile problem Konstantin, On 12.10.2013 3:52, Konstantin Preißer wrote: I also tried this now with trunk (r1531312) and Native 1.1.29 RC on Windows 8 64-bit with Java 1.7.0_40, and can confirm the behavior: With the above configuration for a SSL HTTP APR connector, I cannot receive the contents of /docs/manager-howto.html, whereas it works if I either add useSendfile=true or useSendfile=false. Thank you for verifying. I now re-read the docs, and realized that sendfile is not allowed with HTTPS, so one should always add useSendfile=false to HTTPS APR connector. It is strange that useSendfile=true, and not adding attribute useSendfile at all behaves differently, but this is, IMO, minor issue in interpreting server.xml. BTW, if I revert the changes in r1530269 (in AprEndpoint) then that specific issue does no longer appear when useSendfile attribute is not specified on the SSL connector - then Firefox shows the correct contents if I request /docs/manager-howto.html. Thanks - that tells me where to look. Fixed. Thanks again for the pointers. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [Tomcat 8.0.x trunk] APR sendfile problem
Mark, On 13.10.2013 11:42, Mark Thomas wrote: Fixed. Thanks again for the pointers. Thanks, it works as exptected: 1. useSendfile=true, issues a warning, and disables sendfile. 2. useSednfile=false or omitting attribute useSendfile, disables sendfile. -Ognjen - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [Tomcat 8.0.x trunk] APR sendfile problem
Konstantin, On 12.10.2013 3:52, Konstantin Preißer wrote: I am testing tcnative-1.1.29 RC, with Tomcat 8.0.x trunk (r1531461) on Win7 64-bit. I have HTTPS configured. I can't get any response larger than 50 kB. ... Now, this is interesting: I know that 50 kB limit usually smells like sendfile issue. So I tried to add EITHER useSendfile=true or useSendfile=false to the above configuration, and with either of those attributes the problem is resolved. I also tried this now with trunk (r1531312) and Native 1.1.29 RC on Windows 8 64-bit with Java 1.7.0_40, and can confirm the behavior: With the above configuration for a SSL HTTP APR connector, I cannot receive the contents of /docs/manager-howto.html, whereas it works if I either add useSendfile=true or useSendfile=false. Thank you for verifying. I now re-read the docs, and realized that sendfile is not allowed with HTTPS, so one should always add useSendfile=false to HTTPS APR connector. It is strange that useSendfile=true, and not adding attribute useSendfile at all behaves differently, but this is, IMO, minor issue in interpreting server.xml. Additionally, I regularly got following exceptions and crashes when playing with the Drawboard example (using brush to draw on it, or press F5 so that a binary websocket message with the PNG image is sent to the browser). They happen independent of the presence and value of the sendFile attribute, but they do not happen with a Non-SSL HTTP APR connector. Was sendFile a typo? It should be useSendfile. -Ognjen - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
RE: [Tomcat 8.0.x trunk] APR sendfile problem
Hi Ognjen, -Original Message- From: Ognjen Blagojevic [mailto:ognjen.d.blagoje...@gmail.com] Sent: Sunday, October 13, 2013 12:11 AM Konstantin, Additionally, I regularly got following exceptions and crashes when playing with the Drawboard example (using brush to draw on it, or press F5 so that a binary websocket message with the PNG image is sent to the browser). They happen independent of the presence and value of the sendFile attribute, but they do not happen with a Non-SSL HTTP APR connector. Was sendFile a typo? It should be useSendfile. Yes, I meant the useSendfile attribute. Regards, Konstantin Preißer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
RE: [Tomcat 8.0.x trunk] APR sendfile problem
-Original Message- From: Ognjen Blagojevic [mailto:ognjen.d.blagoje...@gmail.com] Sent: Sunday, October 13, 2013 12:11 AM To: Tomcat Developers List Subject: Re: [Tomcat 8.0.x trunk] APR sendfile problem Konstantin, On 12.10.2013 3:52, Konstantin Preißer wrote: I also tried this now with trunk (r1531312) and Native 1.1.29 RC on Windows 8 64-bit with Java 1.7.0_40, and can confirm the behavior: With the above configuration for a SSL HTTP APR connector, I cannot receive the contents of /docs/manager-howto.html, whereas it works if I either add useSendfile=true or useSendfile=false. Thank you for verifying. I now re-read the docs, and realized that sendfile is not allowed with HTTPS, so one should always add useSendfile=false to HTTPS APR connector. It is strange that useSendfile=true, and not adding attribute useSendfile at all behaves differently, but this is, IMO, minor issue in interpreting server.xml. BTW, if I revert the changes in r1530269 (in AprEndpoint) then that specific issue does no longer appear when useSendfile attribute is not specified on the SSL connector - then Firefox shows the correct contents if I request /docs/manager-howto.html. Regards, Konstantin Preißer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
RE: [Tomcat 8.0.x trunk] APR sendfile problem
Hi, -Original Message- From: Ognjen Blagojevic [mailto:ognjen.d.blagoje...@gmail.com] Sent: Saturday, October 12, 2013 1:29 AM To: Tomcat Developers List Subject: [Tomcat 8.0.x trunk] APR sendfile problem Hi, I am testing tcnative-1.1.29 RC, with Tomcat 8.0.x trunk (r1531461) on Win7 64-bit. I have HTTPS configured. I can't get any response larger than 50 kB. For instance these links did not work for me (Firefox renders blank page): https://localhost:443/docs/manager-howto.html https://localhost:443/docs/config/http.html ... Here is my connector configuration: Connector protocol=org.apache.coyote.http11.Http11AprProtocol port=443 maxHttpHeaderSize=8192 maxThreads=150 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true SSLEnabled=true SSLCertificateFile=c:\Users\xx\xx.cert SSLCertificateKeyFile=c:\Users\xx\xx.key SSLCertificateChainFile=c:\Users\xx\xx.chain / Now, this is interesting: I know that 50 kB limit usually smells like sendfile issue. So I tried to add EITHER useSendfile=true or useSendfile=false to the above configuration, and with either of those attributes the problem is resolved. I also tried this now with trunk (r1531312) and Native 1.1.29 RC on Windows 8 64-bit with Java 1.7.0_40, and can confirm the behavior: With the above configuration for a SSL HTTP APR connector, I cannot receive the contents of /docs/manager-howto.html, whereas it works if I either add useSendfile=true or useSendfile=false. Additionally, I regularly got following exceptions and crashes when playing with the Drawboard example (using brush to draw on it, or press F5 so that a binary websocket message with the PNG image is sent to the browser). They happen independent of the presence and value of the sendFile attribute, but they do not happen with a Non-SSL HTTP APR connector. 12-Oct-2013 03:12:59.282 SEVERE [http-apr-8443-exec-7] websocket.drawboard.DrawboardEndpoint.onError onError: java.io.IOException: Unexpected error [20,014] reading data from the APR/native socket. java.io.IOException: Unexpected error [20,014] reading data from the APR/native socket. at org.apache.coyote.http11.upgrade.AprServletInputStream.doRead(AprServletInputStream.java:104) at org.apache.coyote.http11.upgrade.AbstractServletInputStream.read(AbstractServletInputStream.java:116) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:46) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler$WsReadListener.onDataAvailable(WsHttpUpgradeHandler.java:192) at org.apache.coyote.http11.upgrade.AbstractServletInputStream.onDataAvailable(AbstractServletInputStream.java:169) at org.apache.coyote.http11.upgrade.AbstractProcessor.upgradeDispatch(AbstractProcessor.java:95) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:640) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:282) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2448) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2437) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) 12-Oct-2013 03:13:05.576 SEVERE [pool-1-thread-1] websocket.drawboard.DrawboardEndpoint$1.run Unexpected exception: java.lang.IllegalArgumentException java.lang.IllegalArgumentException at java.nio.Buffer.position(Buffer.java:236) at org.apache.coyote.http11.upgrade.AprServletOutputStream.doWriteInternal(AprServletOutputStream.java:129) at org.apache.coyote.http11.upgrade.AprServletOutputStream.doWrite(AprServletOutputStream.java:68) at org.apache.coyote.http11.upgrade.AbstractServletOutputStream.writeInternal(AbstractServletOutputStream.java:116) at org.apache.coyote.http11.upgrade.AbstractServletOutputStream.write(AbstractServletOutputStream.java:83) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.onWritePossible(WsRemoteEndpointImplServer.java:84) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:71) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:362) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessage(WsRemoteEndpointImplBase.java:259) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendBytesByCompletion(WsRemoteEndpointImplBase.java:129) at