Pivotal GemFire® v8.0

Using gfsh to Manage a Remote Cluster Over HTTP

Using gfsh to Manage a Remote Cluster Over HTTP

You can connect gfsh via HTTP to a remote cluster and manage the cluster using gfsh commands.

To connect gfsh using the HTTP protocol to a remote GemFire cluster:

  1. Launch gfsh. See Starting gfsh.
  2. When starting the remote cluster on the remote host, you can optionally specify --http-bind-address and --http-service-port as GemFire properties when starting up your JMX manager (server or locator). These properties can be then used in the URL used when connecting from your local system to the HTTP service in the remote cluster. For example:
    gfsh>start server --name=server1 --J=-Dgemfire.jmx-manager=true \
    --J=-Dgemfire.jmx-manager-start=true -J=-Dgemfire.http-service-port=8080 \
    This command must be executed directly on the host machine that will ultimately act as the remote GemFire server that hosts the HTTP service for remote administration. (You cannot launch a GemFire server remotely.)
  3. On your local system, run the gfsh connect command to connect to the remote system. Include the --use-http and --url parameters. For example:
    gfsh>connect --use-http=true --url="http://my.remote.cluster:8080/gemfire/v1"
    Successfully connected to: GemFire Manager's HTTP service @ http://my.remote.cluster:8080/gemfire/v1

    See connect.

gfsh is now connected to the remote system. Most gfsh commands will now execute on the remote system; however, there are exceptions. The following commands are executed on the local cluster :

  • alter disk-store
  • compact offline-disk-store
  • describe offline-disk-store
  • help
  • hint
  • sh (for executing OS commands)
  • sleep
  • start jconsole (however, you can connect JConsole to a remote cluster when gfsh is connected to the cluster via JMX)
  • start jvisualvm
  • start locator
  • start server
  • start vsd
  • status locator*
  • status server*
  • stop locator*
  • stop server*
  • run (for executing gfsh scripts)
  • validate disk-store
  • version

* You can stop and obtain the status of remote locators and servers when gfsh is connected to the cluster via JMX or HTTP by using the --name option for these stop/status commands. If you are using the --pid or --dir option for these commands, then the stop/status commands are executed only locally.