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.

ksm
  • 276
  • 1
  • 8
  • looking carefully at the documentation for the HA resource type [ocf:heartbeat:tomcat](http://www.linux-ha.org/doc/man-pages/re-ra-tomcat.html) there is an option `tomcat_user` , when set, tomcat will be launched as that user. – ksm Jul 05 '16 at 13:05

2 Answers2

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.

ksm
  • 276
  • 1
  • 8
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

Alex H
  • 1,814
  • 11
  • 18
  • looking carefully at the documentation for the HA resource type [ocf:heartbeat:tomcat](http://www.linux-ha.org/doc/man-pages/re-ra-tomcat.html) there is an option `tomcat_user` , when set, tomcat will be launched as that user. – ksm Jul 05 '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 06 '16 at 15:35
  • @MattKereczman thank you, did not know that! – Alex H Jul 07 '16 at 13:36