You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Ihsan Ecemis <mi...@gmail.com> on 2016/04/02 13:27:38 UTC

Problem fetching JSF resources over SSL when ActiveMQ broker is running

Hello,

I was having some weird problems with my JSF pages lately, and after some brute-force experimentation, I realized that TomEE has problems with serving JSF resources over SSL if I start an embedded ActiveMQ broker.  I found this awkward as I wouldn’t expect these 2 things to interfere with each other. 

I created a barebones project to show the problem:  https://github.com/ecemis/activemq-jsf-troubleshoot <https://github.com/ecemis/activemq-jsf-troubleshoot>

The project has 2 scripts at top level:

run_server.sh:  That’s how I start the server
test_command.sh:  That’s the test script that fetches a JSF resource via curl. I ran this on a separate terminal 

And there are 3 tags you can checkout to test 3 cases:

case-1-working:  This case doesn’t have ActiveMQ and test_command.sh can successfully fetch a JSF resource
case-2-not-working:  This case adds resources.xml file that starts an embedded ActiveMQ broker. As a result, test_command.sh fails to fetch the JSF resource
case-3-working:  This one changes the service from https to http, and  test_command.sh works again (while ActiveMQ broker is running)

(You can checkout and try each case separately, e.g. git checkout case-2-not-working. You can also compare the changes between the cases via git diff, e.g. git diff case-1-working case-2-not-working)

Note that fetching static files works in all cases. The problem I could observe so far is just with fetching JSF resources. 

All help will be greatly appreciated. 

Thanks,

Ihsan.


PS: For the impatient who wants to know the errors before cloning the sample project above, here is what curl gives me:

* SSLRead() return error -9845
* Closing connection 0
curl: (56) SSLRead() return error -9845


And here is what I get on the server:

WARNING - JSF1064: Unable to find or serve resource, primefaces.js, from library, primefaces.
WARNING - 
org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
	at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
	at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
	at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
	at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
	at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
	at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
	at java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
	at com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:358)
	at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
	at org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87)
	at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:655)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.openejb.server.httpd.WebBeansFilter.doFilter(WebBeansFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
	at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Broken pipe
	at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
	at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
	at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
	at sun.nio.ch.IOUtil.write(IOUtil.java:51)
	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
	at org.apache.tomcat.util.net.SecureNioChannel.flush(SecureNioChannel.java:140)
	at org.apache.tomcat.util.net.SecureNioChannel.write(SecureNioChannel.java:521)
	at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
	at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
	at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
	at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
	at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
	at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
	at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:121)
	at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
	at org.apache.coyote.Response.doWrite(Response.java:501)
	at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
	... 37 more



Re: Problem fetching JSF resources over SSL when ActiveMQ broker is running

Posted by Ihsan Ecemis <mi...@gmail.com>.
Thank you for confirming.  Looking forward to 7.0.0-M4 or 7.0.0.


> On Apr 7, 2016, at 3:08 PM, Romain Manni-Bucau <rm...@gmail.com> wrote:
> 
> 2016-04-07 20:51 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>> 
>> You mean you confirmed that this works on Tomcat 8.5.0  (vs Tomcat 8.0.32)?
> 
> And got the issue with tomee 7M3 too yes.
> 
>> 
>> Actually, I spoke too soon when I claimed that I made my app work when I moved the resource definition from resources.xml to tomee.xml.  It didn’t make a difference (I put tomee.xml in a wrong location, and that didn’t start ActiveMQ broker so I didn’t observe the problem cause the problem requires ActiveMQ broker running).
>> 
>> If Tomcat 8.5.0 is fine, then I can wait until 7.0.0-M4 or 7.0.0
>> 
>> 
>>> On Apr 6, 2016, at 5:08 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
>>> 
>>> Hi
>>> 
>>> I'm tempted to think it was a bug in tomcat backbone since it seems ok
>>> on tomee snapshot which upgraded tomcat version.
>>> 
>>> Romain Manni-Bucau
>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>> 
>>> 
>>> 2016-04-06 0:13 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>> 
>>>> I tested a few other cases, and found that everything works fine with TomEE
>>>> 1.7.x  (I tested 1.7.1 and 1.7.4).
>>>> 
>>>> And then I made it work with TomEE 7.0.0-M3 by moving ActiveMQ resource
>>>> definition from resources.xml file to tomee.xml file!   Both files are
>>>> attached.
>>>> 
>>>> The file contents are the same, why do we have this problem when ActiveMQ
>>>> resource is defined under resources.xml?
>>>> 
>>>> Again, the problem is with serving JSF resources like
>>>> /jsf/javax.faces.resource/primefaces.js?ln=primefaces&v=5.3 — and there is
>>>> NO problem with serving static files like /sample_static_file.txt  or xhtml
>>>> files served by Faces Servlet, like /jsf/sample_xhtml_file.xhtml
>>>> 
>>>> And the problem only exists on Linux or Mac OS X with Java 1.8 and TomEE
>>>> 7.0.0-M3.   The following cases work fine:
>>>> 
>>>> Windows    Java 1.8 and TomEE 7.0.0-M3
>>>> Mac OS X  Java 1.7  and TomEE 7.0.0-M3
>>>> Mac OS X  Java 1.8  and TomEE 1.7.x
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On Apr 5, 2016, at 1:59 AM, Romain Manni-Bucau <rm...@gmail.com>
>>>> wrote:
>>>> 
>>>> Isnt it due to new ciphers? I know tomee 1 uses an older - pre cipher
>>>> enforcement - AMQ than tomee 7 cause of java version constraints. Maybe
>>>> testing both can validate it.
>>>> Le 5 avr. 2016 04:10, "Ihsan Ecemis" <mi...@gmail.com> a écrit :
>>>> 
>>>> 
>>>> Also, I just tried it under Java 1.7.0_71 on Mac OS X and it worked fine!
>>>> 
>>>> So far, I could observe the problem under Mac OS X 1.8.0_73,  Mac OS X
>>>> 1.8.0_77, and Linux  1.8.0_71.
>>>> 
>>>> 
>>>> On Apr 4, 2016, at 5:02 PM, Ihsan Ecemis <mi...@gmail.com> wrote:
>>>> 
>>>> 
>>>> I didn’t have time to investigate your suggestion but tested it under
>>>> 
>>>> Windows and confirmed that everything works fine.  Will dig more when I
>>>> have some time.
>>>> 
>>>> 
>>>> 
>>>> On Apr 3, 2016, at 7:23 AM, Romain Manni-Bucau <rm...@gmail.com>
>>>> 
>>>> wrote:
>>>> 
>>>> 
>>>> SSL config is at connector level so nothing particular under the
>>>> webapp. Client side behavior doesn't help - at least I'm not sure how
>>>> to check it at the moment - but on server side you can check if there
>>>> is any SSLContext#init setup which is unexpected or has some side
>>>> effects (a debug point there with mvn tomee:debug should do it).
>>>> 
>>>> Romain Manni-Bucau
>>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>>> 
>>>> 
>>>> 2016-04-03 13:19 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>> 
>>>> 
>>>> Is SSL config different for JSF resources than static files under
>>>> 
>>>> Tomcat?  Note that I can fetch static files without any problem,  I have
>>>> the problem only with JSF resources!  (I didn’t add static files to the
>>>> sample project to show this but my application have them)
>>>> 
>>>> 
>>>> If you’d like I can setup an EC2 server for you to try this.    Would
>>>> 
>>>> you have a few minutes to login and see it for yourself?
>>>> 
>>>> 
>>>> 
>>>> On Apr 3, 2016, at 7:07 AM, Romain Manni-Bucau <rm...@gmail.com>
>>>> 
>>>> wrote:
>>>> 
>>>> 
>>>> tried on windows so wonder if it can be linked to gnu tools.
>>>> 
>>>> If you get such an issue the only thing I can think about is AMQ
>>>> changing the SSL config of the JVM which would then make the SSL
>>>> config of tomcat changing if relying on the JVM settings for any of
>>>> them.
>>>> 
>>>> Can also be a local firewall etc even if weird for a UNIx box - saw
>>>> several company windows boxes to fail even on localhost cause of
>>>> McAfee or equivalent.
>>>> 
>>>> 
>>>> Romain Manni-Bucau
>>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>>> 
>>>> 
>>>> 2016-04-03 13:04 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>> 
>>>> 
>>>> That makes this even more interesting.  I can consistently reproduce
>>>> 
>>>> this on:
>>>> 
>>>> 
>>>> Mac OS X 10.11.4,  Java 1.8.0_73-b02
>>>> Linux 4.1.10-17.31.amzn1.x86_64,  Java 1.8.0_71-b15
>>>> 
>>>> Thank you for trying to reproduce.  I would appreciate if you could
>>>> 
>>>> give me any ideas/tips about how to proceed in terms of
>>>> debugging/experimenting.
>>>> 
>>>> 
>>>> 
>>>> On Apr 3, 2016, at 4:26 AM, Romain Manni-Bucau <
>>>> 
>>>> rmannibucau@gmail.com> wrote:
>>>> 
>>>> 
>>>> Hi
>>>> 
>>>> Didn't reproduce it with your sample. Ran on java8, not sure it is
>>>> 
>>>> linked
>>>> 
>>>> 
>>>> Romain Manni-Bucau
>>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>>> 
>>>> 
>>>> 2016-04-02 13:27 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>> 
>>>> 
>>>> Hello,
>>>> 
>>>> I was having some weird problems with my JSF pages lately, and
>>>> 
>>>> after some brute-force experimentation, I realized that TomEE has problems
>>>> with serving JSF resources over SSL if I start an embedded ActiveMQ
>>>> broker.  I found this awkward as I wouldn’t expect these 2 things to
>>>> interfere with each other.
>>>> 
>>>> 
>>>> I created a barebones project to show the problem:
>>>> 
>>>> https://github.com/ecemis/activemq-jsf-troubleshoot <
>>>> https://github.com/ecemis/activemq-jsf-troubleshoot>
>>>> 
>>>> 
>>>> The project has 2 scripts at top level:
>>>> 
>>>> run_server.sh:  That’s how I start the server
>>>> test_command.sh:  That’s the test script that fetches a JSF
>>>> 
>>>> resource via curl. I ran this on a separate terminal
>>>> 
>>>> 
>>>> And there are 3 tags you can checkout to test 3 cases:
>>>> 
>>>> case-1-working:  This case doesn’t have ActiveMQ and
>>>> 
>>>> test_command.sh can successfully fetch a JSF resource
>>>> 
>>>> case-2-not-working:  This case adds resources.xml file that starts
>>>> 
>>>> an embedded ActiveMQ broker. As a result, test_command.sh fails to fetch
>>>> the JSF resource
>>>> 
>>>> case-3-working:  This one changes the service from https to http,
>>>> 
>>>> and  test_command.sh works again (while ActiveMQ broker is running)
>>>> 
>>>> 
>>>> (You can checkout and try each case separately, e.g. git checkout
>>>> 
>>>> case-2-not-working. You can also compare the changes between the cases via
>>>> git diff, e.g. git diff case-1-working case-2-not-working)
>>>> 
>>>> 
>>>> Note that fetching static files works in all cases. The problem I
>>>> 
>>>> could observe so far is just with fetching JSF resources.
>>>> 
>>>> 
>>>> All help will be greatly appreciated.
>>>> 
>>>> Thanks,
>>>> 
>>>> Ihsan.
>>>> 
>>>> 
>>>> PS: For the impatient who wants to know the errors before cloning
>>>> 
>>>> the sample project above, here is what curl gives me:
>>>> 
>>>> 
>>>> * SSLRead() return error -9845
>>>> * Closing connection 0
>>>> curl: (56) SSLRead() return error -9845
>>>> 
>>>> 
>>>> And here is what I get on the server:
>>>> 
>>>> WARNING - JSF1064: Unable to find or serve resource,
>>>> 
>>>> primefaces.js, from library, primefaces.
>>>> 
>>>> WARNING -
>>>> org.apache.catalina.connector.ClientAbortException:
>>>> 
>>>> java.io.IOException: Broken pipe
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
>>>> 
>>>>  at
>>>> 
>>>> java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
>>>> 
>>>>  at
>>>> 
>>>> com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:358)
>>>> 
>>>>  at
>>>> 
>>>> javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>>> 
>>>>  at
>>>> 
>>>> org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87)
>>>> 
>>>>  at
>>>> 
>>>> javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>>> 
>>>>  at
>>>> 
>>>> javax.faces.webapp.FacesServlet.service(FacesServlet.java:655)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.openejb.server.httpd.WebBeansFilter.doFilter(WebBeansFilter.java:52)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
>>>> 
>>>>  at
>>>> 
>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>>> 
>>>>  at
>>>> 
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>>>> 
>>>>  at java.lang.Thread.run(Thread.java:745)
>>>> Caused by: java.io.IOException: Broken pipe
>>>>  at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
>>>>  at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
>>>>  at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
>>>>  at sun.nio.ch.IOUtil.write(IOUtil.java:51)
>>>>  at
>>>> 
>>>> sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.tomcat.util.net.SecureNioChannel.flush(SecureNioChannel.java:140)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.tomcat.util.net.SecureNioChannel.write(SecureNioChannel.java:521)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:121)
>>>> 
>>>>  at
>>>> 
>>>> org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
>>>> 
>>>>  at org.apache.coyote.Response.doWrite(Response.java:501)
>>>>  at
>>>> 
>>>> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
>>>> 
>>>>  ... 37 more
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>> 


