Deephaven PID files

Deephaven uses standard Linux PID files, which are stored by default in the directory /etc/deephaven/run.

Changing PID File Directory

The following procedures explains how to change the PID file location. The examples assume that the new directory is /etc/deephaven/pidfileDir, so adjust the commands accordingly for the desired directory.

Stop all the Deephaven processes.

sudo -u irisadmin monit stop all

If necessary, create the new pidfile directory and ensure that the new pidfile directory is writable by irisadmin:dbmergegrp.

sudo -u irisadmin mkdir /etc/deephaven/pidfileDir
sudo -u irisadmin ls -l /etc/deephaven
sudo -u irisadmin chmod 775 /etc/deephaven/pidfileDir
sudo -u irisadmin touch /etc/deephaven/pidfileDir/testfile
sudo -u irisadmin rm /etc/deephaven/pidfileDir/testfile

Update the host configuration to specify the new pid file directory.

sudo vi /etc/sysconfig/illumon.confs/illumon.iris.hostconfig

Add an environment variable.

export PIDROOT=/etc/deephaven/pidfileDir

The rest of the steps will be performed as irisadmin.

sudo su - irisadmin

Update the monit and CUS files to specify the new location. Some of these files are links (the auth and conf ones), and any substitute commands must ensure that the backing files are updated, not new files created in the local directory, or upgrades will remove the changes. For example:

cd /etc/monit.d/deephaven/auth
sed --follow-symlinks  -i -e 's+/etc/deephaven/run+/etc/deephaven/pidfileDir+g' *.conf
cd /etc/monit.d/deephaven/config
sed --follow-symlinks -i -e 's+/etc/deephaven/run+/etc/deephaven/pidfileDir+g' *.conf
cd /etc/monit.d/deephaven/service
sed -i -e --follow-symlinks 's+/etc/deephaven/run+/etc/deephaven/pidfileDir+g' *.conf
cd /etc/lighttpd
cp client-update-service.conf client-update-service.conf_save
sed -i -e 's+/etc/deephaven/run+/etc/deephaven/pidfileDir+g' client-update-service.conf

Update the properties to:

/usr/illumon/latest/bin/dhconfig properties export -f iris-environment.prop -d /etc/sysconfig/illumon.d/resources/ --etcd
vi /etc/sysconfig/illumon.d/resources/iris-environment.prop

Add:

pidFileDirectory=/etc/deephaven/pidfileDir

/usr/illumon/latest/bin/dhconfig properties import -file iris-environment.prop -d /etc/sysconfig/illumon.d/resources/ --etcd

Reload monit’s configuration and restart it.

monit reload
monit start all