JBoss EAP can be run in a number of modes, but the standalone server mode is just that — a single instance of JBoss that can be used to deploy and manage Java applications through the provided console or the CLI. For the most part, the JBoss EAP can run successfully out-of-the-box, but we can further configure access by altering any of the provided standalone server configuration files.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Update Standalone Networking
Attempt to access the JBoss management console at
PUBLICIP:9990
. This attempt should fail.From the CLI, switch to the JBoss home directory:
cd /opt/jboss-eap/
Open the standalone configuration file:
sudo vim standalone/configuration/standalone.xml
We need to update our networking interfaces to accept connections from outside the local host. Look for the
<interfaces>
code block and update the127.0.0.1
address to use0.0.0.0
instead:<interfaces> <interface name="management"> <inet-address value="${jboss.bind.address.management:0.0.0.0}"/> </interface> <interface name="public"> <inet-address value="${jboss.bind.address:0.0.0.0}"/> </interface> </interfaces>
Press Esc and enter
:wq
to save and exit the file.
- Update Users for the Standalone Server
Open the user group configuration file:
sudo vim standalone/configuration/mgmt-groups.properties
Add the
tina
user to thedev
group:tina=dev
Press Esc and enter
:wq
to save and exit the file.
- Update the Log Level
Open the log file for when the JBoss server boots:
sudo vim standalone/configuration/logging.properties
Set the log level to
DEBUG
:logger.level=DEBUG
Press Esc and enter
:wq
to save and exit the file.
- Confirm that Configuration Changes
Restart JBoss:
sudo systemctl restart jboss-eap-rhel
Check that you can access the management console at
PUBLICIP:9990
using the provided lab credentials.Check the user configuration to ensure that the group persists:
sudo vim standalone/configuration/mgmt-groups.properties
Finally, we want to review the log file:
sudo vim standalone/configuration/logging.properties
Note: For this configuration, the change does not persist. This is because the log level is set for when the service boots and will be overwritten once the boot process is finished. The log file is the only setting that has this behavior.