Re: Problem fetching JSF resources over SSL when ActiveMQ broker is running

Posted by Romain Manni-Bucau <rm...@gmail.com>.
2016-04-07 20:51 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>
> You mean you confirmed that this works on Tomcat 8.5.0  (vs Tomcat 8.0.32)?

And got the issue with tomee 7M3 too yes.

>
> Actually, I spoke too soon when I claimed that I made my app work when I moved the resource definition from resources.xml to tomee.xml.  It didn’t make a difference (I put tomee.xml in a wrong location, and that didn’t start ActiveMQ broker so I didn’t observe the problem cause the problem requires ActiveMQ broker running).
>
> If Tomcat 8.5.0 is fine, then I can wait until 7.0.0-M4 or 7.0.0
>
>
>> On Apr 6, 2016, at 5:08 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
>>
>> Hi
>>
>> I'm tempted to think it was a bug in tomcat backbone since it seems ok
>> on tomee snapshot which upgraded tomcat version.
>>
>> Romain Manni-Bucau
>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>
>>
>> 2016-04-06 0:13 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>
>>> I tested a few other cases, and found that everything works fine with TomEE
>>> 1.7.x  (I tested 1.7.1 and 1.7.4).
>>>
>>> And then I made it work with TomEE 7.0.0-M3 by moving ActiveMQ resource
>>> definition from resources.xml file to tomee.xml file!   Both files are
>>> attached.
>>>
>>> The file contents are the same, why do we have this problem when ActiveMQ
>>> resource is defined under resources.xml?
>>>
>>> Again, the problem is with serving JSF resources like
>>> /jsf/javax.faces.resource/primefaces.js?ln=primefaces&v=5.3 — and there is
>>> NO problem with serving static files like /sample_static_file.txt  or xhtml
>>> files served by Faces Servlet, like /jsf/sample_xhtml_file.xhtml
>>>
>>> And the problem only exists on Linux or Mac OS X with Java 1.8 and TomEE
>>> 7.0.0-M3.   The following cases work fine:
>>>
>>> Windows    Java 1.8 and TomEE 7.0.0-M3
>>> Mac OS X  Java 1.7  and TomEE 7.0.0-M3
>>> Mac OS X  Java 1.8  and TomEE 1.7.x
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Apr 5, 2016, at 1:59 AM, Romain Manni-Bucau <rm...@gmail.com>
>>> wrote:
>>>
>>> Isnt it due to new ciphers? I know tomee 1 uses an older - pre cipher
>>> enforcement - AMQ than tomee 7 cause of java version constraints. Maybe
>>> testing both can validate it.
>>> Le 5 avr. 2016 04:10, "Ihsan Ecemis" <mi...@gmail.com> a écrit :
>>>
>>>
>>> Also, I just tried it under Java 1.7.0_71 on Mac OS X and it worked fine!
>>>
>>> So far, I could observe the problem under Mac OS X 1.8.0_73,  Mac OS X
>>> 1.8.0_77, and Linux  1.8.0_71.
>>>
>>>
>>> On Apr 4, 2016, at 5:02 PM, Ihsan Ecemis <mi...@gmail.com> wrote:
>>>
>>>
>>> I didn’t have time to investigate your suggestion but tested it under
>>>
>>> Windows and confirmed that everything works fine.  Will dig more when I
>>> have some time.
>>>
>>>
>>>
>>> On Apr 3, 2016, at 7:23 AM, Romain Manni-Bucau <rm...@gmail.com>
>>>
>>> wrote:
>>>
>>>
>>> SSL config is at connector level so nothing particular under the
>>> webapp. Client side behavior doesn't help - at least I'm not sure how
>>> to check it at the moment - but on server side you can check if there
>>> is any SSLContext#init setup which is unexpected or has some side
>>> effects (a debug point there with mvn tomee:debug should do it).
>>>
>>> Romain Manni-Bucau
>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>>
>>>
>>> 2016-04-03 13:19 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>
>>>
>>> Is SSL config different for JSF resources than static files under
>>>
>>> Tomcat?  Note that I can fetch static files without any problem,  I have
>>> the problem only with JSF resources!  (I didn’t add static files to the
>>> sample project to show this but my application have them)
>>>
>>>
>>> If you’d like I can setup an EC2 server for you to try this.    Would
>>>
>>> you have a few minutes to login and see it for yourself?
>>>
>>>
>>>
>>> On Apr 3, 2016, at 7:07 AM, Romain Manni-Bucau <rm...@gmail.com>
>>>
>>> wrote:
>>>
>>>
>>> tried on windows so wonder if it can be linked to gnu tools.
>>>
>>> If you get such an issue the only thing I can think about is AMQ
>>> changing the SSL config of the JVM which would then make the SSL
>>> config of tomcat changing if relying on the JVM settings for any of
>>> them.
>>>
>>> Can also be a local firewall etc even if weird for a UNIx box - saw
>>> several company windows boxes to fail even on localhost cause of
>>> McAfee or equivalent.
>>>
>>>
>>> Romain Manni-Bucau
>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>>
>>>
>>> 2016-04-03 13:04 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>
>>>
>>> That makes this even more interesting.  I can consistently reproduce
>>>
>>> this on:
>>>
>>>
>>> Mac OS X 10.11.4,  Java 1.8.0_73-b02
>>> Linux 4.1.10-17.31.amzn1.x86_64,  Java 1.8.0_71-b15
>>>
>>> Thank you for trying to reproduce.  I would appreciate if you could
>>>
>>> give me any ideas/tips about how to proceed in terms of
>>> debugging/experimenting.
>>>
>>>
>>>
>>> On Apr 3, 2016, at 4:26 AM, Romain Manni-Bucau <
>>>
>>> rmannibucau@gmail.com> wrote:
>>>
>>>
>>> Hi
>>>
>>> Didn't reproduce it with your sample. Ran on java8, not sure it is
>>>
>>> linked
>>>
>>>
>>> Romain Manni-Bucau
>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>>
>>>
>>> 2016-04-02 13:27 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>
>>>
>>> Hello,
>>>
>>> I was having some weird problems with my JSF pages lately, and
>>>
>>> after some brute-force experimentation, I realized that TomEE has problems
>>> with serving JSF resources over SSL if I start an embedded ActiveMQ
>>> broker.  I found this awkward as I wouldn’t expect these 2 things to
>>> interfere with each other.
>>>
>>>
>>> I created a barebones project to show the problem:
>>>
>>> https://github.com/ecemis/activemq-jsf-troubleshoot <
>>> https://github.com/ecemis/activemq-jsf-troubleshoot>
>>>
>>>
>>> The project has 2 scripts at top level:
>>>
>>> run_server.sh:  That’s how I start the server
>>> test_command.sh:  That’s the test script that fetches a JSF
>>>
>>> resource via curl. I ran this on a separate terminal
>>>
>>>
>>> And there are 3 tags you can checkout to test 3 cases:
>>>
>>> case-1-working:  This case doesn’t have ActiveMQ and
>>>
>>> test_command.sh can successfully fetch a JSF resource
>>>
>>> case-2-not-working:  This case adds resources.xml file that starts
>>>
>>> an embedded ActiveMQ broker. As a result, test_command.sh fails to fetch
>>> the JSF resource
>>>
>>> case-3-working:  This one changes the service from https to http,
>>>
>>> and  test_command.sh works again (while ActiveMQ broker is running)
>>>
>>>
>>> (You can checkout and try each case separately, e.g. git checkout
>>>
>>> case-2-not-working. You can also compare the changes between the cases via
>>> git diff, e.g. git diff case-1-working case-2-not-working)
>>>
>>>
>>> Note that fetching static files works in all cases. The problem I
>>>
>>> could observe so far is just with fetching JSF resources.
>>>
>>>
>>> All help will be greatly appreciated.
>>>
>>> Thanks,
>>>
>>> Ihsan.
>>>
>>>
>>> PS: For the impatient who wants to know the errors before cloning
>>>
>>> the sample project above, here is what curl gives me:
>>>
>>>
>>> * SSLRead() return error -9845
>>> * Closing connection 0
>>> curl: (56) SSLRead() return error -9845
>>>
>>>
>>> And here is what I get on the server:
>>>
>>> WARNING - JSF1064: Unable to find or serve resource,
>>>
>>> primefaces.js, from library, primefaces.
>>>
>>> WARNING -
>>> org.apache.catalina.connector.ClientAbortException:
>>>
>>> java.io.IOException: Broken pipe
>>>
>>>   at
>>>
>>> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
>>>
>>>   at
>>>
>>> org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
>>>
>>>   at
>>>
>>> org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
>>>
>>>   at
>>>
>>> org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
>>>
>>>   at
>>>
>>> org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
>>>
>>>   at
>>>
>>> org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
>>>
>>>   at
>>>
>>> java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
>>>
>>>   at
>>>
>>> com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:358)
>>>
>>>   at
>>>
>>> javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>>
>>>   at
>>>
>>> org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87)
>>>
>>>   at
>>>
>>> javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>>
>>>   at
>>>
>>> javax.faces.webapp.FacesServlet.service(FacesServlet.java:655)
>>>
>>>   at
>>>
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
>>>
>>>   at
>>>
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>
>>>   at
>>>
>>> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>>
>>>   at
>>>
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>>
>>>   at
>>>
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>
>>>   at
>>>
>>> org.apache.openejb.server.httpd.WebBeansFilter.doFilter(WebBeansFilter.java:52)
>>>
>>>   at
>>>
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>>
>>>   at
>>>
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>
>>>   at
>>>
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
>>>
>>>   at
>>>
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
>>>
>>>   at
>>>
>>> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>>>
>>>   at
>>>
>>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
>>>
>>>   at
>>>
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>>
>>>   at
>>>
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
>>>
>>>   at
>>>
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>>
>>>   at
>>>
>>> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
>>>
>>>   at
>>>
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
>>>
>>>   at
>>>
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
>>>
>>>   at
>>>
>>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
>>>
>>>   at
>>>
>>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
>>>
>>>   at
>>>
>>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
>>>
>>>   at
>>>
>>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
>>>
>>>   at
>>>
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>>
>>>   at
>>>
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>>
>>>   at
>>>
>>> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>>>
>>>   at java.lang.Thread.run(Thread.java:745)
>>> Caused by: java.io.IOException: Broken pipe
>>>   at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
>>>   at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
>>>   at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
>>>   at sun.nio.ch.IOUtil.write(IOUtil.java:51)
>>>   at
>>>
>>> sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
>>>
>>>   at
>>>
>>> org.apache.tomcat.util.net.SecureNioChannel.flush(SecureNioChannel.java:140)
>>>
>>>   at
>>>
>>> org.apache.tomcat.util.net.SecureNioChannel.write(SecureNioChannel.java:521)
>>>
>>>   at
>>>
>>> org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
>>>
>>>   at
>>>
>>> org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
>>>
>>>   at
>>>
>>> org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
>>>
>>>   at
>>>
>>> org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
>>>
>>>   at
>>>
>>> org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
>>>
>>>   at
>>>
>>> org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
>>>
>>>   at
>>>
>>> org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:121)
>>>
>>>   at
>>>
>>> org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
>>>
>>>   at org.apache.coyote.Response.doWrite(Response.java:501)
>>>   at
>>>
>>> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
>>>
>>>   ... 37 more
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>

Re: Problem fetching JSF resources over SSL when ActiveMQ broker is running

Posted by Ihsan Ecemis <mi...@gmail.com>.
You mean you confirmed that this works on Tomcat 8.5.0  (vs Tomcat 8.0.32)? 

