Endpoint Command

Command Purpose

The endpoint command is used to control services' endpoints across the cluster.

Command Syntax

Show Endpoint Status

Information about the configured, running endpoints can be retrieved using the status action:

endpoint status [filter]

The output produced by this command contains:

If required, an optional filter string can be supplied to the command. Only endpoints that have a node name, service name, instance number, endpoint name, or status that matches the filter will be displayed. The match is case-insensitive.

Enable Endpoint

Service endpoints that are configured but disabled can be enabled using the enable action:

endpoint enable <endpoint> <service> [<node>]

Endpoints that are already enabled will be unaffected by this command.

No output is returned from this command unless an error is encountered.

Disable Endpoint

Service endpoints that are configured and enabled can be disabled using the disable action:

endpoint disable <endpoint> <service> [<node>]

The system will prompt for confirmation if node is not specified.

Endpoints that are already disabled will be unaffected by this command.

No output is returned from this command unless an error is encountered.

Reload Endpoint

Configured service endpoints can be instructed to reload and apply their configuration using the reload action. The reload action can also be used to load initial configuration for newly configured endpoints:

endpoint reload <endpoint> <service> [<node>]

Applying a change to an endpoint’s enabled property will cause the endpoint to be enabled or disabled to reflect the contents of the newly loaded configuration.

Applying certain other configuration changes may cause active endpoints to be disabled then re-enabled. For example, if a remote server or port property is changed for an enabled/active endpoint, the endpoint will be disabled and re-enabled automatically in order to apply the change.

No output is returned from this command unless an error is encountered.

Common Parameters

The endpoint parameter is a regular expression. Only endpoints with names that match the expression will be affected by the command.

The service parameter is a service name or instance identifier. Only endpoints owned by the corresponding service or service instance will be affected by the command.

The optional node parameter is a node name. If specified, only endpoints owned by the specified service and running on the specified node will be affected by the command.

Note that node may only be specified if service is a name rather than a service instance identifier. This is because service instance identifiers uniquely identify service instances within the cluster.

All three parameters - endpoint, service, and node - are case-sensitive.

The combination of the 3 parameters enables you to fully specify the scope of the command. Scope may be as narrow as a single endpoint owned by a specific service instance running on a particular node, or as wide as all endpoints owned by all instances of a named service on any/all nodes in the cluster.

Error Messages

Invalid Syntax

ERROR: action, endpoint, and service must be supplied.

The endpoint command requires at least action, endpoint, and service to be supplied.

ERROR: too many arguments

The endpoint command expects only action, endpoint, service, and node to be supplied. Note that node cannot be specified if service is a service instance identifier.

ERROR: endpoint '<endpoint>' is not a valid regular expression.

The endpoint parameter must be a valid Java regular expression. Amend the input.

Command Failure

ERROR: failed to send request to service instance '<service>'.

The command could not be sent to the target service instance for handling. Ensure that the target service instance is running in the cluster. Contact N-Squared technical support if problems persist.

ERROR: failed to send request to service '<service>'.

The command could not be sent to the target service for handling. Ensure that the target service is running on at least one node in the cluster. Contact N-Squared technical support if problems persist.

ERROR: failed to send request to node '<node>' service '<service>'.

The command could not be sent to the target service for handling. Ensure that the target service is running on the target node. Contact N-Squared technical support if problems persist.

ERROR: unknown action '<command>'.

The endpoint command only accepts certain action keywords. Review the available actions and amend the input.