Skip to main content

Restart (restart.sh / reboot.sh)

Legacy native page

This page applies only to native deployment boxes below 2026.05. To restart a container-mode (2026.05+) box:

sudo systemctl restart plantpulse-edge.service

The "Restart" button in the UI is handled by kopens-host-action.path on the host via a signal file (/etc/kopens/host-action.request). See the Container mode operations guide.

1. restart.sh — Restart Tomcat only (most frequent)

$PE_HOME/bin/restart.sh
  • Restart targets: Tomcat (server) + FENetClient(LS) + GEClient
  • Left running: Cassandra, HiveMQ, Redis, timeseries-engine, Node-RED — no data loss

Normal output:

--------------------------------------------------------------------
PLANTPULSE EDGE RESTART APPLICATION ...
--------------------------------------------------------------------
[1] SERVER STOP ... java killed (pid 12567)
[2] SERVER START ...
--------------------------------------------------------------------
RESTART COMPLETED.
--------------------------------------------------------------------

Takes about 6 seconds. Use it right after deploying code / JSP / app.properties / class files, or whenever Tomcat alone just feels sluggish — this is the most frequently used option.

Wait 1–2 seconds after a restart

If you run curl http://localhost/... in the same ssh session immediately after restart.sh, you may see Connection refused. Just wait 1–2 seconds.

Rare race condition — run the same command once more

Very rarely after restart.sh, an internal startup listener fails silently and OPC shows 0/N (0 of 10). In that case, running ./restart.sh once more recovers it.


2. reboot.sh — OS reboot

$PE_HOME/bin/reboot.sh

Reboots the OS itself. Use it after a kernel / firmware update, or when the system is hung and nothing else clears it.

Recommended sequence before calling it:

$PE_HOME/bin/stop.sh # 1. 정식 종료 (Cassandra drain)
$PE_HOME/bin/reboot.sh # 2. OS 재부팅
# 부팅 후 (자동 시작 안 되어 있으면)
$PE_HOME/bin/start.sh # 3. 게이트웨이 다시 시작

3. Verification

After restart.sh:

$PE_HOME/bin/ps.sh # Tomcat 만 PID 가 새 값
curl -s http://127.0.0.1/api/v1/edge | jq # 응답 정상
curl -s http://127.0.0.1/ui/opcua/tree | jq '.data.tree | length'

After reboot.sh (once the OS reboot finishes and you have logged back in over ssh):

$PE_HOME/bin/ps.sh
# 모든 컴포넌트 (cassandra, hivemq, timeseries, tomcat, node-red) 가 모두 보여야 함

4. Learn more