Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-2986

NPE from LogCleaner

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: None

      Description

      So I set

      logviewer.cleanup.interval.secs: 10
      

      to start LogCleaner thread. But from logviewer.log:

       

      2018-03-05 21:31:17.629 o.a.s.v.ConfigValidation main [WARN] storm.messaging.netty.max_retries is a deprecated config please see class org.apache.storm.Config.STORM_MESSAGING_NETTY_MAX_RETRIES for more information.
      2018-03-05 21:31:17.650 o.a.s.d.l.LogviewerServer main [INFO] Starting Logviewer HTTP servers...
      2018-03-05 21:31:17.684 o.e.j.u.log main [INFO] Logging initialized @2455ms to org.eclipse.jetty.util.log.Slf4jLog
      2018-03-05 21:31:17.877 o.a.s.d.l.u.LogCleaner main [INFO] configured max total size of worker logs: 2 MB, max total size of worker logs per directory: 1 MB
      2018-03-05 21:31:18.017 o.a.s.d.m.MetricsUtils main [INFO] Using statistics reporter plugin:org.apache.storm.daemon.metrics.reporters.JmxPreparableReporter
      2018-03-05 21:31:18.022 o.a.s.d.l.u.LogCleaner logviewer-cleanup [ERROR] Exception while cleaning up old log.
      java.lang.NullPointerException: null
      at java.util.Arrays.stream(Arrays.java:5004) ~[?:1.8.0_131]
      at org.apache.storm.daemon.logviewer.utils.LogCleaner.selectDirsForCleanup(LogCleaner.java:217) ~[storm-webapp-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
      at org.apache.storm.daemon.logviewer.utils.LogCleaner.run(LogCleaner.java:135) ~[storm-webapp-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
      at org.apache.storm.StormTimer$1.run(StormTimer.java:207) ~[storm-client-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
      at org.apache.storm.StormTimer$StormTimerTask.run(StormTimer.java:81) ~[storm-client-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
      2018-03-05 21:31:18.024 o.a.s.d.m.r.JmxPreparableReporter main [INFO] Preparing...
      2018-03-05 21:31:18.031 o.a.s.m.StormMetricsRegistry main [INFO] Started statistics report plugin...
      2018-03-05 21:31:18.031 o.a.s.d.l.LogviewerServer main [INFO] Starting Logviewer...
      2018-03-05 21:31:18.041 o.e.j.s.Server main [INFO] jetty-9.4.7.v20170914
      2018-03-05 21:31:18.215 o.a.h.s.a.s.KerberosAuthenticationHandler main [INFO] Login using keytab /keytabs/HTTP.keytab, for principal HTTP/persistmist.corp.ne1.yahoo.com
      2018-03-05 21:31:20.832 o.h.v.i.u.Version main [INFO] HV000001: Hibernate Validator 5.3.4.Final
      2018-03-05 21:31:21.215 o.e.j.s.h.ContextHandler main [INFO] Started o.e.j.s.ServletContextHandler@65bb9029{/,file:///tmp/apache-storm-2.0.0-SNAPSHOT/public/,AVAILABLE}
      2018-03-05 21:31:21.287 o.e.j.s.AbstractConnector main [INFO] Started ServerConnector@30506c0d{HTTP/1.1,[http/1.1]}{0.0.0.0:8000}
      2018-03-05 21:31:21.288 o.e.j.s.Server main [INFO] Started @6060ms
      2018-03-05 21:31:28.038 o.a.s.d.l.u.LogCleaner logviewer-cleanup [ERROR] Exception while cleaning up old log.
      java.lang.NullPointerException: null
      at java.util.Arrays.stream(Arrays.java:5004) ~[?:1.8.0_131]
      at org.apache.storm.daemon.logviewer.utils.LogCleaner.selectDirsForCleanup(LogCleaner.java:217) ~[storm-webapp-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
      at org.apache.storm.daemon.logviewer.utils.LogCleaner.run(LogCleaner.java:135) ~[storm-webapp-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
      at org.apache.storm.StormTimer$1.run(StormTimer.java:207) ~[storm-client-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
      at org.apache.storm.StormTimer$StormTimerTask.run(StormTimer.java:81) ~[storm-client-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]

       

      It's because there is no workers-artifacts directory at the very beginning before submitting any topologies.  Users can fix it by manually creating the directory. But it's better to have it solve fixed. 

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ethanli Ethan Li
                Reporter:
                ethanli Ethan Li
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m