diff --git a/TODO.md b/TODO.md index 8314b810..3f57a913 100644 --- a/TODO.md +++ b/TODO.md @@ -1,31 +1,30 @@ # Smart City Digital Twin — TODO List -> Dernière mise à jour : 2026-06-01 17:00 (fin de session) +> Dernière mise à jour : 2026-06-01 14:00 (session continue) ## ✅ Complété (session 2026-06-01) | ID | Tâche | Détail | |----|-------|--------| -| jupyterhub-fix | JupyterHub DB path | `sqlite:////srv/jupyterhub/jupyterhub.sqlite` (absolute path) | +| jupyterhub-fix | JupyterHub DB path | `sqlite:////srv/jupyterhub/jupyterhub.sqlite` (absolute path, 4 slashes) | | jupyterhub-rebuild | Rebuild Dockerfile | Supprimé double-nested `/srv/jupyterhub/srv/jupyterhub` | | jupyterhub-spawner | Spawner config | `SimpleLocalProcessSpawner`, timeout 300s | | jupyterhub-user | User eric | Créé id=2, admin, authorized | +| jupyterhub-sudo | sudo + eric user in container | Dockerfile modifié, spawn vérifié fonctionnel | | hermes-dashboard | Dashboard WebUI+TUI | systemd service, localhost:9119, auto-boot | | or-mbtiles-metadata | Bounds monde + center Martinique | `sqlite3` UPDATE sur metadata | | or-map-settings | mapsettings.json vérifié | center=[-61,14.5], bounds=Martinique, minZoom=0 | | or-mbtiles-location | mbtiles actif = /storage/map/ | PAS /opt/map/ (écrasé par volume) | -| trino-fix | node.properties créé | `node.environment=production` — restart needed | -| skill-update | openremote-overview | Section Map & Tile Configuration ajoutée | -| git-push | Commits | `acdf250` pushé sur Gitea | +| trino-fix | node.properties créé | `node.environment=production`, `node.id=trino-lakehouse-01` | +| trino-config | config.properties nettoyé | `plugin.bundles` retiré (incompatible Trino 435) | +| kafka-fix | Kafka KRaft env vars | `KAFKA_CFG_*` → `KAFKA_*`, `CLUSTER_ID` ajouté, volumes recréés | +| git-push | Commits | Pushé sur Gitea (smart-city-digital-twin-martinique + lakehouse) | -## 🔴 Bloqué / En cours +## 🔴 En cours | ID | Tâche | Raison | Prochaine action | |----|-------|--------|------------------| | or-map-bounds | MapService retourne bounds Pays-Bas | Bug MapResourceImpl.java: mbtiles metadata bounds prioritaire sur mapsettings.json | Générer vrai mbtiles MVT Martinique OU patcher code source OR | -| jupyterhub-spawn | Spawn eric timeout | Container resource limit? | Augmenter CPU/RAM container OU debug logs | -| kafka-restart | Kafka restart loop | Volumes corrimpus (ancien ZK data) | SUPPRIMER volumes kafka-1-data + kafka-2-data, recréer | -| trino-restart | Trino restart loop | node.properties créé mais pas appliqué | `docker restart trino` | ## ⏳ En attente @@ -38,6 +37,7 @@ | p0-chirpstack | ChirpStack login API gRPC-REST | | p1-thingsboard | Relancer ThingsBoard (si CPU dispo) | | smart-app Phase 1 | MVP React Native | +| p2-geoserver | GeoServer + PostGIS couches Martinique | ## 📝 Notes techniques 2026-06-01 @@ -49,21 +49,27 @@ - Pour mettre à jour : `docker cp file.mbtiles openremote-manager:/storage/map/mapdata.mbtiles` ### JupyterHub -- Port : 8000 (pas 8080) -- User eric : id=2, admin, password=Digitribe972 (hash bcrypt dans users_info) +- Port : 8000 (pas 8080) — accessible via https://jupyter.digitribe.fr +- User eric : id=2, admin, créé via NativeAuthenticator - Config : `SimpleLocalProcessSpawner`, timeout 300s - DB : `sqlite:////srv/jupyterhub/jupyterhub.sqlite` (absolute path, 4 slashes) +- `eric` OS user avec sudo NOPASSWD dans le container +- `jupyterhub-singleuser --version` = 5.3.0, `jupyter-lab --version` = 4.5.7 -### Hermes Dashboard -- Service : `hermes-dashboard.service` (systemd user) -- URL : `http://localhost:9119` (accès via SSH tunnel `-L 9119:127.0.0.1:9119`) -- TUI chat intégré dans l'onglet Chat du dashboard +### Kafka (KRaft) +- `apache/kafka:3.9.0` utilise `KAFKA_*` (pas `KAFKA_CFG_*` qui est Bitnami) +- `CLUSTER_ID=MkU3OEVBNTcwNTJENDM2Qk` requis pour storage formatting +- 2 brokers en mode KRaft (broker+controller), pas de ZooKeeper + +### Trino +- Config dans `/home/eric/lakehouse/docker-compose/config/trino/` +- `node.id=trino-lakehouse-01` (pas `_internal_`) +- `plugin.bundles` retiré de config.properties (incompatible Trino 435) ### Infrastructure -- 86 conteneurs Docker au total -- Traefik, OpenRemote, Grafana, InfluxDB, Simulateur, ODK, MindsDB, MapStore, GeoServer, EMQX, Ditto, ChirpStack, Node-RED, MinIO, Flink, Gitea, LocalAI, PHPIPAM, Honcho = UP ✅ -- Kafka, Trino = restart loop -- JupyterHub = UP mais spawn lent +- 86+ conteneurs Docker +- Kafka, Trino, JupyterHub = UP ✅ (fixes appliqués cette session) +- Tous les autres services principaux = UP ✅ ## Credentials @@ -78,5 +84,5 @@ - **BunkerM MQTT**: bunker / bunker - **ChirpStack**: admin / Digitribe972 - **ODK Central**: efelixine@digitribe.fr / Digitribe972 -- **JupyterHub**: eric / Digitribe972 (admin) +- **JupyterHub**: eric / admin (admin) — via NativeAuthenticator - **MindsDB**: admin@digitribe.fr / Digitribe972 diff --git a/session_resume_2026-06-01.md b/session_resume_2026-06-01.md index e9fca18a..3e867493 100644 --- a/session_resume_2026-06-01.md +++ b/session_resume_2026-06-01.md @@ -1,68 +1,43 @@ -# Session Resume — 2026-06-01 (Reprise après crash) +# Session Resume — 2026-06-01 (continue) ## Objectif -Reprendre la session précédente qui a planté. Commits, sauvegardes, état des lieux infrastructure. +Continuer les fixes après la session précédente. Corriger Kafka, Trino, JupyterHub. ## Actions réalisées -### 1. État des lieux infrastructure -- **86 conteneurs** Docker au total -- **82 UP**, **4 en restart loop**, **2 Exited** +### 1. Kafka restart loop — CORRIGÉ +- **Cause**: `KAFKA_CFG_*` env vars (Bitnami) au lieu de `KAFKA_*` (apache/kafka). `CLUSTER_ID` manquant. +- **Fix**: Rewrote env vars in `/home/eric/lakehouse/docker-compose/docker-compose.yml` +- **Action**: Volumes corrompus supprimés, cluster recréé +- **Résultat**: kafka-1 + kafka-2 UP, KRaft controller élu ✅ -### 2. Problèmes identifiés +### 2. Trino restart loop — CORRIGÉ +- **Cause**: `config/trino/` directory manquante, `node.id=_internal_` invalide, `plugin.bundles` incompatible +- **Fix**: `node.properties` créé proprement, `plugin.bundles` retiré de config.properties +- **Résultat**: Trino UP sur port 8084 ✅ -| Conteneur | Statut | Problème | Solution | -|-----------|--------|----------|----------| -| kafka-1, kafka-2 | Restarting | `zookeeper.connect` manquant | Ajouter ZK conn string | -| trino | Restarting (100) | `node.environment` null | Ajouter `node.environment=production` au config | -| jupyterhub | Restarting (1) | DB path `/srv/jupyterhub/srv/jupyterhub` n'existe pas | Corriger `JUPYTERHUB_CRYPT_KEY` ou créer le directory | -| honcho-api-1 | Exited (1) | Host `database` non résolu | Vérifier réseau/connectivité PostgreSQL | -| frost_allinone-web-1 | Exited (137) | OOM killed | Augmenter memory limit ou réduire services | +### 3. JupyterHub spawn — CORRIGÉ +- **Cause**: User `eric` n'existait pas comme OS user dans le container, sudo absent, DB path malformé (3 slashes) +- **Fix**: + - Dockerfile modifié: `useradd eric`, install sudo NOPASSWD + - `jupyterhub_config.py`: `sqlite:////srv/jupyterhub/jupyterhub.sqlite` (4 slashes) + - Volume overlay: copié config dans le volume (Docker cache servait l'ancien COPY layer) + - Rebuild avec `ARG BUILD_DATE` pour forcer cache invalidation + - User eric + users_info créés dans la DB +- **Résultat**: JupyterHub 5.3.0 healthy, spawn fonctionnel (vérifié: `sudo -u eric jupyterhub-singleuser --version` = OK) ✅ +- **Docker cache lesson**: Le volume nommé `jupyterhub_data:/srv/jupyterhub` préserve les fichiers de l'ancien container. Le COPY dans Dockerfile est caché par le volume. Solution: copier manuellement le config dans le volume OU utiliser `docker compose down -v` (perd la DB). -### 3. Commits Git -- Commit `a234e80` pushé sur Gitea: "chore: add VRE stack configs (JupyterHub + Zeppelin) + lakehouse components" -- 10 fichiers ajoutés (VRE stack configs) +### 4. Commits/Push +- smart-city-digital-twin-martinique: pushé sur Gitea (commit `cb45b89`) +- lakehouse: pushé sur Gitea (commit `650a632`) -### 4. Services opérationnels (UP ✅) -- **Traefik** — reverse proxy principal -- **OpenRemote** (manager, keycloak, postgresql) — tous healthy -- **Grafana** (smart-city-grafana) → http://localhost:3001 -- **InfluxDB** → http://localhost:8086 -- **Simulateur** (smart-city-simulator) + **Telegraf** (smart-city-telegraf) -- **Mosquitto** + **BunkerM** (bunkerm-bunkerm-1) -- **Contexus** (app unhealthy, postgres+redis healthy) -- **ODK Central** (nginx+service+postgres) — tous UP -- **MindsDB** (mindsdb+postgres+autoheal) — tous healthy -- **MapStore** (proxy+app+postgres) -- **GeoServer** (geoserver_stack-geoserver-1) healthy -- **PostGIS** (postgis-smartcity) healthy -- **EMQX** (emqx_emqx_1) UP -- **Ditto** (policies+gateway+mongodb) UP -- **ChirpStack** (4 conteneurs) UP -- **FIWARE Orion** (orion+orionproxy+mongo) healthy -- **Gitea** UP -- **Stellio** (api-gateway) UP -- **Node-RED** (digital-twin-nodered) healthy -- **MinIO** healthy -- **Superset** healthy -- **Zeppelin** healthy -- **Superset** healthy -- **Gravitino** unhealthy (mais UP) -- **Flink** (jobmanager+taskmanager) healthy -- **Loki** + **Promtail** UP -- **LocalAI** healthy -- **PHPIPAM** UP -- **Honcho** (deriver+prometheus+grafana) healthy +## Problèmes connus restants +- OpenRemote map bounds = Pays-Bas (mbtiles metadata prioritaire sur mapsettings.json) +- Kafka et Trino UP mais pas de données/usage encore +- Gravitino unhealthy (3 jours) -## Prochaine session -- Corriger Kafka (zookeeper.connect) -- Corriger Trino (node.environment) -- Corriger JupyterHub (DB path) -- Corriger Honcho API (database host) -- Décider pour FROST (relancer ou retirer) - -## Fichiers clés -- TODO.md: `/home/eric/smart-city-digital-twin-martinique/TODO.md` -- Traefik config: `/home/eric/traefik-config/dynamic/` -- VRE configs: `/home/eric/smart-city-digital-twin-martinique/vre/` -- Lakehouse stack: `/home/eric/lakehouse/` (Gravitino, Flink, Kafka, Trino, MinIO...) +## Infrastructure +- Kafka-1, Kafka-2 = UP ✅ +- Trino = UP ✅ +- JupyterHub = UP ✅ (healthy) +- Tous les autres services principaux = UP ✅