Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Troubleshooting a JBoss EAP Installation

Red Hat JBoss Enterprise Application Platform (EAP) is a Java EE-based cross-application platform built around deploying and managing Java applications and services. This hands-on lab explores troubleshooting common things that can go wrong during the installation of JBoss EAP on Red Hat Enterprise Linux 8.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 30m
Published
Clock icon Jan 24, 2020

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Install JBoss

    1. Run the installer located in the cloud_user's home directory:

      sudo java -jar jboss-eap-7.2.0-installer.jar -console
      
    2. Review installer:

      • Set the language.
      • Accept terms.
      • Set path (use /opt/jboss-eap to match default configuration).
      • Install all packages.
      • Set admin name (admin).
      • Set admin password.
      • Use the default configuration.
      • Choose whether to save an automatic installation script based on this install.
    3. Create the service user:

       sudo useradd --no-create-home --shell /bin/false/ jboss-eap
      
    4. Open the configuration file and uncomment the JBOSS_HOME and JBOSS_USER settings; save and exit.

       cd /opt/jboss-eap
       sudo vim bin/init.d/jboss-eap.conf
      
    5. Copy service files to the appropriate locations:

       sudo cp bin/init.d/jboss-eap.conf /etc/default/
       sudo cp bin/init.d/jboss-eap-rhel.sh /etc/init.d/
      
    6. Set script as an executable:

       sudo chmod +x /etc/init.d/jboss-eap-rhel.sh
      
    7. Set the service to start automatically:

       sudo chkconfig --add jboss-eap-rhel.sh
       sudo chkconfig jboss-eap-rhel.sh on
      
    8. Attempt to start JBoss EAP:

       sudo systemctl start jboss-eap-rhel
      

      The service start should fail.

  2. Challenge

    Determine Cause of Failure (SELinux)

    1. Begin troubleshooting by viewing the journalctl log, as suggested in the output:

      journalctl -xe | less
      
    2. Scroll towards the bottom of the logs. Look for a line stating:

       SELinux is preventing jboss-eap-rhel. from
       create access on the file console.log.
      
    3. We'll need to update SELinux to allow JBoss. Luckily, instructions for this are included in the log itself. Note that we'll have to adjust the commands to use sudo:

       sudo ausearch -c 'jboss-eap-rhel.' --raw | sudo audit2allow -M jboss-eap-rhel
       sudo semodule -X 300 -i jboss-eap-rhel.pp
      
    4. Attempt to start JBoss once more:

       sudo systemctl start jboss-eap-rhel
      

      Once more, it will fail.

  3. Challenge

    Determine Cause of Failure (Permissions)

    1. Rerun the journalctl command:

      journalctl -xe | less
      
    2. Once more, scroll towards the bottom. Here we can see a permissions error:

       Starting jboss-eap: chown: missing operand after ‘/var/run/jboss-eap’
      
    3. We'll need to ensure our jboss-eap user can access the /var/run/jboss-eap directory:

       sudo chown -R jboss-eap:jboss-eap /var/run/jboss-eap
      
    4. Attempt another service start:

       sudo systemctl start jboss-eap-rhel
      

    Yet again, it fails.

  4. Challenge

    Determine Cause of Failure (JBoss Logs)

    1. Should we check the logs this time, what we're given is not very helpful. Instead, we want to look at JBoss's logs themselves, found at /var/log/jboss-eap:

       cat /var/log/jboss-eap/console.log
      

    Note that not all log content will be here. This is because our jboss-eap user doesn't have permissions for this directory:

        ls -al /var/log/jboss-eap/
    
    1. Change the ownership for this directory:

       sudo chown -R jboss-eap:jboss-eap /var/log/jboss-eap
      
    2. Rerun the start command:

       sudo systemctl start jboss-eap-rhel
      
    3. Now we can review our logs:

       less /var/log/jboss-eap/console.log
      
    4. Notice that we cannot create a directory in /opt/jboss-eap — this also needs to have its ownership updated:

       sudo chown -R jboss-eap:jboss-eap /opt/jboss-eap
      
    5. Start the service:

       sudo systemctl start jboss-eap-rhel
      

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans