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.

  • 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 '16 at 13:05
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

  • 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 '16 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. – Matt Kereczman Jul 6 '16 at 15:35
  • @MattKereczman thank you, did not know that! – Alex H Jul 7 '16 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.