Actually, I spoke too soon when I claimed that I made my app work when I moved the resource definition from resources.xml to tomee.xml.  It didn’t make a difference (I put tomee.xml in a wrong location, and that didn’t start ActiveMQ broker so I didn’t observe the problem cause the problem requires ActiveMQ broker running).

If Tomcat 8.5.0 is fine, then I can wait until 7.0.0-M4 or 7.0.0


> On Apr 6, 2016, at 5:08 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
> 
> Hi
> 
> I'm tempted to think it was a bug in tomcat backbone since it seems ok
> on tomee snapshot which upgraded tomcat version.
> 
> Romain Manni-Bucau
> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> 
> 
> 2016-04-06 0:13 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>> 
>> I tested a few other cases, and found that everything works fine with TomEE
>> 1.7.x  (I tested 1.7.1 and 1.7.4).
>> 
>> And then I made it work with TomEE 7.0.0-M3 by moving ActiveMQ resource
>> definition from resources.xml file to tomee.xml file!   Both files are
>> attached.
>> 
>> The file contents are the same, why do we have this problem when ActiveMQ
>> resource is defined under resources.xml?
>> 
>> Again, the problem is with serving JSF resources like
>> /jsf/javax.faces.resource/primefaces.js?ln=primefaces&v=5.3 — and there is
>> NO problem with serving static files like /sample_static_file.txt  or xhtml
>> files served by Faces Servlet, like /jsf/sample_xhtml_file.xhtml
>> 
>> And the problem only exists on Linux or Mac OS X with Java 1.8 and TomEE
>> 7.0.0-M3.   The following cases work fine:
>> 
>> Windows    Java 1.8 and TomEE 7.0.0-M3
>> Mac OS X  Java 1.7  and TomEE 7.0.0-M3
>> Mac OS X  Java 1.8  and TomEE 1.7.x
>> 
>> 
>> 
>> 
>> 
>> 
>> On Apr 5, 2016, at 1:59 AM, Romain Manni-Bucau <rm...@gmail.com>
>> wrote:
>> 
>> Isnt it due to new ciphers? I know tomee 1 uses an older - pre cipher
>> enforcement - AMQ than tomee 7 cause of java version constraints. Maybe
>> testing both can validate it.
>> Le 5 avr. 2016 04:10, "Ihsan Ecemis" <mi...@gmail.com> a écrit :
>> 
>> 
>> Also, I just tried it under Java 1.7.0_71 on Mac OS X and it worked fine!
>> 
>> So far, I could observe the problem under Mac OS X 1.8.0_73,  Mac OS X
>> 1.8.0_77, and Linux  1.8.0_71.
>> 
>> 
>> On Apr 4, 2016, at 5:02 PM, Ihsan Ecemis <mi...@gmail.com> wrote:
>> 
>> 
>> I didn’t have time to investigate your suggestion but tested it under
>> 
>> Windows and confirmed that everything works fine.  Will dig more when I
>> have some time.
>> 
>> 
>> 
>> On Apr 3, 2016, at 7:23 AM, Romain Manni-Bucau <rm...@gmail.com>
>> 
>> wrote:
>> 
>> 
>> SSL config is at connector level so nothing particular under the
>> webapp. Client side behavior doesn't help - at least I'm not sure how
>> to check it at the moment - but on server side you can check if there
>> is any SSLContext#init setup which is unexpected or has some side
>> effects (a debug point there with mvn tomee:debug should do it).
>> 
>> Romain Manni-Bucau
>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>> 
>> 
>> 2016-04-03 13:19 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>> 
>> 
>> Is SSL config different for JSF resources than static files under
>> 
>> Tomcat?  Note that I can fetch static files without any problem,  I have
>> the problem only with JSF resources!  (I didn’t add static files to the
>> sample project to show this but my application have them)
>> 
>> 
>> If you’d like I can setup an EC2 server for you to try this.    Would
>> 
>> you have a few minutes to login and see it for yourself?
>> 
>> 
>> 
>> On Apr 3, 2016, at 7:07 AM, Romain Manni-Bucau <rm...@gmail.com>
>> 
>> wrote:
>> 
>> 
>> tried on windows so wonder if it can be linked to gnu tools.
>> 
>> If you get such an issue the only thing I can think about is AMQ
>> changing the SSL config of the JVM which would then make the SSL
>> config of tomcat changing if relying on the JVM settings for any of
>> them.
>> 
>> Can also be a local firewall etc even if weird for a UNIx box - saw
>> several company windows boxes to fail even on localhost cause of
>> McAfee or equivalent.
>> 
>> 
>> Romain Manni-Bucau
>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>> 
>> 
>> 2016-04-03 13:04 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>> 
>> 
>> That makes this even more interesting.  I can consistently reproduce
>> 
>> this on:
>> 
>> 
>> Mac OS X 10.11.4,  Java 1.8.0_73-b02
>> Linux 4.1.10-17.31.amzn1.x86_64,  Java 1.8.0_71-b15
>> 
>> Thank you for trying to reproduce.  I would appreciate if you could
>> 
>> give me any ideas/tips about how to proceed in terms of
>> debugging/experimenting.
>> 
>> 
>> 
>> On Apr 3, 2016, at 4:26 AM, Romain Manni-Bucau <
>> 
>> rmannibucau@gmail.com> wrote:
>> 
>> 
>> Hi
>> 
>> Didn't reproduce it with your sample. Ran on java8, not sure it is
>> 
>> linked
>> 
>> 
>> Romain Manni-Bucau
>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>> 
>> 
>> 2016-04-02 13:27 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>> 
>> 
>> Hello,
>> 
>> I was having some weird problems with my JSF pages lately, and
>> 
>> after some brute-force experimentation, I realized that TomEE has problems
>> with serving JSF resources over SSL if I start an embedded ActiveMQ
>> broker.  I found this awkward as I wouldn’t expect these 2 things to
>> interfere with each other.
>> 
>> 
>> I created a barebones project to show the problem:
>> 
>> https://github.com/ecemis/activemq-jsf-troubleshoot <
>> https://github.com/ecemis/activemq-jsf-troubleshoot>
>> 
>> 
>> The project has 2 scripts at top level:
>> 
>> run_server.sh:  That’s how I start the server
>> test_command.sh:  That’s the test script that fetches a JSF
>> 
>> resource via curl. I ran this on a separate terminal
>> 
>> 
>> And there are 3 tags you can checkout to test 3 cases:
>> 
>> case-1-working:  This case doesn’t have ActiveMQ and
>> 
>> test_command.sh can successfully fetch a JSF resource
>> 
>> case-2-not-working:  This case adds resources.xml file that starts
>> 
>> an embedded ActiveMQ broker. As a result, test_command.sh fails to fetch
>> the JSF resource
>> 
>> case-3-working:  This one changes the service from https to http,
>> 
>> and  test_command.sh works again (while ActiveMQ broker is running)
>> 
>> 
>> (You can checkout and try each case separately, e.g. git checkout
>> 
>> case-2-not-working. You can also compare the changes between the cases via
>> git diff, e.g. git diff case-1-working case-2-not-working)
>> 
>> 
>> Note that fetching static files works in all cases. The problem I
>> 
>> could observe so far is just with fetching JSF resources.
>> 
>> 
>> All help will be greatly appreciated.
>> 
>> Thanks,
>> 
>> Ihsan.
>> 
>> 
>> PS: For the impatient who wants to know the errors before cloning
>> 
>> the sample project above, here is what curl gives me:
>> 
>> 
>> * SSLRead() return error -9845
>> * Closing connection 0
>> curl: (56) SSLRead() return error -9845
>> 
>> 
>> And here is what I get on the server:
>> 
>> WARNING - JSF1064: Unable to find or serve resource,
>> 
>> primefaces.js, from library, primefaces.
>> 
>> WARNING -
>> org.apache.catalina.connector.ClientAbortException:
>> 
>> java.io.IOException: Broken pipe
>> 
>>   at
>> 
>> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
>> 
>>   at
>> 
>> org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
>> 
>>   at
>> 
>> org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
>> 
>>   at
>> 
>> org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
>> 
>>   at
>> 
>> org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
>> 
>>   at
>> 
>> org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
>> 
>>   at
>> 
>> java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
>> 
>>   at
>> 
>> com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:358)
>> 
>>   at
>> 
>> javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>> 
>>   at
>> 
>> org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87)
>> 
>>   at
>> 
>> javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>> 
>>   at
>> 
>> javax.faces.webapp.FacesServlet.service(FacesServlet.java:655)
>> 
>>   at
>> 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
>> 
>>   at
>> 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>> 
>>   at
>> 
>> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>> 
>>   at
>> 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>> 
>>   at
>> 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>> 
>>   at
>> 
>> org.apache.openejb.server.httpd.WebBeansFilter.doFilter(WebBeansFilter.java:52)
>> 
>>   at
>> 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>> 
>>   at
>> 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>> 
>>   at
>> 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
>> 
>>   at
>> 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
>> 
>>   at
>> 
>> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>> 
>>   at
>> 
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
>> 
>>   at
>> 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>> 
>>   at
>> 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
>> 
>>   at
>> 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>> 
>>   at
>> 
>> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
>> 
>>   at
>> 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
>> 
>>   at
>> 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
>> 
>>   at
>> 
>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
>> 
>>   at
>> 
>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
>> 
>>   at
>> 
>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
>> 
>>   at
>> 
>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
>> 
>>   at
>> 
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>> 
>>   at
>> 
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>> 
>>   at
>> 
>> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>> 
>>   at java.lang.Thread.run(Thread.java:745)
>> Caused by: java.io.IOException: Broken pipe
>>   at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
>>   at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
>>   at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
>>   at sun.nio.ch.IOUtil.write(IOUtil.java:51)
>>   at
>> 
>> sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
>> 
>>   at
>> 
>> org.apache.tomcat.util.net.SecureNioChannel.flush(SecureNioChannel.java:140)
>> 
>>   at
>> 
>> org.apache.tomcat.util.net.SecureNioChannel.write(SecureNioChannel.java:521)
>> 
>>   at
>> 
>> org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
>> 
>>   at
>> 
>> org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
>> 
>>   at
>> 
>> org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
>> 
>>   at
>> 
>> org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
>> 
>>   at
>> 
>> org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
>> 
>>   at
>> 
>> org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
>> 
>>   at
>> 
>> org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:121)
>> 
>>   at
>> 
>> org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
>> 
>>   at org.apache.coyote.Response.doWrite(Response.java:501)
>>   at
>> 
>> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
>> 
>>   ... 37 more
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 


Re: Problem fetching JSF resources over SSL when ActiveMQ broker is running

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

