LATEST VERSION: 9.2.0 - CHANGELOG
Pivotal GemFire® v9.2

Using gfsh to Manage a Remote Cluster Over HTTP or HTTPS

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

To connect gfsh using the HTTP protocol to a remote 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 --http-service-port=8080 \
    --http-service-bind-address=myremotecluster.example.com
    

    This command must be executed directly on the host machine that will ultimately act as the remote server that hosts the HTTP service for remote administration. (You cannot launch a 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://myremotecluster.example.com:8080/geode/v1"
    
    Successfully connected to: GemFire Manager's HTTP service @ http://myremotecluster.example.com:8080/geode/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/S by using the --name option for these stop/status commands. If you are using the --pid or --dir option for these commands, then thestop/status commands are executed only locally.

To configure SSL for the remote connection (HTTPS), enable SSL for the http component in gemfire.properties or gfsecurity-properties or upon server startup. See SSL for details on configuring SSL parameters. These SSL parameters also apply to all HTTP services hosted on the configured JMX Manager, which can include the following:

  • Developer REST API service
  • Pulse monitoring tool