Accidentally Started Tamr as Root? Follow These Steps to Undo and Start as Functional User

Problem: When Tamr and/or Tamr dependencies are restarted as root or as a user other than Tamr functional user, you will likely encounter errors when running Tamr.

Cause: When started as a root user, the Tamr application cannot access the necessary files it needs to run.

Resolution:

  1. To resolve the issue, run the following commands as root.

a. Stop Tamr and Tamr dependencies

# if version >= 2019.007
./stop-unify.sh
./stop-dependencies.sh 

# if version < 2019.007
./tamr/stop.sh
./stop-tamr-deps.sh

b. Check if all processes related to Tamr are stopped, and if still running, we need to kill the processes. Commands to run are as follows:

# if jps is installed
jps
# if jps is not installed
ps -ef | grep java

# kill processes related to tamr software
kill <process_id>

c. We need to change the ownership of the directories of tamr as running as root would have altered the ownership of files to 'root' which is the main cause for the failure of Tamr not starting properly.

You will need to locate the TAMR_HOME directory which is the directory that contains the dependencies and the 'tamr' directory. Note in the example below we are assuming the Tamr functional user is called 'tamr'

cd <TAMR_HOME>
chown -R tamr:tamr *
su - tamr

# if version >= 2019.007
./start-dependencies.sh 
./start-unify.sh

# if version < 2019.007
./init-tamr-deps.sh
./tamr/start.sh
  1. Always make sure to switch to the functional user of Tamr when restarting Tamr and Tamr dependencies.

Did this page help you?