JBoss ON is unable to discover EAP 6 server installed from RPM version 7.1.3-4

Solution Unverified - Updated

Environment

  • JBoss Operations Network (ON) 3.1.1
  • Red Hat Enterprise Linux 6
  • JBoss Enterprise Application Platform (EAP) 6
  • JBoss EAP installed from RPM version 7.1.3-4.Final_redhat_4.ep6.el6

Issue

  • agent discovery error with JBoss

  • When the agent starts, the following message is logged:

      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).
    
  • JBoss application server can not be discovered

Resolution

Add the user who is starting the JBoss ON agent (for example jbosson-agent) to the jboss group.

For example,

sudo gpasswd -a jbosson-agent jboss

Root Cause

Starting with version 7.1.3-4 of the JBoss EAP RPMs (jbossas-domain and jbossas-standalone) the default directory permissions have been changed. In previous versions the domain and standalone installation directories were read/execute by others (octal 0755). Beginning in RPM version 7.1.3-4, these directories are no longer read/execute by others (octal 0750) meaning that the JBoss ON agent user (unless running as root) is not able to read the contents of these directories. For more details, see This content is not included.bug 892047.

Diagnostic Steps

  • Verify the expected file really does exist:

      ls -l /usr/share/jbossas/domain/configuration/host.xml
    

    Replace /usr/share/jbossas/domain/configuration/host.xml with the complete path and file name of the expected file.

    If No such file or directory is returned, it may indicate that the expected file really does not exist and the installation may have become corrupt. If Permission denied is returned, it most likely means that the directory or file permissions of the expected file are not correct.

  • Using the user account that started the JBoss ON agent, attempt to read the same file:

      sudo su -m -c 'cat /usr/share/jbossas/domain/configuration/host.xml' jbosson-agent
    

    Replace /usr/share/jbossas/domain/configuration/host.xml with the complete path and file name of the expected file and replace jbosson-agent with the operating system user name that is used to start the JBoss ON agent.

    If No such file or directory is returned, it may indicate that the expected file really does not exist and the installation may have become corrupt. If Permission denied is returned, it means that the user (in the case of the example, jbosson-agent) does not have adequate permissions to read the contents of the file either due to the files permissions or one of the parent directories the file resides in.

SBR
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.