Troubleshooting

This page covers the most common first-run issues for MicroRaft users. The format is symptom, cause, and fix so you can recover quickly.

Gradle cannot find Java 11

Symptom: the build fails before running tests and Gradle reports that it cannot find a Java installation matching version 11.

Why it happens: the repository build targets Java 11.

What to do:

  • install Java 11 locally
  • rerun the original Gradle command after Java 11 is available
./gradlew :microraft-tutorial:test \
  --tests io.microraft.tutorial.OperationCommitTest

I used the wrong build command

Symptom: you copied an older Maven command from a stale source and mvnw does not reflect the current repository build flow.

What to do:

  • use ./gradlew, not mvnw
  • prefer the commands in the root README or Setup

No leader seems to be elected locally

Symptom: the scenario hangs or never reaches the expected leader-dependent assertions.

What to do:

  • start with LeaderElectionTest to isolate cluster formation
  • confirm you are running the tutorial test module from the repository root
  • check your logs for local transport setup failures before assuming a protocol issue
./gradlew :microraft-tutorial:test \
  --tests io.microraft.tutorial.LeaderElectionTest

The example command is not found

Symptom: your shell cannot find ./gradlew, or the module path or test class name is not recognized.

What to do:

  • run the command from the repository root
  • make sure the repository clone completed successfully
  • use the fully qualified test names shown in microraft-tutorial/README.md

Still blocked?

  • open a GitHub issue with Java version, OS, logs, and exact command line
  • start a discussion if you are unsure whether the behavior is a bug or a usage issue