From matt at matthicks.com Mon Oct 9 12:49:02 2017 From: matt at matthicks.com (Hicks, Matt) Date: Mon, 09 Oct 2017 16:49:02 +0000 Subject: [undertow-dev] Java 9: sun.misc.Cleaner not found Message-ID: I just updated to Java 9 and have started getting the following exception: exampleJVM[ERROR] Oct 09, 2017 11:45:35 AM io.undertow.server.DirectByteBufferDeallocator exampleJVM[ERROR] ERROR: UT005091: Failed to initialize DirectByteBufferDeallocator exampleJVM[ERROR] java.lang.ClassNotFoundException: sun.misc.Cleaner exampleJVM[ERROR] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) exampleJVM[ERROR] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185) exampleJVM[ERROR] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496) exampleJVM[ERROR] at java.base/java.lang.Class.forName0(Native Method) exampleJVM[ERROR] at java.base/java.lang.Class.forName(Class.java:292) exampleJVM[ERROR] at io.undertow.server.DirectByteBufferDeallocator.(DirectByteBufferDeallocator.java:23) exampleJVM[ERROR] at io.undertow.server.DefaultByteBufferPool.queueIfUnderMax(DefaultByteBufferPool.java:207) exampleJVM[ERROR] at io.undertow.server.DefaultByteBufferPool.freeInternal(DefaultByteBufferPool.java:199) exampleJVM[ERROR] at io.undertow.server.DefaultByteBufferPool.access$200(DefaultByteBufferPool.java:41) exampleJVM[ERROR] at io.undertow.server.DefaultByteBufferPool$DefaultPooledBuffer.close(DefaultByteBufferPool.java:269) exampleJVM[ERROR] at io.undertow.conduits.DeflatingStreamSinkConduit.deflateData(DeflatingStreamSinkConduit.java:495) exampleJVM[ERROR] at io.undertow.conduits.DeflatingStreamSinkConduit.write(DeflatingStreamSinkConduit.java:117) exampleJVM[ERROR] at io.undertow.conduits.DeflatingStreamSinkConduit.write(DeflatingStreamSinkConduit.java:138) exampleJVM[ERROR] at org.xnio.conduits.ConduitStreamSinkChannel.write(ConduitStreamSinkChannel.java:154) exampleJVM[ERROR] at io.undertow.channels.DetachableStreamSinkChannel.write(DetachableStreamSinkChannel.java:187) exampleJVM[ERROR] at io.undertow.server.HttpServerExchange$WriteDispatchChannel.write(HttpServerExchange.java:2046) exampleJVM[ERROR] at io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:219) exampleJVM[ERROR] at io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:310) exampleJVM[ERROR] at io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:282) exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation$.handleStandard(UndertowServerImplementation.scala:250) exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation$.response(UndertowServerImplementation.scala:169) exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation.$anonfun$requestHandler$1(UndertowServerImplementation.scala:100) exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation.$anonfun$requestHandler$1$adapted(UndertowServerImplementation.scala:97) exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation$.handle$1(UndertowServerImplementation.scala:126) exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation$.processRequest(UndertowServerImplementation.scala:162) exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation.requestHandler(UndertowServerImplementation.scala:97) exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation.$anonfun$handleRequest$1(UndertowServerImplementation.scala:90) exampleJVM[ERROR] at io.youi.ErrorSupport.errorSupport(ErrorSupport.scala:11) exampleJVM[ERROR] at io.youi.ErrorSupport.errorSupport$(ErrorSupport.scala:10) exampleJVM[ERROR] at io.youi.example.ServerExampleApplication$.errorSupport(ServerExampleApplication.scala:8) exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation.handleRequest(UndertowServerImplementation.scala:74) exampleJVM[ERROR] at io.undertow.server.handlers.encoding.EncodingHandler.handleRequest(EncodingHandler.java:72) exampleJVM[ERROR] at io.undertow.server.Connectors.executeRootHandler(Connectors.java:332) exampleJVM[ERROR] at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:254) exampleJVM[ERROR] at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136) exampleJVM[ERROR] at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:151) exampleJVM[ERROR] at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:92) exampleJVM[ERROR] at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:51) exampleJVM[ERROR] at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) exampleJVM[ERROR] at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:291) exampleJVM[ERROR] at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286) exampleJVM[ERROR] at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) exampleJVM[ERROR] at org.xnio.nio.QueuedNioTcpServer$1.run(QueuedNioTcpServer.java:129) exampleJVM[ERROR] at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:582) exampleJVM[ERROR] at org.xnio.nio.WorkerThread.run(WorkerThread.java:466) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171009/16a5fd20/attachment-0001.html From tcerar at redhat.com Tue Oct 10 04:14:43 2017 From: tcerar at redhat.com (Tomaz Cerar) Date: Tue, 10 Oct 2017 10:14:43 +0200 Subject: [undertow-dev] Java 9: sun.misc.Cleaner not found In-Reply-To: References: Message-ID: JDK9 encapsulates the private classes properly now. adding something like --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED to your command line should probably fix it. On Mon, Oct 9, 2017 at 6:49 PM, Hicks, Matt wrote: > I just updated to Java 9 and have started getting the following exception: > > exampleJVM[ERROR] Oct 09, 2017 11:45:35 AM io.undertow.server.DirectByteBufferDeallocator > > exampleJVM[ERROR] ERROR: UT005091: Failed to initialize > DirectByteBufferDeallocator > exampleJVM[ERROR] java.lang.ClassNotFoundException: sun.misc.Cleaner > exampleJVM[ERROR] at java.base/jdk.internal.loader. > BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) > exampleJVM[ERROR] at java.base/jdk.internal.loader. > ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185) > exampleJVM[ERROR] at java.base/java.lang.ClassLoader.loadClass( > ClassLoader.java:496) > exampleJVM[ERROR] at java.base/java.lang.Class.forName0(Native Method) > exampleJVM[ERROR] at java.base/java.lang.Class.forName(Class.java:292) > exampleJVM[ERROR] at io.undertow.server.DirectByteBufferDeallocator.< > clinit>(DirectByteBufferDeallocator.java:23) > exampleJVM[ERROR] at io.undertow.server.DefaultByteBufferPool. > queueIfUnderMax(DefaultByteBufferPool.java:207) > exampleJVM[ERROR] at io.undertow.server.DefaultByteBufferPool. > freeInternal(DefaultByteBufferPool.java:199) > exampleJVM[ERROR] at io.undertow.server.DefaultByteBufferPool.access$ > 200(DefaultByteBufferPool.java:41) > exampleJVM[ERROR] at io.undertow.server.DefaultByteBufferPool$ > DefaultPooledBuffer.close(DefaultByteBufferPool.java:269) > exampleJVM[ERROR] at io.undertow.conduits.DeflatingStreamSinkConduit. > deflateData(DeflatingStreamSinkConduit.java:495) > exampleJVM[ERROR] at io.undertow.conduits.DeflatingStreamSinkConduit. > write(DeflatingStreamSinkConduit.java:117) > exampleJVM[ERROR] at io.undertow.conduits.DeflatingStreamSinkConduit. > write(DeflatingStreamSinkConduit.java:138) > exampleJVM[ERROR] at org.xnio.conduits.ConduitStreamSinkChannel.write( > ConduitStreamSinkChannel.java:154) > exampleJVM[ERROR] at io.undertow.channels.DetachableStreamSinkChannel. > write(DetachableStreamSinkChannel.java:187) > exampleJVM[ERROR] at io.undertow.server.HttpServerExchange$ > WriteDispatchChannel.write(HttpServerExchange.java:2046) > exampleJVM[ERROR] at io.undertow.io.AsyncSenderImpl.send( > AsyncSenderImpl.java:219) > exampleJVM[ERROR] at io.undertow.io.AsyncSenderImpl.send( > AsyncSenderImpl.java:310) > exampleJVM[ERROR] at io.undertow.io.AsyncSenderImpl.send( > AsyncSenderImpl.java:282) > exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation$. > handleStandard(UndertowServerImplementation.scala:250) > exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation$. > response(UndertowServerImplementation.scala:169) > exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation.$ > anonfun$requestHandler$1(UndertowServerImplementation.scala:100) > exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation.$ > anonfun$requestHandler$1$adapted(UndertowServerImplementation.scala:97) > exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation$. > handle$1(UndertowServerImplementation.scala:126) > exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation$. > processRequest(UndertowServerImplementation.scala:162) > exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation. > requestHandler(UndertowServerImplementation.scala:97) > exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation.$ > anonfun$handleRequest$1(UndertowServerImplementation.scala:90) > exampleJVM[ERROR] at io.youi.ErrorSupport.errorSupport(ErrorSupport. > scala:11) > exampleJVM[ERROR] at io.youi.ErrorSupport.errorSupport$(ErrorSupport. > scala:10) > exampleJVM[ERROR] at io.youi.example.ServerExampleApplication$. > errorSupport(ServerExampleApplication.scala:8) > exampleJVM[ERROR] at io.youi.server.UndertowServerImplementation. > handleRequest(UndertowServerImplementation.scala:74) > exampleJVM[ERROR] at io.undertow.server.handlers.encoding.EncodingHandler. > handleRequest(EncodingHandler.java:72) > exampleJVM[ERROR] at io.undertow.server.Connectors. > executeRootHandler(Connectors.java:332) > exampleJVM[ERROR] at io.undertow.server.protocol.http.HttpReadListener. > handleEventWithNoRunningRequest(HttpReadListener.java:254) > exampleJVM[ERROR] at io.undertow.server.protocol.http.HttpReadListener. > handleEvent(HttpReadListener.java:136) > exampleJVM[ERROR] at io.undertow.server.protocol.http.HttpOpenListener. > handleEvent(HttpOpenListener.java:151) > exampleJVM[ERROR] at io.undertow.server.protocol.http.HttpOpenListener. > handleEvent(HttpOpenListener.java:92) > exampleJVM[ERROR] at io.undertow.server.protocol.http.HttpOpenListener. > handleEvent(HttpOpenListener.java:51) > exampleJVM[ERROR] at org.xnio.ChannelListeners.invokeChannelListener( > ChannelListeners.java:92) > exampleJVM[ERROR] at org.xnio.ChannelListeners$10. > handleEvent(ChannelListeners.java:291) > exampleJVM[ERROR] at org.xnio.ChannelListeners$10. > handleEvent(ChannelListeners.java:286) > exampleJVM[ERROR] at org.xnio.ChannelListeners.invokeChannelListener( > ChannelListeners.java:92) > exampleJVM[ERROR] at org.xnio.nio.QueuedNioTcpServer$1.run( > QueuedNioTcpServer.java:129) > exampleJVM[ERROR] at org.xnio.nio.WorkerThread. > safeRun(WorkerThread.java:582) > exampleJVM[ERROR] at org.xnio.nio.WorkerThread.run(WorkerThread.java:466) > > _______________________________________________ > undertow-dev mailing list > undertow-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/undertow-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171010/88546da3/attachment.html From sdouglas at redhat.com Tue Oct 10 05:54:41 2017 From: sdouglas at redhat.com (Stuart Douglas) Date: Tue, 10 Oct 2017 11:54:41 +0200 Subject: [undertow-dev] Java 9: sun.misc.Cleaner not found In-Reply-To: References: Message-ID: You can safely ignore this, it will be fixed in a later release. Basically the only time it will make a difference is if you are using a buffer pool that is too small for the workload, so you are frequently allocating/deallocating direct buffers. Stuart On Mon, Oct 9, 2017 at 6:49 PM, Hicks, Matt wrote: > I just updated to Java 9 and have started getting the following exception: > > exampleJVM[ERROR] Oct 09, 2017 11:45:35 AM > io.undertow.server.DirectByteBufferDeallocator > exampleJVM[ERROR] ERROR: UT005091: Failed to initialize > DirectByteBufferDeallocator > exampleJVM[ERROR] java.lang.ClassNotFoundException: sun.misc.Cleaner > exampleJVM[ERROR] at > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) > exampleJVM[ERROR] at > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185) > exampleJVM[ERROR] at > java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496) > exampleJVM[ERROR] at java.base/java.lang.Class.forName0(Native Method) > exampleJVM[ERROR] at java.base/java.lang.Class.forName(Class.java:292) > exampleJVM[ERROR] at > io.undertow.server.DirectByteBufferDeallocator.(DirectByteBufferDeallocator.java:23) > exampleJVM[ERROR] at > io.undertow.server.DefaultByteBufferPool.queueIfUnderMax(DefaultByteBufferPool.java:207) > exampleJVM[ERROR] at > io.undertow.server.DefaultByteBufferPool.freeInternal(DefaultByteBufferPool.java:199) > exampleJVM[ERROR] at > io.undertow.server.DefaultByteBufferPool.access$200(DefaultByteBufferPool.java:41) > exampleJVM[ERROR] at > io.undertow.server.DefaultByteBufferPool$DefaultPooledBuffer.close(DefaultByteBufferPool.java:269) > exampleJVM[ERROR] at > io.undertow.conduits.DeflatingStreamSinkConduit.deflateData(DeflatingStreamSinkConduit.java:495) > exampleJVM[ERROR] at > io.undertow.conduits.DeflatingStreamSinkConduit.write(DeflatingStreamSinkConduit.java:117) > exampleJVM[ERROR] at > io.undertow.conduits.DeflatingStreamSinkConduit.write(DeflatingStreamSinkConduit.java:138) > exampleJVM[ERROR] at > org.xnio.conduits.ConduitStreamSinkChannel.write(ConduitStreamSinkChannel.java:154) > exampleJVM[ERROR] at > io.undertow.channels.DetachableStreamSinkChannel.write(DetachableStreamSinkChannel.java:187) > exampleJVM[ERROR] at > io.undertow.server.HttpServerExchange$WriteDispatchChannel.write(HttpServerExchange.java:2046) > exampleJVM[ERROR] at > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:219) > exampleJVM[ERROR] at > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:310) > exampleJVM[ERROR] at > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:282) > exampleJVM[ERROR] at > io.youi.server.UndertowServerImplementation$.handleStandard(UndertowServerImplementation.scala:250) > exampleJVM[ERROR] at > io.youi.server.UndertowServerImplementation$.response(UndertowServerImplementation.scala:169) > exampleJVM[ERROR] at > io.youi.server.UndertowServerImplementation.$anonfun$requestHandler$1(UndertowServerImplementation.scala:100) > exampleJVM[ERROR] at > io.youi.server.UndertowServerImplementation.$anonfun$requestHandler$1$adapted(UndertowServerImplementation.scala:97) > exampleJVM[ERROR] at > io.youi.server.UndertowServerImplementation$.handle$1(UndertowServerImplementation.scala:126) > exampleJVM[ERROR] at > io.youi.server.UndertowServerImplementation$.processRequest(UndertowServerImplementation.scala:162) > exampleJVM[ERROR] at > io.youi.server.UndertowServerImplementation.requestHandler(UndertowServerImplementation.scala:97) > exampleJVM[ERROR] at > io.youi.server.UndertowServerImplementation.$anonfun$handleRequest$1(UndertowServerImplementation.scala:90) > exampleJVM[ERROR] at > io.youi.ErrorSupport.errorSupport(ErrorSupport.scala:11) > exampleJVM[ERROR] at > io.youi.ErrorSupport.errorSupport$(ErrorSupport.scala:10) > exampleJVM[ERROR] at > io.youi.example.ServerExampleApplication$.errorSupport(ServerExampleApplication.scala:8) > exampleJVM[ERROR] at > io.youi.server.UndertowServerImplementation.handleRequest(UndertowServerImplementation.scala:74) > exampleJVM[ERROR] at > io.undertow.server.handlers.encoding.EncodingHandler.handleRequest(EncodingHandler.java:72) > exampleJVM[ERROR] at > io.undertow.server.Connectors.executeRootHandler(Connectors.java:332) > exampleJVM[ERROR] at > io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:254) > exampleJVM[ERROR] at > io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136) > exampleJVM[ERROR] at > io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:151) > exampleJVM[ERROR] at > io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:92) > exampleJVM[ERROR] at > io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:51) > exampleJVM[ERROR] at > org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) > exampleJVM[ERROR] at > org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:291) > exampleJVM[ERROR] at > org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286) > exampleJVM[ERROR] at > org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) > exampleJVM[ERROR] at > org.xnio.nio.QueuedNioTcpServer$1.run(QueuedNioTcpServer.java:129) > exampleJVM[ERROR] at > org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:582) > exampleJVM[ERROR] at org.xnio.nio.WorkerThread.run(WorkerThread.java:466) > > _______________________________________________ > undertow-dev mailing list > undertow-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/undertow-dev From matt at matthicks.com Tue Oct 10 10:21:06 2017 From: matt at matthicks.com (Hicks, Matt) Date: Tue, 10 Oct 2017 14:21:06 +0000 Subject: [undertow-dev] Java 9: sun.misc.Cleaner not found In-Reply-To: References: Message-ID: Stuart, it seems to cause videos not to be able play properly, so I can't exactly ignore it. Switching back to Java 8 for now until this is resolved. On Tue, Oct 10, 2017 at 4:54 AM Stuart Douglas wrote: > You can safely ignore this, it will be fixed in a later release. > > Basically the only time it will make a difference is if you are using > a buffer pool that is too small for the workload, so you are > frequently allocating/deallocating direct buffers. > > Stuart > > On Mon, Oct 9, 2017 at 6:49 PM, Hicks, Matt wrote: > > I just updated to Java 9 and have started getting the following > exception: > > > > exampleJVM[ERROR] Oct 09, 2017 11:45:35 AM > > io.undertow.server.DirectByteBufferDeallocator > > exampleJVM[ERROR] ERROR: UT005091: Failed to initialize > > DirectByteBufferDeallocator > > exampleJVM[ERROR] java.lang.ClassNotFoundException: sun.misc.Cleaner > > exampleJVM[ERROR] at > > > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) > > exampleJVM[ERROR] at > > > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185) > > exampleJVM[ERROR] at > > java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496) > > exampleJVM[ERROR] at java.base/java.lang.Class.forName0(Native Method) > > exampleJVM[ERROR] at java.base/java.lang.Class.forName(Class.java:292) > > exampleJVM[ERROR] at > > > io.undertow.server.DirectByteBufferDeallocator.(DirectByteBufferDeallocator.java:23) > > exampleJVM[ERROR] at > > > io.undertow.server.DefaultByteBufferPool.queueIfUnderMax(DefaultByteBufferPool.java:207) > > exampleJVM[ERROR] at > > > io.undertow.server.DefaultByteBufferPool.freeInternal(DefaultByteBufferPool.java:199) > > exampleJVM[ERROR] at > > > io.undertow.server.DefaultByteBufferPool.access$200(DefaultByteBufferPool.java:41) > > exampleJVM[ERROR] at > > > io.undertow.server.DefaultByteBufferPool$DefaultPooledBuffer.close(DefaultByteBufferPool.java:269) > > exampleJVM[ERROR] at > > > io.undertow.conduits.DeflatingStreamSinkConduit.deflateData(DeflatingStreamSinkConduit.java:495) > > exampleJVM[ERROR] at > > > io.undertow.conduits.DeflatingStreamSinkConduit.write(DeflatingStreamSinkConduit.java:117) > > exampleJVM[ERROR] at > > > io.undertow.conduits.DeflatingStreamSinkConduit.write(DeflatingStreamSinkConduit.java:138) > > exampleJVM[ERROR] at > > > org.xnio.conduits.ConduitStreamSinkChannel.write(ConduitStreamSinkChannel.java:154) > > exampleJVM[ERROR] at > > > io.undertow.channels.DetachableStreamSinkChannel.write(DetachableStreamSinkChannel.java:187) > > exampleJVM[ERROR] at > > > io.undertow.server.HttpServerExchange$WriteDispatchChannel.write(HttpServerExchange.java:2046) > > exampleJVM[ERROR] at > > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:219) > > exampleJVM[ERROR] at > > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:310) > > exampleJVM[ERROR] at > > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:282) > > exampleJVM[ERROR] at > > > io.youi.server.UndertowServerImplementation$.handleStandard(UndertowServerImplementation.scala:250) > > exampleJVM[ERROR] at > > > io.youi.server.UndertowServerImplementation$.response(UndertowServerImplementation.scala:169) > > exampleJVM[ERROR] at > > > io.youi.server.UndertowServerImplementation.$anonfun$requestHandler$1(UndertowServerImplementation.scala:100) > > exampleJVM[ERROR] at > > > io.youi.server.UndertowServerImplementation.$anonfun$requestHandler$1$adapted(UndertowServerImplementation.scala:97) > > exampleJVM[ERROR] at > > > io.youi.server.UndertowServerImplementation$.handle$1(UndertowServerImplementation.scala:126) > > exampleJVM[ERROR] at > > > io.youi.server.UndertowServerImplementation$.processRequest(UndertowServerImplementation.scala:162) > > exampleJVM[ERROR] at > > > io.youi.server.UndertowServerImplementation.requestHandler(UndertowServerImplementation.scala:97) > > exampleJVM[ERROR] at > > > io.youi.server.UndertowServerImplementation.$anonfun$handleRequest$1(UndertowServerImplementation.scala:90) > > exampleJVM[ERROR] at > > io.youi.ErrorSupport.errorSupport(ErrorSupport.scala:11) > > exampleJVM[ERROR] at > > io.youi.ErrorSupport.errorSupport$(ErrorSupport.scala:10) > > exampleJVM[ERROR] at > > > io.youi.example.ServerExampleApplication$.errorSupport(ServerExampleApplication.scala:8) > > exampleJVM[ERROR] at > > > io.youi.server.UndertowServerImplementation.handleRequest(UndertowServerImplementation.scala:74) > > exampleJVM[ERROR] at > > > io.undertow.server.handlers.encoding.EncodingHandler.handleRequest(EncodingHandler.java:72) > > exampleJVM[ERROR] at > > io.undertow.server.Connectors.executeRootHandler(Connectors.java:332) > > exampleJVM[ERROR] at > > > io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:254) > > exampleJVM[ERROR] at > > > io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136) > > exampleJVM[ERROR] at > > > io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:151) > > exampleJVM[ERROR] at > > > io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:92) > > exampleJVM[ERROR] at > > > io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:51) > > exampleJVM[ERROR] at > > org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) > > exampleJVM[ERROR] at > > org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:291) > > exampleJVM[ERROR] at > > org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286) > > exampleJVM[ERROR] at > > org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) > > exampleJVM[ERROR] at > > org.xnio.nio.QueuedNioTcpServer$1.run(QueuedNioTcpServer.java:129) > > exampleJVM[ERROR] at > > org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:582) > > exampleJVM[ERROR] at org.xnio.nio.WorkerThread.run(WorkerThread.java:466) > > > > _______________________________________________ > > undertow-dev mailing list > > undertow-dev at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/undertow-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171010/51077500/attachment-0001.html From sdouglas at redhat.com Tue Oct 10 16:48:28 2017 From: sdouglas at redhat.com (Stuart Douglas) Date: Tue, 10 Oct 2017 22:48:28 +0200 Subject: [undertow-dev] Java 9: sun.misc.Cleaner not found In-Reply-To: References: Message-ID: Are you sure it is related? In theory the code should just log the error and then be a NOOP. I sounds like maybe this is a different issue with JDK9? Stuart On Tue, Oct 10, 2017 at 4:21 PM, Hicks, Matt wrote: > Stuart, it seems to cause videos not to be able play properly, so I can't > exactly ignore it. Switching back to Java 8 for now until this is resolved. > > On Tue, Oct 10, 2017 at 4:54 AM Stuart Douglas wrote: >> >> You can safely ignore this, it will be fixed in a later release. >> >> Basically the only time it will make a difference is if you are using >> a buffer pool that is too small for the workload, so you are >> frequently allocating/deallocating direct buffers. >> >> Stuart >> >> On Mon, Oct 9, 2017 at 6:49 PM, Hicks, Matt wrote: >> > I just updated to Java 9 and have started getting the following >> > exception: >> > >> > exampleJVM[ERROR] Oct 09, 2017 11:45:35 AM >> > io.undertow.server.DirectByteBufferDeallocator >> > exampleJVM[ERROR] ERROR: UT005091: Failed to initialize >> > DirectByteBufferDeallocator >> > exampleJVM[ERROR] java.lang.ClassNotFoundException: sun.misc.Cleaner >> > exampleJVM[ERROR] at >> > >> > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) >> > exampleJVM[ERROR] at >> > >> > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185) >> > exampleJVM[ERROR] at >> > java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496) >> > exampleJVM[ERROR] at java.base/java.lang.Class.forName0(Native Method) >> > exampleJVM[ERROR] at java.base/java.lang.Class.forName(Class.java:292) >> > exampleJVM[ERROR] at >> > >> > io.undertow.server.DirectByteBufferDeallocator.(DirectByteBufferDeallocator.java:23) >> > exampleJVM[ERROR] at >> > >> > io.undertow.server.DefaultByteBufferPool.queueIfUnderMax(DefaultByteBufferPool.java:207) >> > exampleJVM[ERROR] at >> > >> > io.undertow.server.DefaultByteBufferPool.freeInternal(DefaultByteBufferPool.java:199) >> > exampleJVM[ERROR] at >> > >> > io.undertow.server.DefaultByteBufferPool.access$200(DefaultByteBufferPool.java:41) >> > exampleJVM[ERROR] at >> > >> > io.undertow.server.DefaultByteBufferPool$DefaultPooledBuffer.close(DefaultByteBufferPool.java:269) >> > exampleJVM[ERROR] at >> > >> > io.undertow.conduits.DeflatingStreamSinkConduit.deflateData(DeflatingStreamSinkConduit.java:495) >> > exampleJVM[ERROR] at >> > >> > io.undertow.conduits.DeflatingStreamSinkConduit.write(DeflatingStreamSinkConduit.java:117) >> > exampleJVM[ERROR] at >> > >> > io.undertow.conduits.DeflatingStreamSinkConduit.write(DeflatingStreamSinkConduit.java:138) >> > exampleJVM[ERROR] at >> > >> > org.xnio.conduits.ConduitStreamSinkChannel.write(ConduitStreamSinkChannel.java:154) >> > exampleJVM[ERROR] at >> > >> > io.undertow.channels.DetachableStreamSinkChannel.write(DetachableStreamSinkChannel.java:187) >> > exampleJVM[ERROR] at >> > >> > io.undertow.server.HttpServerExchange$WriteDispatchChannel.write(HttpServerExchange.java:2046) >> > exampleJVM[ERROR] at >> > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:219) >> > exampleJVM[ERROR] at >> > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:310) >> > exampleJVM[ERROR] at >> > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:282) >> > exampleJVM[ERROR] at >> > >> > io.youi.server.UndertowServerImplementation$.handleStandard(UndertowServerImplementation.scala:250) >> > exampleJVM[ERROR] at >> > >> > io.youi.server.UndertowServerImplementation$.response(UndertowServerImplementation.scala:169) >> > exampleJVM[ERROR] at >> > >> > io.youi.server.UndertowServerImplementation.$anonfun$requestHandler$1(UndertowServerImplementation.scala:100) >> > exampleJVM[ERROR] at >> > >> > io.youi.server.UndertowServerImplementation.$anonfun$requestHandler$1$adapted(UndertowServerImplementation.scala:97) >> > exampleJVM[ERROR] at >> > >> > io.youi.server.UndertowServerImplementation$.handle$1(UndertowServerImplementation.scala:126) >> > exampleJVM[ERROR] at >> > >> > io.youi.server.UndertowServerImplementation$.processRequest(UndertowServerImplementation.scala:162) >> > exampleJVM[ERROR] at >> > >> > io.youi.server.UndertowServerImplementation.requestHandler(UndertowServerImplementation.scala:97) >> > exampleJVM[ERROR] at >> > >> > io.youi.server.UndertowServerImplementation.$anonfun$handleRequest$1(UndertowServerImplementation.scala:90) >> > exampleJVM[ERROR] at >> > io.youi.ErrorSupport.errorSupport(ErrorSupport.scala:11) >> > exampleJVM[ERROR] at >> > io.youi.ErrorSupport.errorSupport$(ErrorSupport.scala:10) >> > exampleJVM[ERROR] at >> > >> > io.youi.example.ServerExampleApplication$.errorSupport(ServerExampleApplication.scala:8) >> > exampleJVM[ERROR] at >> > >> > io.youi.server.UndertowServerImplementation.handleRequest(UndertowServerImplementation.scala:74) >> > exampleJVM[ERROR] at >> > >> > io.undertow.server.handlers.encoding.EncodingHandler.handleRequest(EncodingHandler.java:72) >> > exampleJVM[ERROR] at >> > io.undertow.server.Connectors.executeRootHandler(Connectors.java:332) >> > exampleJVM[ERROR] at >> > >> > io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:254) >> > exampleJVM[ERROR] at >> > >> > io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136) >> > exampleJVM[ERROR] at >> > >> > io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:151) >> > exampleJVM[ERROR] at >> > >> > io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:92) >> > exampleJVM[ERROR] at >> > >> > io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:51) >> > exampleJVM[ERROR] at >> > >> > org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) >> > exampleJVM[ERROR] at >> > org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:291) >> > exampleJVM[ERROR] at >> > org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286) >> > exampleJVM[ERROR] at >> > >> > org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) >> > exampleJVM[ERROR] at >> > org.xnio.nio.QueuedNioTcpServer$1.run(QueuedNioTcpServer.java:129) >> > exampleJVM[ERROR] at >> > org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:582) >> > exampleJVM[ERROR] at >> > org.xnio.nio.WorkerThread.run(WorkerThread.java:466) >> > >> > _______________________________________________ >> > undertow-dev mailing list >> > undertow-dev at lists.jboss.org >> > https://lists.jboss.org/mailman/listinfo/undertow-dev From rwfnewsletters at gmail.com Tue Oct 10 18:14:06 2017 From: rwfnewsletters at gmail.com (Richard Fuller) Date: Tue, 10 Oct 2017 17:14:06 -0500 Subject: [undertow-dev] Expose metrics in Spring Boot environment Message-ID: Hello, We have recently moved from Weblogic to Spring Boot and decided to use Undertow instead of Tomcat. Everything seems to be working great but would like to be able to see metrics such as threads used in pool, max threads in pool, current requests, etc. It does not appear these are exposed through JMX. Is there a way to get metrics such as these? Thanks in advance, Wayne -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171010/78d915c8/attachment.html From sdouglas at redhat.com Wed Oct 11 05:13:18 2017 From: sdouglas at redhat.com (Stuart Douglas) Date: Wed, 11 Oct 2017 11:13:18 +0200 Subject: [undertow-dev] Expose metrics in Spring Boot environment In-Reply-To: References: Message-ID: Undertow does not provide JMX beans out of the box, but it does provide ways of getting this information programatically. The reason for this is because Undertow is designed to be embeddable, it is left up to the embedding container as to how to expose this information. There are a few places statistics are gathered: - Inside XNIO (which does provide a JMX bean), this provides information on thread pool sizes - On a per connector level you can call io.undertow.Undertow.ListenerInfo#getConnectorStatistics (which you obtain by calling io.undertow.Undertow#getListenerInfo) - Using io.undertow.server.handlers.MetricsHandler. If this is installed as the root handler then it will collect server wide statistics, alternatively you can install it on specific paths to get information about requests to specific paths. Stuart On Wed, Oct 11, 2017 at 12:14 AM, Richard Fuller wrote: > Hello, > > We have recently moved from Weblogic to Spring Boot and decided to use > Undertow instead of Tomcat. Everything seems to be working great but would > like to be able to see metrics such as threads used in pool, max threads in > pool, current requests, etc. It does not appear these are exposed through > JMX. Is there a way to get metrics such as these? > > Thanks in advance, > Wayne > > _______________________________________________ > undertow-dev mailing list > undertow-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/undertow-dev From tcerar at redhat.com Wed Oct 11 10:05:26 2017 From: tcerar at redhat.com (Tomaz Cerar) Date: Wed, 11 Oct 2017 16:05:26 +0200 Subject: [undertow-dev] Java 9: sun.misc.Cleaner not found In-Reply-To: References: Message-ID: Adding --add-exports switch doesn't help? On Tue, Oct 10, 2017 at 4:21 PM, Hicks, Matt wrote: > Stuart, it seems to cause videos not to be able play properly, so I can't > exactly ignore it. Switching back to Java 8 for now until this is resolved. > > On Tue, Oct 10, 2017 at 4:54 AM Stuart Douglas > wrote: > >> You can safely ignore this, it will be fixed in a later release. >> >> Basically the only time it will make a difference is if you are using >> a buffer pool that is too small for the workload, so you are >> frequently allocating/deallocating direct buffers. >> >> Stuart >> >> On Mon, Oct 9, 2017 at 6:49 PM, Hicks, Matt wrote: >> > I just updated to Java 9 and have started getting the following >> exception: >> > >> > exampleJVM[ERROR] Oct 09, 2017 11:45:35 AM >> > io.undertow.server.DirectByteBufferDeallocator >> > exampleJVM[ERROR] ERROR: UT005091: Failed to initialize >> > DirectByteBufferDeallocator >> > exampleJVM[ERROR] java.lang.ClassNotFoundException: sun.misc.Cleaner >> > exampleJVM[ERROR] at >> > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass( >> BuiltinClassLoader.java:582) >> > exampleJVM[ERROR] at >> > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader. >> loadClass(ClassLoaders.java:185) >> > exampleJVM[ERROR] at >> > java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496) >> > exampleJVM[ERROR] at java.base/java.lang.Class.forName0(Native Method) >> > exampleJVM[ERROR] at java.base/java.lang.Class.forName(Class.java:292) >> > exampleJVM[ERROR] at >> > io.undertow.server.DirectByteBufferDeallocator.( >> DirectByteBufferDeallocator.java:23) >> > exampleJVM[ERROR] at >> > io.undertow.server.DefaultByteBufferPool.queueIfUnderMax( >> DefaultByteBufferPool.java:207) >> > exampleJVM[ERROR] at >> > io.undertow.server.DefaultByteBufferPool.freeInternal( >> DefaultByteBufferPool.java:199) >> > exampleJVM[ERROR] at >> > io.undertow.server.DefaultByteBufferPool.access$ >> 200(DefaultByteBufferPool.java:41) >> > exampleJVM[ERROR] at >> > io.undertow.server.DefaultByteBufferPool$DefaultPooledBuffer.close( >> DefaultByteBufferPool.java:269) >> > exampleJVM[ERROR] at >> > io.undertow.conduits.DeflatingStreamSinkConduit.deflateData( >> DeflatingStreamSinkConduit.java:495) >> > exampleJVM[ERROR] at >> > io.undertow.conduits.DeflatingStreamSinkConduit.write( >> DeflatingStreamSinkConduit.java:117) >> > exampleJVM[ERROR] at >> > io.undertow.conduits.DeflatingStreamSinkConduit.write( >> DeflatingStreamSinkConduit.java:138) >> > exampleJVM[ERROR] at >> > org.xnio.conduits.ConduitStreamSinkChannel.write( >> ConduitStreamSinkChannel.java:154) >> > exampleJVM[ERROR] at >> > io.undertow.channels.DetachableStreamSinkChannel.write( >> DetachableStreamSinkChannel.java:187) >> > exampleJVM[ERROR] at >> > io.undertow.server.HttpServerExchange$WriteDispatchChannel.write( >> HttpServerExchange.java:2046) >> > exampleJVM[ERROR] at >> > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:219) >> > exampleJVM[ERROR] at >> > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:310) >> > exampleJVM[ERROR] at >> > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:282) >> > exampleJVM[ERROR] at >> > io.youi.server.UndertowServerImplementation$.handleStandard( >> UndertowServerImplementation.scala:250) >> > exampleJVM[ERROR] at >> > io.youi.server.UndertowServerImplementation$.response( >> UndertowServerImplementation.scala:169) >> > exampleJVM[ERROR] at >> > io.youi.server.UndertowServerImplementation.$anonfun$requestHandler$1( >> UndertowServerImplementation.scala:100) >> > exampleJVM[ERROR] at >> > io.youi.server.UndertowServerImplementation.$anonfun$requestHandler$1$ >> adapted(UndertowServerImplementation.scala:97) >> > exampleJVM[ERROR] at >> > io.youi.server.UndertowServerImplementation$.handle$1( >> UndertowServerImplementation.scala:126) >> > exampleJVM[ERROR] at >> > io.youi.server.UndertowServerImplementation$.processRequest( >> UndertowServerImplementation.scala:162) >> > exampleJVM[ERROR] at >> > io.youi.server.UndertowServerImplementation.requestHandler( >> UndertowServerImplementation.scala:97) >> > exampleJVM[ERROR] at >> > io.youi.server.UndertowServerImplementation.$anonfun$handleRequest$1( >> UndertowServerImplementation.scala:90) >> > exampleJVM[ERROR] at >> > io.youi.ErrorSupport.errorSupport(ErrorSupport.scala:11) >> > exampleJVM[ERROR] at >> > io.youi.ErrorSupport.errorSupport$(ErrorSupport.scala:10) >> > exampleJVM[ERROR] at >> > io.youi.example.ServerExampleApplication$.errorSupport( >> ServerExampleApplication.scala:8) >> > exampleJVM[ERROR] at >> > io.youi.server.UndertowServerImplementation.handleRequest( >> UndertowServerImplementation.scala:74) >> > exampleJVM[ERROR] at >> > io.undertow.server.handlers.encoding.EncodingHandler. >> handleRequest(EncodingHandler.java:72) >> > exampleJVM[ERROR] at >> > io.undertow.server.Connectors.executeRootHandler(Connectors.java:332) >> > exampleJVM[ERROR] at >> > io.undertow.server.protocol.http.HttpReadListener. >> handleEventWithNoRunningRequest(HttpReadListener.java:254) >> > exampleJVM[ERROR] at >> > io.undertow.server.protocol.http.HttpReadListener. >> handleEvent(HttpReadListener.java:136) >> > exampleJVM[ERROR] at >> > io.undertow.server.protocol.http.HttpOpenListener. >> handleEvent(HttpOpenListener.java:151) >> > exampleJVM[ERROR] at >> > io.undertow.server.protocol.http.HttpOpenListener. >> handleEvent(HttpOpenListener.java:92) >> > exampleJVM[ERROR] at >> > io.undertow.server.protocol.http.HttpOpenListener. >> handleEvent(HttpOpenListener.java:51) >> > exampleJVM[ERROR] at >> > org.xnio.ChannelListeners.invokeChannelListener( >> ChannelListeners.java:92) >> > exampleJVM[ERROR] at >> > org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:291) >> > exampleJVM[ERROR] at >> > org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286) >> > exampleJVM[ERROR] at >> > org.xnio.ChannelListeners.invokeChannelListener( >> ChannelListeners.java:92) >> > exampleJVM[ERROR] at >> > org.xnio.nio.QueuedNioTcpServer$1.run(QueuedNioTcpServer.java:129) >> > exampleJVM[ERROR] at >> > org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:582) >> > exampleJVM[ERROR] at org.xnio.nio.WorkerThread.run( >> WorkerThread.java:466) >> > >> > _______________________________________________ >> > undertow-dev mailing list >> > undertow-dev at lists.jboss.org >> > https://lists.jboss.org/mailman/listinfo/undertow-dev >> > > _______________________________________________ > undertow-dev mailing list > undertow-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/undertow-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171011/bf53f37b/attachment-0001.html From matt at matthicks.com Wed Oct 11 10:20:55 2017 From: matt at matthicks.com (Hicks, Matt) Date: Wed, 11 Oct 2017 14:20:55 +0000 Subject: [undertow-dev] Java 9: sun.misc.Cleaner not found In-Reply-To: References: Message-ID: I haven't had a chance to test again. I'll send out another message once I get around to switching back to JDK9. On Wed, Oct 11, 2017 at 9:05 AM Tomaz Cerar wrote: > Adding --add-exports switch doesn't help? > > On Tue, Oct 10, 2017 at 4:21 PM, Hicks, Matt wrote: > >> Stuart, it seems to cause videos not to be able play properly, so I can't >> exactly ignore it. Switching back to Java 8 for now until this is resolved. >> >> On Tue, Oct 10, 2017 at 4:54 AM Stuart Douglas >> wrote: >> >>> You can safely ignore this, it will be fixed in a later release. >>> >>> Basically the only time it will make a difference is if you are using >>> a buffer pool that is too small for the workload, so you are >>> frequently allocating/deallocating direct buffers. >>> >>> Stuart >>> >>> On Mon, Oct 9, 2017 at 6:49 PM, Hicks, Matt wrote: >>> > I just updated to Java 9 and have started getting the following >>> exception: >>> > >>> > exampleJVM[ERROR] Oct 09, 2017 11:45:35 AM >>> > io.undertow.server.DirectByteBufferDeallocator >>> > exampleJVM[ERROR] ERROR: UT005091: Failed to initialize >>> > DirectByteBufferDeallocator >>> > exampleJVM[ERROR] java.lang.ClassNotFoundException: sun.misc.Cleaner >>> > exampleJVM[ERROR] at >>> > >>> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) >>> > exampleJVM[ERROR] at >>> > >>> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185) >>> > exampleJVM[ERROR] at >>> > java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496) >>> > exampleJVM[ERROR] at java.base/java.lang.Class.forName0(Native Method) >>> > exampleJVM[ERROR] at java.base/java.lang.Class.forName(Class.java:292) >>> > exampleJVM[ERROR] at >>> > >>> io.undertow.server.DirectByteBufferDeallocator.(DirectByteBufferDeallocator.java:23) >>> > exampleJVM[ERROR] at >>> > >>> io.undertow.server.DefaultByteBufferPool.queueIfUnderMax(DefaultByteBufferPool.java:207) >>> > exampleJVM[ERROR] at >>> > >>> io.undertow.server.DefaultByteBufferPool.freeInternal(DefaultByteBufferPool.java:199) >>> > exampleJVM[ERROR] at >>> > >>> io.undertow.server.DefaultByteBufferPool.access$200(DefaultByteBufferPool.java:41) >>> > exampleJVM[ERROR] at >>> > >>> io.undertow.server.DefaultByteBufferPool$DefaultPooledBuffer.close(DefaultByteBufferPool.java:269) >>> > exampleJVM[ERROR] at >>> > >>> io.undertow.conduits.DeflatingStreamSinkConduit.deflateData(DeflatingStreamSinkConduit.java:495) >>> > exampleJVM[ERROR] at >>> > >>> io.undertow.conduits.DeflatingStreamSinkConduit.write(DeflatingStreamSinkConduit.java:117) >>> > exampleJVM[ERROR] at >>> > >>> io.undertow.conduits.DeflatingStreamSinkConduit.write(DeflatingStreamSinkConduit.java:138) >>> > exampleJVM[ERROR] at >>> > >>> org.xnio.conduits.ConduitStreamSinkChannel.write(ConduitStreamSinkChannel.java:154) >>> > exampleJVM[ERROR] at >>> > >>> io.undertow.channels.DetachableStreamSinkChannel.write(DetachableStreamSinkChannel.java:187) >>> > exampleJVM[ERROR] at >>> > >>> io.undertow.server.HttpServerExchange$WriteDispatchChannel.write(HttpServerExchange.java:2046) >>> > exampleJVM[ERROR] at >>> > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:219) >>> > exampleJVM[ERROR] at >>> > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:310) >>> > exampleJVM[ERROR] at >>> > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:282) >>> > exampleJVM[ERROR] at >>> > >>> io.youi.server.UndertowServerImplementation$.handleStandard(UndertowServerImplementation.scala:250) >>> > exampleJVM[ERROR] at >>> > >>> io.youi.server.UndertowServerImplementation$.response(UndertowServerImplementation.scala:169) >>> > exampleJVM[ERROR] at >>> > >>> io.youi.server.UndertowServerImplementation.$anonfun$requestHandler$1(UndertowServerImplementation.scala:100) >>> > exampleJVM[ERROR] at >>> > >>> io.youi.server.UndertowServerImplementation.$anonfun$requestHandler$1$adapted(UndertowServerImplementation.scala:97) >>> > exampleJVM[ERROR] at >>> > >>> io.youi.server.UndertowServerImplementation$.handle$1(UndertowServerImplementation.scala:126) >>> > exampleJVM[ERROR] at >>> > >>> io.youi.server.UndertowServerImplementation$.processRequest(UndertowServerImplementation.scala:162) >>> > exampleJVM[ERROR] at >>> > >>> io.youi.server.UndertowServerImplementation.requestHandler(UndertowServerImplementation.scala:97) >>> > exampleJVM[ERROR] at >>> > >>> io.youi.server.UndertowServerImplementation.$anonfun$handleRequest$1(UndertowServerImplementation.scala:90) >>> > exampleJVM[ERROR] at >>> > io.youi.ErrorSupport.errorSupport(ErrorSupport.scala:11) >>> > exampleJVM[ERROR] at >>> > io.youi.ErrorSupport.errorSupport$(ErrorSupport.scala:10) >>> > exampleJVM[ERROR] at >>> > >>> io.youi.example.ServerExampleApplication$.errorSupport(ServerExampleApplication.scala:8) >>> > exampleJVM[ERROR] at >>> > >>> io.youi.server.UndertowServerImplementation.handleRequest(UndertowServerImplementation.scala:74) >>> > exampleJVM[ERROR] at >>> > >>> io.undertow.server.handlers.encoding.EncodingHandler.handleRequest(EncodingHandler.java:72) >>> > exampleJVM[ERROR] at >>> > io.undertow.server.Connectors.executeRootHandler(Connectors.java:332) >>> > exampleJVM[ERROR] at >>> > >>> io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:254) >>> > exampleJVM[ERROR] at >>> > >>> io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136) >>> > exampleJVM[ERROR] at >>> > >>> io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:151) >>> > exampleJVM[ERROR] at >>> > >>> io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:92) >>> > exampleJVM[ERROR] at >>> > >>> io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:51) >>> > exampleJVM[ERROR] at >>> > >>> org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) >>> > exampleJVM[ERROR] at >>> > org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:291) >>> > exampleJVM[ERROR] at >>> > org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286) >>> > exampleJVM[ERROR] at >>> > >>> org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) >>> > exampleJVM[ERROR] at >>> > org.xnio.nio.QueuedNioTcpServer$1.run(QueuedNioTcpServer.java:129) >>> > exampleJVM[ERROR] at >>> > org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:582) >>> > exampleJVM[ERROR] at >>> org.xnio.nio.WorkerThread.run(WorkerThread.java:466) >>> > >>> > _______________________________________________ >>> > undertow-dev mailing list >>> > undertow-dev at lists.jboss.org >>> > https://lists.jboss.org/mailman/listinfo/undertow-dev >>> >> >> _______________________________________________ >> undertow-dev mailing list >> undertow-dev at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/undertow-dev >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171011/b711903a/attachment.html From sdouglas at redhat.com Thu Oct 12 07:16:12 2017 From: sdouglas at redhat.com (Stuart Douglas) Date: Thu, 12 Oct 2017 13:16:12 +0200 Subject: [undertow-dev] Java 9: sun.misc.Cleaner not found In-Reply-To: References: Message-ID: This is fixed upstream, it should not be a problem in the next release. Stuart On Wed, Oct 11, 2017 at 4:20 PM, Hicks, Matt wrote: > I haven't had a chance to test again. I'll send out another message once I > get around to switching back to JDK9. > > On Wed, Oct 11, 2017 at 9:05 AM Tomaz Cerar wrote: >> >> Adding --add-exports switch doesn't help? >> >> On Tue, Oct 10, 2017 at 4:21 PM, Hicks, Matt wrote: >>> >>> Stuart, it seems to cause videos not to be able play properly, so I can't >>> exactly ignore it. Switching back to Java 8 for now until this is resolved. >>> >>> On Tue, Oct 10, 2017 at 4:54 AM Stuart Douglas >>> wrote: >>>> >>>> You can safely ignore this, it will be fixed in a later release. >>>> >>>> Basically the only time it will make a difference is if you are using >>>> a buffer pool that is too small for the workload, so you are >>>> frequently allocating/deallocating direct buffers. >>>> >>>> Stuart >>>> >>>> On Mon, Oct 9, 2017 at 6:49 PM, Hicks, Matt wrote: >>>> > I just updated to Java 9 and have started getting the following >>>> > exception: >>>> > >>>> > exampleJVM[ERROR] Oct 09, 2017 11:45:35 AM >>>> > io.undertow.server.DirectByteBufferDeallocator >>>> > exampleJVM[ERROR] ERROR: UT005091: Failed to initialize >>>> > DirectByteBufferDeallocator >>>> > exampleJVM[ERROR] java.lang.ClassNotFoundException: sun.misc.Cleaner >>>> > exampleJVM[ERROR] at >>>> > >>>> > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) >>>> > exampleJVM[ERROR] at >>>> > >>>> > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185) >>>> > exampleJVM[ERROR] at >>>> > java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496) >>>> > exampleJVM[ERROR] at java.base/java.lang.Class.forName0(Native Method) >>>> > exampleJVM[ERROR] at java.base/java.lang.Class.forName(Class.java:292) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.undertow.server.DirectByteBufferDeallocator.(DirectByteBufferDeallocator.java:23) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.undertow.server.DefaultByteBufferPool.queueIfUnderMax(DefaultByteBufferPool.java:207) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.undertow.server.DefaultByteBufferPool.freeInternal(DefaultByteBufferPool.java:199) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.undertow.server.DefaultByteBufferPool.access$200(DefaultByteBufferPool.java:41) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.undertow.server.DefaultByteBufferPool$DefaultPooledBuffer.close(DefaultByteBufferPool.java:269) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.undertow.conduits.DeflatingStreamSinkConduit.deflateData(DeflatingStreamSinkConduit.java:495) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.undertow.conduits.DeflatingStreamSinkConduit.write(DeflatingStreamSinkConduit.java:117) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.undertow.conduits.DeflatingStreamSinkConduit.write(DeflatingStreamSinkConduit.java:138) >>>> > exampleJVM[ERROR] at >>>> > >>>> > org.xnio.conduits.ConduitStreamSinkChannel.write(ConduitStreamSinkChannel.java:154) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.undertow.channels.DetachableStreamSinkChannel.write(DetachableStreamSinkChannel.java:187) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.undertow.server.HttpServerExchange$WriteDispatchChannel.write(HttpServerExchange.java:2046) >>>> > exampleJVM[ERROR] at >>>> > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:219) >>>> > exampleJVM[ERROR] at >>>> > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:310) >>>> > exampleJVM[ERROR] at >>>> > io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:282) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.youi.server.UndertowServerImplementation$.handleStandard(UndertowServerImplementation.scala:250) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.youi.server.UndertowServerImplementation$.response(UndertowServerImplementation.scala:169) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.youi.server.UndertowServerImplementation.$anonfun$requestHandler$1(UndertowServerImplementation.scala:100) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.youi.server.UndertowServerImplementation.$anonfun$requestHandler$1$adapted(UndertowServerImplementation.scala:97) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.youi.server.UndertowServerImplementation$.handle$1(UndertowServerImplementation.scala:126) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.youi.server.UndertowServerImplementation$.processRequest(UndertowServerImplementation.scala:162) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.youi.server.UndertowServerImplementation.requestHandler(UndertowServerImplementation.scala:97) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.youi.server.UndertowServerImplementation.$anonfun$handleRequest$1(UndertowServerImplementation.scala:90) >>>> > exampleJVM[ERROR] at >>>> > io.youi.ErrorSupport.errorSupport(ErrorSupport.scala:11) >>>> > exampleJVM[ERROR] at >>>> > io.youi.ErrorSupport.errorSupport$(ErrorSupport.scala:10) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.youi.example.ServerExampleApplication$.errorSupport(ServerExampleApplication.scala:8) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.youi.server.UndertowServerImplementation.handleRequest(UndertowServerImplementation.scala:74) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.undertow.server.handlers.encoding.EncodingHandler.handleRequest(EncodingHandler.java:72) >>>> > exampleJVM[ERROR] at >>>> > io.undertow.server.Connectors.executeRootHandler(Connectors.java:332) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:254) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:151) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:92) >>>> > exampleJVM[ERROR] at >>>> > >>>> > io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:51) >>>> > exampleJVM[ERROR] at >>>> > >>>> > org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) >>>> > exampleJVM[ERROR] at >>>> > org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:291) >>>> > exampleJVM[ERROR] at >>>> > org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286) >>>> > exampleJVM[ERROR] at >>>> > >>>> > org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) >>>> > exampleJVM[ERROR] at >>>> > org.xnio.nio.QueuedNioTcpServer$1.run(QueuedNioTcpServer.java:129) >>>> > exampleJVM[ERROR] at >>>> > org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:582) >>>> > exampleJVM[ERROR] at >>>> > org.xnio.nio.WorkerThread.run(WorkerThread.java:466) >>>> > >>>> > _______________________________________________ >>>> > undertow-dev mailing list >>>> > undertow-dev at lists.jboss.org >>>> > https://lists.jboss.org/mailman/listinfo/undertow-dev >>> >>> >>> _______________________________________________ >>> undertow-dev mailing list >>> undertow-dev at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/undertow-dev >> >> > From ruslan at ibragimov.by Mon Oct 16 11:59:57 2017 From: ruslan at ibragimov.by (Ruslan Ibragimov) Date: Mon, 16 Oct 2017 18:59:57 +0300 Subject: [undertow-dev] Using Async Api inside HttpHandler Message-ID: Hello Team, I there way to execute some code asynchronously in handler and fill response in callback? I started with straightforward code like: HttpHandler asyncHandler = (HttpServerExchange exchange) -> { client.execute(new HttpGet("https://newton.now.sh/"), new FutureCallback() { @Override public void completed(HttpResponse result) { System.out.println("Received."); exchange.getResponseSender().send("Received."); } @Override public void failed(Exception ex) { System.out.println("Failed."); exchange.getResponseSender().send("Failed."); } @Override public void cancelled() { System.out.println("Cancelled."); exchange.getResponseSender().send("Cancelled."); } }); }; When I run this code *completed* method called, but nothing written in response (since exchange already end) So I googled my question and found SO answer, and I tried to dispatch exchange as described here: https://stackoverflow.com/a/25223070/1538877 With no luck too. Then I go to Request Lifecycle section of the docs (minor typo fix here: https://github.com/undertow-io/undertow-docs/pull/9) http://undertow.io/undertow-docs/undertow-docs-1.4.0/index.html#undertow-request-lifecyle and tried approach with dispatching current handler with no luck too. (But found that HttpHandlers class renamed too Connectors, fix: https://github.com/undertow-io/undertow-docs/pull/8) So my question is how to do async tasks in handlers. My attempts as single file: https://gist.github.com/IRus/de8a23396ccd6b59df9267d4124393db (requires http://mvnrepository.com/artifact/org.apache.httpcomponents/httpasyncclient/4.1.3 ) -- Best regards, Ibragimov Ruslan http://ibragimov.by/ http://heap.by/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171016/86f12ac5/attachment-0001.html From stevehu at gmail.com Mon Oct 16 17:49:26 2017 From: stevehu at gmail.com (Steve Hu) Date: Mon, 16 Oct 2017 17:49:26 -0400 Subject: [undertow-dev] Reverse proxy with https connections Message-ID: I am extending the ReverseProxyServer example to connect down stream servers that listen to https and got the following error on the proxy server. After debugging into it, I realized that the ssl is null when UndertowClient tries to create connection to the downstream server. I am wondering who is responsible for creating this ssl object. Where the certificates should be loaded? Thanks, Steve proxy_1 | 17:37:12.430 [XNIO-1 I/O-4] DEBUG io.undertow.request failed - Failed to connect proxy_1 | java.io.IOException: UT000065: SSL must be specified to connect to a https URL proxy_1 | at io.undertow.client.http.HttpClientProvider.connect(HttpClientProvider.java:94) proxy_1 | at io.undertow.client.UndertowClient.connect(UndertowClient.java:157) proxy_1 | at io.undertow.server.handlers.proxy.ProxyConnectionPool.openConnection(ProxyConnectionPool.java:273) proxy_1 | at io.undertow.server.handlers.proxy.ProxyConnectionPool.connect(ProxyConnectionPool.java:527) proxy_1 | at io.undertow.server.handlers.proxy.LoadBalancingProxyClient.getConnection(LoadBalancingProxyClient.java:301) proxy_1 | at io.undertow.server.handlers.proxy.ProxyHandler$ProxyClientHandler.run(ProxyHandler.java:292) proxy_1 | at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:582) proxy_1 | at org.xnio.nio.WorkerThread.run(WorkerThread.java:466) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171016/9b11b286/attachment.html From sdouglas at redhat.com Tue Oct 17 01:55:08 2017 From: sdouglas at redhat.com (Stuart Douglas) Date: Tue, 17 Oct 2017 07:55:08 +0200 Subject: [undertow-dev] Using Async Api inside HttpHandler In-Reply-To: References: Message-ID: You need to use the Runnable variant of dispatch() not the HttpHandler version. The HttpHandler version will dispatch your exchange to a new executor, but will still end the exchange when the handler returns (unless you have dispatched again). The Runnable version will not, and it is entirely up to you to make sure that the exchange is eventually completed. Stuart On Mon, Oct 16, 2017 at 5:59 PM, Ruslan Ibragimov wrote: > Hello Team, > > I there way to execute some code asynchronously in handler and fill response > in callback? > > I started with straightforward code like: > > HttpHandler asyncHandler = (HttpServerExchange exchange) -> { > client.execute(new HttpGet("https://newton.now.sh/"), new > FutureCallback() { > @Override > public void completed(HttpResponse result) { > System.out.println("Received."); > exchange.getResponseSender().send("Received."); > } > > @Override > public void failed(Exception ex) { > System.out.println("Failed."); > exchange.getResponseSender().send("Failed."); > } > > @Override > public void cancelled() { > System.out.println("Cancelled."); > exchange.getResponseSender().send("Cancelled."); > } > }); > }; > > When I run this code completed method called, but nothing written in > response (since exchange already end) > > So I googled my question and found SO answer, and I tried to dispatch > exchange as described here: https://stackoverflow.com/a/25223070/1538877 > > With no luck too. > > Then I go to Request Lifecycle section of the docs (minor typo fix here: > https://github.com/undertow-io/undertow-docs/pull/9) > http://undertow.io/undertow-docs/undertow-docs-1.4.0/index.html#undertow-request-lifecyle > and tried approach with dispatching current handler with no luck too. (But > found that HttpHandlers class renamed too Connectors, fix: > https://github.com/undertow-io/undertow-docs/pull/8) > > So my question is how to do async tasks in handlers. > > My attempts as single file: > https://gist.github.com/IRus/de8a23396ccd6b59df9267d4124393db > (requires > http://mvnrepository.com/artifact/org.apache.httpcomponents/httpasyncclient/4.1.3) > > -- > Best regards, > Ibragimov Ruslan > http://ibragimov.by/ > http://heap.by/ > > _______________________________________________ > undertow-dev mailing list > undertow-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/undertow-dev From sdouglas at redhat.com Tue Oct 17 02:38:33 2017 From: sdouglas at redhat.com (Stuart Douglas) Date: Tue, 17 Oct 2017 08:38:33 +0200 Subject: [undertow-dev] Reverse proxy with https connections In-Reply-To: References: Message-ID: You need to use one of the connect methods that takes an XnioSsl as a parameter, and pass in an instance of UndertowXnioSsl. You will probably want to use the constructor that takes a SSLContext as a parameter, which you can configure as normal in terms of key and trust managers. Stuart On Mon, Oct 16, 2017 at 11:49 PM, Steve Hu wrote: > I am extending the ReverseProxyServer example to connect down stream servers > that listen to https and got the following error on the proxy server. After > debugging into it, I realized that the ssl is null when UndertowClient tries > to create connection to the downstream server. > > I am wondering who is responsible for creating this ssl object. Where the > certificates should be loaded? > > Thanks, > > Steve > > proxy_1 | 17:37:12.430 [XNIO-1 I/O-4] DEBUG io.undertow.request failed - > Failed to connect > proxy_1 | java.io.IOException: UT000065: SSL must be specified to connect > to a https URL > proxy_1 | at > io.undertow.client.http.HttpClientProvider.connect(HttpClientProvider.java:94) > proxy_1 | at > io.undertow.client.UndertowClient.connect(UndertowClient.java:157) > proxy_1 | at > io.undertow.server.handlers.proxy.ProxyConnectionPool.openConnection(ProxyConnectionPool.java:273) > proxy_1 | at > io.undertow.server.handlers.proxy.ProxyConnectionPool.connect(ProxyConnectionPool.java:527) > proxy_1 | at > io.undertow.server.handlers.proxy.LoadBalancingProxyClient.getConnection(LoadBalancingProxyClient.java:301) > proxy_1 | at > io.undertow.server.handlers.proxy.ProxyHandler$ProxyClientHandler.run(ProxyHandler.java:292) > proxy_1 | at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:582) > proxy_1 | at org.xnio.nio.WorkerThread.run(WorkerThread.java:466) > > > _______________________________________________ > undertow-dev mailing list > undertow-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/undertow-dev From ecki at zusammenkunft.net Tue Oct 17 04:04:47 2017 From: ecki at zusammenkunft.net (Bernd Eckenfels) Date: Tue, 17 Oct 2017 08:04:47 +0000 Subject: [undertow-dev] Reverse proxy with https connections In-Reply-To: References: Message-ID: Can you show your extended code? Gruss Bernd -- http://bernd.eckenfels.net ________________________________ From: undertow-dev-bounces at lists.jboss.org on behalf of Steve Hu Sent: Monday, October 16, 2017 11:49:26 PM To: Undertow Developers Subject: [undertow-dev] Reverse proxy with https connections I am extending the ReverseProxyServer example to connect down stream servers that listen to https and got the following error on the proxy server. After debugging into it, I realized that the ssl is null when UndertowClient tries to create connection to the downstream server. I am wondering who is responsible for creating this ssl object. Where the certificates should be loaded? Thanks, Steve proxy_1 | 17:37:12.430 [XNIO-1 I/O-4] DEBUG io.undertow.request failed - Failed to connect proxy_1 | java.io.IOException: UT000065: SSL must be specified to connect to a https URL proxy_1 | at io.undertow.client.http.HttpClientProvider.connect(HttpClientProvider.java:94) proxy_1 | at io.undertow.client.UndertowClient.connect(UndertowClient.java:157) proxy_1 | at io.undertow.server.handlers.proxy.ProxyConnectionPool.openConnection(ProxyConnectionPool.java:273) proxy_1 | at io.undertow.server.handlers.proxy.ProxyConnectionPool.connect(ProxyConnectionPool.java:527) proxy_1 | at io.undertow.server.handlers.proxy.LoadBalancingProxyClient.getConnection(LoadBalancingProxyClient.java:301) proxy_1 | at io.undertow.server.handlers.proxy.ProxyHandler$ProxyClientHandler.run(ProxyHandler.java:292) proxy_1 | at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:582) proxy_1 | at org.xnio.nio.WorkerThread.run(WorkerThread.java:466) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171017/4f90ad83/attachment.html From oranheim at gmail.com Wed Oct 18 15:50:22 2017 From: oranheim at gmail.com (Ove Ranheim) Date: Wed, 18 Oct 2017 21:50:22 +0200 Subject: [undertow-dev] Resource handler and Webjars Message-ID: <08E8BFBB-7AC5-4FA7-893C-B3EC55AF17F1@gmail.com> Hi, How do I register a resource handler for webjars. E.g. https://github.com/webjars/bootstrap-sass Regards, Ove -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171018/f8977c74/attachment.html From miere.teixeira at gmail.com Thu Oct 19 09:28:48 2017 From: miere.teixeira at gmail.com (Miere Teixeira) Date: Thu, 19 Oct 2017 13:28:48 +0000 Subject: [undertow-dev] Resource handler and Webjars In-Reply-To: <08E8BFBB-7AC5-4FA7-893C-B3EC55AF17F1@gmail.com> References: <08E8BFBB-7AC5-4FA7-893C-B3EC55AF17F1@gmail.com> Message-ID: Hi Ove, I don't know if this is the best approach, but when I had to serve WebJars before I followed the approach I copied-and-pasted here . It is a good start. Maybe people here can clarify if there is a better approach or if there is something to be improved. Hope it helps! Cheers! Miere On Thu, Oct 19, 2017 at 3:53 AM Ove Ranheim wrote: > Hi, > > How do I register a resource handler for webjars. > > E.g. https://github.com/webjars/bootstrap-sass > > Regards, > Ove > > _______________________________________________ > undertow-dev mailing list > undertow-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/undertow-dev -- Miere Teixeira -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171019/04c73f5a/attachment-0001.html From bill at dartalley.com Thu Oct 19 10:35:33 2017 From: bill at dartalley.com (Bill O'Neil) Date: Thu, 19 Oct 2017 10:35:33 -0400 Subject: [undertow-dev] Resource handler and Webjars In-Reply-To: <08E8BFBB-7AC5-4FA7-893C-B3EC55AF17F1@gmail.com> References: <08E8BFBB-7AC5-4FA7-893C-B3EC55AF17F1@gmail.com> Message-ID: You should be able to use a ClassPathResourceManager, something along these lines. This should read files from the classpath which would include the jars. As long as you find the right file path it should work. ResourceManager resourceManager = new ClassPathResourceManager(CurrentClass.class.getClassLoader(),"someprefix"); ResourceHandler handler = new ResourceHandler(resourceManager); handler.setCacheTime((int)TimeUnit.HOURS.toSeconds(4)); On Wed, Oct 18, 2017 at 3:50 PM, Ove Ranheim wrote: > Hi, > > How do I register a resource handler for webjars. > > E.g. https://github.com/webjars/bootstrap-sass > > Regards, > Ove > > > _______________________________________________ > undertow-dev mailing list > undertow-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/undertow-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171019/2b5b7ba4/attachment.html From oranheim at gmail.com Thu Oct 19 11:30:31 2017 From: oranheim at gmail.com (Ove Ranheim) Date: Thu, 19 Oct 2017 17:30:31 +0200 Subject: [undertow-dev] Resource handler and Webjars In-Reply-To: References: <08E8BFBB-7AC5-4FA7-893C-B3EC55AF17F1@gmail.com> Message-ID: Thanks Bill! > On 19 Oct 2017, at 16:35, Bill O'Neil wrote: > > You should be able to use a ClassPathResourceManager, something along these lines. This should read files from the classpath which would include the jars. As long as you find the right file path it should work. > > ResourceManager resourceManager = new ClassPathResourceManager(CurrentClass.class.getClassLoader(),"someprefix"); > ResourceHandler handler = new ResourceHandler(resourceManager); > handler.setCacheTime((int)TimeUnit.HOURS.toSeconds(4)); > > > On Wed, Oct 18, 2017 at 3:50 PM, Ove Ranheim > wrote: > Hi, > > How do I register a resource handler for webjars. > > E.g. https://github.com/webjars/bootstrap-sass > > Regards, > Ove > > > _______________________________________________ > undertow-dev mailing list > undertow-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/undertow-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171019/9b4cb1a9/attachment.html From oranheim at gmail.com Thu Oct 19 11:57:01 2017 From: oranheim at gmail.com (Ove Ranheim) Date: Thu, 19 Oct 2017 17:57:01 +0200 Subject: [undertow-dev] Resource handler and Webjars In-Reply-To: References: <08E8BFBB-7AC5-4FA7-893C-B3EC55AF17F1@gmail.com> Message-ID: How do I handle multiple ClassPathResourceManager(s)? undertowWebApp.getDeploymentInfo().setResourceManager(new ClassPathResourceManager(ClassLoaders.tccl(), MvcResourceConfig.STATIC_FOLDER)); undertowWebApp.getDeploymentInfo().setResourceManager(new ClassPathResourceManager(ClassLoaders.tccl(), MvcResourceConfig.WEBJARS_RESOURCES)); I have different contexts where I want to resolves static files. -Ove > On 19 Oct 2017, at 16:35, Bill O'Neil wrote: > > You should be able to use a ClassPathResourceManager, something along these lines. This should read files from the classpath which would include the jars. As long as you find the right file path it should work. > > ResourceManager resourceManager = new ClassPathResourceManager(CurrentClass.class.getClassLoader(),"someprefix"); > ResourceHandler handler = new ResourceHandler(resourceManager); > handler.setCacheTime((int)TimeUnit.HOURS.toSeconds(4)); > > > On Wed, Oct 18, 2017 at 3:50 PM, Ove Ranheim > wrote: > Hi, > > How do I register a resource handler for webjars. > > E.g. https://github.com/webjars/bootstrap-sass > > Regards, > Ove > > > _______________________________________________ > undertow-dev mailing list > undertow-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/undertow-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171019/02136dfc/attachment.html From bill at dartalley.com Thu Oct 19 18:25:01 2017 From: bill at dartalley.com (Bill O'Neil) Date: Thu, 19 Oct 2017 18:25:01 -0400 Subject: [undertow-dev] Resource handler and Webjars In-Reply-To: References: <08E8BFBB-7AC5-4FA7-893C-B3EC55AF17F1@gmail.com> Message-ID: You can try wrapping the resource handlers in a path handler. If you can provide sample paths and which goes to which resource that would be helpful. On Oct 19, 2017 6:22 PM, "Ove Ranheim" wrote: > How do I handle multiple ClassPathResourceManager(s)? > > undertowWebApp.getDeploymentInfo().setResourceManager(new ClassPathResourceManager(ClassLoaders.tccl(), MvcResourceConfig.STATIC_FOLDER)); > undertowWebApp.getDeploymentInfo().setResourceManager(new ClassPathResourceManager(ClassLoaders.tccl(), MvcResourceConfig.WEBJARS_RESOURCES)); > > I have different contexts where I want to resolves static files. > > -Ove > > On 19 Oct 2017, at 16:35, Bill O'Neil wrote: > > You should be able to use a ClassPathResourceManager, something along > these lines. This should read files from the classpath which would include > the jars. As long as you find the right file path it should work. > > ResourceManager resourceManager = new ClassPathResourceManager( > CurrentClass.class.getClassLoader(),"someprefix"); > ResourceHandler handler = new ResourceHandler(resourceManager); > handler.setCacheTime((int)TimeUnit.HOURS.toSeconds(4)); > > > On Wed, Oct 18, 2017 at 3:50 PM, Ove Ranheim wrote: > >> Hi, >> >> How do I register a resource handler for webjars. >> >> E.g. https://github.com/webjars/bootstrap-sass >> >> Regards, >> Ove >> >> >> _______________________________________________ >> undertow-dev mailing list >> undertow-dev at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/undertow-dev >> > > > > _______________________________________________ > undertow-dev mailing list > undertow-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/undertow-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171019/08bb3d1d/attachment-0001.html From mario.e.carbajal at gmail.com Sun Oct 22 17:02:51 2017 From: mario.e.carbajal at gmail.com (Mario Carbajal) Date: Sun, 22 Oct 2017 18:02:51 -0300 Subject: [undertow-dev] Why are ioThreads capped at a max of 2 by default? Message-ID: In the undertow builder there's this line: ioThreads = Math.max(Runtime.getRuntime().availableProcessors(), 2); Why the cap? is it not recommended to go over 2? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171022/b9e9532c/attachment.html From mario.e.carbajal at gmail.com Sun Oct 22 17:05:39 2017 From: mario.e.carbajal at gmail.com (Mario Carbajal) Date: Sun, 22 Oct 2017 18:05:39 -0300 Subject: [undertow-dev] Why are ioThreads capped at a max of 2 by default? In-Reply-To: References: Message-ID: Uh.. please disregard this email. I just realized it's the other way around: minimum two threads. On Sun, Oct 22, 2017 at 6:02 PM, Mario Carbajal wrote: > In the undertow builder there's this line: > ioThreads = Math.max(Runtime.getRuntime().availableProcessors(), 2); > > Why the cap? is it not recommended to go over 2? > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171022/83c4d6c7/attachment.html From greg.hellings at gmail.com Sun Oct 22 19:31:49 2017 From: greg.hellings at gmail.com (Greg Hellings) Date: Sun, 22 Oct 2017 18:31:49 -0500 Subject: [undertow-dev] Why are ioThreads capped at a max of 2 by default? In-Reply-To: References: Message-ID: I think the value defaults to 2 * number_of_cpu_cores_detected? So yeah, 2 would be minimal. On Sun, Oct 22, 2017 at 4:05 PM, Mario Carbajal wrote: > Uh.. please disregard this email. I just realized it's the other way > around: minimum two threads. > > On Sun, Oct 22, 2017 at 6:02 PM, Mario Carbajal < > mario.e.carbajal at gmail.com> wrote: > >> In the undertow builder there's this line: >> ioThreads = Math.max(Runtime.getRuntime().availableProcessors(), 2); >> >> Why the cap? is it not recommended to go over 2? >> > > > _______________________________________________ > undertow-dev mailing list > undertow-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/undertow-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171022/330d27f2/attachment.html From sdouglas at redhat.com Sun Oct 22 19:44:54 2017 From: sdouglas at redhat.com (Stuart Douglas) Date: Mon, 23 Oct 2017 01:44:54 +0200 Subject: [undertow-dev] Why are ioThreads capped at a max of 2 by default? In-Reply-To: References: Message-ID: It just defaults to the number of cores, not cores*2. We used to use cores*2 as our initial benchmarking showed it to be slightly faster, however it turns out that this is actually fairly variable and the difference is minimal (one is not consistently faster than the other, it depends on workload and hardware), so we use less threads by default. Stuart On Mon, Oct 23, 2017 at 1:31 AM, Greg Hellings wrote: > I think the value defaults to 2 * number_of_cpu_cores_detected? So yeah, 2 > would be minimal. > > On Sun, Oct 22, 2017 at 4:05 PM, Mario Carbajal > wrote: >> >> Uh.. please disregard this email. I just realized it's the other way >> around: minimum two threads. >> >> On Sun, Oct 22, 2017 at 6:02 PM, Mario Carbajal >> wrote: >>> >>> In the undertow builder there's this line: >>> ioThreads = Math.max(Runtime.getRuntime().availableProcessors(), 2); >>> >>> Why the cap? is it not recommended to go over 2? >> >> >> >> _______________________________________________ >> undertow-dev mailing list >> undertow-dev at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/undertow-dev > > > > _______________________________________________ > undertow-dev mailing list > undertow-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/undertow-dev From nick at portlandwebworks.com Tue Oct 31 10:04:34 2017 From: nick at portlandwebworks.com (Nick Stuart) Date: Tue, 31 Oct 2017 10:04:34 -0400 Subject: [undertow-dev] WildFly 8.2.1 EJB Security and Custom Auth Mechanism. Message-ID: Hello all, having an issue with a custom io.undertow.security.api.AuthenticationMechanism implementation and EJB security on WildFly 8.2 and hoping someone can think of a work around. Basic problem, user is authenticated via the AuthenticationMechanism, and the web context sees the user just fine and their roles, but when we get to the EJB calls the user is seen as 'anonymous'. The mechanism calls: sc.authenticationComplete(ac, mechanismName, true); and returns: AuthenticationMechanismOutcome.AUTHENTICATED; The resources I'm calling are configured as being protected through the web.xml and all of that is working as expected. Another note, I am able to get this to work in WildFly 10.1, but only with (what I think is) a bit of hack. The following code is required for EJB Security to work: sc.authenticationComplete(ac, mechanismName, true); sc.login(ac.getUsername(), ""); sc.authenticate(); This same code in 8.2 causes an infinite recursion issue. Even working around that (with another hack) this still doesn't work. Any ideas would be greatly appreciated. Upgrading is going to be considered a worst case scenario right now, and would like avoid it right now if at all possible. Thanks for the help! -Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171031/b8a3dcd3/attachment.html From sdouglas at redhat.com Tue Oct 31 17:51:54 2017 From: sdouglas at redhat.com (Stuart Douglas) Date: Wed, 1 Nov 2017 08:51:54 +1100 Subject: [undertow-dev] WildFly 8.2.1 EJB Security and Custom Auth Mechanism. In-Reply-To: References: Message-ID: I assume you are not using the IdentityManager in your custom impl? This is what causes the Wildfly issues, as the Wildfly SecurityContext setup is done there. You will probably need to duplicate some of the code in org.wildfly.extension.undertow.security.JAASIdentityManagerImpl into your custom auth mechanism (the bit in org.wildfly.extension.undertow.security.JAASIdentityManagerImpl#verifyCredential that sets up the context). I would recomment upgrading to Wildfly 11, there have been a *lot* of fixes since 8.1. Stuart On Wed, Nov 1, 2017 at 1:04 AM, Nick Stuart wrote: > Hello all, having an issue with a custom > io.undertow.security.api.AuthenticationMechanism implementation and EJB > security on WildFly 8.2 and hoping someone can think of a work around. > > Basic problem, user is authenticated via the AuthenticationMechanism, and > the web context sees the user just fine and their roles, but when we get to > the EJB calls the user is seen as 'anonymous'. The mechanism calls: > > sc.authenticationComplete(ac, mechanismName, true); > and returns: > AuthenticationMechanismOutcome.AUTHENTICATED; > > The resources I'm calling are configured as being protected through the > web.xml and all of that is working as expected. > > Another note, I am able to get this to work in WildFly 10.1, but only with > (what I think is) a bit of hack. The following code is required for EJB > Security to work: > > sc.authenticationComplete(ac, mechanismName, true); > sc.login(ac.getUsername(), ""); > sc.authenticate(); > > This same code in 8.2 causes an infinite recursion issue. Even working > around that (with another hack) this still doesn't work. > > Any ideas would be greatly appreciated. Upgrading is going to be considered > a worst case scenario right now, and would like avoid it right now if at all > possible. > > Thanks for the help! > -Nick > > _______________________________________________ > undertow-dev mailing list > undertow-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/undertow-dev From arjan.tijms at gmail.com Tue Oct 31 17:55:26 2017 From: arjan.tijms at gmail.com (arjan tijms) Date: Tue, 31 Oct 2017 22:55:26 +0100 Subject: [undertow-dev] WildFly 8.2.1 EJB Security and Custom Auth Mechanism. In-Reply-To: References: Message-ID: Hi, On Tue, Oct 31, 2017 at 3:04 PM, Nick Stuart wrote: > Hello all, having an issue with a custom io.undertow.security.api.AuthenticationMechanism > implementation and EJB security on WildFly 8.2 and hoping someone can think > of a work around. > > Basic problem, user is authenticated via the AuthenticationMechanism, and > the web context sees the user just fine and their roles, but when we get to > the EJB calls the user is seen as 'anonymous'. The mechanism calls: > > sc.authenticationComplete(ac, mechanismName, true); > and returns: > AuthenticationMechanismOutcome.AUTHENTICATED; > This looks quite similar to a number of different fixes that were being done for WildFly when the caller authenticates via JASPIC. See some of the links here: https://jaspic.zeef.com/arjan.tijms#block_63051_implementations-issue-tracking You could try authenticating via JASPIC instead of AuthenticationMechanism to see if that makes a difference. JASPIC should really work, as I have been specifically testing WildFly for that. See http://arjan-tijms.omnifaces.org/2016/12/the-state-of-portable-authentication-in.html Any ideas would be greatly appreciated. Upgrading is going to be considered > a worst case scenario right now, and would like avoid it right now if at > all possible. > Just curious, but why would you want to avoid that? WildFly 8 corresponds to a very early version of JBoss EAP 7, while WildFly 10 is very close to the final release. Kind regards, Arjan Tijms > > > Thanks for the help! > -Nick > > _______________________________________________ > undertow-dev mailing list > undertow-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/undertow-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171031/2d501917/attachment.html From paroczizs at gmail.com Tue Oct 31 19:06:31 2017 From: paroczizs at gmail.com (paroczizs .) Date: Wed, 1 Nov 2017 00:06:31 +0100 Subject: [undertow-dev] Request and response conduits Message-ID: Hi Undertow-dev, is it possible to identify the last byte(s) of the request and response streams in the conduits? Regards, Zsolt Mentes a v?rusokt?l. www.avast.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171101/e79e494f/attachment.html From sdouglas at redhat.com Tue Oct 31 22:06:00 2017 From: sdouglas at redhat.com (Stuart Douglas) Date: Wed, 1 Nov 2017 13:06:00 +1100 Subject: [undertow-dev] Request and response conduits In-Reply-To: References: Message-ID: You would need to save the last byte during each call to write or trnsfer, then when terminateWrites (or writeFinal) is called you know the saved byte is the last one. Stuart On Wed, Nov 1, 2017 at 10:06 AM, paroczizs . wrote: > Hi Undertow-dev, > > is it possible to identify the last byte(s) of the request and response > streams in the conduits? > > Regards, Zsolt > > > Mentes > a v?rusokt?l. www.avast.com > > <#m_-8213409549217972035_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > _______________________________________________ > undertow-dev mailing list > undertow-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/undertow-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171101/edcaa615/attachment.html