Start and Shutdown operations fail for EAP instance from JON when sudo is used as script prefix
Issue
- sudo asking for password
- Using script prefix of
/usr/bin/sudo -u userid
does not appear to work becausesudo
still asks for a password even though the user who started the platform's agent has valid sudo rights - Start and stop script for EAP instance fail to work with
Script Prefix
defined as/usr/bin/sudo -u userid
Environment
- JBoss Operations Network (JON) 2.3
- JBoss Enterprise Application Platform (EAP) 4.2, 4.3, 5.0
- Red Hat Enterprise Linux 4, 5
-
/etc/sudoers
configured to allow JON Agent user toRunAs
another user with no password requiredjonadmin jonagent-host=(jbossadmin) NOPASSWD: /opt/jboss-eap-4.3/jboss-as/bin/*MyConfig*.sh
-
JBoss AS Server resource configured with
- Script Prefix:
/usr/bin/sudo -u jbossadmin
- Start Script:
bin/start-MyConfig.sh
- Stop Script:
bin/stop-MyConfig.sh
- Script Prefix:
start-MyConfig.sh
andstop-MyConfig.sh
scripts which invoke standardbin/run.sh
andbin/shutdown.sh
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.