conduktor.io ↗

Kafka Exception TaskIdFormatException

org.apache.kafka.streams.errors.TaskIdFormatException
Non-retriable Streams

Indicates a run time error incurred while trying parse the TaskId task id from the read string.

Common Causes

Solutions

Example Stack Trace

org.apache.kafka.streams.errors.TaskIdFormatException: Task id cannot be parsed correctly from hello_world at org.apache.kafka.streams.processor.TaskId.parse(TaskId.java:120) at org.apache.kafka.streams.processor.internals.StateDirectory.parseTaskDirectoryName(StateDirectory.java:512) at org.apache.kafka.streams.processor.internals.StateDirectory.listNonEmptyTaskDirectories(StateDirectory.java:489) at org.apache.kafka.streams.processor.internals.TaskManager.tasksOnLocalStorage(TaskManager.java:1180) at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:632) at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:575)

Diagnostic Commands

ls -la $STATE_DIR/<application.id>/ # task dirs must look like 0_0, 0_1, 1_3 (or <name>__0_0 for named topologies); anything else is corrupt bin/kafka-streams-application-reset.sh --application-id <app-id> --bootstrap-server localhost:9092 --input-topics <topics> rm -rf $STATE_DIR/<application.id> # wipe local state after a reset so Streams recreates valid task directories

Related

Related Streams exceptions: BrokerNotFoundException · InternalTopicsAlreadySetupException · InvalidStateStoreException · InvalidStateStorePartitionException · LockException · MisconfiguredInternalTopicException · MissingInternalTopicsException · MissingSourceTopicException

Hitting TaskIdFormatException in production? Conduktor Console gives you real-time visibility into clients, consumer groups, and broker health. Browse every Kafka exception or protocol error code.