LATEST VERSION: 8.2.7 - CHANGELOG
Pivotal GemFire® v8.2

connect

connect

Connect to a jmx-manager either directly or via a locator.

If you are connecting via a locator, and a jmx-manager does not already exist, the locator starts one.

gfsh connects as a discovery client to the locator service and asks where the JMX Manager is. The locator knows when there is no member currently configured as the JMX manager and simply starts up the JMX manager service within itself. gfsh connects as a JMX client to locator JMX RMI port.

You can also connect to a remote locator using the HTTP protocol, as illustrated by the second example below.

Availability: Offline. You will receive a notification "Already connected to: host[port]" if you are already connected.

Syntax:
connect [--locator=value] [--jmx-manager=value] [--use-http(=value)?] [--url=value]
    [--user=value][--password=value] [--key-store=value] [--key-store-password=value] 
    [--trust-store=value] [--trust-store-password=value] [--ciphers=value] [--protocols=value]
    [--security-properties-file=value] [--use-ssl(=value)?]
Table 1. Parameters
Name Description Default
--locator Network address of the Locator in the form: host[port]. localhost[10334]
--jmx-manager Network address of the jmx-manager in the form: host[port].  
--use-http Connects to a JMX manager HTTP service using the HTTP protocol.
  • If the parameter is not specified: false
  • If the parameter is specified without a value: true
--url URL used to connect to a JMX manager's HTTP service http://localhost:8080/gemfire/v1
--user User name to securely connect to the jmx-manager. If the --password parameter is not specified then it will be prompted for.  
--password Password to be used as credential which is required to connect to a jmx-manager securely.  
--key-store Java keystore file containing this application's certificate and private key. If the --key-store-password parameter is not specified, gfsh prompts the operator for the password.  
--key-store-password Password to access the private key from the keystore file specified by --key-store.  
--trust-store Java keystore file containing the collection of CA certificates trusted by this application. If the --trust-store-password parameter is not specified, gfsh prompts the operator for the password.  
--trust-store-password Password to unlock the keystore file specified by --trust-store.  
--ciphers SSL/TLS ciphers used when encrypting the connection. The default is "any".  
--protocols SSL/TLS protocol versions to enable when encrypting the connection. The default is "any".  
--security-properties-file The gfsecurity.properties file for configuring gfsh to connect to the Locator/Manager. The file path can be absolute or relative to the current gfsh directory.  
--use-ssl Whether to use SSL for communication with Locator and/or JMX Manager. If set to true, the connect command also reads gfsecurity.properties. SSL Options take precedence over values set in the properties file. If none are specified, defaults are used.
  • If the parameter is not specified: false
  • If the parameter is specified without a value: true

Example Commands:

If you do not specify a locator or jmx-manager, gfsh connects to the locator on the localhost at the default port.
gfsh>connect
Sample Output:
gfsh>connect
Connecting to Locator at [host=localhost, port=10334] ..
Connecting to Manager at [host=GemFireStymon, port=1099] ..
Successfully connected to: [host=GemFireStymon, port=1099]
Example of connecting to a remote locator over HTTP:
gfsh>connect --use-http=true --url="http://myLocatorHost.com:8080/gemfire/v1"
Successfully connected to: GemFire Manager's HTTP service @ http://myLocatorHost.com:8080/gemfire/v1

Error Messages:

"Locator could not find a JMX Manager";
"jmx password must be specified.";
"Could not connect to : {0}. {1}";
"Could not find a GemFire jmx-manager service running at {0}.";
"Could not connect to GemFire Locator service at {0}."