This document summarizes all issues fixed during the Docker build and run setup session.
Problem: pip install failed with "Read timed out" when downloading confluent-kafka package during Docker image build.
Root Cause: Default pip timeout (15s) insufficient for large packages over slow network.
Fix: Added --timeout 300 to pip install in docker/dockerfiles/Dockerfile.platform:
RUN pip install --no-cache-dir --timeout 300 \
fastapi==0.111.0 \
"uvicorn[standard]==0.30.0" \
...File: docker/dockerfiles/Dockerfile.platform (line 15)
Problem: Running scripts/run_all.sh multiple times caused:
- Duplicate container starts
- Regeneration of seed data
- Duplicate schema application
- Duplicate data loading
Fix: Added helper functions and conditional checks:
containers_running()- Skipdocker compose upif containers already runningseed_files_exist()- Skip data generation if seed files existpg_has_data(),ts_has_data(),neo4j_has_data()- Skip data load if data existspg_has_schema(),ts_has_schema(),neo4j_has_constraints()- Skip schema if appliedplatform_running()- Skip platform stack launch if already running
File: scripts/run_all.sh (lines 106-173, 189-218, 222-247, 311-416, 421-503, 574-581)
Problem: flowcore-agents container failed to start with:
ports are not available: exposing port TCP 0.0.0.0:8021 -> ... bind: address already in use
Root Cause: Port 8021 already in use by another process.
Fix: Changed CLASS_AGENT_PORT from 8021 to 8022 in environment:
CLASS_AGENT_PORT=8022File: docker/.env (line 77)
Problem: Port 8888 (NOC UI) not accessible - flowcore-api-ui container not running.
Root Cause: Container wasn't started - only infrastructure, platform, and agents were up.
Fix: Started flowcore-api-ui container:
docker compose -f docker/docker-compose.api.yml up -dAccess: http://localhost:8888/
Problem: NOC UI displayed "No racks found. Make sure the Digital Twin is populated."
Root Cause: Frontend .env had non-existent VITE_DEFAULT_TENANT_ID that didn't match database.
Fix: Updated noc-frontend/.env with correct tenant ID from PostgreSQL:
VITE_GRAPHQL_URL=http://localhost:8888/graphql
VITE_GRAPHQL_WS_URL=ws://localhost:8888/graphql-ws
VITE_INSIGHTS_API_URL=http://localhost:8888/api/insights
VITE_DEFAULT_TENANT_ID=fbeb8fc1-fad9-4c0a-98b4-c6d410ee7a4bFile: noc-frontend/.env (new file)
Problem: Port 8090 not responding - no web UI for Kafka topic browsing.
Root Cause: Redpanda's built-in dashboard is not enabled in dev-container mode.
Fix: Added Redpanda Console service to docker-compose.kafka.yml:
kafka-ui:
image: redpandadata/console:latest
ports:
- "${KAFKA_UI_PORT:-8091}:8080"
environment:
KAFKA_BROKERS: kafka:9092Access: http://localhost:8091/
Files: docker/docker-compose.kafka.yml (lines 96-118), docker/.env (line 36)
Problem: Synthetic replay service showed errors: 495 and events_published: 0.
Root Cause: entity["entity_id"] is asyncpg UUID object, not string:
key.encode()failed - UUID has noencode()methodentity['entity_id'][:8]failed - UUID not subscriptable
Fix: Convert UUID to string before operations:
# Line 68 - Kafka message key
key_bytes = str(key).encode() if key else None
# Line 145 - Asset tag generation
"identity_signals": [{"signal_type": "ASSET_TAG",
"signal_value": f"AT-{str(entity['entity_id'])[:8]}", ...}]File: services/synthetic-replay/main.py (lines 66-70, 145)
Problem: Push rejected with:
remote: error: File generators/output/timescaledb_seed.sql is 403.75 MB;
this exceeds GitHub's file size limit of 100.00 MB
Fix: Added generators/output/ to .gitignore and removed from tracking:
# Generated seed data and logs
generators/output/File: .gitignore (new file)
Problem: No easy way to start/stop/restart all FlowCore containers.
Fix: Created scripts/container.sh with commands:
start- Start all containersstop- Stop all containersrestart- Full restartps- Show container statuslogs- Follow logsdown- Remove containers and volumespull- Pull latest imagesbuild- Rebuild local images
File: scripts/container.sh (new file)
# Verify current remote and branch
git remote -v
git branch --show-current
# Change remote to new repository
git remote remove origin
git remote add origin https://github.com/codinnvrends/flow-core.git
# Push your branch
git push -u origin fix-for-kafka-and-UI-etc-working-system# Create .gitignore for output folder
echo "generators/output/" >> .gitignore
# Remove large files from git index (keep locally)
git rm -r --cached generators/output/
# Stage .gitignore and commit
git add .gitignore
git commit -m "Add .gitignore and exclude generated output files"
# Push again
git push -u origin fix-for-kafka-and-UI-etc-working-system# Add new files
git add .gitignore
git add noc-frontend/.env
git add scripts/container.sh
# Stage modified files
git add docker/.env
git add docker/docker-compose.kafka.yml
git add docker/dockerfiles/Dockerfile.platform
git add scripts/neo4j_loader.py
git add scripts/rebuild.sh
git add scripts/run_all.sh
git add scripts/stack.sh
git add services/synthetic-replay/main.py
# Commit and push
git commit -m "Fix for kafka and UI etc working system"
git push -u origin fix-for-kafka-and-UI-etc-working-system# Save your work to a new branch first
git checkout -b temp-backup
# Reset to clean state and cherry-pick fixes
git checkout fix-for-kafka-and-UI-etc-working-system
git reset --soft HEAD~1
git add .gitignore noc-frontend/.env scripts/container.sh
git add docker/ services/
git commit -m "Fix for kafka and UI etc working system"
git push -f -u origin fix-for-kafka-and-UI-etc-working-system# Stash current changes and switch branch
git stash push -m "Description of changes"
git checkout main
# Or discard changes and switch
git checkout --force main
# Restore stashed changes later
git stash pop
git stash list # View all stashes# Extract file from another branch to current branch
git show fix-for-kafka-and-UI-etc-working-system:README.md > README.md
git show fix-for-kafka-and-UI-etc-working-system:FIXES_SUMMARY.md > FIXES_SUMMARY.md
# Stage and commit
git add README.md FIXES_SUMMARY.md
git commit -m "Add updated documentation"# When pull creates conflicts, use local version (--ours)
git checkout --ours README.md
git add README.md
git commit -m "Resolved conflict keeping local version"
# Alternative: use remote version (--theirs)
git checkout --theirs README.md
git add README.md
git commit -m "Resolved conflict using remote version"# When remote is ahead and you have local commits
git pull --no-rebase origin main
# Resolve any conflicts, then push
git push origin mainGenerated: April 11, 2026
