2.2.23 service
usage: service start [-s, --scope <all | custom | standard>] | restart [--publish-only] | dump | info [-d, --detailed] [-i, --instance <provider/service instance>] | list | update [-c, --command] [-i, --instance <provider/service instance>]
Note!
This command is valid only for the MZ_HOME owner.
The command enables you to manage the services which are configured and hosted in Service Contexts.
start
Use service start
to start the platform and Service Contexts. When you call service start, the platform orchestrates the start-up of defined service instances (standard-services.conf
and custom-services.conf
) and saves the configuration produced.
The command accepts the following option:
[-s, --scope <all | custom | standard> | Use this option to choose which services you want to start. |
Example.
To start both standard and custom services, you may call the following:mzsh service start
ormzsh service start --scope all
To start only custom or standard services, runmzsh service start --scope custom
ormzsh service start --scope standard
restart
Use service restart
when the platform is restarted while some or all of the Service Contexts are kept running, e g, after Platform failure and recovery, or after scheduled maintenance of the Platform. When you call service restart
, the command applies the configuration state saved by the service start
command, so that all service instances are configured the same way as when the service start
was issued. At the very least, service restart republishes the information required to connect to a service instance, e g, from a workflow). However, it also causes any service members found to be missing in the Service Contexts, to be restarted - this may happen when a failure and recovery affects the platform and some of the Service Contexts.
When the Platform is restarted, while Service Contexts are active, you must also restart the embedded services using this command.
The command accepts the following option:
[--publish-only] | Use this option to only publish the service configuration in the platform registry. This option can be used if you first upgrade the platform and then execute a rolling upgrade of Service Contexts. Using the option will not restart any service members. |
dump
Use service dump
to display very detailed information in HOCON format on all the services running. This information is mainly intended for support and troubleshooting.
info
Use service info to display information on all of the services running or a specific service instance.
The command accepts the following options:
[-d, --detailed] | Use this option to display detailed information on all of the services running. |
[-i, --instance <provider/service instance>] | Use this option to display detailed information on a specific service instance. |
Example.
For information on all of the services running, you call the following:mzsh service info
For detailed information on all of the services running, you call the following:mzsh mzadmin/dr service info --detailed
For information on a specific service, you must specify the service provider/service instance, for example:mzsh service info --instance kafka/kafka1
list
Use service list to display information on all available service providers.
update
Use service update
to send custom commands to the service instance.
[-c, --command] | Use this option to specify a custom command. |
[-i, --instance <provider/service instance>] | Use this option to specify a specific service instance that should be updated. |
Return Codes
Listed below are the different return codes for the service command:
Code | Description |
---|---|
0 | Will be returned if the command was successful |
1 | Will be returned if an argument is invalid |
2 | Will be returned when a known error occurs |
3 | Will be returned when a general error occurs |