From 6ac4e770a6bf2f67f785026969d24a2112fa527d Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 22 Nov 2017 11:08:20 +0100 Subject: [PATCH 1/2] Issue #1983 Warn on connection failures Signed-off-by: Greg Wilkins --- .../jetty/alpn/server/ALPNServerConnectionFactory.java | 5 ++++- .../src/main/java/org/eclipse/jetty/io/ManagedSelector.java | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/jetty-alpn/jetty-alpn-server/src/main/java/org/eclipse/jetty/alpn/server/ALPNServerConnectionFactory.java b/jetty-alpn/jetty-alpn-server/src/main/java/org/eclipse/jetty/alpn/server/ALPNServerConnectionFactory.java index 56135bd008d..0bebdccd0ac 100644 --- a/jetty-alpn/jetty-alpn-server/src/main/java/org/eclipse/jetty/alpn/server/ALPNServerConnectionFactory.java +++ b/jetty-alpn/jetty-alpn-server/src/main/java/org/eclipse/jetty/alpn/server/ALPNServerConnectionFactory.java @@ -104,6 +104,9 @@ public class ALPNServerConnectionFactory extends NegotiatingServerConnectionFact return connection; } } - throw new IllegalStateException("No ALPNProcessor for " + engine); + + if (LOG.isDebugEnabled()) + LOG.debug("No ALPNProcessor: {} {}",engine,endPoint); + throw new IllegalStateException("Connection rejected: No ALPN Processor for " + engine.getClass().getName() + " from " + processors); } } diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java b/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java index f2ffc393fea..ad08872056e 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java @@ -666,6 +666,7 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable protected void failed(Throwable failure) { closeNoExceptions(channel); + LOG.warn(String.valueOf(failure)); LOG.debug(failure); } } From 8e6605a681790fa98c3be520a8f0e404f95d57a4 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Wed, 22 Nov 2017 13:01:31 +0100 Subject: [PATCH 2/2] Issue #1817 --- .../java/org/eclipse/jetty/jstl/JstlTest.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java b/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java index c3bb5f89ba7..388bcbca6e9 100644 --- a/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java +++ b/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java @@ -18,6 +18,11 @@ package org.eclipse.jetty.jstl; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.not; +import static org.junit.Assert.assertThat; + import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -31,22 +36,15 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.toolchain.test.FS; import org.eclipse.jetty.toolchain.test.JAR; -import org.eclipse.jetty.toolchain.test.JDK; import org.eclipse.jetty.toolchain.test.MavenTestingUtils; import org.eclipse.jetty.util.IO; import org.eclipse.jetty.webapp.Configuration; import org.eclipse.jetty.webapp.WebAppContext; import org.junit.AfterClass; -import org.junit.Assume; import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.not; -import static org.junit.Assert.assertThat; - public class JstlTest { private static Server server; @@ -55,8 +53,6 @@ public class JstlTest @BeforeClass public static void startServer() throws Exception { - Assume.assumeFalse(JDK.IS_9); - // Setup Server server = new Server(); ServerConnector connector = new ServerConnector(server); @@ -139,7 +135,6 @@ public class JstlTest } @Test - @Ignore public void testCatchTaglib() throws IOException { HttpURLConnection http = (HttpURLConnection) baseUri.resolve("/catch-taglib.jsp").toURL().openConnection();