I'm tempted to think it was a bug in tomcat backbone since it seems ok
on tomee snapshot which upgraded tomcat version.

Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2016-04-06 0:13 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>
> I tested a few other cases, and found that everything works fine with TomEE
> 1.7.x  (I tested 1.7.1 and 1.7.4).
>
> And then I made it work with TomEE 7.0.0-M3 by moving ActiveMQ resource
> definition from resources.xml file to tomee.xml file!   Both files are
> attached.
>
> The file contents are the same, why do we have this problem when ActiveMQ
> resource is defined under resources.xml?
>
> Again, the problem is with serving JSF resources like
> /jsf/javax.faces.resource/primefaces.js?ln=primefaces&v=5.3 — and there is
> NO problem with serving static files like /sample_static_file.txt  or xhtml
> files served by Faces Servlet, like /jsf/sample_xhtml_file.xhtml
>
> And the problem only exists on Linux or Mac OS X with Java 1.8 and TomEE
> 7.0.0-M3.   The following cases work fine:
>
> Windows    Java 1.8 and TomEE 7.0.0-M3
> Mac OS X  Java 1.7  and TomEE 7.0.0-M3
> Mac OS X  Java 1.8  and TomEE 1.7.x
>
>
>
>
>
>
> On Apr 5, 2016, at 1:59 AM, Romain Manni-Bucau <rm...@gmail.com>
> wrote:
>
> Isnt it due to new ciphers? I know tomee 1 uses an older - pre cipher
> enforcement - AMQ than tomee 7 cause of java version constraints. Maybe
> testing both can validate it.
> Le 5 avr. 2016 04:10, "Ihsan Ecemis" <mi...@gmail.com> a écrit :
>
>
> Also, I just tried it under Java 1.7.0_71 on Mac OS X and it worked fine!
>
> So far, I could observe the problem under Mac OS X 1.8.0_73,  Mac OS X
> 1.8.0_77, and Linux  1.8.0_71.
>
>
> On Apr 4, 2016, at 5:02 PM, Ihsan Ecemis <mi...@gmail.com> wrote:
>
>
> I didn’t have time to investigate your suggestion but tested it under
>
> Windows and confirmed that everything works fine.  Will dig more when I
> have some time.
>
>
>
> On Apr 3, 2016, at 7:23 AM, Romain Manni-Bucau <rm...@gmail.com>
>
> wrote:
>
>
> SSL config is at connector level so nothing particular under the
> webapp. Client side behavior doesn't help - at least I'm not sure how
> to check it at the moment - but on server side you can check if there
> is any SSLContext#init setup which is unexpected or has some side
> effects (a debug point there with mvn tomee:debug should do it).
>
> Romain Manni-Bucau
> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>
>
> 2016-04-03 13:19 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>
>
> Is SSL config different for JSF resources than static files under
>
> Tomcat?  Note that I can fetch static files without any problem,  I have
> the problem only with JSF resources!  (I didn’t add static files to the
> sample project to show this but my application have them)
>
>
> If you’d like I can setup an EC2 server for you to try this.    Would
>
> you have a few minutes to login and see it for yourself?
>
>
>
> On Apr 3, 2016, at 7:07 AM, Romain Manni-Bucau <rm...@gmail.com>
>
> wrote:
>
>
> tried on windows so wonder if it can be linked to gnu tools.
>
> If you get such an issue the only thing I can think about is AMQ
> changing the SSL config of the JVM which would then make the SSL
> config of tomcat changing if relying on the JVM settings for any of
> them.
>
> Can also be a local firewall etc even if weird for a UNIx box - saw
> several company windows boxes to fail even on localhost cause of
> McAfee or equivalent.
>
>
> Romain Manni-Bucau
> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>
>
> 2016-04-03 13:04 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>
>
> That makes this even more interesting.  I can consistently reproduce
>
> this on:
>
>
> Mac OS X 10.11.4,  Java 1.8.0_73-b02
> Linux 4.1.10-17.31.amzn1.x86_64,  Java 1.8.0_71-b15
>
> Thank you for trying to reproduce.  I would appreciate if you could
>
> give me any ideas/tips about how to proceed in terms of
> debugging/experimenting.
>
>
>
> On Apr 3, 2016, at 4:26 AM, Romain Manni-Bucau <
>
> rmannibucau@gmail.com> wrote:
>
>
> Hi
>
> Didn't reproduce it with your sample. Ran on java8, not sure it is
>
> linked
>
>
> Romain Manni-Bucau
> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>
>
> 2016-04-02 13:27 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>
>
> Hello,
>
> I was having some weird problems with my JSF pages lately, and
>
> after some brute-force experimentation, I realized that TomEE has problems
> with serving JSF resources over SSL if I start an embedded ActiveMQ
> broker.  I found this awkward as I wouldn’t expect these 2 things to
> interfere with each other.
>
>
> I created a barebones project to show the problem:
>
> https://github.com/ecemis/activemq-jsf-troubleshoot <
> https://github.com/ecemis/activemq-jsf-troubleshoot>
>
>
> The project has 2 scripts at top level:
>
> run_server.sh:  That’s how I start the server
> test_command.sh:  That’s the test script that fetches a JSF
>
> resource via curl. I ran this on a separate terminal
>
>
> And there are 3 tags you can checkout to test 3 cases:
>
> case-1-working:  This case doesn’t have ActiveMQ and
>
> test_command.sh can successfully fetch a JSF resource
>
> case-2-not-working:  This case adds resources.xml file that starts
>
> an embedded ActiveMQ broker. As a result, test_command.sh fails to fetch
> the JSF resource
>
> case-3-working:  This one changes the service from https to http,
>
> and  test_command.sh works again (while ActiveMQ broker is running)
>
>
> (You can checkout and try each case separately, e.g. git checkout
>
> case-2-not-working. You can also compare the changes between the cases via
> git diff, e.g. git diff case-1-working case-2-not-working)
>
>
> Note that fetching static files works in all cases. The problem I
>
> could observe so far is just with fetching JSF resources.
>
>
> All help will be greatly appreciated.
>
> Thanks,
>
> Ihsan.
>
>
> PS: For the impatient who wants to know the errors before cloning
>
> the sample project above, here is what curl gives me:
>
>
> * SSLRead() return error -9845
> * Closing connection 0
> curl: (56) SSLRead() return error -9845
>
>
> And here is what I get on the server:
>
> WARNING - JSF1064: Unable to find or serve resource,
>
> primefaces.js, from library, primefaces.
>
> WARNING -
> org.apache.catalina.connector.ClientAbortException:
>
> java.io.IOException: Broken pipe
>
>    at
>
> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
>
>    at
>
> org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
>
>    at
>
> org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
>
>    at
>
> org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
>
>    at
>
> org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
>
>    at
>
> org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
>
>    at
>
> java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
>
>    at
>
> com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:358)
>
>    at
>
> javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>
>    at
>
> org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87)
>
>    at
>
> javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>
>    at
>
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:655)
>
>    at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
>
>    at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>
>    at
>
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>
>    at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>
>    at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>
>    at
>
> org.apache.openejb.server.httpd.WebBeansFilter.doFilter(WebBeansFilter.java:52)
>
>    at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>
>    at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>
>    at
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
>
>    at
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
>
>    at
>
> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>
>    at
>
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
>
>    at
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>
>    at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
>
>    at
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>
>    at
>
> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
>
>    at
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
>
>    at
>
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
>
>    at
>
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
>
>    at
>
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
>
>    at
>
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
>
>    at
>
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
>
>    at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>
>    at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>
>    at
>
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>
>    at java.lang.Thread.run(Thread.java:745)
> Caused by: java.io.IOException: Broken pipe
>    at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
>    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
>    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
>    at sun.nio.ch.IOUtil.write(IOUtil.java:51)
>    at
>
> sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
>
>    at
>
> org.apache.tomcat.util.net.SecureNioChannel.flush(SecureNioChannel.java:140)
>
>    at
>
> org.apache.tomcat.util.net.SecureNioChannel.write(SecureNioChannel.java:521)
>
>    at
>
> org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
>
>    at
>
> org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
>
>    at
>
> org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
>
>    at
>
> org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
>
>    at
>
> org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
>
>    at
>
> org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
>
>    at
>
> org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:121)
>
>    at
>
> org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
>
>    at org.apache.coyote.Response.doWrite(Response.java:501)
>    at
>
> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
>
>    ... 37 more
>
>
>
>
>
>
>
>
>

Re: Problem fetching JSF resources over SSL when ActiveMQ broker is running

Posted by Ihsan Ecemis <mi...@gmail.com>.
I tested a few other cases, and found that everything works fine with TomEE 1.7.x  (I tested 1.7.1 and 1.7.4).

And then I made it work with TomEE 7.0.0-M3 by moving ActiveMQ resource definition from resources.xml file to tomee.xml file!   Both files are attached.

The file contents are the same, why do we have this problem when ActiveMQ resource is defined under resources.xml?  

Again, the problem is with serving JSF resources like /jsf/javax.faces.resource/primefaces.js?ln=primefaces&v=5.3 — and there is NO problem with serving static files like /sample_static_file.txt  or xhtml files served by Faces Servlet, like /jsf/sample_xhtml_file.xhtml

And the problem only exists on Linux or Mac OS X with Java 1.8 and TomEE 7.0.0-M3.   The following cases work fine:

Windows    Java 1.8 and TomEE 7.0.0-M3
Mac OS X  Java 1.7  and TomEE 7.0.0-M3
Mac OS X  Java 1.8  and TomEE 1.7.x



> On Apr 5, 2016, at 1:59 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
> 
> Isnt it due to new ciphers? I know tomee 1 uses an older - pre cipher
> enforcement - AMQ than tomee 7 cause of java version constraints. Maybe
> testing both can validate it.
> Le 5 avr. 2016 04:10, "Ihsan Ecemis" <mi...@gmail.com> a écrit :
> 
>> 
>> Also, I just tried it under Java 1.7.0_71 on Mac OS X and it worked fine!
>> 
>> So far, I could observe the problem under Mac OS X 1.8.0_73,  Mac OS X
>> 1.8.0_77, and Linux  1.8.0_71.
>> 
>> 
>>> On Apr 4, 2016, at 5:02 PM, Ihsan Ecemis <mi...@gmail.com> wrote:
>>> 
>>> 
>>> I didn’t have time to investigate your suggestion but tested it under
>> Windows and confirmed that everything works fine.  Will dig more when I
>> have some time.
>>> 
>>> 
>>>> On Apr 3, 2016, at 7:23 AM, Romain Manni-Bucau <rm...@gmail.com>
>> wrote:
>>>> 
>>>> SSL config is at connector level so nothing particular under the
>>>> webapp. Client side behavior doesn't help - at least I'm not sure how
>>>> to check it at the moment - but on server side you can check if there
>>>> is any SSLContext#init setup which is unexpected or has some side
>>>> effects (a debug point there with mvn tomee:debug should do it).
>>>> 
>>>> Romain Manni-Bucau
>>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>>> 
>>>> 
>>>> 2016-04-03 13:19 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>>> 
>>>>> Is SSL config different for JSF resources than static files under
>> Tomcat?  Note that I can fetch static files without any problem,  I have
>> the problem only with JSF resources!  (I didn’t add static files to the
>> sample project to show this but my application have them)
>>>>> 
>>>>> If you’d like I can setup an EC2 server for you to try this.    Would
>> you have a few minutes to login and see it for yourself?
>>>>> 
>>>>> 
>>>>>> On Apr 3, 2016, at 7:07 AM, Romain Manni-Bucau <rm...@gmail.com>
>> wrote:
>>>>>> 
>>>>>> tried on windows so wonder if it can be linked to gnu tools.
>>>>>> 
>>>>>> If you get such an issue the only thing I can think about is AMQ
>>>>>> changing the SSL config of the JVM which would then make the SSL
>>>>>> config of tomcat changing if relying on the JVM settings for any of
>>>>>> them.
>>>>>> 
>>>>>> Can also be a local firewall etc even if weird for a UNIx box - saw
>>>>>> several company windows boxes to fail even on localhost cause of
>>>>>> McAfee or equivalent.
>>>>>> 
>>>>>> 
>>>>>> Romain Manni-Bucau
>>>>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>>>>> 
>>>>>> 
>>>>>> 2016-04-03 13:04 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>>>>> 
>>>>>>> That makes this even more interesting.  I can consistently reproduce
>> this on:
>>>>>>> 
>>>>>>> Mac OS X 10.11.4,  Java 1.8.0_73-b02
>>>>>>> Linux 4.1.10-17.31.amzn1.x86_64,  Java 1.8.0_71-b15
>>>>>>> 
>>>>>>> Thank you for trying to reproduce.  I would appreciate if you could
>> give me any ideas/tips about how to proceed in terms of
>> debugging/experimenting.
>>>>>>> 
>>>>>>> 
>>>>>>>> On Apr 3, 2016, at 4:26 AM, Romain Manni-Bucau <
>> rmannibucau@gmail.com> wrote:
>>>>>>>> 
>>>>>>>> Hi
>>>>>>>> 
>>>>>>>> Didn't reproduce it with your sample. Ran on java8, not sure it is
>> linked
>>>>>>>> 
>>>>>>>> Romain Manni-Bucau
>>>>>>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 2016-04-02 13:27 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>>>>>>> 
>>>>>>>>> Hello,
>>>>>>>>> 
>>>>>>>>> I was having some weird problems with my JSF pages lately, and
>> after some brute-force experimentation, I realized that TomEE has problems
>> with serving JSF resources over SSL if I start an embedded ActiveMQ
>> broker.  I found this awkward as I wouldn’t expect these 2 things to
>> interfere with each other.
>>>>>>>>> 
>>>>>>>>> I created a barebones project to show the problem:
>> https://github.com/ecemis/activemq-jsf-troubleshoot <
>> https://github.com/ecemis/activemq-jsf-troubleshoot>
>>>>>>>>> 
>>>>>>>>> The project has 2 scripts at top level:
>>>>>>>>> 
>>>>>>>>> run_server.sh:  That’s how I start the server
>>>>>>>>> test_command.sh:  That’s the test script that fetches a JSF
>> resource via curl. I ran this on a separate terminal
>>>>>>>>> 
>>>>>>>>> And there are 3 tags you can checkout to test 3 cases:
>>>>>>>>> 
>>>>>>>>> case-1-working:  This case doesn’t have ActiveMQ and
>> test_command.sh can successfully fetch a JSF resource
>>>>>>>>> case-2-not-working:  This case adds resources.xml file that starts
>> an embedded ActiveMQ broker. As a result, test_command.sh fails to fetch
>> the JSF resource
>>>>>>>>> case-3-working:  This one changes the service from https to http,
>> and  test_command.sh works again (while ActiveMQ broker is running)
>>>>>>>>> 
>>>>>>>>> (You can checkout and try each case separately, e.g. git checkout
>> case-2-not-working. You can also compare the changes between the cases via
>> git diff, e.g. git diff case-1-working case-2-not-working)
>>>>>>>>> 
>>>>>>>>> Note that fetching static files works in all cases. The problem I
>> could observe so far is just with fetching JSF resources.
>>>>>>>>> 
>>>>>>>>> All help will be greatly appreciated.
>>>>>>>>> 
>>>>>>>>> Thanks,
>>>>>>>>> 
>>>>>>>>> Ihsan.
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> PS: For the impatient who wants to know the errors before cloning
>> the sample project above, here is what curl gives me:
>>>>>>>>> 
>>>>>>>>> * SSLRead() return error -9845
>>>>>>>>> * Closing connection 0
>>>>>>>>> curl: (56) SSLRead() return error -9845
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> And here is what I get on the server:
>>>>>>>>> 
>>>>>>>>> WARNING - JSF1064: Unable to find or serve resource,
>> primefaces.js, from library, primefaces.
>>>>>>>>> WARNING -
>>>>>>>>> org.apache.catalina.connector.ClientAbortException:
>> java.io.IOException: Broken pipe
>>>>>>>>>    at
>> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
>>>>>>>>>    at
>> org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
>>>>>>>>>    at
>> org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
>>>>>>>>>    at
>> org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
>>>>>>>>>    at
>> org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
>>>>>>>>>    at
>> org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
>>>>>>>>>    at
>> java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
>>>>>>>>>    at
>> com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:358)
>>>>>>>>>    at
>> javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>>>>>>>>    at
>> org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87)
>>>>>>>>>    at
>> javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>>>>>>>>    at
>> javax.faces.webapp.FacesServlet.service(FacesServlet.java:655)
>>>>>>>>>    at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
>>>>>>>>>    at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>>>>>>>    at
>> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>>>>>>>>    at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>>>>>>>>    at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>>>>>>>    at
>> org.apache.openejb.server.httpd.WebBeansFilter.doFilter(WebBeansFilter.java:52)
>>>>>>>>>    at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>>>>>>>>    at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>>>>>>>    at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
>>>>>>>>>    at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
>>>>>>>>>    at
>> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>>>>>>>>>    at
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
>>>>>>>>>    at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>>>>>>>>    at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
>>>>>>>>>    at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>>>>>>>>    at
>> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
>>>>>>>>>    at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
>>>>>>>>>    at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
>>>>>>>>>    at
>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
>>>>>>>>>    at
>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
>>>>>>>>>    at
>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
>>>>>>>>>    at
>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
>>>>>>>>>    at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>>>>>>>>    at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>>>>>>>>    at
>> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>>>>>>>>>    at java.lang.Thread.run(Thread.java:745)
>>>>>>>>> Caused by: java.io.IOException: Broken pipe
>>>>>>>>>    at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
>>>>>>>>>    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
>>>>>>>>>    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
>>>>>>>>>    at sun.nio.ch.IOUtil.write(IOUtil.java:51)
>>>>>>>>>    at
>> sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
>>>>>>>>>    at
>> org.apache.tomcat.util.net.SecureNioChannel.flush(SecureNioChannel.java:140)
>>>>>>>>>    at
>> org.apache.tomcat.util.net.SecureNioChannel.write(SecureNioChannel.java:521)
>>>>>>>>>    at
>> org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
>>>>>>>>>    at
>> org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
>>>>>>>>>    at
>> org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
>>>>>>>>>    at
>> org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
>>>>>>>>>    at
>> org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
>>>>>>>>>    at
>> org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
>>>>>>>>>    at
>> org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:121)
>>>>>>>>>    at
>> org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
>>>>>>>>>    at org.apache.coyote.Response.doWrite(Response.java:501)
>>>>>>>>>    at
>> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
>>>>>>>>>    ... 37 more
>>>>>>>>> 
>>>>>>>>> 
>>>>>>> 
>>>>> 
>>> 
>> 
>> 


