This guide covers common issues and their solutions when running K2I.
# Via CLI
k2i status --url http://localhost:8080
# Via curl
curl -s http://localhost:8080/health | jq .
# Kubernetes
kubectl exec -it deployment/k2i -n k2i -- curl -s localhost:8080/health# Systemd
journalctl -u k2i -f
# Docker
docker logs -f k2i
# Kubernetes
kubectl logs -f deployment/k2i -n k2i# Via CLI flag
k2i ingest -v # debug level
k2i ingest -vv # trace level
# Via environment variable
RUST_LOG=k2i=debug k2i ingest
RUST_LOG=k2i=trace,rdkafka=debug k2i ingestcurl -s http://localhost:9090/metrics | grep k2iSymptom:
Error: No such file or directory (os error 2)
Cause: Configuration file doesn't exist at the specified path.
Solution:
# Check file exists
ls -la config.toml
# Specify full path
k2i ingest --config /absolute/path/to/config.tomlSymptom:
Error: TOML parse error at line 15, column 3
Cause: Syntax error in configuration file.
Solution:
# Validate config
k2i validate --config config.toml
# Check TOML syntax
cat config.toml | toml-cli lintSymptom:
Error: missing field `topic` at line 1 column 1
Cause: Required configuration field is not set.
Solution: Add the missing field to your config file. Required fields:
kafka.bootstrap_serverskafka.topickafka.consumer_groupiceberg.catalog_typeiceberg.warehouse_pathiceberg.database_nameiceberg.table_name
Symptom:
Error: Kafka connection failed: broker not available
Causes:
- Brokers are not running
- Network connectivity issue
- Wrong bootstrap servers
Solutions:
# Test connectivity
nc -zv kafka-broker 9092
# Check broker status
kafka-broker-api-versions --bootstrap-server localhost:9092
# Verify config
cat config.toml | grep bootstrap_serversSymptom:
Error: SASL authentication failed: Invalid credentials
Causes:
- Wrong username/password
- Wrong SASL mechanism
- Missing security configuration
Solution:
[kafka.security]
protocol = "SASL_SSL"
sasl_mechanism = "SCRAM-SHA-256" # or SCRAM-SHA-512, PLAIN
sasl_username = "correct-username"
sasl_password = "correct-password"Symptom:
Error: SSL handshake failed: certificate verify failed
Solutions:
[kafka.security]
protocol = "SASL_SSL"
ssl_ca_location = "/path/to/ca-cert.pem"
# For self-signed certs (development only)
# ssl_endpoint_identification_algorithm = ""Symptom:
WARN Consumer rebalance triggered
WARN Consumer rebalance triggered
WARN Consumer rebalance triggered
Cause: max_poll_interval_ms too short for flush time.
Solution:
[kafka]
max_poll_interval_ms = 600000 # 10 minutesSymptom:
WARN Backpressure engaged: buffer full
Causes:
- Iceberg writes too slow
- Buffer too small for throughput
- Network issues to object storage
Solutions:
[buffer]
# Increase buffer size
max_size_mb = 1000
# Decrease flush interval (write more often)
flush_interval_seconds = 15
# Decrease batch size (smaller files, faster writes)
flush_batch_size = 5000Symptom:
Error: memory allocation failed
Causes:
- Buffer size exceeds available memory
- Memory leak (report as bug)
Solutions:
[buffer]
# Reduce buffer size to fit in available memory
max_size_mb = 500# Increase container/process memory limit
docker run -m 4g ...
# Kubernetes
resources:
limits:
memory: 4GiSymptom:
Error: Failed to connect to Iceberg catalog
Causes:
- Catalog server not running
- Wrong URI
- Network issue
Solutions:
# Test REST catalog
curl -s http://localhost:8181/v1/config
# Check Glue access
aws glue get-databases --region us-east-1
# Verify config
cat config.toml | grep -A5 "\[iceberg\]"Symptom:
Error: Table not found: analytics.events
Cause: Table doesn't exist in catalog.
Solution:
# Create table via Spark/DuckDB/Trino
spark-sql -e "CREATE TABLE analytics.events ..."
# Or use catalog REST API
curl -X POST http://localhost:8181/v1/namespaces/analytics/tables ...Symptom:
Error: CAS conflict: expected snapshot 123, actual 124
Cause: Another process modified the table.
Solution: K2I automatically retries CAS conflicts. If persistent:
- Ensure only one K2I instance per table
- Check for other Iceberg writers
Symptom:
Error: Access Denied (Service: S3)
Solutions:
# Test S3 access
aws s3 ls s3://your-bucket/warehouse/
# Check IAM permissions
aws sts get-caller-identity
# Verify credentials in config
cat config.toml | grep aws_Required S3 permissions:
s3:GetObjects3:PutObjects3:DeleteObjects3:ListBucket
Symptom:
Error: Failed to write Parquet file
Causes:
- Schema mismatch
- Invalid data types
- Storage full
Solutions:
# Check available storage
aws s3api head-bucket --bucket your-bucket
# Enable trace logging for details
RUST_LOG=k2i::iceberg=trace k2i ingestSymptom:
Error: Transaction log corrupted at position 12345
Cause: Incomplete write, disk failure, or bug.
Solutions:
# Backup corrupted log
cp -r transaction_logs transaction_logs.backup
# Clear log (will replay from Kafka)
rm -rf transaction_logs/*
# Restart (will re-consume from last Kafka offset)
k2i ingestSymptom:
Error: Checksum mismatch at entry 5678
Cause: Data corruption in log file.
Solution: Same as log corruption - backup and clear.
Symptom:
Error: Failed to recover from transaction log
Solutions:
- Check disk space
- Check file permissions
- Clear transaction log if corrupt
- Check Iceberg table state matches expected
Symptom: k2i_kafka_consumer_lag increasing over time.
Causes:
- Processing too slow
- Flush taking too long
- Insufficient resources
Solutions:
[kafka]
# Increase batch size for higher throughput
batch_size = 5000
[buffer]
# Larger flushes are more efficient
flush_batch_size = 50000
[iceberg]
# Faster compression
compression = "lz4" # instead of zstdSymptom: k2i_flush_duration_seconds high (> 5s).
Causes:
- Large batch sizes
- Slow object storage
- Network latency
Solutions:
[buffer]
# Smaller, more frequent flushes
flush_batch_size = 10000
flush_interval_seconds = 15
[iceberg]
# Faster compression
compression = "snappy" # fastest
# Smaller files
target_file_size_mb = 128Symptom: Container/process memory growing.
Solutions:
[buffer]
# Limit buffer size
max_size_mb = 500
# Shorter TTL evicts faster
ttl_seconds = 30Symptom:
{"status": "Degraded", "components": {"catalog": {"status": "Degraded"}}}Cause: Non-critical component experiencing issues but still operational.
Action: Check component logs for warnings, monitor closely.
Symptom:
{"status": "Unhealthy", "components": {"kafka": {"status": "Unhealthy"}}}Cause: Critical component failed.
Action: Check component-specific errors, restart may be needed.
Causes:
- K2I not running
- Wrong port
- Network issue
Solutions:
# Check process is running
ps aux | grep k2i
pgrep -f "k2i ingest"
# Check port binding
netstat -tlnp | grep 8080
ss -tlnp | grep 8080
# Check firewall
iptables -L -n | grep 8080| Code | Meaning | Action |
|---|---|---|
| 0 | Success | None |
| 1 | Config Error | Fix configuration |
| 2 | Kafka Error | Check Kafka connectivity |
| 3 | Iceberg Error | Check catalog/storage |
| 4 | Storage Error | Check object storage access |
| 5 | TxLog Error | Check local disk |
| 6 | Health Error | Check all components |
| 10 | Runtime Error | Check logs for details |
| 130 | Signal Interrupt | Normal shutdown |
When reporting issues, include:
-
Version:
k2i --version
-
Configuration (redact secrets):
cat config.toml | sed 's/password.*/password = "REDACTED"/g'
-
Health status:
curl -s http://localhost:8080/health | jq .
-
Metrics:
curl -s http://localhost:9090/metrics | grep k2i -
Logs (last 100 lines with trace):
RUST_LOG=trace k2i ingest 2>&1 | tail -100
-
Environment:
uname -a rustc --version docker --version # if applicable kubectl version # if applicable
Report issues at: https://github.com/osodevops/k2i/issues
Include:
- Description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Debug information (see above)
No. K2I uses a single consumer group per topic. Multiple instances would cause duplicate processing. Run one instance per topic.
K2I automatically recovers on restart using the transaction log. Simply restart the process - it will resume from the last committed offset.
- Stop K2I gracefully (flushes buffer)
- Update configuration
- Start K2I - it will start from the new topic's beginning
- Stop K2I
- Update
database_nameandtable_namein config - Create the new table in your catalog
- Start K2I
K2I engages backpressure - it pauses Kafka consumption until the buffer has space. Data is not lost, but latency increases.
K2I is single-process by design. Scale by:
- Running separate instances for different topics
- Partitioning your data across multiple topics
- Increasing resources (CPU, memory) for a single instance