Determining the Port Number for Managing JBoss EAP
When adding a JBoss EAP server using the eG admin interface, you need to specify a Port number for the target server. By default, this is set to 9990. Depending upon the operating mode of the target JBoss EAP server, you may have to override this default setting by specifying a different port number here.
Typically, JBoss EAP operates in one of the following modes:
- Standalone server operating mode for managing discrete instances
Managed domain operating mode for managing groups of instances from a single control point
To know in which mode the JBoss EAP server you want to monitor is operating, login to the JBoss Management Console and click the Runtime option in its main menu. When Figure 1 appears, take a look at the options displayed in the left panel of Figure 1.
Figure 1 : How to determine the operating mode of JBoss EAP
If you see Hosts and Server Groups displayed therein, it indicates that the target JBoss EAP server is running in the domain mode. If you see Standalone Server there instead, it implies that the target server is running in the standalone mode.
If the server to be monitored is operating in the standalone mode, then follow the steps below to determine what port the standalone server has to be configured with:
Typically, a JBoss EAP server operating in the standalone mode should be managed using the port on which the HTTP REST API is enabled. By default, this is port 9900. To verify whether this default setting really holds good or has to be changed, first determine the profile on which the JBoss server is running. In the standalone operating mode, each profile is associated with a configuration file (*.xml). This configuration file is where the various port bindings are configured. The table below lists the profile names and the configuration (XML) file that corresponds to each:
Configuration File Name
Next, determine which configuration file is in use on the target server and zoom into the contents of that file to identify the port number on which the HTTP REST API is enabled. To know the configuration file, login to the JBoss Management Console of the target server, click on the Tools menu at the bottom of the console and choose the Management Model option (as indicated by Figure 2).
Figure 2 : Selecting the Management Model option from Tools menu
Then, in the tree-structure that appears in the left panel (see Figure 3), expand the Management Model node. Expand the core-service sub-node within, and finally click the server-environment sub-node (see Figure 3). The right panel will then change to display the details about the target server. Browsing these details will lead you to the Config file of the standalone server (see Figure 3).
Figure 3 : Determining the configuration file of the monitored server
Next, open the indicated Config file using a text/XML editor (see Figure 4). In the file, look for the “socket-binding-group” attribute. Within that attribute, search for the “management-http” socket binding. Typically, in most systems, the HTTP REST API is enabled on the "management-http" socket binding only. In the example of Figure 4, the port used for management-http is set as 9990. This is the port that you should use when managing the JBoss EAP server using the eG admin interface.
Figure 4 : Determining the management-http port number of the JBoss EAP server
In some environments, the port-offset will also be used to indicate the port. In the environment illustrated by Figure 4 above, the port offset value is set to 0. So the management-http port remains same as “9990”. In case the port-offset is configured with a non-zero value, then you will have to add this port-offset value with the management-http port, and configure the resultant sum as the port number of the target JBoss server. For instance, if the port-offset value is 10 and the management-http port is 9990, then you will have to configure 10000 (9990+10) as the port number of the target JBoss EAP server in the eG admin interface. “10000”. Also, remember that the port-offset sometimes is set via Java Options.
In the domain operating mode, there can be ‘N’ server instances hosted on ‘M’ hosts. Within the M hosts, one acts as master (domain controller) and the remaining are slaves (host controllers). The management console is available only in domain controller.
If the JBoss EAP server to be monitored is operating in the domain mode, then, when adding that server to the eG Enterprise system, make sure that you configure the server with the application/HTTP port. To determine the application/HTTP port of a JBoss EAP server, follow the steps below:
First, login to the target server and identify the profile on which it runs. For that, login to the management console of the domain controller. From the Tools button at the bottom of the console, select the Management Model option (see Figure 5).
Figure 5 : Selecting the Management Model option from the Tools menu in the management console of the domain controller
Figure 6 then appears, where you will find a tree-structure in the left panel. Expand the Management Model node in the tree-structure, and then expand the server-group sub-node within. Finally, click the main-server-group sub-node. The right panel will change to display the details of the main-server-group. The Profile name will be displayed as part of these details. In the case of the example illustrated by Figure 6, full is the Profile name of the target JBoss EAP server.
Figure 6 : Finding the profile name of the target JBoss EAP server
- Next, open the <EAP_HOME>/domain/configuration/host.xml file on the target server, using a text/XML editor. Typically, each JBoss server host that is managed by a domain controller is associated with a host.xml file; this is the file from which each host reads its configuration.
In the host.xml file, look for a "socket-binding-group name" that corresponds to the profile name of the target server. For instance, if the target server runs on the "full" profile, then look for a "socket-binding-group name " that is set to "full-sockets" (see Figure 5).
Figure 7 : Determining the port number of a JBoss EAP server operating in the domain mode
In the "full-sockets" section, you will find a specification of the following format (as indicated by Figure 5):
The <port_number> in this specification, is the application/HTTP port of the target JBoss server. When managing the JBoss EAP server using the eG admin interface, make sure you configure the server with this port number.
In some environments, the port-offset setting will also be used to indicate the port of a server. In the host.xml file, you will find separate sections for each server managed by the domain controller. Each of these sections will be headed , <server name="<name of the server managed by the domain controller>". The port-offset setting will be part of some/all of these server-specific sections. For instance, in Figure 6 below, you can see 2 server-specific sections - one for server-one and another for server-two.
Figure 8 : Port-offset and its impact on the application/HTTP port configuration of a server
If the port-offset parameter is unavailable in a server-specific section, then go with the application/HTTP port shown by Figure 5. For instance, server-one in Figure 6 does not have a port-offset setting; this means that the application/HTTP port of that server will only be 8080 (as indicated by Figure 5). On the other hand, if a port-offset parameter is available in a server-specific section and is configured with a non-zero value, then you will have to add this port-offset value to the application/HTTP port of Figure 5, and configure the resultant sum as the port number of the target JBoss server. For instance, server-two in Figure 6 is configured with the port-offset value of 10. If the application/HTTP port is 8080, then you will have to configure 8090 (8080+10) as the port number of the target JBoss EAP server in the eG admin interface. Also, remember that the port-offset sometimes is set via Java Options.