Questo contenuto non è disponibile nella lingua selezionata.

Appendix B. Connecting with JConsole


B.1. Connect to JDG via JConsole

JConsole is a JMX GUI that allows a user to connect to a JVM, either local or remote, to monitor the JVM, its MBeans, and execute operations.

Procedure B.1. Add Management User to JBoss Data Grid

Before being able to connect to a remote JBoss Data Grid instance a user will need to be created; to add a user execute the following steps on the remote instance.
  1. Navigate to the bin directory
    cd $JDG_HOME/bin
    Copy to Clipboard Toggle word wrap
  2. Execute the add-user.sh script.
    ./add-user.sh
    Copy to Clipboard Toggle word wrap
  3. Accept the default option of ManagementUser by pressing return.
  4. Accept the default option of ManagementRealm by pressing return.
  5. Enter the desired username. In this example jmxadmin will be used.
  6. Enter and confirm the password.
  7. Accept the default option of no groups by pressing return.
  8. Confirm that the desired user will be added to the ManagementRealm by entering yes.
  9. Enter no as this user will not be used for connections between processes.
  10. The following image shows an example execution run.

    Figure B.1. Execution of add-user.sh

Binding the Management Interface

By default JBoss Data Grid will start with the management interface binding to 127.0.0.1. In order to connect remotely this interface must be bound to an IP address that is visible by the network. Either of the following options will correct this:

  • Option 1: Runtime - By adjusting the jboss.bind.address.management property on startup a new IP address can be specified. In the following example JBoss Data Grid is starting with this bound to 192.168.122.5:
    ./standalone.sh ... -Djboss.bind.address.management=192.168.122.5
    Copy to Clipboard Toggle word wrap
  • Option 2: Configuration - Adjust the jboss.bind.address.management in the configuration file. This is found in the interfaces subsystem. A snippet of the configuration file, with the IP adjusted to 192.168.122.5, is provided below:
    <interfaces>
        <interface name="management">
            <inet-address value="${jboss.bind.address.management:192.168.122.5}"/>
        </interface>
        [...]
    </interface>
    Copy to Clipboard Toggle word wrap
Running JConsole

A jconsole.sh script is provided in the $JDG_HOME/bin directory. Executing this script will launch JConsole.

Procedure B.2. Connecting to a remote JBoss Data Grid instance using JConsole

  1. Execute the $JDG_HOME/bin/jconsole.sh script. This will result in the following window appearing:

    Figure B.2. JConsole

  2. Select Remote Process.
  3. Enter service:jmx:remoting-jmx://$IP:9999 in the text area.
  4. Enter the username and password, created from the add-user.sh script.
  5. Click Connect to initiate the connection.
  6. Once connected ensure that the cache-related nodes may be viewed. The following screenshot shows such a node.

    Figure B.3. JConsole: Showing a Cache

Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat