adaptai / platform /dbops /challenges_solutions.md
ADAPT-Chase's picture
Add files using upload-large-folder tool
38c314f verified
|
raw
history blame
3.58 kB
# Challenges and Solutions during Service Startup
This document outlines the key challenges encountered during the recent service startup and the solutions implemented to resolve them.
## 1. Redis Cluster Startup Failure (Missing Configuration Files)
**Challenge:** The Redis cluster failed to start with "Fatal error, can't open config file" errors.
**Solution:** The `redis.conf` files for each node were missing from `/data/adaptai/platform/dbops/configs/redis/`. These files were created with basic cluster configurations, and corresponding data directories were created in `/data/adaptai/platform/dbops/data/redis/`.
## 2. JanusGraph Startup Failure (Incorrect Script Path & Configuration)
**Challenge:** JanusGraph initially failed to start with "No such file or directory" for its startup script, and subsequently with "Server failed" when using an in-memory configuration.
**Solution:**
* The path to `janusgraph-server.sh` in `restart-all-services.sh` was corrected from `.../janusgraph-1.0.0/bin/` to `.../janusgraph/bin/`.
* The `restart-all-services.sh` script was attempting to start JanusGraph directly, while it is intended to be managed by `supervisord`. The direct startup command was removed from `restart-all-services.sh`.
* JanusGraph's `gremlin-server.yaml` was configured for in-memory. The `restart-all-services.sh` script was updated to use `/data/adaptai/platform/dbops/configs/janusgraph/gremlin-server-17002.yaml`, which points to a ScyllaDB backend.
* The `janusgraph-scilla.properties` was updated to connect to ScyllaDB via HAProxy on port `17542` (as per `ports.yaml` and `scylla.md` runbook), instead of directly to 9042.
## 3. NATS Server Startup Failure (Port Conflict & Incorrect Client Port)
**Challenge:** NATS failed to start due to "address already in use" errors, initially on port 4222 and then on 18222.
**Solution:**
* The `restart-all-services.sh` script was attempting to start NATS directly, while it is intended to be managed by `supervisord`. The direct startup command was removed from `restart-all-services.sh`.
* The NATS configuration file (`/data/adaptai/platform/dbops/configs/nats/nats.conf`) was updated to use `port: 18222` for client connections and `http_port: 18222` for monitoring, adhering to the "high ports ONLY" directive from `ports.yaml`.
* Lingering NATS processes were manually killed to free up the port.
## 4. Service Management (Transition to Supervisord)
**Challenge:** Several services (JanusGraph, NATS, DragonFly, Pulsar, Qdrant, Redis) were not starting correctly or consistently when attempted directly by `restart-all-services.sh`.
**Solution:** It was identified that `supervisord` is the intended service manager for these components.
* `supervisord` daemon was started using `/usr/bin/supervisord -c /data/adaptai/platform/dbops/supervisor/supervisord.conf`.
* `supervisord` configurations were reread and updated using `supervisorctl`.
* This resolved the startup issues for JanusGraph and NATS, as they are now correctly managed by `supervisord`. Further investigation is needed for DragonFly, Pulsar, Qdrant, and Redis if they are also intended to be managed by `supervisord` and are still failing. (Note: The health check showed Qdrant, DragonFly, and Redis running, so their `supervisord` issues might be separate or resolved by the direct startup in `restart-all-services.sh`).
## Current Operational Status
All core DataOps services (Qdrant, DragonFly, Redis, JanusGraph, NATS) are now up and running, and the health check confirms their operational status.