Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 1. Getting Started with the Data Grid CLI


The command line interface (CLI) lets you remotely connect to Data Grid servers to access data and perform administrative functions.

1.1. Creating and Modifying Users

Data Grid Server requires users to authenticate against a default property realm. Before you can access Data Grid Server, you must add credentials by creating at least one user and a password. You can also add and modify the security authorization groups to which users belong.

Procedure

  1. Open a terminal in $RHDG_HOME.
  2. Create and modify Data Grid users with the user command.
Tip

Run help user for more details about using the command.

Creating users and passwords

  • Linux

    $ bin/cli.sh user create myuser -p "qwer1234!"
    Copy to Clipboard Toggle word wrap
  • Microsoft Windows

    $ bin\cli.bat user create myuser -p "qwer1234!"
    Copy to Clipboard Toggle word wrap

Creating users with group membership

  • Linux

    $ bin/cli.sh user create myuser -p "qwer1234!" -g supervisor,reader,writer
    Copy to Clipboard Toggle word wrap
  • Microsoft Windows

    $ bin\cli.bat user create myuser -p "qwer1234!" -g supervisor,reader,writer
    Copy to Clipboard Toggle word wrap

1.2. Connecting to Data Grid Servers

Establish CLI connections to Data Grid.

Prerequisites

Add user credentials and have at least one running Data Grid server instance.

Procedure

  1. Open a terminal in $RHDG_HOME.
  2. Start the CLI.

    • Linux:

      $ bin/cli.sh
      Copy to Clipboard Toggle word wrap
    • Microsoft Windows:

      $ bin\cli.bat
      Copy to Clipboard Toggle word wrap
  3. Run the connect command and enter your username and password when prompted.

    • Data Grid Server on the default port of 11222:

      [disconnected]> connect
      Copy to Clipboard Toggle word wrap
    • Data Grid Server with a port offset of 100:

      [disconnected]> connect 127.0.0.1:11322
      Copy to Clipboard Toggle word wrap

1.4. Shutting Down Data Grid Server

Stop individually running servers or bring down clusters gracefully.

Procedure

  1. Create a CLI connection to Data Grid.
  2. Shut down Data Grid Server in one of the following ways:

    • Stop all nodes in a cluster with the shutdown cluster command, for example:

      [//containers/default]> shutdown cluster
      Copy to Clipboard Toggle word wrap

      This command saves cluster state to the data folder for each node in the cluster. If you use a cache store, the shutdown cluster command also persists all data in the cache.

    • Stop individual server instances with the shutdown server command and the server hostname, for example:

      [//containers/default]> shutdown server <my_server01>
      Copy to Clipboard Toggle word wrap
Important

The shutdown server command does not wait for rebalancing operations to complete, which can lead to data loss if you specify multiple hostnames at the same time.

Tip

Run help shutdown for more details about using the command.

Verification

Data Grid logs the following messages when you shut down servers:

ISPN080002: Data Grid Server stopping
ISPN000080: Disconnecting JGroups channel cluster
ISPN000390: Persisted state, version=<$version> timestamp=YYYY-MM-DDTHH:MM:SS
ISPN080003: Data Grid Server stopped
Copy to Clipboard Toggle word wrap

1.4.1. Restarting Data Grid Clusters

When you bring Data Grid clusters back online after shutting them down, you should wait for the cluster to be available before adding or removing nodes or modifying cluster state.

If you shutdown clustered nodes with the shutdown server command, you must restart each server in reverse order.
For example, if you shutdown server1 and then shutdown server2, you should first start server2 and then start server1.

If you shutdown a cluster with the shutdown cluster command, clusters become fully operational only after all nodes rejoin.
You can restart nodes in any order but the cluster remains in DEGRADED state until all nodes that were joined before shutdown are running.

Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2025 Red Hat