Re: Problem fetching JSF resources over SSL when ActiveMQ broker is running

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Isnt it due to new ciphers? I know tomee 1 uses an older - pre cipher
enforcement - AMQ than tomee 7 cause of java version constraints. Maybe
testing both can validate it.
Le 5 avr. 2016 04:10, "Ihsan Ecemis" <mi...@gmail.com> a écrit :

>
> Also, I just tried it under Java 1.7.0_71 on Mac OS X and it worked fine!
>
> So far, I could observe the problem under Mac OS X 1.8.0_73,  Mac OS X
> 1.8.0_77, and Linux  1.8.0_71.
>
>
> > On Apr 4, 2016, at 5:02 PM, Ihsan Ecemis <mi...@gmail.com> wrote:
> >
> >
> > I didn’t have time to investigate your suggestion but tested it under
> Windows and confirmed that everything works fine.  Will dig more when I
> have some time.
> >
> >
> >> On Apr 3, 2016, at 7:23 AM, Romain Manni-Bucau <rm...@gmail.com>
> wrote:
> >>
> >> SSL config is at connector level so nothing particular under the
> >> webapp. Client side behavior doesn't help - at least I'm not sure how
> >> to check it at the moment - but on server side you can check if there
> >> is any SSLContext#init setup which is unexpected or has some side
> >> effects (a debug point there with mvn tomee:debug should do it).
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> >>
> >>
> >> 2016-04-03 13:19 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
> >>>
> >>> Is SSL config different for JSF resources than static files under
> Tomcat?  Note that I can fetch static files without any problem,  I have
> the problem only with JSF resources!  (I didn’t add static files to the
> sample project to show this but my application have them)
> >>>
> >>> If you’d like I can setup an EC2 server for you to try this.    Would
> you have a few minutes to login and see it for yourself?
> >>>
> >>>
> >>>> On Apr 3, 2016, at 7:07 AM, Romain Manni-Bucau <rm...@gmail.com>
> wrote:
> >>>>
> >>>> tried on windows so wonder if it can be linked to gnu tools.
> >>>>
> >>>> If you get such an issue the only thing I can think about is AMQ
> >>>> changing the SSL config of the JVM which would then make the SSL
> >>>> config of tomcat changing if relying on the JVM settings for any of
> >>>> them.
> >>>>
> >>>> Can also be a local firewall etc even if weird for a UNIx box - saw
> >>>> several company windows boxes to fail even on localhost cause of
> >>>> McAfee or equivalent.
> >>>>
> >>>>
> >>>> Romain Manni-Bucau
> >>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> >>>>
> >>>>
> >>>> 2016-04-03 13:04 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
> >>>>>
> >>>>> That makes this even more interesting.  I can consistently reproduce
> this on:
> >>>>>
> >>>>> Mac OS X 10.11.4,  Java 1.8.0_73-b02
> >>>>> Linux 4.1.10-17.31.amzn1.x86_64,  Java 1.8.0_71-b15
> >>>>>
> >>>>> Thank you for trying to reproduce.  I would appreciate if you could
> give me any ideas/tips about how to proceed in terms of
> debugging/experimenting.
> >>>>>
> >>>>>
> >>>>>> On Apr 3, 2016, at 4:26 AM, Romain Manni-Bucau <
> rmannibucau@gmail.com> wrote:
> >>>>>>
> >>>>>> Hi
> >>>>>>
> >>>>>> Didn't reproduce it with your sample. Ran on java8, not sure it is
> linked
> >>>>>>
> >>>>>> Romain Manni-Bucau
> >>>>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> >>>>>>
> >>>>>>
> >>>>>> 2016-04-02 13:27 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
> >>>>>>>
> >>>>>>> Hello,
> >>>>>>>
> >>>>>>> I was having some weird problems with my JSF pages lately, and
> after some brute-force experimentation, I realized that TomEE has problems
> with serving JSF resources over SSL if I start an embedded ActiveMQ
> broker.  I found this awkward as I wouldn’t expect these 2 things to
> interfere with each other.
> >>>>>>>
> >>>>>>> I created a barebones project to show the problem:
> https://github.com/ecemis/activemq-jsf-troubleshoot <
> https://github.com/ecemis/activemq-jsf-troubleshoot>
> >>>>>>>
> >>>>>>> The project has 2 scripts at top level:
> >>>>>>>
> >>>>>>> run_server.sh:  That’s how I start the server
> >>>>>>> test_command.sh:  That’s the test script that fetches a JSF
> resource via curl. I ran this on a separate terminal
> >>>>>>>
> >>>>>>> And there are 3 tags you can checkout to test 3 cases:
> >>>>>>>
> >>>>>>> case-1-working:  This case doesn’t have ActiveMQ and
> test_command.sh can successfully fetch a JSF resource
> >>>>>>> case-2-not-working:  This case adds resources.xml file that starts
> an embedded ActiveMQ broker. As a result, test_command.sh fails to fetch
> the JSF resource
> >>>>>>> case-3-working:  This one changes the service from https to http,
> and  test_command.sh works again (while ActiveMQ broker is running)
> >>>>>>>
> >>>>>>> (You can checkout and try each case separately, e.g. git checkout
> case-2-not-working. You can also compare the changes between the cases via
> git diff, e.g. git diff case-1-working case-2-not-working)
> >>>>>>>
> >>>>>>> Note that fetching static files works in all cases. The problem I
> could observe so far is just with fetching JSF resources.
> >>>>>>>
> >>>>>>> All help will be greatly appreciated.
> >>>>>>>
> >>>>>>> Thanks,
> >>>>>>>
> >>>>>>> Ihsan.
> >>>>>>>
> >>>>>>>
> >>>>>>> PS: For the impatient who wants to know the errors before cloning
> the sample project above, here is what curl gives me:
> >>>>>>>
> >>>>>>> * SSLRead() return error -9845
> >>>>>>> * Closing connection 0
> >>>>>>> curl: (56) SSLRead() return error -9845
> >>>>>>>
> >>>>>>>
> >>>>>>> And here is what I get on the server:
> >>>>>>>
> >>>>>>> WARNING - JSF1064: Unable to find or serve resource,
> primefaces.js, from library, primefaces.
> >>>>>>> WARNING -
> >>>>>>> org.apache.catalina.connector.ClientAbortException:
> java.io.IOException: Broken pipe
> >>>>>>>     at
> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
> >>>>>>>     at
> org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
> >>>>>>>     at
> org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
> >>>>>>>     at
> org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
> >>>>>>>     at
> org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
> >>>>>>>     at
> org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
> >>>>>>>     at
> java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
> >>>>>>>     at
> com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:358)
> >>>>>>>     at
> javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
> >>>>>>>     at
> org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87)
> >>>>>>>     at
> javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
> >>>>>>>     at
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:655)
> >>>>>>>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
> >>>>>>>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
> >>>>>>>     at
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> >>>>>>>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
> >>>>>>>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
> >>>>>>>     at
> org.apache.openejb.server.httpd.WebBeansFilter.doFilter(WebBeansFilter.java:52)
> >>>>>>>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
> >>>>>>>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
> >>>>>>>     at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
> >>>>>>>     at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
> >>>>>>>     at
> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
> >>>>>>>     at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
> >>>>>>>     at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
> >>>>>>>     at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
> >>>>>>>     at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
> >>>>>>>     at
> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
> >>>>>>>     at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
> >>>>>>>     at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
> >>>>>>>     at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
> >>>>>>>     at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
> >>>>>>>     at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
> >>>>>>>     at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
> >>>>>>>     at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> >>>>>>>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> >>>>>>>     at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> >>>>>>>     at java.lang.Thread.run(Thread.java:745)
> >>>>>>> Caused by: java.io.IOException: Broken pipe
> >>>>>>>     at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
> >>>>>>>     at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
> >>>>>>>     at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
> >>>>>>>     at sun.nio.ch.IOUtil.write(IOUtil.java:51)
> >>>>>>>     at
> sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
> >>>>>>>     at
> org.apache.tomcat.util.net.SecureNioChannel.flush(SecureNioChannel.java:140)
> >>>>>>>     at
> org.apache.tomcat.util.net.SecureNioChannel.write(SecureNioChannel.java:521)
> >>>>>>>     at
> org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
> >>>>>>>     at
> org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
> >>>>>>>     at
> org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
> >>>>>>>     at
> org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
> >>>>>>>     at
> org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
> >>>>>>>     at
> org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
> >>>>>>>     at
> org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:121)
> >>>>>>>     at
> org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
> >>>>>>>     at org.apache.coyote.Response.doWrite(Response.java:501)
> >>>>>>>     at
> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
> >>>>>>>     ... 37 more
> >>>>>>>
> >>>>>>>
> >>>>>
> >>>
> >
>
>

