Bug 917861 - AS7 plug-in is unable to discover EAP 6 server installed from RPM
Summary: AS7 plug-in is unable to discover EAP 6 server installed from RPM
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Documentation
Version: JON 3.1.1
Hardware: All
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: Deon Ballard
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 892047
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-04 23:36 UTC by Charles Crouch
Modified: 2018-11-30 20:17 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 892047
Environment:
JBoss ON 3.1.1 agent with AS7 plug-in installed EAP 6 domain controller installed and running from jbossas-domain-7.1.3-4.Final_redhat_4.ep6.el6.noarch RPM
Last Closed: 2014-05-10 03:42:02 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 288873 None None None Never
Red Hat Bugzilla 1119496 None None None Never

Internal Links: 1119496

Description Charles Crouch 2013-03-04 23:36:16 UTC
+++ This bug was initially created as a clone of Bug #892047 +++

Description of problem:
After starting installing and starting EAP 6 from RPM, agent with AS7 plug-in is unable to discover it and throws the following error:

ERROR [ResourceDiscoveryComponent.invoker.daemon-1] (rhq.modules.plugins.jbossas7.HostControllerDiscovery)- Discovery of a JBossAS7 Host Controller Resource failed for process: pid=[2836], name=[/etc/alternatives/jre/bin/java], ppid=[2810] - cause: java.lang.Exception: Server configuration file not found at the expected location (/usr/share/jbossas/domain/configuration/host-slave.xml).


Version-Release number of selected component (if applicable):
4.4.0.JON311GA

How reproducible:
Always

Steps to Reproduce:
1.  On RHEL 6 system, install EAP 6 from RPM:

        # JBoss EAP RPMs
        _rhnUser=admin
        _rhnPassword=redhat
        _jbappplatform=$(rhn-channel -L -u {_rhnUser} -p ${_rhnPassword} | grep jbappplatform)
        rhn-channel --add -c ${_jbappplatform} -u {_rhnUser} -p ${_rhnPassword}
        # RPM version is very important.
        # Problem occurs starting with EAP RPM 7.1.3-4
        yum -y install yum install jbossas-domain-7.1.3-4.Final_redhat_4.ep6.el6.noarch

2.  Start EAP 6 domain service

        sudo service jbossas-domain start
        
3.  Start JBoss ON agent using a different user/group then what is being used by EAP

    You can not use root or any account that is a member of the jboss group. Such as what happens when running JON agent from RPM install and starting it as a service.
  
Actual results:
EAP6 host controller does not get discovered and the following error is logged in agent.log:

    ERROR [ResourceDiscoveryComponent.invoker.daemon-1] (rhq.modules.plugins.jbossas7.HostControllerDiscovery)- Discovery of a JBossAS7 Host Controller Resource failed for process: pid=[2836], name=[/etc/alternatives/jre/bin/java], ppid=[2810] - cause: java.lang.Exception: Server configuration file not found at the expected location (/usr/share/jbossas/domain/configuration/host.xml).

Expected results:
EAP6 host controller should be discovered and appear in the discovery queue.

Additional info:
This issue is a direct result of directory permissions used by EAP's RPM. By default, starting in 7.1.3-4, /var/lib/jbossas/domain (and other directories) are not world-readable. This means, unless the RHQ agent is started by root or a user who is a member of the jboss group, the AS7 plug-in will not be able to read the configuration files from the file system.

Prior to 7.1.3-4, directories were world-readable meaning that we would not see this unless testing with the latest RPM version released in late November 2012.

--- Additional comment from Larry O'Leary on 2013-01-08 12:32:43 EST ---

This might be as simple as JBoss ON documenting that if using the EAP 6 RPM, the user who starts the agent must be added to the OS group 'jboss'. Additionally, we might want to do this automatically with the JBoss ON agent RPM.

Comment 1 Charles Crouch 2013-03-04 23:43:29 UTC
Deon, this clone BZ is to add to our docs to make sure people understand what they have to do to get their rpm installed EAP instances discovered, i.e. make sure the jon user is added to the user group which runs EAP

Comment 2 Deon Ballard 2014-05-10 03:42:02 UTC
Mass closure of bugs modified in 2013. All of these are in the currently-published docs.


Note You need to log in before you can comment on or make changes to this bug.