[
https://issues.apache.org/jira/browse/RATIS-747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16969505#comment-16969505
]
Aravindan Vijayan commented on RATIS-747:
-----------------------------------------
The underlying problem was the registration of the commitInfoCache metric for
the leader server before starting the RaftServerImpl. The fix is to move the
registration of the metric outside the constructor.
> Datanode restart fails with IllegalStateException
> -------------------------------------------------
>
> Key: RATIS-747
> URL: https://issues.apache.org/jira/browse/RATIS-747
> Project: Ratis
> Issue Type: Bug
> Affects Versions: 0.5.0
> Reporter: Aravindan Vijayan
> Assignee: Aravindan Vijayan
> Priority: Major
> Labels: intermittent
> Fix For: 0.5.0
>
>
> This issue was observed and reported by [~hanishakoneru] while working on
> HDDS-2392.
> Datanode restart in an integration test fails with the following exception.
> {code}
> Caused by: java.lang.IllegalStateException: Not started
> at
> org.apache.ratis.thirdparty.com.google.common.base.Preconditions.checkState(Preconditions.java:504)
> at
> org.apache.ratis.thirdparty.io.grpc.internal.ServerImpl.getPort(ServerImpl.java:176)
> at
> org.apache.ratis.grpc.server.GrpcService.lambda$new$2(GrpcService.java:143)
> at org.apache.ratis.util.MemoizedSupplier.get(MemoizedSupplier.java:62)
> at
> org.apache.ratis.grpc.server.GrpcService.getInetSocketAddress(GrpcService.java:182)
> at
> org.apache.ratis.server.impl.RaftServerImpl.lambda$new$0(RaftServerImpl.java:84)
> at org.apache.ratis.util.MemoizedSupplier.get(MemoizedSupplier.java:62)
> at
> org.apache.ratis.server.impl.RaftServerImpl.getPeer(RaftServerImpl.java:136)
> at
> org.apache.ratis.server.impl.RaftServerMetrics.<init>(RaftServerMetrics.java:70)
> at
> org.apache.ratis.server.impl.RaftServerMetrics.getRaftServerMetrics(RaftServerMetrics.java:62)
> at
> org.apache.ratis.server.impl.RaftServerImpl.<init>(RaftServerImpl.java:119)
> at
> org.apache.ratis.server.impl.RaftServerProxy.lambda$newRaftServerImpl$2(RaftServerProxy.java:208)
> at
> java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
> Issue Links
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)