Improve error message when coordinator not found

Led users to think that the node had left the cluster when not starting
sharding on every node with the correct roles.
This commit is contained in:
Christopher Batey 2020-02-07 08:15:25 +00:00
parent 2ee2db0cc7
commit 36cd20247f

View file

@ -899,9 +899,18 @@ private[akka] class ShardRegion(
shardBuffers.totalSize, shardBuffers.totalSize,
coordinatorMessage) coordinatorMessage)
} else { } else {
// Members start off as "Removed"
val partOfCluster = cluster.selfMember.status != MemberStatus.Removed
val possibleReason =
if (partOfCluster)
"Has Cluster Sharding been started on every node and nodes been configured with the correct role(s)?"
else
"Probably, no seed-nodes configured and manual cluster or bootstrap join not performed?"
log.warning( log.warning(
"{}: No coordinator found to register. Probably, no seed-nodes configured and manual cluster join not performed? Total [{}] buffered messages.", "{}: No coordinator found to register. {} Total [{}] buffered messages.",
typeName, typeName,
possibleReason,
shardBuffers.totalSize) shardBuffers.totalSize)
} }
} }