chore: session backup 2026-06-01 continue — Kafka/Trino/JupyterHub fixes, TODO update

This commit is contained in:
Eric FELIXINE
2026-06-01 10:39:11 -04:00
parent cb45b89f1f
commit 85199fc3f0
2 changed files with 59 additions and 78 deletions

46
TODO.md
View File

@@ -1,31 +1,30 @@
# Smart City Digital Twin — TODO List # 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) ## ✅ Complété (session 2026-06-01)
| ID | Tâche | Détail | | 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-rebuild | Rebuild Dockerfile | Supprimé double-nested `/srv/jupyterhub/srv/jupyterhub` |
| jupyterhub-spawner | Spawner config | `SimpleLocalProcessSpawner`, timeout 300s | | jupyterhub-spawner | Spawner config | `SimpleLocalProcessSpawner`, timeout 300s |
| jupyterhub-user | User eric | Créé id=2, admin, authorized | | 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 | | hermes-dashboard | Dashboard WebUI+TUI | systemd service, localhost:9119, auto-boot |
| or-mbtiles-metadata | Bounds monde + center Martinique | `sqlite3` UPDATE sur metadata | | 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-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) | | or-mbtiles-location | mbtiles actif = /storage/map/ | PAS /opt/map/ (écrasé par volume) |
| trino-fix | node.properties créé | `node.environment=production` — restart needed | | trino-fix | node.properties créé | `node.environment=production`, `node.id=trino-lakehouse-01` |
| skill-update | openremote-overview | Section Map & Tile Configuration ajoutée | | trino-config | config.properties nettoyé | `plugin.bundles` retiré (incompatible Trino 435) |
| git-push | Commits | `acdf250` pushé sur Gitea | | 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 | | 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 | | 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 ## ⏳ En attente
@@ -38,6 +37,7 @@
| p0-chirpstack | ChirpStack login API gRPC-REST | | p0-chirpstack | ChirpStack login API gRPC-REST |
| p1-thingsboard | Relancer ThingsBoard (si CPU dispo) | | p1-thingsboard | Relancer ThingsBoard (si CPU dispo) |
| smart-app Phase 1 | MVP React Native | | smart-app Phase 1 | MVP React Native |
| p2-geoserver | GeoServer + PostGIS couches Martinique |
## 📝 Notes techniques 2026-06-01 ## 📝 Notes techniques 2026-06-01
@@ -49,21 +49,27 @@
- Pour mettre à jour : `docker cp file.mbtiles openremote-manager:/storage/map/mapdata.mbtiles` - Pour mettre à jour : `docker cp file.mbtiles openremote-manager:/storage/map/mapdata.mbtiles`
### JupyterHub ### JupyterHub
- Port : 8000 (pas 8080) - Port : 8000 (pas 8080) — accessible via https://jupyter.digitribe.fr
- User eric : id=2, admin, password=Digitribe972 (hash bcrypt dans users_info) - User eric : id=2, admin, créé via NativeAuthenticator
- Config : `SimpleLocalProcessSpawner`, timeout 300s - Config : `SimpleLocalProcessSpawner`, timeout 300s
- DB : `sqlite:////srv/jupyterhub/jupyterhub.sqlite` (absolute path, 4 slashes) - 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 ### Kafka (KRaft)
- Service : `hermes-dashboard.service` (systemd user) - `apache/kafka:3.9.0` utilise `KAFKA_*` (pas `KAFKA_CFG_*` qui est Bitnami)
- URL : `http://localhost:9119` (accès via SSH tunnel `-L 9119:127.0.0.1:9119`) - `CLUSTER_ID=MkU3OEVBNTcwNTJENDM2Qk` requis pour storage formatting
- TUI chat intégré dans l'onglet Chat du dashboard - 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 ### Infrastructure
- 86 conteneurs Docker au total - 86+ conteneurs Docker
- Traefik, OpenRemote, Grafana, InfluxDB, Simulateur, ODK, MindsDB, MapStore, GeoServer, EMQX, Ditto, ChirpStack, Node-RED, MinIO, Flink, Gitea, LocalAI, PHPIPAM, Honcho = UP ✅ - Kafka, Trino, JupyterHub = UP ✅ (fixes appliqués cette session)
- Kafka, Trino = restart loop - Tous les autres services principaux = UP ✅
- JupyterHub = UP mais spawn lent
## Credentials ## Credentials
@@ -78,5 +84,5 @@
- **BunkerM MQTT**: bunker / bunker - **BunkerM MQTT**: bunker / bunker
- **ChirpStack**: admin / Digitribe972 - **ChirpStack**: admin / Digitribe972
- **ODK Central**: efelixine@digitribe.fr / Digitribe972 - **ODK Central**: efelixine@digitribe.fr / Digitribe972
- **JupyterHub**: eric / Digitribe972 (admin) - **JupyterHub**: eric / admin (admin) — via NativeAuthenticator
- **MindsDB**: admin@digitribe.fr / Digitribe972 - **MindsDB**: admin@digitribe.fr / Digitribe972