Re: Problem fetching JSF resources over SSL when ActiveMQ broker is running

Posted by Ihsan Ecemis <mi...@gmail.com>.
Also, I just tried it under Java 1.7.0_71 on Mac OS X and it worked fine!  

So far, I could observe the problem under Mac OS X 1.8.0_73,  Mac OS X 1.8.0_77, and Linux  1.8.0_71.


> On Apr 4, 2016, at 5:02 PM, Ihsan Ecemis <mi...@gmail.com> wrote:
> 
> 
> I didn’t have time to investigate your suggestion but tested it under Windows and confirmed that everything works fine.  Will dig more when I have some time.
> 
> 
>> On Apr 3, 2016, at 7:23 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
>> 
>> SSL config is at connector level so nothing particular under the
>> webapp. Client side behavior doesn't help - at least I'm not sure how
>> to check it at the moment - but on server side you can check if there
>> is any SSLContext#init setup which is unexpected or has some side
>> effects (a debug point there with mvn tomee:debug should do it).
>> 
>> Romain Manni-Bucau
>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>> 
>> 
>> 2016-04-03 13:19 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>> 
>>> Is SSL config different for JSF resources than static files under Tomcat?  Note that I can fetch static files without any problem,  I have the problem only with JSF resources!  (I didn’t add static files to the sample project to show this but my application have them)
>>> 
>>> If you’d like I can setup an EC2 server for you to try this.    Would you have a few minutes to login and see it for yourself?
>>> 
>>> 
>>>> On Apr 3, 2016, at 7:07 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
>>>> 
>>>> tried on windows so wonder if it can be linked to gnu tools.
>>>> 
>>>> If you get such an issue the only thing I can think about is AMQ
>>>> changing the SSL config of the JVM which would then make the SSL
>>>> config of tomcat changing if relying on the JVM settings for any of
>>>> them.
>>>> 
>>>> Can also be a local firewall etc even if weird for a UNIx box - saw
>>>> several company windows boxes to fail even on localhost cause of
>>>> McAfee or equivalent.
>>>> 
>>>> 
>>>> Romain Manni-Bucau
>>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>>> 
>>>> 
>>>> 2016-04-03 13:04 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>>> 
>>>>> That makes this even more interesting.  I can consistently reproduce this on:
>>>>> 
>>>>> Mac OS X 10.11.4,  Java 1.8.0_73-b02
>>>>> Linux 4.1.10-17.31.amzn1.x86_64,  Java 1.8.0_71-b15
>>>>> 
>>>>> Thank you for trying to reproduce.  I would appreciate if you could give me any ideas/tips about how to proceed in terms of debugging/experimenting.
>>>>> 
>>>>> 
>>>>>> On Apr 3, 2016, at 4:26 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
>>>>>> 
>>>>>> Hi
>>>>>> 
>>>>>> Didn't reproduce it with your sample. Ran on java8, not sure it is linked
>>>>>> 
>>>>>> Romain Manni-Bucau
>>>>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>>>>> 
>>>>>> 
>>>>>> 2016-04-02 13:27 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>>>>> 
>>>>>>> Hello,
>>>>>>> 
>>>>>>> I was having some weird problems with my JSF pages lately, and after some brute-force experimentation, I realized that TomEE has problems with serving JSF resources over SSL if I start an embedded ActiveMQ broker.  I found this awkward as I wouldn’t expect these 2 things to interfere with each other.
>>>>>>> 
>>>>>>> I created a barebones project to show the problem:  https://github.com/ecemis/activemq-jsf-troubleshoot <https://github.com/ecemis/activemq-jsf-troubleshoot>
>>>>>>> 
>>>>>>> The project has 2 scripts at top level:
>>>>>>> 
>>>>>>> run_server.sh:  That’s how I start the server
>>>>>>> test_command.sh:  That’s the test script that fetches a JSF resource via curl. I ran this on a separate terminal
>>>>>>> 
>>>>>>> And there are 3 tags you can checkout to test 3 cases:
>>>>>>> 
>>>>>>> case-1-working:  This case doesn’t have ActiveMQ and test_command.sh can successfully fetch a JSF resource
>>>>>>> case-2-not-working:  This case adds resources.xml file that starts an embedded ActiveMQ broker. As a result, test_command.sh fails to fetch the JSF resource
>>>>>>> case-3-working:  This one changes the service from https to http, and  test_command.sh works again (while ActiveMQ broker is running)
>>>>>>> 
>>>>>>> (You can checkout and try each case separately, e.g. git checkout case-2-not-working. You can also compare the changes between the cases via git diff, e.g. git diff case-1-working case-2-not-working)
>>>>>>> 
>>>>>>> Note that fetching static files works in all cases. The problem I could observe so far is just with fetching JSF resources.
>>>>>>> 
>>>>>>> All help will be greatly appreciated.
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> 
>>>>>>> Ihsan.
>>>>>>> 
>>>>>>> 
>>>>>>> PS: For the impatient who wants to know the errors before cloning the sample project above, here is what curl gives me:
>>>>>>> 
>>>>>>> * SSLRead() return error -9845
>>>>>>> * Closing connection 0
>>>>>>> curl: (56) SSLRead() return error -9845
>>>>>>> 
>>>>>>> 
>>>>>>> And here is what I get on the server:
>>>>>>> 
>>>>>>> WARNING - JSF1064: Unable to find or serve resource, primefaces.js, from library, primefaces.
>>>>>>> WARNING -
>>>>>>> org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
>>>>>>>     at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
>>>>>>>     at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
>>>>>>>     at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
>>>>>>>     at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
>>>>>>>     at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
>>>>>>>     at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
>>>>>>>     at java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
>>>>>>>     at com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:358)
>>>>>>>     at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>>>>>>     at org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87)
>>>>>>>     at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>>>>>>     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:655)
>>>>>>>     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
>>>>>>>     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>>>>>     at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>>>>>>     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>>>>>>     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>>>>>     at org.apache.openejb.server.httpd.WebBeansFilter.doFilter(WebBeansFilter.java:52)
>>>>>>>     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>>>>>>     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>>>>>     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
>>>>>>>     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
>>>>>>>     at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>>>>>>>     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
>>>>>>>     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>>>>>>     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
>>>>>>>     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>>>>>>     at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
>>>>>>>     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
>>>>>>>     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
>>>>>>>     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
>>>>>>>     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
>>>>>>>     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
>>>>>>>     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
>>>>>>>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>>>>>>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>>>>>>     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>>>>>>>     at java.lang.Thread.run(Thread.java:745)
>>>>>>> Caused by: java.io.IOException: Broken pipe
>>>>>>>     at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
>>>>>>>     at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
>>>>>>>     at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
>>>>>>>     at sun.nio.ch.IOUtil.write(IOUtil.java:51)
>>>>>>>     at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
>>>>>>>     at org.apache.tomcat.util.net.SecureNioChannel.flush(SecureNioChannel.java:140)
>>>>>>>     at org.apache.tomcat.util.net.SecureNioChannel.write(SecureNioChannel.java:521)
>>>>>>>     at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
>>>>>>>     at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
>>>>>>>     at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
>>>>>>>     at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
>>>>>>>     at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
>>>>>>>     at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
>>>>>>>     at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:121)
>>>>>>>     at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
>>>>>>>     at org.apache.coyote.Response.doWrite(Response.java:501)
>>>>>>>     at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
>>>>>>>     ... 37 more
>>>>>>> 
>>>>>>> 
>>>>> 
>>> 
> 


Re: Problem fetching JSF resources over SSL when ActiveMQ broker is running

Posted by Ihsan Ecemis <mi...@gmail.com>.
I didn’t have time to investigate your suggestion but tested it under Windows and confirmed that everything works fine.  Will dig more when I have some time.


> On Apr 3, 2016, at 7:23 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
> 
> SSL config is at connector level so nothing particular under the
> webapp. Client side behavior doesn't help - at least I'm not sure how
> to check it at the moment - but on server side you can check if there
> is any SSLContext#init setup which is unexpected or has some side
> effects (a debug point there with mvn tomee:debug should do it).
> 
> Romain Manni-Bucau
> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> 
> 
> 2016-04-03 13:19 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>> 
>> Is SSL config different for JSF resources than static files under Tomcat?  Note that I can fetch static files without any problem,  I have the problem only with JSF resources!  (I didn’t add static files to the sample project to show this but my application have them)
>> 
>> If you’d like I can setup an EC2 server for you to try this.    Would you have a few minutes to login and see it for yourself?
>> 
>> 
>>> On Apr 3, 2016, at 7:07 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
>>> 
>>> tried on windows so wonder if it can be linked to gnu tools.
>>> 
>>> If you get such an issue the only thing I can think about is AMQ
>>> changing the SSL config of the JVM which would then make the SSL
>>> config of tomcat changing if relying on the JVM settings for any of
>>> them.
>>> 
>>> Can also be a local firewall etc even if weird for a UNIx box - saw
>>> several company windows boxes to fail even on localhost cause of
>>> McAfee or equivalent.
>>> 
>>> 
>>> Romain Manni-Bucau
>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>> 
>>> 
>>> 2016-04-03 13:04 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>> 
>>>> That makes this even more interesting.  I can consistently reproduce this on:
>>>> 
>>>> Mac OS X 10.11.4,  Java 1.8.0_73-b02
>>>> Linux 4.1.10-17.31.amzn1.x86_64,  Java 1.8.0_71-b15
>>>> 
>>>> Thank you for trying to reproduce.  I would appreciate if you could give me any ideas/tips about how to proceed in terms of debugging/experimenting.
>>>> 
>>>> 
>>>>> On Apr 3, 2016, at 4:26 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
>>>>> 
>>>>> Hi
>>>>> 
>>>>> Didn't reproduce it with your sample. Ran on java8, not sure it is linked
>>>>> 
>>>>> Romain Manni-Bucau
>>>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>>>> 
>>>>> 
>>>>> 2016-04-02 13:27 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>>>> 
>>>>>> Hello,
>>>>>> 
>>>>>> I was having some weird problems with my JSF pages lately, and after some brute-force experimentation, I realized that TomEE has problems with serving JSF resources over SSL if I start an embedded ActiveMQ broker.  I found this awkward as I wouldn’t expect these 2 things to interfere with each other.
>>>>>> 
>>>>>> I created a barebones project to show the problem:  https://github.com/ecemis/activemq-jsf-troubleshoot <https://github.com/ecemis/activemq-jsf-troubleshoot>
>>>>>> 
>>>>>> The project has 2 scripts at top level:
>>>>>> 
>>>>>> run_server.sh:  That’s how I start the server
>>>>>> test_command.sh:  That’s the test script that fetches a JSF resource via curl. I ran this on a separate terminal
>>>>>> 
>>>>>> And there are 3 tags you can checkout to test 3 cases:
>>>>>> 
>>>>>> case-1-working:  This case doesn’t have ActiveMQ and test_command.sh can successfully fetch a JSF resource
>>>>>> case-2-not-working:  This case adds resources.xml file that starts an embedded ActiveMQ broker. As a result, test_command.sh fails to fetch the JSF resource
>>>>>> case-3-working:  This one changes the service from https to http, and  test_command.sh works again (while ActiveMQ broker is running)
>>>>>> 
>>>>>> (You can checkout and try each case separately, e.g. git checkout case-2-not-working. You can also compare the changes between the cases via git diff, e.g. git diff case-1-working case-2-not-working)
>>>>>> 
>>>>>> Note that fetching static files works in all cases. The problem I could observe so far is just with fetching JSF resources.
>>>>>> 
>>>>>> All help will be greatly appreciated.
>>>>>> 
>>>>>> Thanks,
>>>>>> 
>>>>>> Ihsan.
>>>>>> 
>>>>>> 
>>>>>> PS: For the impatient who wants to know the errors before cloning the sample project above, here is what curl gives me:
>>>>>> 
>>>>>> * SSLRead() return error -9845
>>>>>> * Closing connection 0
>>>>>> curl: (56) SSLRead() return error -9845
>>>>>> 
>>>>>> 
>>>>>> And here is what I get on the server:
>>>>>> 
>>>>>> WARNING - JSF1064: Unable to find or serve resource, primefaces.js, from library, primefaces.
>>>>>> WARNING -
>>>>>> org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
>>>>>>      at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
>>>>>>      at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
>>>>>>      at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
>>>>>>      at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
>>>>>>      at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
>>>>>>      at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
>>>>>>      at java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
>>>>>>      at com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:358)
>>>>>>      at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>>>>>      at org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87)
>>>>>>      at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>>>>>      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:655)
>>>>>>      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
>>>>>>      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>>>>      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>>>>>      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>>>>>      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>>>>      at org.apache.openejb.server.httpd.WebBeansFilter.doFilter(WebBeansFilter.java:52)
>>>>>>      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>>>>>      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>>>>      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
>>>>>>      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
>>>>>>      at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>>>>>>      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
>>>>>>      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>>>>>      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
>>>>>>      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>>>>>      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
>>>>>>      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
>>>>>>      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
>>>>>>      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
>>>>>>      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
>>>>>>      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
>>>>>>      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
>>>>>>      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>>>>>      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>>>>>      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>>>>>>      at java.lang.Thread.run(Thread.java:745)
>>>>>> Caused by: java.io.IOException: Broken pipe
>>>>>>      at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
>>>>>>      at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
>>>>>>      at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
>>>>>>      at sun.nio.ch.IOUtil.write(IOUtil.java:51)
>>>>>>      at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
>>>>>>      at org.apache.tomcat.util.net.SecureNioChannel.flush(SecureNioChannel.java:140)
>>>>>>      at org.apache.tomcat.util.net.SecureNioChannel.write(SecureNioChannel.java:521)
>>>>>>      at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
>>>>>>      at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
>>>>>>      at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
>>>>>>      at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
>>>>>>      at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
>>>>>>      at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
>>>>>>      at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:121)
>>>>>>      at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
>>>>>>      at org.apache.coyote.Response.doWrite(Response.java:501)
>>>>>>      at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
>>>>>>      ... 37 more
>>>>>> 
>>>>>> 
>>>> 
>> 


