[ 
https://issues.apache.org/jira/browse/STORM-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Joseph Evans resolved STORM-2986.
----------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.0.0

Thanks Ethan,

 

I merged this into master.

> NPE from LogCleaner
> -------------------
>
>                 Key: STORM-2986
>                 URL: https://issues.apache.org/jira/browse/STORM-2986
>             Project: Apache Storm
>          Issue Type: Bug
>            Reporter: Ethan Li
>            Assignee: Ethan Li
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.0.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> So I set
> {code:java}
> logviewer.cleanup.interval.secs: 10
> {code}
> to start LogCleaner thread. But from logviewer.log:
>  
> {code:java}
> 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]{code}
>  
> 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. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to