diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java b/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java index a5757579cc4..6c64f6dc9b8 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java @@ -232,7 +232,10 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa } catch (Exception x) { - LOG.info("Exception while notifying connection " + connection, x); + if (isRunning()) + LOG.warn("Exception while notifying connection " + connection, x); + else + LOG.debug("Exception while notifying connection {}",connection, x); } } diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java index 77d500993b7..d3cfd8ae040 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java @@ -709,19 +709,20 @@ public class JettyRunForkedMojo extends AbstractMojo if (PluginLog.getLog().isDebugEnabled()) PluginLog.getLog().debug(Arrays.toString(cmd.toArray())); - forkedProcess = builder.start(); PluginLog.getLog().info("Forked process starting"); if (waitForChild) { + forkedProcess = builder.start(); startPump("STDOUT",forkedProcess.getInputStream()); startPump("STDERR",forkedProcess.getErrorStream()); int exitcode = forkedProcess.waitFor(); PluginLog.getLog().info("Forked execution exit: "+exitcode); } else - { //we're not going to be reading the stderr as we're not waiting for the child to finish - forkedProcess.getErrorStream().close(); + { //merge stderr and stdout from child + builder.redirectErrorStream(true); + forkedProcess = builder.start(); //wait for the child to be ready before terminating. //child indicates it has finished starting by printing on stdout the token passed to it @@ -754,6 +755,7 @@ public class JettyRunForkedMojo extends AbstractMojo { throw new MojoExecutionException ("Problem determining if forked process is ready: "+e.getMessage()); } + } } catch (InterruptedException ex) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java index 1d9a881e4b1..5a4e4d67e20 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java @@ -21,6 +21,7 @@ package org.eclipse.jetty.server; import java.io.IOException; import java.net.InetSocketAddress; import java.nio.ByteBuffer; +import java.nio.channels.ClosedChannelException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; @@ -361,13 +362,13 @@ public class HttpChannel implements HttpParser.RequestHandler, Runnable // Complete generating the response _response.closeOutput(); } - catch(EofException e) + catch(EofException|ClosedChannelException e) { LOG.debug(e); } catch(Exception e) { - LOG.warn("handle complete",e); + LOG.warn("complete failed",e); } finally { @@ -762,7 +763,7 @@ public class HttpChannel implements HttpParser.RequestHandler, Runnable @Override public void failed(final Throwable x) { - if (x instanceof EofException) + if (x instanceof EofException || x instanceof ClosedChannelException) { LOG.debug(x); _callback.failed(x);