Start, Stop, Restart
There are two places to start and stop the data lake. The container itself is handled from the host, while individual services inside the container are managed via pd. First, decide which one you need.
| What you want to do | Where | Command |
|---|---|---|
| Start or stop the entire platform | Host | up.sh · down.sh · restart.sh |
| Recreate only the data lake after changing settings or passwords | Host | restart-datalake.sh |
| Restart a single app (server, batch, warehouse) | Host | restart-server.sh · restart-batch.sh · restart-warehouse.sh · restart-one.sh <서비스> |
| Restart a single service inside the data lake (CEP, workflow, etc.) | Inside container | pd restart <서비스> |
| Check status | Host / Inside container | status.sh / pd status |
Host verbs
cd /opt/kopens/plantpulse-platform-docker/bin
./up.sh # 기동 — 준비될 때까지 기다린다. 종료 코드 0 = 쓸 수 있다
./down.sh # 정지 — 컨테이너 · 볼륨은 남는다
./restart.sh # 전체 재시작 — graceful drain → 재기동 → 준비 대기. 인자를 받지 않는다
./restart-datalake.sh # 데이터레이크만 — drain → 재생성 → 준비 대기 → 의존 앱 판정
./status.sh # 컨테이너 · 헬스 · 볼륨 요약. 0 = 정상 / 2 = 비정상
| Verb | Meaning of exit code 0 | Note |
|---|---|---|
up.sh | «Ready» — not a command success. It re-checks until the readiness check passes (default 900s, 15s interval) | If PP_WAIT=0, it does not wait, and the 0 at that point does not mean ready |
restart.sh | Ready after restart | Including all six apps, proxy, and certificate containers. When you changed values that affect apps, like language or timezone |
restart-datalake.sh | Data lake is healthy again, along with its dependent apps | It's one container but a stack event — all apps hold connections to it, so after it finishes, apps are assessed and only those that can't recover on their own get one extra restart. Takes as long as boot |
status.sh | Normal | Volumes and conf are only reported and not included in the exit code |
restart-datalake.sh, not docker restartSidecar and node file values are injected as environment variables when compose recreates the container. docker restart plantpulse-datalake just restarts with the same environment variables, so new values won't be applied.
Startup order
Between containers
plantpulse-certs (TLS materials) → plantpulse-datalake → six apps · proxy. Apps start only after the data lake is healthy. The data lake's startup grace period is 900s, and the first boot can take that long because of Aster TSDB schema creation.
Inside the data lake
When the container starts, pd start runs automatically.
- If core ports (6379, 5432, 9042) are already open, it rejects them as «already running».
- Checks that all 15 required secrets (workers: +1) are present. If any are missing, it lists them all and exits with code 3.
- Checks TLS materials (
/var/security/plantpulse). - Settings render — all templates to actual files under
PP_HOME. Every time, without exception. - Starts in the order of
storage → analytics → messaging → timeseries → cep → workflow → data-gateway → admin-api, waiting for each health check to be UP.
The last line is the result.
datalake started: 8 service(s) ready. Logs: pd logs # exit 0
datalake started with 1 service(s) not ready (7 ready). Check: pd status # exit 6
Shutdown order
The host's down.sh and restart.sh stop apps first and then drain the data lake — pd stop inside the container stops services in reverse order (admin-api → … → storage), proving each one «stopped» (30s wait → SIGTERM 15s → SIGKILL 10s). The container's shutdown grace period (stop_grace_period) is 180s.
storage and leave the rest runningAll of the above services are attached to storage. If you need to stop, you should stop everything in reverse order with pd stop, and if you're going to do that, it's even better to stop the container itself from the host with down.sh. If you stop the whole pd stop «to keep things quiet for a moment», the container's HEALTHCHECK will become unhealthy within a few minutes, and the host-side monitoring will react.
Single service — pd
docker exec plantpulse-datalake pd status # 어느 것이 STOPPED 인가
docker exec plantpulse-datalake pd logs --lines 100 cep
docker exec plantpulse-datalake pd restart cep # stop → 정지 증명 → 5초 → start
| Service | What happens when you restart it |
|---|---|
storage | Everything that depends on it loses its connection. If possible, use the host's restart-datalake.sh for the whole thing |
analytics | All running SQL and Spark jobs are terminated. If an archive job is running, do it after it finishes |
messaging | All message reception stops for a few seconds. Consumers (server, CEP, batch) reconnect automatically |
timeseries · cep · workflow · data-gateway · admin-api | Only that service. Apps reconnect automatically |
pd restart first proves that it has stopped. If stopping fails (exit 7), it stops there — in that case, pd kill --dry-run → pd kill → pd status → pd start.
Checking status line by line
./status.sh # 호스트: 0 정상 / 2 비정상
docker ps --format 'table {{.Names}}\t{{.Status}}' # 컨테이너와 (healthy)
docker exec plantpulse-datalake pd status # 서비스 포트 표
curl -kfsS https://<server-ip>:4950/api/health | jq .status # 콘솔 헬스 API
Since PID 1 inside the container is systemd, only Java processes get OOM-killed by the cgroup, and docker ps keeps showing Up (healthy) until it eventually becomes unhealthy. If pd status are all STOPPED but the container is alive, suspect this first.
dmesg -T | grep -i "memory cgroup" # 호스트
docker inspect plantpulse-datalake --format '{{.State.OOMKilled}}'
To raise the limit, see Changing settings — memory.
Automatic startup
The container runs with restart: always, so when the host reboots, the Docker daemon starts it on its own. No separate systemd unit is needed. However, if you intentionally stopped the stack with down.sh, it stays down after a reboot — bring it up with up.sh.
Related documents
- System startup and shutdown — whole stack and emergency procedures
pdCLI- Logs and health