Skip to main content

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 doWhereCommand
Start or stop the entire platformHostup.sh · down.sh · restart.sh
Recreate only the data lake after changing settings or passwordsHostrestart-datalake.sh
Restart a single app (server, batch, warehouse)Hostrestart-server.sh · restart-batch.sh · restart-warehouse.sh · restart-one.sh <서비스>
Restart a single service inside the data lake (CEP, workflow, etc.)Inside containerpd restart <서비스>
Check statusHost / Inside containerstatus.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 = 비정상
VerbMeaning of exit code 0Note
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.shReady after restartIncluding all six apps, proxy, and certificate containers. When you changed values that affect apps, like language or timezone
restart-datalake.shData lake is healthy again, along with its dependent appsIt'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.shNormalVolumes and conf are only reported and not included in the exit code
If you changed values, use restart-datalake.sh, not docker restart

Sidecar 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.

  1. If core ports (6379, 5432, 9042) are already open, it rejects them as «already running».
  2. Checks that all 15 required secrets (workers: +1) are present. If any are missing, it lists them all and exits with code 3.
  3. Checks TLS materials (/var/security/plantpulse).
  4. Settings render — all templates to actual files under PP_HOME. Every time, without exception.
  5. 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.

Don't stop only storage and leave the rest running

All 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
ServiceWhat happens when you restart it
storageEverything that depends on it loses its connection. If possible, use the host's restart-datalake.sh for the whole thing
analyticsAll running SQL and Spark jobs are terminated. If an archive job is running, do it after it finishes
messagingAll message reception stops for a few seconds. Consumers (server, CEP, batch) reconnect automatically
timeseries · cep · workflow · data-gateway · admin-apiOnly 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
«Up but dead» — memory OOM

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.