Skip to content

maintenance

Liam Beckman edited this page Apr 15, 2020 · 2 revisions

Server Maintenance

Starting and Restarting

It may be desired to have the REACH process server start automatically at boot. There are two (of many) ways to accomplish detailed this below: (1) via systemd and (2) via cron.

systemd

The benefit of using systemd is it's Restart=always directive that restarts the process server should it crash.

To enable the REACH systemd service, create the reach.service file with the following contents at /etc/systemd/user if it does not already exist.

[Unit]
Description=REACH Process Server

[Service]
Type=simple
WorkingDirectory=/ssd/d1/reach-integration/readh
ExecStart=sbt 'run-main org.clulab.processors.server.ProcessorServer'
Restart=always

[Install]
WantedBy = multi-user.target

To enable the unit file and allow the process server to start at boot, enter:

sudo systemctl enable reach.service

To disable this behavior, so that manually starting the process server is required, enter:

sudo systemctl disable reach.service

cron

The benefit of using cron is that it is largely service manager agnostic. So should REACH be installed on an operating system that doesn't use system, cron allows for greater flexibility. It is recommended to favor the systemd approach unless this benefit is desired.

@reboot cd /ssd/d1/reach-integration/reach; sbt 'run-main org.clulab.processors.server.ProcessorServer'

Clone this wiki locally