Apache Geode
CHANGELOG
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:
- Launch
gfsh. See Starting gfsh. When starting the remote cluster on the remote host, you can optionally specify
--http-bind-addressand--http-service-portas Geode 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.comThis 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.)
On your local system, run the
gfsh connectcommand to connect to the remote system. Include the--use-httpand--urlparameters. For example:gfsh>connect --use-http=true --url="http://myremotecluster.example.com:8080/geode/v1" Successfully connected to: Geode Manager's HTTP service @ http://myremotecluster.example.com:8080/geode/v1See connect.
gfshis now connected to the remote system. Mostgfshcommands 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 whengfshis connected to the cluster via JMX or HTTP/S by using the--nameoption for thesestop/statuscommands. If you are using the--pidor--diroption for these commands, then thestop/statuscommands 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