Re: Problem fetching JSF resources over SSL when ActiveMQ broker is running

Posted by Romain Manni-Bucau <rm...@gmail.com>.
SSL config is at connector level so nothing particular under the
webapp. Client side behavior doesn't help - at least I'm not sure how
to check it at the moment - but on server side you can check if there
is any SSLContext#init setup which is unexpected or has some side
effects (a debug point there with mvn tomee:debug should do it).

Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2016-04-03 13:19 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>
> Is SSL config different for JSF resources than static files under Tomcat?  Note that I can fetch static files without any problem,  I have the problem only with JSF resources!  (I didn’t add static files to the sample project to show this but my application have them)
>
> If you’d like I can setup an EC2 server for you to try this.    Would you have a few minutes to login and see it for yourself?
>
>
>> On Apr 3, 2016, at 7:07 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
>>
>> tried on windows so wonder if it can be linked to gnu tools.
>>
>> If you get such an issue the only thing I can think about is AMQ
>> changing the SSL config of the JVM which would then make the SSL
>> config of tomcat changing if relying on the JVM settings for any of
>> them.
>>
>> Can also be a local firewall etc even if weird for a UNIx box - saw
>> several company windows boxes to fail even on localhost cause of
>> McAfee or equivalent.
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>
>>
>> 2016-04-03 13:04 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>
>>> That makes this even more interesting.  I can consistently reproduce this on:
>>>
>>> Mac OS X 10.11.4,  Java 1.8.0_73-b02
>>> Linux 4.1.10-17.31.amzn1.x86_64,  Java 1.8.0_71-b15
>>>
>>> Thank you for trying to reproduce.  I would appreciate if you could give me any ideas/tips about how to proceed in terms of debugging/experimenting.
>>>
>>>
>>>> On Apr 3, 2016, at 4:26 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
>>>>
>>>> Hi
>>>>
>>>> Didn't reproduce it with your sample. Ran on java8, not sure it is linked
>>>>
>>>> Romain Manni-Bucau
>>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>>>
>>>>
>>>> 2016-04-02 13:27 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>>>
>>>>> Hello,
>>>>>
>>>>> I was having some weird problems with my JSF pages lately, and after some brute-force experimentation, I realized that TomEE has problems with serving JSF resources over SSL if I start an embedded ActiveMQ broker.  I found this awkward as I wouldn’t expect these 2 things to interfere with each other.
>>>>>
>>>>> I created a barebones project to show the problem:  https://github.com/ecemis/activemq-jsf-troubleshoot <https://github.com/ecemis/activemq-jsf-troubleshoot>
>>>>>
>>>>> The project has 2 scripts at top level:
>>>>>
>>>>> run_server.sh:  That’s how I start the server
>>>>> test_command.sh:  That’s the test script that fetches a JSF resource via curl. I ran this on a separate terminal
>>>>>
>>>>> And there are 3 tags you can checkout to test 3 cases:
>>>>>
>>>>> case-1-working:  This case doesn’t have ActiveMQ and test_command.sh can successfully fetch a JSF resource
>>>>> case-2-not-working:  This case adds resources.xml file that starts an embedded ActiveMQ broker. As a result, test_command.sh fails to fetch the JSF resource
>>>>> case-3-working:  This one changes the service from https to http, and  test_command.sh works again (while ActiveMQ broker is running)
>>>>>
>>>>> (You can checkout and try each case separately, e.g. git checkout case-2-not-working. You can also compare the changes between the cases via git diff, e.g. git diff case-1-working case-2-not-working)
>>>>>
>>>>> Note that fetching static files works in all cases. The problem I could observe so far is just with fetching JSF resources.
>>>>>
>>>>> All help will be greatly appreciated.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Ihsan.
>>>>>
>>>>>
>>>>> PS: For the impatient who wants to know the errors before cloning the sample project above, here is what curl gives me:
>>>>>
>>>>> * SSLRead() return error -9845
>>>>> * Closing connection 0
>>>>> curl: (56) SSLRead() return error -9845
>>>>>
>>>>>
>>>>> And here is what I get on the server:
>>>>>
>>>>> WARNING - JSF1064: Unable to find or serve resource, primefaces.js, from library, primefaces.
>>>>> WARNING -
>>>>> org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
>>>>>       at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
>>>>>       at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
>>>>>       at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
>>>>>       at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
>>>>>       at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
>>>>>       at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
>>>>>       at java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
>>>>>       at com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:358)
>>>>>       at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>>>>       at org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87)
>>>>>       at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>>>>       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:655)
>>>>>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
>>>>>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>>>       at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>>>>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>>>>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>>>       at org.apache.openejb.server.httpd.WebBeansFilter.doFilter(WebBeansFilter.java:52)
>>>>>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>>>>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>>>       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
>>>>>       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
>>>>>       at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>>>>>       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
>>>>>       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>>>>       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
>>>>>       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>>>>       at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
>>>>>       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
>>>>>       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
>>>>>       at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
>>>>>       at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
>>>>>       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
>>>>>       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
>>>>>       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>>>>       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>>>>       at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>>>>>       at java.lang.Thread.run(Thread.java:745)
>>>>> Caused by: java.io.IOException: Broken pipe
>>>>>       at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
>>>>>       at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
>>>>>       at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
>>>>>       at sun.nio.ch.IOUtil.write(IOUtil.java:51)
>>>>>       at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
>>>>>       at org.apache.tomcat.util.net.SecureNioChannel.flush(SecureNioChannel.java:140)
>>>>>       at org.apache.tomcat.util.net.SecureNioChannel.write(SecureNioChannel.java:521)
>>>>>       at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
>>>>>       at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
>>>>>       at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
>>>>>       at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
>>>>>       at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
>>>>>       at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
>>>>>       at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:121)
>>>>>       at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
>>>>>       at org.apache.coyote.Response.doWrite(Response.java:501)
>>>>>       at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
>>>>>       ... 37 more
>>>>>
>>>>>
>>>
>

Re: Problem fetching JSF resources over SSL when ActiveMQ broker is running

Posted by Ihsan Ecemis <mi...@gmail.com>.
Is SSL config different for JSF resources than static files under Tomcat?  Note that I can fetch static files without any problem,  I have the problem only with JSF resources!  (I didn’t add static files to the sample project to show this but my application have them)

If you’d like I can setup an EC2 server for you to try this.    Would you have a few minutes to login and see it for yourself?  
 

> On Apr 3, 2016, at 7:07 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
> 
> tried on windows so wonder if it can be linked to gnu tools.
> 
> If you get such an issue the only thing I can think about is AMQ
> changing the SSL config of the JVM which would then make the SSL
> config of tomcat changing if relying on the JVM settings for any of
> them.
> 
> Can also be a local firewall etc even if weird for a UNIx box - saw
> several company windows boxes to fail even on localhost cause of
> McAfee or equivalent.
> 
> 
> Romain Manni-Bucau
> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> 
> 
> 2016-04-03 13:04 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>> 
>> That makes this even more interesting.  I can consistently reproduce this on:
>> 
>> Mac OS X 10.11.4,  Java 1.8.0_73-b02
>> Linux 4.1.10-17.31.amzn1.x86_64,  Java 1.8.0_71-b15
>> 
>> Thank you for trying to reproduce.  I would appreciate if you could give me any ideas/tips about how to proceed in terms of debugging/experimenting.
>> 
>> 
>>> On Apr 3, 2016, at 4:26 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
>>> 
>>> Hi
>>> 
>>> Didn't reproduce it with your sample. Ran on java8, not sure it is linked
>>> 
>>> Romain Manni-Bucau
>>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>> 
>>> 
>>> 2016-04-02 13:27 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>> 
>>>> Hello,
>>>> 
>>>> I was having some weird problems with my JSF pages lately, and after some brute-force experimentation, I realized that TomEE has problems with serving JSF resources over SSL if I start an embedded ActiveMQ broker.  I found this awkward as I wouldn’t expect these 2 things to interfere with each other.
>>>> 
>>>> I created a barebones project to show the problem:  https://github.com/ecemis/activemq-jsf-troubleshoot <https://github.com/ecemis/activemq-jsf-troubleshoot>
>>>> 
>>>> The project has 2 scripts at top level:
>>>> 
>>>> run_server.sh:  That’s how I start the server
>>>> test_command.sh:  That’s the test script that fetches a JSF resource via curl. I ran this on a separate terminal
>>>> 
>>>> And there are 3 tags you can checkout to test 3 cases:
>>>> 
>>>> case-1-working:  This case doesn’t have ActiveMQ and test_command.sh can successfully fetch a JSF resource
>>>> case-2-not-working:  This case adds resources.xml file that starts an embedded ActiveMQ broker. As a result, test_command.sh fails to fetch the JSF resource
>>>> case-3-working:  This one changes the service from https to http, and  test_command.sh works again (while ActiveMQ broker is running)
>>>> 
>>>> (You can checkout and try each case separately, e.g. git checkout case-2-not-working. You can also compare the changes between the cases via git diff, e.g. git diff case-1-working case-2-not-working)
>>>> 
>>>> Note that fetching static files works in all cases. The problem I could observe so far is just with fetching JSF resources.
>>>> 
>>>> All help will be greatly appreciated.
>>>> 
>>>> Thanks,
>>>> 
>>>> Ihsan.
>>>> 
>>>> 
>>>> PS: For the impatient who wants to know the errors before cloning the sample project above, here is what curl gives me:
>>>> 
>>>> * SSLRead() return error -9845
>>>> * Closing connection 0
>>>> curl: (56) SSLRead() return error -9845
>>>> 
>>>> 
>>>> And here is what I get on the server:
>>>> 
>>>> WARNING - JSF1064: Unable to find or serve resource, primefaces.js, from library, primefaces.
>>>> WARNING -
>>>> org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
>>>>       at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
>>>>       at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
>>>>       at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
>>>>       at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
>>>>       at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
>>>>       at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
>>>>       at java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
>>>>       at com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:358)
>>>>       at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>>>       at org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87)
>>>>       at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>>>       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:655)
>>>>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
>>>>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>>       at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>>>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>>>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>>       at org.apache.openejb.server.httpd.WebBeansFilter.doFilter(WebBeansFilter.java:52)
>>>>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>>>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>>       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
>>>>       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
>>>>       at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>>>>       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
>>>>       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>>>       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
>>>>       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>>>       at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
>>>>       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
>>>>       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
>>>>       at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
>>>>       at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
>>>>       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
>>>>       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
>>>>       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>>>       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>>>       at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>>>>       at java.lang.Thread.run(Thread.java:745)
>>>> Caused by: java.io.IOException: Broken pipe
>>>>       at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
>>>>       at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
>>>>       at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
>>>>       at sun.nio.ch.IOUtil.write(IOUtil.java:51)
>>>>       at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
>>>>       at org.apache.tomcat.util.net.SecureNioChannel.flush(SecureNioChannel.java:140)
>>>>       at org.apache.tomcat.util.net.SecureNioChannel.write(SecureNioChannel.java:521)
>>>>       at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
>>>>       at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
>>>>       at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
>>>>       at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
>>>>       at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
>>>>       at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
>>>>       at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:121)
>>>>       at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
>>>>       at org.apache.coyote.Response.doWrite(Response.java:501)
>>>>       at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
>>>>       ... 37 more
>>>> 
>>>> 
>> 


