You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Jialiang Cai (Jira)" <ji...@apache.org> on 2024/11/12 00:56:00 UTC
[jira] [Resolved] (AMBARI-26234) ClusterNotFoundException in stage Confirm Hosts during deploying a cluster
[ https://issues.apache.org/jira/browse/AMBARI-26234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jialiang Cai resolved AMBARI-26234.
-----------------------------------
Fix Version/s: 3.0.0
Resolution: Fixed
> ClusterNotFoundException in stage Confirm Hosts during deploying a cluster
> --------------------------------------------------------------------------
>
> Key: AMBARI-26234
> URL: https://issues.apache.org/jira/browse/AMBARI-26234
> Project: Ambari
> Issue Type: Bug
> Components: ambari-sever
> Reporter: guluo
> Priority: Major
> Fix For: 3.0.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Erros logs is shown bellow in ambari-server.log:
> 2024-11-11 19:26:35,293 ERROR [agent-command-publisher-2] AgentCommandsPublisher:124 - Exception on sendAgentCommand
> org.apache.ambari.server.ClusterNotFoundException: Cluster not found, clusterId=-1
> at org.apache.ambari.server.state.cluster.ClustersImpl.getCluster(ClustersImpl.java:417)
> at org.apache.ambari.server.events.publishers.AgentCommandsPublisher.lambda$null$0(AgentCommandsPublisher.java:121)
> 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:1699)
> at com.google.common.collect.CollectSpliterators$1FlatMapSpliterator.forEachRemaining(CollectSpliterators.java:247)
> at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
> 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)
>
> The reason:
> During deploying a cluster, in stage Confirm Hosts, cluster_id = -1 (Preset default value) because the cluster has not been created yet.
> as fallow:
> ```java
> public class StageEntity
> {
> @Basic
> @Column(name = "cluster_id", updatable = false, nullable = false)
> private Long clusterId = Long.valueOf(-1L);
> }
> ```
> But in stage Confirm Hosts, Ambari would get the information of cluster by clusterID, so we will get ClusterNotFoundException because the cluster has not been created yet.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ambari.apache.org
For additional commands, e-mail: issues-help@ambari.apache.org