You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by ash211 <gi...@git.apache.org> on 2014/06/09 09:05:36 UTC

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

GitHub user ash211 opened a pull request:

    https://github.com/apache/spark/pull/1019

    SPARK-1902 Silence stacktrace from logs when doing port failover to port n+1

    Before:
    
    ```
    14/06/08 23:58:23 WARN AbstractLifeCycle: FAILED SelectChannelConnector@0.0.0.0:4040: java.net.BindException: Address already in use
    java.net.BindException: Address already in use
    	at sun.nio.ch.Net.bind0(Native Method)
    	at sun.nio.ch.Net.bind(Net.java:444)
    	at sun.nio.ch.Net.bind(Net.java:436)
    	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
    	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    	at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:187)
    	at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)
    	at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:265)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    	at org.eclipse.jetty.server.Server.doStart(Server.java:293)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    	at org.apache.spark.ui.JettyUtils$$anonfun$1.apply$mcV$sp(JettyUtils.scala:192)
    	at org.apache.spark.ui.JettyUtils$$anonfun$1.apply(JettyUtils.scala:192)
    	at org.apache.spark.ui.JettyUtils$$anonfun$1.apply(JettyUtils.scala:192)
    	at scala.util.Try$.apply(Try.scala:161)
    	at org.apache.spark.ui.JettyUtils$.connect$1(JettyUtils.scala:191)
    	at org.apache.spark.ui.JettyUtils$.startJettyServer(JettyUtils.scala:205)
    	at org.apache.spark.ui.WebUI.bind(WebUI.scala:99)
    	at org.apache.spark.SparkContext.<init>(SparkContext.scala:223)
    	at org.apache.spark.repl.SparkILoop.createSparkContext(SparkILoop.scala:957)
    	at $line3.$read$$iwC$$iwC.<init>(<console>:8)
    	at $line3.$read$$iwC.<init>(<console>:14)
    	at $line3.$read.<init>(<console>:16)
    	at $line3.$read$.<init>(<console>:20)
    	at $line3.$read$.<clinit>(<console>)
    	at $line3.$eval$.<init>(<console>:7)
    	at $line3.$eval$.<clinit>(<console>)
    	at $line3.$eval.$print(<console>)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:606)
    	at org.apache.spark.repl.SparkIMain$ReadEvalPrint.call(SparkIMain.scala:788)
    	at org.apache.spark.repl.SparkIMain$Request.loadAndRun(SparkIMain.scala:1056)
    	at org.apache.spark.repl.SparkIMain.loadAndRunReq$1(SparkIMain.scala:614)
    	at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:645)
    	at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:609)
    	at org.apache.spark.repl.SparkILoop.reallyInterpret$1(SparkILoop.scala:796)
    	at org.apache.spark.repl.SparkILoop.interpretStartingWith(SparkILoop.scala:841)
    	at org.apache.spark.repl.SparkILoop.command(SparkILoop.scala:753)
    	at org.apache.spark.repl.SparkILoopInit$$anonfun$initializeSpark$1.apply(SparkILoopInit.scala:121)
    	at org.apache.spark.repl.SparkILoopInit$$anonfun$initializeSpark$1.apply(SparkILoopInit.scala:120)
    	at org.apache.spark.repl.SparkIMain.beQuietDuring(SparkIMain.scala:263)
    	at org.apache.spark.repl.SparkILoopInit$class.initializeSpark(SparkILoopInit.scala:120)
    	at org.apache.spark.repl.SparkILoop.initializeSpark(SparkILoop.scala:56)
    	at org.apache.spark.repl.SparkILoop$$anonfun$process$1$$anonfun$apply$mcZ$sp$5.apply$mcV$sp(SparkILoop.scala:913)
    	at org.apache.spark.repl.SparkILoopInit$class.runThunks(SparkILoopInit.scala:142)
    	at org.apache.spark.repl.SparkILoop.runThunks(SparkILoop.scala:56)
    	at org.apache.spark.repl.SparkILoopInit$class.postInitialization(SparkILoopInit.scala:104)
    	at org.apache.spark.repl.SparkILoop.postInitialization(SparkILoop.scala:56)
    	at org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply$mcZ$sp(SparkILoop.scala:930)
    	at org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply(SparkILoop.scala:884)
    	at org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply(SparkILoop.scala:884)
    	at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135)
    	at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:884)
    	at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:982)
    	at org.apache.spark.repl.Main$.main(Main.scala:31)
    	at org.apache.spark.repl.Main.main(Main.scala)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:606)
    	at org.apache.spark.deploy.SparkSubmit$.launch(SparkSubmit.scala:292)
    	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:55)
    	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
    14/06/08 23:58:23 WARN AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@7439e55a: java.net.BindException: Address already in use
    java.net.BindException: Address already in use
    	at sun.nio.ch.Net.bind0(Native Method)
    	at sun.nio.ch.Net.bind(Net.java:444)
    	at sun.nio.ch.Net.bind(Net.java:436)
    	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
    	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    	at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:187)
    	at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)
    	at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:265)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    	at org.eclipse.jetty.server.Server.doStart(Server.java:293)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    	at org.apache.spark.ui.JettyUtils$$anonfun$1.apply$mcV$sp(JettyUtils.scala:192)
    	at org.apache.spark.ui.JettyUtils$$anonfun$1.apply(JettyUtils.scala:192)
    	at org.apache.spark.ui.JettyUtils$$anonfun$1.apply(JettyUtils.scala:192)
    	at scala.util.Try$.apply(Try.scala:161)
    	at org.apache.spark.ui.JettyUtils$.connect$1(JettyUtils.scala:191)
    	at org.apache.spark.ui.JettyUtils$.startJettyServer(JettyUtils.scala:205)
    	at org.apache.spark.ui.WebUI.bind(WebUI.scala:99)
    	at org.apache.spark.SparkContext.<init>(SparkContext.scala:223)
    	at org.apache.spark.repl.SparkILoop.createSparkContext(SparkILoop.scala:957)
    	at $line3.$read$$iwC$$iwC.<init>(<console>:8)
    	at $line3.$read$$iwC.<init>(<console>:14)
    	at $line3.$read.<init>(<console>:16)
    	at $line3.$read$.<init>(<console>:20)
    	at $line3.$read$.<clinit>(<console>)
    	at $line3.$eval$.<init>(<console>:7)
    	at $line3.$eval$.<clinit>(<console>)
    	at $line3.$eval.$print(<console>)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:606)
    	at org.apache.spark.repl.SparkIMain$ReadEvalPrint.call(SparkIMain.scala:788)
    	at org.apache.spark.repl.SparkIMain$Request.loadAndRun(SparkIMain.scala:1056)
    	at org.apache.spark.repl.SparkIMain.loadAndRunReq$1(SparkIMain.scala:614)
    	at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:645)
    	at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:609)
    	at org.apache.spark.repl.SparkILoop.reallyInterpret$1(SparkILoop.scala:796)
    	at org.apache.spark.repl.SparkILoop.interpretStartingWith(SparkILoop.scala:841)
    	at org.apache.spark.repl.SparkILoop.command(SparkILoop.scala:753)
    	at org.apache.spark.repl.SparkILoopInit$$anonfun$initializeSpark$1.apply(SparkILoopInit.scala:121)
    	at org.apache.spark.repl.SparkILoopInit$$anonfun$initializeSpark$1.apply(SparkILoopInit.scala:120)
    	at org.apache.spark.repl.SparkIMain.beQuietDuring(SparkIMain.scala:263)
    	at org.apache.spark.repl.SparkILoopInit$class.initializeSpark(SparkILoopInit.scala:120)
    	at org.apache.spark.repl.SparkILoop.initializeSpark(SparkILoop.scala:56)
    	at org.apache.spark.repl.SparkILoop$$anonfun$process$1$$anonfun$apply$mcZ$sp$5.apply$mcV$sp(SparkILoop.scala:913)
    	at org.apache.spark.repl.SparkILoopInit$class.runThunks(SparkILoopInit.scala:142)
    	at org.apache.spark.repl.SparkILoop.runThunks(SparkILoop.scala:56)
    	at org.apache.spark.repl.SparkILoopInit$class.postInitialization(SparkILoopInit.scala:104)
    	at org.apache.spark.repl.SparkILoop.postInitialization(SparkILoop.scala:56)
    	at org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply$mcZ$sp(SparkILoop.scala:930)
    	at org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply(SparkILoop.scala:884)
    	at org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply(SparkILoop.scala:884)
    	at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135)
    	at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:884)
    	at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:982)
    	at org.apache.spark.repl.Main$.main(Main.scala:31)
    	at org.apache.spark.repl.Main.main(Main.scala)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:606)
    	at org.apache.spark.deploy.SparkSubmit$.launch(SparkSubmit.scala:292)
    	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:55)
    	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
    14/06/08 23:58:23 INFO JettyUtils: Failed to create UI at port, 4040. Trying again.
    14/06/08 23:58:23 INFO JettyUtils: Error was: Failure(java.net.BindException: Address already in use)
    14/06/08 23:58:23 INFO SparkUI: Started SparkUI at http://aash-mbp.local:4041
    ````
    
    After:
    ```
    14/06/09 00:04:12 INFO JettyUtils: Failed to create UI at port, 4040. Trying again.
    14/06/09 00:04:12 INFO JettyUtils: Error was: Failure(java.net.BindException: Address already in use)
    14/06/09 00:04:12 INFO Server: jetty-8.y.z-SNAPSHOT
    14/06/09 00:04:12 INFO AbstractConnector: Started SelectChannelConnector@0.0.0.0:4041
    14/06/09 00:04:12 INFO SparkUI: Started SparkUI at http://aash-mbp.local:4041
    ```
    
    Lengthy logging comes from this line of code in Jetty: http://grepcode.com/file/repo1.maven.org/maven2/org.eclipse.jetty.aggregate/jetty-all/9.1.3.v20140225/org/eclipse/jetty/util/component/AbstractLifeCycle.java#210

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ash211/spark SPARK-1902

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/1019.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1019
    
----
commit 9d85eedf26fe6c0f8c98c6f90c8e07de00dc4e8e
Author: Andrew Ash <an...@andrewash.com>
Date:   2014-06-09T06:59:53Z

    SPARK-1902 Silence stacktrace from logs when doing port failover to port n+1

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/1019#issuecomment-45473515
  
    Merged build finished. All automated tests passed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by ash211 <gi...@git.apache.org>.
Github user ash211 commented on the pull request:

    https://github.com/apache/spark/pull/1019#issuecomment-46527409
  
    I found this JETTY bug which is a potential improvement they could make.
    
    https://jira.codehaus.org/browse/JETTY-1229
    
    Updates to this PR forthcoming


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by ash211 <gi...@git.apache.org>.
Github user ash211 commented on the pull request:

    https://github.com/apache/spark/pull/1019#issuecomment-46527678
  
    Latest iteration:
    
        14/06/19 02:28:27 WARN JettyUtils: Failed to create UI on port :4040. Trying again on port :4041 - Failure(java.net.BindException: Address already in use)
        14/06/19 02:28:27 INFO Server: jetty-8.y.z-SNAPSHOT
        14/06/19 02:28:27 INFO AbstractConnector: Started SelectChannelConnector@0.0.0.0:4041
        14/06/19 02:28:27 INFO SparkUI: Started SparkUI at http://10.0.13.10:4041


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on the pull request:

    https://github.com/apache/spark/pull/1019#issuecomment-46475251
  
    I looked into this a bit more. The only other jetty logs I've seen Spark produce is if there is an error serving a web request at the UI. This comes from a different jetty log stream:
    
    ```
    14/06/18 11:31:19 WARN servlet.ServletHandler: /stages/stage/
    java.lang.NumberFormatException: null
    	at java.lang.Integer.parseInt(Integer.java:454)
    	at java.lang.Integer.parseInt(Integer.java:527)
    	at scala.collection.immutable.StringLike$class.toInt(StringLike.scala:229)
    	at scala.collection.immutable.StringOps.toInt(StringOps.scala:31)
    	at org.apache.spark.ui.jobs.StagePage.render(StagePage.scala:36)
    	at org.apache.spark.ui.WebUI$$anonfun$attachPage$1.apply(WebUI.scala:65)
    	at org.apache.spark.ui.WebUI$$anonfun$attachPage$1.apply(WebUI.scala:65)
    	at org.apache.spark.ui.JettyUtils$$anon$1.doGet(JettyUtils.scala:70)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
    	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
    	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
    	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
    	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
    	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
    	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    	at org.eclipse.jetty.server.Server.handle(Server.java:370)
    	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
    	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
    	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
    	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
    	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
    	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
    	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
    	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
    	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
    	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
    	at java.lang.Thread.run(Thread.java:724)
    ```
    
    I think the current message is confusing enough to users that we should try to merge this patch. A note though, we might be opening ourselves up to something painful if this ends up causing us to silence exceptions from other parts of the code.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1019#discussion_r13955854
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/JettyUtils.scala ---
    @@ -194,11 +194,16 @@ private[spark] object JettyUtils extends Logging {
             case s: Success[_] =>
               (server, server.getConnectors.head.getLocalPort)
             case f: Failure[_] =>
    +          val nextPort = (currentPort + 1) % 65536
               server.stop()
               pool.stop()
    -          logInfo("Failed to create UI at port, %s. Trying again.".format(currentPort))
    -          logInfo("Error was: " + f.toString)
    -          connect((currentPort + 1) % 65536)
    +          val msg = s"Failed to create UI on port :$currentPort. Trying again on port :$nextPort"
    --- End diff --
    
    The `:` is a place holder for the word "port" in URI's, I it might be sufficient to just say "port XX" instead of "port :XX"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/1019#issuecomment-46530536
  
    Merged build finished. All automated tests passed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by ash211 <gi...@git.apache.org>.
Github user ash211 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1019#discussion_r13955085
  
    --- Diff: conf/log4j.properties.template ---
    @@ -6,6 +6,6 @@ log4j.appender.console.layout=org.apache.log4j.PatternLayout
     log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: %m%n
     
     # Settings to quiet third party logs that are too verbose
    -log4j.logger.org.eclipse.jetty=WARN
    --- End diff --
    
    Hmm, an audit of jetty logging doesn't sound particularly appealing TBH :)  I think I'll leave it in instead


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/1019#issuecomment-46527949
  
     Merged build triggered. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by ash211 <gi...@git.apache.org>.
Github user ash211 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1019#discussion_r13954414
  
    --- Diff: conf/log4j.properties.template ---
    @@ -6,6 +6,6 @@ log4j.appender.console.layout=org.apache.log4j.PatternLayout
     log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: %m%n
     
     # Settings to quiet third party logs that are too verbose
    -log4j.logger.org.eclipse.jetty=WARN
    --- End diff --
    
    I was assuming that this line was a prior failed attempt at silencing this exact issue that stuck around, so intentionally changed this logging.
    
    My change logs more verbosely for everything under `org.eclipse.jetty` that isn't `org.eclipse.jetty.util.component.AbstractLifeCycle` since it's lowering the threshold from WARN down to level of the root, which is INFO.  Even if we were silencing something from jetty in addition to the message this change addresses, it'd be better to target that class more directly rather than everything inside `org.eclipse.jetty`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on the pull request:

    https://github.com/apache/spark/pull/1019#issuecomment-46530285
  
    Two minor things. I can just fix them on merging this if it otherwise passes tests (of course, unless you strongly prefer saying `port :4040` instead of `port 4040`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/1019#issuecomment-46527953
  
    Merged build started. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/1019#issuecomment-45466486
  
     Merged build triggered. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on the pull request:

    https://github.com/apache/spark/pull/1019#issuecomment-46476269
  
    @ash211 now that we don't log the exception, we should improve the logging that spark does when this happens. I can think of a few simple improvements here.
    
    1. We should log the new port that we are going to try on instead of just saying "Trying again"
    2. The first line should be logged at WARN level, not Info.
    3. If the exception message contains "Address already in use" we can just log the exception message at WARN.
    4. If the exception is some other message, we should log it at ERROR, and pass the exception to `logError` so that the entire stack trace is printed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/1019


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1019#discussion_r13955026
  
    --- Diff: conf/log4j.properties.template ---
    @@ -6,6 +6,6 @@ log4j.appender.console.layout=org.apache.log4j.PatternLayout
     log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: %m%n
     
     # Settings to quiet third party logs that are too verbose
    -log4j.logger.org.eclipse.jetty=WARN
    --- End diff --
    
    That other line has been in spark since way before we added this port retrying, so I don't think that's why it's there. IIRC there are various jetty services that will spit out logging information, especially at start up and shut down, and so we've always used this blanket statement. See for example Spark 0.5 which is more than 2 years old (before we even had a UI).
    
    https://github.com/apache/spark/blob/branch-0.5/conf/log4j.properties.template#L7
    
    If you'd like to audit this at some point that would be great (it might be hard to find all cases where jetty will print something). But since this change is about the port issue specifically, it might be good not to change that other behavior in this patch


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1019#discussion_r13932264
  
    --- Diff: conf/log4j.properties.template ---
    @@ -6,6 +6,6 @@ log4j.appender.console.layout=org.apache.log4j.PatternLayout
     log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: %m%n
     
     # Settings to quiet third party logs that are too verbose
    -log4j.logger.org.eclipse.jetty=WARN
    --- End diff --
    
    Shouldn't we keep this line as well? Otherwise you might also be changing the log level of other `jetty.XX` loggers


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/1019#issuecomment-45473518
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15562/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/1019#issuecomment-45469291
  
    Merged build started. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/1019#issuecomment-46530538
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15901/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/1019#issuecomment-45514210
  
    Thanks Andrew. This is a much needed fix. However, it looks like AbstractLifeCycle logs all exceptions as warnings, and I wonder if this obscures more serious exceptions if they don't surface to the main thread. Do you see other sources of exceptions that we may not want to avoid logging? (I personally haven't run into any other than java.net.BindException)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by ash211 <gi...@git.apache.org>.
Github user ash211 commented on the pull request:

    https://github.com/apache/spark/pull/1019#issuecomment-46560290
  
    I'm in meetings all day so feel free to merge with those two fixes. Thanks!
    On Jun 19, 2014 3:15 AM, "Patrick Wendell" <no...@github.com> wrote:
    
    > Two minor things. I can just fix them on merging this if it otherwise
    > passes tests (of course, unless you strongly prefer saying port :4040
    > instead of port 4040.
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/spark/pull/1019#issuecomment-46530285>.
    >


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: SPARK-1902 Silence stacktrace from logs when d...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1019#discussion_r13955863
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/JettyUtils.scala ---
    @@ -194,11 +194,16 @@ private[spark] object JettyUtils extends Logging {
             case s: Success[_] =>
               (server, server.getConnectors.head.getLocalPort)
             case f: Failure[_] =>
    +          val nextPort = (currentPort + 1) % 65536
               server.stop()
               pool.stop()
    -          logInfo("Failed to create UI at port, %s. Trying again.".format(currentPort))
    -          logInfo("Error was: " + f.toString)
    -          connect((currentPort + 1) % 65536)
    +          val msg = s"Failed to create UI on port :$currentPort. Trying again on port :$nextPort"
    +          if(f.toString.contains("Address already in use")) {
    --- End diff --
    
    This might fail our style checks, should be `if (f.toString...`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---