Re: Problem fetching JSF resources over SSL when ActiveMQ broker is running

Posted by Romain Manni-Bucau <rm...@gmail.com>.
tried on windows so wonder if it can be linked to gnu tools.

If you get such an issue the only thing I can think about is AMQ
changing the SSL config of the JVM which would then make the SSL
config of tomcat changing if relying on the JVM settings for any of
them.

Can also be a local firewall etc even if weird for a UNIx box - saw
several company windows boxes to fail even on localhost cause of
McAfee or equivalent.


Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2016-04-03 13:04 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>
> That makes this even more interesting.  I can consistently reproduce this on:
>
> Mac OS X 10.11.4,  Java 1.8.0_73-b02
> Linux 4.1.10-17.31.amzn1.x86_64,  Java 1.8.0_71-b15
>
> Thank you for trying to reproduce.  I would appreciate if you could give me any ideas/tips about how to proceed in terms of debugging/experimenting.
>
>
>> On Apr 3, 2016, at 4:26 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
>>
>> Hi
>>
>> Didn't reproduce it with your sample. Ran on java8, not sure it is linked
>>
>> Romain Manni-Bucau
>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>
>>
>> 2016-04-02 13:27 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>>>
>>> Hello,
>>>
>>> I was having some weird problems with my JSF pages lately, and after some brute-force experimentation, I realized that TomEE has problems with serving JSF resources over SSL if I start an embedded ActiveMQ broker.  I found this awkward as I wouldn’t expect these 2 things to interfere with each other.
>>>
>>> I created a barebones project to show the problem:  https://github.com/ecemis/activemq-jsf-troubleshoot <https://github.com/ecemis/activemq-jsf-troubleshoot>
>>>
>>> The project has 2 scripts at top level:
>>>
>>> run_server.sh:  That’s how I start the server
>>> test_command.sh:  That’s the test script that fetches a JSF resource via curl. I ran this on a separate terminal
>>>
>>> And there are 3 tags you can checkout to test 3 cases:
>>>
>>> case-1-working:  This case doesn’t have ActiveMQ and test_command.sh can successfully fetch a JSF resource
>>> case-2-not-working:  This case adds resources.xml file that starts an embedded ActiveMQ broker. As a result, test_command.sh fails to fetch the JSF resource
>>> case-3-working:  This one changes the service from https to http, and  test_command.sh works again (while ActiveMQ broker is running)
>>>
>>> (You can checkout and try each case separately, e.g. git checkout case-2-not-working. You can also compare the changes between the cases via git diff, e.g. git diff case-1-working case-2-not-working)
>>>
>>> Note that fetching static files works in all cases. The problem I could observe so far is just with fetching JSF resources.
>>>
>>> All help will be greatly appreciated.
>>>
>>> Thanks,
>>>
>>> Ihsan.
>>>
>>>
>>> PS: For the impatient who wants to know the errors before cloning the sample project above, here is what curl gives me:
>>>
>>> * SSLRead() return error -9845
>>> * Closing connection 0
>>> curl: (56) SSLRead() return error -9845
>>>
>>>
>>> And here is what I get on the server:
>>>
>>> WARNING - JSF1064: Unable to find or serve resource, primefaces.js, from library, primefaces.
>>> WARNING -
>>> org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
>>>        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
>>>        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
>>>        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
>>>        at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
>>>        at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
>>>        at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
>>>        at java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
>>>        at com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:358)
>>>        at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>>        at org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87)
>>>        at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>>        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:655)
>>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
>>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>        at org.apache.openejb.server.httpd.WebBeansFilter.doFilter(WebBeansFilter.java:52)
>>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>>        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
>>>        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
>>>        at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>>>        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
>>>        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>>        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
>>>        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>>        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
>>>        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
>>>        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
>>>        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
>>>        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
>>>        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
>>>        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
>>>        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>>        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>>>        at java.lang.Thread.run(Thread.java:745)
>>> Caused by: java.io.IOException: Broken pipe
>>>        at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
>>>        at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
>>>        at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
>>>        at sun.nio.ch.IOUtil.write(IOUtil.java:51)
>>>        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
>>>        at org.apache.tomcat.util.net.SecureNioChannel.flush(SecureNioChannel.java:140)
>>>        at org.apache.tomcat.util.net.SecureNioChannel.write(SecureNioChannel.java:521)
>>>        at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
>>>        at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
>>>        at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
>>>        at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
>>>        at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
>>>        at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
>>>        at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:121)
>>>        at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
>>>        at org.apache.coyote.Response.doWrite(Response.java:501)
>>>        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
>>>        ... 37 more
>>>
>>>
>

Re: Problem fetching JSF resources over SSL when ActiveMQ broker is running

Posted by Ihsan Ecemis <mi...@gmail.com>.
That makes this even more interesting.  I can consistently reproduce this on:

Mac OS X 10.11.4,  Java 1.8.0_73-b02
Linux 4.1.10-17.31.amzn1.x86_64,  Java 1.8.0_71-b15

Thank you for trying to reproduce.  I would appreciate if you could give me any ideas/tips about how to proceed in terms of debugging/experimenting. 


> On Apr 3, 2016, at 4:26 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
> 
> Hi
> 
> Didn't reproduce it with your sample. Ran on java8, not sure it is linked
> 
> Romain Manni-Bucau
> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> 
> 
> 2016-04-02 13:27 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>> 
>> Hello,
>> 
>> I was having some weird problems with my JSF pages lately, and after some brute-force experimentation, I realized that TomEE has problems with serving JSF resources over SSL if I start an embedded ActiveMQ broker.  I found this awkward as I wouldn’t expect these 2 things to interfere with each other.
>> 
>> I created a barebones project to show the problem:  https://github.com/ecemis/activemq-jsf-troubleshoot <https://github.com/ecemis/activemq-jsf-troubleshoot>
>> 
>> The project has 2 scripts at top level:
>> 
>> run_server.sh:  That’s how I start the server
>> test_command.sh:  That’s the test script that fetches a JSF resource via curl. I ran this on a separate terminal
>> 
>> And there are 3 tags you can checkout to test 3 cases:
>> 
>> case-1-working:  This case doesn’t have ActiveMQ and test_command.sh can successfully fetch a JSF resource
>> case-2-not-working:  This case adds resources.xml file that starts an embedded ActiveMQ broker. As a result, test_command.sh fails to fetch the JSF resource
>> case-3-working:  This one changes the service from https to http, and  test_command.sh works again (while ActiveMQ broker is running)
>> 
>> (You can checkout and try each case separately, e.g. git checkout case-2-not-working. You can also compare the changes between the cases via git diff, e.g. git diff case-1-working case-2-not-working)
>> 
>> Note that fetching static files works in all cases. The problem I could observe so far is just with fetching JSF resources.
>> 
>> All help will be greatly appreciated.
>> 
>> Thanks,
>> 
>> Ihsan.
>> 
>> 
>> PS: For the impatient who wants to know the errors before cloning the sample project above, here is what curl gives me:
>> 
>> * SSLRead() return error -9845
>> * Closing connection 0
>> curl: (56) SSLRead() return error -9845
>> 
>> 
>> And here is what I get on the server:
>> 
>> WARNING - JSF1064: Unable to find or serve resource, primefaces.js, from library, primefaces.
>> WARNING -
>> org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
>>        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
>>        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
>>        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
>>        at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
>>        at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
>>        at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
>>        at java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
>>        at com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:358)
>>        at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>        at org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87)
>>        at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>>        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:655)
>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>        at org.apache.openejb.server.httpd.WebBeansFilter.doFilter(WebBeansFilter.java:52)
>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>>        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
>>        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
>>        at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>>        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
>>        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
>>        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>>        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
>>        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
>>        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
>>        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
>>        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
>>        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
>>        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
>>        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>>        at java.lang.Thread.run(Thread.java:745)
>> Caused by: java.io.IOException: Broken pipe
>>        at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
>>        at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
>>        at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
>>        at sun.nio.ch.IOUtil.write(IOUtil.java:51)
>>        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
>>        at org.apache.tomcat.util.net.SecureNioChannel.flush(SecureNioChannel.java:140)
>>        at org.apache.tomcat.util.net.SecureNioChannel.write(SecureNioChannel.java:521)
>>        at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
>>        at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
>>        at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
>>        at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
>>        at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
>>        at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
>>        at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:121)
>>        at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
>>        at org.apache.coyote.Response.doWrite(Response.java:501)
>>        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
>>        ... 37 more
>> 
>> 


Re: Problem fetching JSF resources over SSL when ActiveMQ broker is running

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

Didn't reproduce it with your sample. Ran on java8, not sure it is linked

Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2016-04-02 13:27 GMT+02:00 Ihsan Ecemis <mi...@gmail.com>:
>
> Hello,
>
> I was having some weird problems with my JSF pages lately, and after some brute-force experimentation, I realized that TomEE has problems with serving JSF resources over SSL if I start an embedded ActiveMQ broker.  I found this awkward as I wouldn’t expect these 2 things to interfere with each other.
>
> I created a barebones project to show the problem:  https://github.com/ecemis/activemq-jsf-troubleshoot <https://github.com/ecemis/activemq-jsf-troubleshoot>
>
> The project has 2 scripts at top level:
>
> run_server.sh:  That’s how I start the server
> test_command.sh:  That’s the test script that fetches a JSF resource via curl. I ran this on a separate terminal
>
> And there are 3 tags you can checkout to test 3 cases:
>
> case-1-working:  This case doesn’t have ActiveMQ and test_command.sh can successfully fetch a JSF resource
> case-2-not-working:  This case adds resources.xml file that starts an embedded ActiveMQ broker. As a result, test_command.sh fails to fetch the JSF resource
> case-3-working:  This one changes the service from https to http, and  test_command.sh works again (while ActiveMQ broker is running)
>
> (You can checkout and try each case separately, e.g. git checkout case-2-not-working. You can also compare the changes between the cases via git diff, e.g. git diff case-1-working case-2-not-working)
>
> Note that fetching static files works in all cases. The problem I could observe so far is just with fetching JSF resources.
>
> All help will be greatly appreciated.
>
> Thanks,
>
> Ihsan.
>
>
> PS: For the impatient who wants to know the errors before cloning the sample project above, here is what curl gives me:
>
> * SSLRead() return error -9845
> * Closing connection 0
> curl: (56) SSLRead() return error -9845
>
>
> And here is what I get on the server:
>
> WARNING - JSF1064: Unable to find or serve resource, primefaces.js, from library, primefaces.
> WARNING -
> org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
>         at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
>         at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
>         at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
>         at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
>         at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
>         at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
>         at java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
>         at com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:358)
>         at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>         at org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87)
>         at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
>         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:655)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>         at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>         at org.apache.openejb.server.httpd.WebBeansFilter.doFilter(WebBeansFilter.java:52)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
>         at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>         at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
>         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
>         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
>         at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
>         at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.io.IOException: Broken pipe
>         at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
>         at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
>         at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
>         at sun.nio.ch.IOUtil.write(IOUtil.java:51)
>         at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
>         at org.apache.tomcat.util.net.SecureNioChannel.flush(SecureNioChannel.java:140)
>         at org.apache.tomcat.util.net.SecureNioChannel.write(SecureNioChannel.java:521)
>         at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
>         at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
>         at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
>         at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
>         at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
>         at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
>         at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:121)
>         at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
>         at org.apache.coyote.Response.doWrite(Response.java:501)
>         at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
>         ... 37 more
>
>