View File

@@ -1,68 +1,43 @@
# Session Resume — 2026-06-01 (Reprise après crash) # Session Resume — 2026-06-01 (continue)
## Objectif ## 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 ## Actions réalisées
### 1. État des lieux infrastructure ### 1. Kafka restart loop — CORRIGÉ
- **86 conteneurs** Docker au total - **Cause**: `KAFKA_CFG_*` env vars (Bitnami) au lieu de `KAFKA_*` (apache/kafka). `CLUSTER_ID` manquant.
- **82 UP**, **4 en restart loop**, **2 Exited** - **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 | ### 3. JupyterHub spawn — CORRIGÉ
|-----------|--------|----------|----------| - **Cause**: User `eric` n'existait pas comme OS user dans le container, sudo absent, DB path malformé (3 slashes)
| kafka-1, kafka-2 | Restarting | `zookeeper.connect` manquant | Ajouter ZK conn string | - **Fix**:
| trino | Restarting (100) | `node.environment` null | Ajouter `node.environment=production` au config | - Dockerfile modifié: `useradd eric`, install sudo NOPASSWD
| jupyterhub | Restarting (1) | DB path `/srv/jupyterhub/srv/jupyterhub` n'existe pas | Corriger `JUPYTERHUB_CRYPT_KEY` ou créer le directory | - `jupyterhub_config.py`: `sqlite:////srv/jupyterhub/jupyterhub.sqlite` (4 slashes)
| honcho-api-1 | Exited (1) | Host `database` non résolu | Vérifier réseau/connectivité PostgreSQL | - Volume overlay: copié config dans le volume (Docker cache servait l'ancien COPY layer)
| frost_allinone-web-1 | Exited (137) | OOM killed | Augmenter memory limit ou réduire services | - 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 ### 4. Commits/Push
- Commit `a234e80` pushé sur Gitea: "chore: add VRE stack configs (JupyterHub + Zeppelin) + lakehouse components" - smart-city-digital-twin-martinique: pushé sur Gitea (commit `cb45b89`)
- 10 fichiers ajoutés (VRE stack configs) - lakehouse: pushé sur Gitea (commit `650a632`)
### 4. Services opérationnels (UP ✅) ## Problèmes connus restants
- **Traefik** — reverse proxy principal - OpenRemote map bounds = Pays-Bas (mbtiles metadata prioritaire sur mapsettings.json)
- **OpenRemote** (manager, keycloak, postgresql) — tous healthy - Kafka et Trino UP mais pas de données/usage encore
- **Grafana** (smart-city-grafana) → http://localhost:3001 - Gravitino unhealthy (3 jours)
- **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
## Prochaine session ## Infrastructure
- Corriger Kafka (zookeeper.connect) - Kafka-1, Kafka-2 = UP ✅
- Corriger Trino (node.environment) - Trino = UP ✅
- Corriger JupyterHub (DB path) - JupyterHub = UP ✅ (healthy)
- Corriger Honcho API (database host) - Tous les autres services principaux = UP ✅
- 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...)