[ https://issues.apache.org/jira/browse/AMBARI-25882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
caijialiang closed AMBARI-25882. -------------------------------- > clusterId NPE error when execute service action > ----------------------------------------------- > > Key: AMBARI-25882 > URL: https://issues.apache.org/jira/browse/AMBARI-25882 > Project: Ambari > Issue Type: Bug > Components: ambari-server > Affects Versions: 2.8.0 > Reporter: caijialiang > Assignee: caijialiang > Priority: Major > Fix For: 2.8.0 > > Time Spent: 0.5h > Remaining Estimate: 0h > > > NPE error occurred when executing service action in ambari server. > AgentCommandsPublisher can't get clusterId from execution command, cause it's > not set in addGenericExecutionCommand( Stage.java) method. > Why did the action succeed in the end after throw a NPE error? Because it > finally reload it from database if find cluster id is not set properlly. > > > > java.lang.NumberFormatException: null > at java.lang.Long.parseLong(Long.java:552) > at java.lang.Long.valueOf(Long.java:803) > at > org.apache.ambari.server.events.publishers.AgentCommandsPublisher.lambda$null$0(AgentCommandsPublisher.java:110) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > com.google.common.collect.CollectSpliterators$1.lambda$forEachRemaining$1(CollectSpliterators.java:116) > at > java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) > at > com.google.common.collect.CollectSpliterators$1.forEachRemaining(CollectSpliterators.java:116) > at > com.google.common.collect.CollectSpliterators$1FlatMapSpliterator.lambda$forEachRemaining$1(CollectSpliterators.java:247) > at > java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1696) > at > com.google.common.collect.CollectSpliterators$1FlatMapSpliterator.forEachRemaining(CollectSpliterators.java:247) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) > at > java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291) > at > java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731) > at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) > at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401) > at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734) > at > java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:583) > at > org.apache.ambari.server.events.publishers.AgentCommandsPublisher.lambda$sendAgentCommand$1(AgentCommandsPublisher.java:103) > at > java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386) > at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) > at > java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) > at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) > at > java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) > > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org For additional commands, e-mail: issues-h...@ambari.apache.org