Expected to handle request, but there was a connection error with one of the brokers

I am using c8run 8.8.0-alpha8 on windows, sometimes when trying to call the rest api
/v2/process-instances
to create a new process instance,I get the following exception (in the same time operate & tasklist are working just fine):

[2025-10-06 08:46:04.313] [ForkJoinPool.commonPool-worker-3] WARN
io.camunda.service.exception.ErrorMapper - Expected to handle request, but there was a connection error with one of the brokers
java.net.ConnectException: Failed to send request to command-api-1, no remote address found.
at io.camunda.zeebe.transport.impl.AtomixClientTransportAdapter.tryToSend(AtomixClientTransportAdapter.java:143)
at io.camunda.zeebe.transport.impl.AtomixClientTransportAdapter.lambda$sendRequestInternal$2(AtomixClientTransportAdapter.java:88)
at io.camunda.zeebe.scheduler.ActorControl.lambda$call$0(ActorControl.java:75)
at io.camunda.zeebe.scheduler.ActorJob.invoke(ActorJob.java:77)
at io.camunda.zeebe.scheduler.ActorJob.execute(ActorJob.java:43)
at io.camunda.zeebe.scheduler.ActorTask.execute(ActorTask.java:125)
at io.camunda.zeebe.scheduler.ActorThread.executeCurrentTask(ActorThread.java:127)
at io.camunda.zeebe.scheduler.ActorThread.doWork(ActorThread.java:104)
at io.camunda.zeebe.scheduler.ActorThread.run(ActorThread.java:224)

I tried restarting c8run I got another error:

io.camunda.service.license.CamundaLicense - No license detected when one is expected. Please provide a license through the CAMUNDA_LICENSE_KEY environment variable.

[2025-10-06 08:53:15.642] [zb-actors-1] [{actor-name=Startup, actor-scheduler=Broker-0}] ERROR
io.camunda.zeebe.util.actor - Uncaught exception in ‘Startup’ in phase ‘STARTED’. Continuing with next job.
io.camunda.zeebe.journal.CorruptedJournalException: Expected to find records until index 227170, but last index is 1
at io.camunda.zeebe.journal.file.SegmentsManager.loadSegments(SegmentsManager.java:384)
at io.camunda.zeebe.journal.file.SegmentsManager.open(SegmentsManager.java:289)
at io.camunda.zeebe.journal.file.SegmentedJournal.(SegmentedJournal.java:63)
at io.camunda.zeebe.journal.file.SegmentedJournalBuilder.build(SegmentedJournalBuilder.java:186)
at io.atomix.raft.storage.log.RaftLogBuilder.build(RaftLogBuilder.java:154)
at io.atomix.raft.storage.RaftStorage.openLog(RaftStorage.java:202)
at io.atomix.raft.impl.RaftContext.(RaftContext.java:221)
at io.atomix.raft.impl.DefaultRaftServer$Builder.build(DefaultRaftServer.java:244)
at io.atomix.raft.impl.DefaultRaftServer$Builder.build(DefaultRaftServer.java:218)
at io.atomix.raft.partition.impl.RaftPartitionServer.buildServer(RaftPartitionServer.java:180)
at io.atomix.raft.partition.impl.RaftPartitionServer.(RaftPartitionServer.java:97)
at io.atomix.raft.partition.RaftPartition.createServer(RaftPartition.java:139)
at io.atomix.raft.partition.RaftPartition.initServer(RaftPartition.java:122)
at io.atomix.raft.partition.RaftPartition.bootstrap(RaftPartition.java:102)
at io.camunda.zeebe.broker.partitioning.startup.steps.RaftBootstrapStep.startup(RaftBootstrapStep.java:37)
at io.camunda.zeebe.broker.partitioning.startup.steps.RaftBootstrapStep.startup(RaftBootstrapStep.java:14)
at io.camunda.zeebe.scheduler.startup.StartupProcess.proceedWithStartupSynchronized(StartupProcess.java:162)
at io.camunda.zeebe.scheduler.startup.StartupProcess.lambda$proceedWithStartupSynchronized$3(StartupProcess.java:170)
at io.camunda.zeebe.scheduler.future.FutureContinuationRunnable.run(FutureContinuationRunnable.java:28)
at io.camunda.zeebe.scheduler.ActorJob.invoke(ActorJob.java:86)
at io.camunda.zeebe.scheduler.ActorJob.execute(ActorJob.java:43)
at io.camunda.zeebe.scheduler.ActorTask.execute(ActorTask.java:125)
at io.camunda.zeebe.scheduler.ActorThread.executeCurrentTask(ActorThread.java:127)
at io.camunda.zeebe.scheduler.ActorThread.doWork(ActorThread.java:104)
at io.camunda.zeebe.scheduler.ActorThread.run(ActorThread.java:224)

Hi @devmsaleh,

You’re encountering multiple interconnected issues with c8run 8.8.0-alpha8. Let me help you understand and resolve these problems:

Issue Classification

This appears to be a Problem with multiple components failing due to journal corruption and licensing requirements.

Root Cause Analysis

1. Journal Corruption

The CorruptedJournalException: Expected to find records until index 227170, but last index is 1 indicates that your Zeebe journal (Raft log) has become corrupted. This is the primary issue causing the startup failures.

2. License Requirement

The license error is expected behavior starting with Camunda 8.6+ - c8run now requires a license key even for local development.

3. Connection Errors

The initial connection errors to command-api-1 were likely symptoms of the underlying journal corruption.

Resolution Steps

Step 1: Fix the License Issue

Set the CAMUNDA_LICENSE_KEY environment variable before starting c8run:

Windows Command Prompt:

set CAMUNDA_LICENSE_KEY=-----BEGIN CAMUNDA LICENSE KEY----- ... -----END CAMUNDA LICENSE KEY-----
c8run

Windows PowerShell:

$env:CAMUNDA_LICENSE_KEY="-----BEGIN CAMUNDA LICENSE KEY----- ... -----END CAMUNDA LICENSE KEY-----"
c8run

If you don’t have a license key, you can request one from Camunda if you’re an enterprise customer.

Step 2: Recover from Journal Corruption

Since your journal is corrupted, you’ll need to reset the c8run data:

  1. Stop c8run completely
  2. Locate and delete the c8run data directory. This is typically in:
    • %USERPROFILE%\.camunda\c8run\data or similar location
  3. Restart c8run - it will initialize with fresh data

:warning: Warning: This will delete all your process instances, deployments, and other data stored locally.

Step 3: Verify Recovery

After restarting with a clean state and proper license:

  1. Check that c8run starts without errors
  2. Test the REST API endpoint /v2/process-instances again
  3. Verify that Operate and Tasklist are accessible

Prevention

  • Ensure c8run is properly shut down (avoid force-killing the process)
  • Consider using Docker Compose setup for more stability in development environments
  • Keep backups of important process definitions

References

Let me know if you need help with any of these steps or if you encounter other issues after following this recovery process!