2

i'm have successfully setup the HA cluster using pacemaker and corosync on centos7, and i've also been able to add and start resources.

one of the resources is an instance of tomcat, and in the current configuration it runs fine. the only problem i am having is that tomcat is being run as root user. i would like the tomcat resource to launch as non-root user. i've been reading the documentation but i havent been able to find anything yet.

can anyone here see if they have a solution to this?

thanks in advance.

1
  • looking carefully at the documentation for the HA resource type ocf:heartbeat:tomcat there is an option tomcat_user , when set, tomcat will be launched as that user.
    – ksm
    Jul 5, 2016 at 13:05

2 Answers 2

4

looking carefully at the documentation for the HA resource type ocf:heartbeat:tomcat there is an option tomcat_user , when set, tomcat will be launched as that user.

2

Look into how to run pacemaker as another user, maker sure it is added to sudoers, configure that user to run pacemaker and tomcat. Have a look here https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/High_Availability_Add-On_Administration/ch-startup-HAAA.html

3
  • looking carefully at the documentation for the HA resource type ocf:heartbeat:tomcat there is an option tomcat_user , when set, tomcat will be launched as that user.
    – ksm
    Jul 5, 2016 at 13:06
  • 1
    @Alex H: There are certain parts of the cluster stack that must run as root like 'lrmd'; which is the part of Pacemaker that does all the start/stop/monitor-ing. Jul 6, 2016 at 15:35
  • @MattKereczman thank you, did not know that!
    – Alex H
    Jul 7, 2016 at 13:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .