Restarting services

You can manually restart services and service instances when you need to use them again after shutting them down

Who needs to complete this task?
You must be either:
  • A cluster administrator
  • An instance administrator
When do you need to complete this task?
When you want to restart a service that was temporarily shut down.
Using the web client to restart services
You can restart services by using the web client. In the web client, you can check the current status of a service, and you can start services as you need.

You can restart only services that use the cpd-cli manage restart command to shut down.

In most cases, you restart services by using one of the following commands:


cpd-cli manage restart
cpd-cli manage restart
You can restart a service by using the cpd-cli manage restart command. The command restarts the specified component and any dependencies. The component is restarted after the dependencies are restarted. When you restart a service, any instances that were forcibly shut down restart automatically.

The command accepts the following options:

--components
The component or components to restart. If a component has any dependencies, the dependencies will also be restarted.
--cpd_instance_ns
The project (namespace) where the component that you want to restart is installed.

Use the ${PROJECT_CPD_INST_OPERANDS} environment variable to specify the project.

--tethered_instance_ns
A tethered project (namespace) where the restart command will restart installed service instances.

Use the ${PROJECT_CPD_INSTANCE_TETHERED} environment variable to specify the project.

--preview
Specify --preview=true to preview the commands that will run when you issue this CLI command.

For more information about the cpd-cli manage restart command, see manage restart in the cpd-cli command reference.



oc patch shutdown command
oc patch shutdown command
Some services support shutdown and restart but do not support the use of the cpd-cli manage shutdown command. To restart these services, you run the oc patch command to update the shutdown parameter in the service custom resource (CR) to manually restart the service.
The shutdown parameter accepts the following values:
true
The operator shuts down its deployments and any dynamic workloads such as jobs and environments. The operator might wait for running jobs to end before it shuts down fully. During that time, the service must not start any new dynamic workloads.

If you shut down a service that has running instances, the CR has a status of shutdownError. Otherwise, the status initially is shutdownInProgress and then eventually shutdown.

force
The service immediately shuts down without waiting for jobs to exit. Any service instances that are running are shut down. Wait for the status to progress from shutdownInProgress to shutdown.
false
The service is restarted. If you previously forced a shutdown that shut down service instances, this setting also restarts those service instances. You can also remove the shutdown setting from the CR to restart the service. Wait for the status to progress from shutdown to InProgress to Completed.

Procedures

Best practice: You can run the commands in this task exactly as written if you set up environment variables. For instructions, see Setting up installation environment variables.

Ensure that you source the environment variables before you run the commands in this task.

  1. Log the cpd-cli in to the Red Hat® OpenShift® Container Platform cluster:
    ${CPDM_OC_LOGIN}
    Remember: CPDM_OC_LOGIN is an alias for the cpd-cli manage login-to-ocp command.
  2. Restart any of the following services as needed.

Scheduling service

Run the following command to restart the scheduling service

oc patch Scheduling ibm-cpd-scheduler \
--namespace ${PROJECT_SCHEDULING_SERVICE} \
--patch '{"spec":{"shutdown": "false"}}' \
--type=merge


control plane
Note: If you installed the Scheduling service, you must restart it before you restart the control plane. See Scheduling service.
Run the following command to restart the control plane:
cpd-cli manage restart \
--components=cpd_platform \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Important: The control plane must restart to the same status it was in before it was shut down. Do not change the spec of the control plane custom resource, perform upgrades, or perform rollbacks while the control plane is shut down.


Common core services

Run the following command to restart the common core services service:

oc patch ccs ccs-cr \
--namespace ${PROJECT_CPD_INST_OPERANDS} \
--patch '{"spec":{"shutdown":"false"}}' \
--type=merge


AI Factsheets

Run the following command to restart the AI Factsheets service:

cpd-cli manage restart \
--components=factsheet \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Analytics Engine powered by Apache Spark

Run the following command to restart the Analytics Engine powered by Apache Spark service:

cpd-cli manage restart \
--components=analyticsengine \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Cognos Analytics

Restart the Cognos Analytics service and then restart the service instances that are associated with the service.

  1. Run the following command to restart the Cognos Analytics service:
    cpd-cli manage restart \
    --components=cognos_analytics \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
    Note: Any instances that were shut down forcibly are automatically restarted.
  2. Run the following command to list all of the Cognos Analytics service instances on the cluster:
    oc get caserviceinstance --all-namespaces

    Identify the service instances that are associated with the instance of Cognos Analytics that you want to restart.

  3. For each instance, run the following command to restart the Cognos Analytics service instance.
    Each time that you run the command, replace the following values:
    • Replace <instance-id> with the appropriate ID from the list of service instances.
    • Replace <instance-namespace> with the namespace where the service instance is deployed.
    oc patch caserviceinstance <instance-id> \
    --namespace <instance-namespace> \
    --patch '{"spec":{"shutdown":"false"}}' \
    --type=merge


Cognos Dashboards

Run the following command to restart the Cognos Dashboards service:

cpd-cli manage restart \
--components=dashboard \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Note: If Cognos Dashboards fails to restart, it might be because the Redis component failed to restart with Cognos Dashboards. For a workaround and more information, see Cannot restart Cognos Dashboards services.


Data Gate

Restart the Data Gate service and then restart the service instances.

  1. Run the following command to restart the Data Gate service:
    cpd-cli manage restart \
    --components=datagate \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
  2. Run the following command to list all of the service instances in the project where Data Gate is installed:
    oc get datagateinstanceservices --namespace ${PROJECT_CPD_INST_OPERANDS}
  3. For each service instance, run the following command to restart the Data Gate service instance.

    Each time that you run the command, replace <instance-id> with the appropriate ID from the list of service instances.

    export DATAGATE_INSTANCE_ID=<instance-id>
    
    cpd-cli manage restart \
    --components=datagate_instance \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --extra-vars=cr_name=${DATAGATE_INSTANCE_ID} \
    --extra-vars='{"override_components_meta":{"datagate_instance":{"cr_apply_support":"true"}}}'


Data Product Hub

Run the following command to restart the Data Product Hub service:

cpd-cli manage restart \
--components=dataproduct \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Data Refinery
Note:

The Data Refinery service is a dependency for multiple services. Restart the Data Refinery service before attempting to restart any services that have a dependency on it.

Run the appropriate command for your environment:
The name of the Data Refinery custom resource is datarefinery-cr
oc patch DataRefinery datarefinery-cr \
--namespace ${PROJECT_CPD_INST_OPERANDS} \
--patch '{"spec":{"shutdown":"false"}}' \
--type=merge
The name of the Data Refinery custom resource is datarefinery-sample
oc patch DataRefinery datarefinery-sample \
--namespace ${PROJECT_CPD_INST_OPERANDS} \
--patch '{"spec":{"shutdown":"false"}}' \
--type=merge


DataStage
  1. Run the following command to restart the DataStage service:
    cpd-cli manage restart \
    --components=datastage_ent \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}

    To restart DataStage Enterprise Plus, set the --components option to datastage_ent_plus.

  2. If your deployment has instances of DataStage on remote physical locations, you must restart them manually.
    1. Log in to Red Hat OpenShift Container Platform as a user with sufficient permissions to complete the task.
      ${REMOTE_OC_LOGIN}
      Remember: REMOTE_OC_LOGIN is an alias for the oc login command when you are connecting to a remote cluster.
    2. Run the following command to restart the instances of DataStage:
      oc -n ${REMOTE_PROJECT_MANAGEMENT} \
      get pxruntime | awk 'NR>1 { print $1 }' | xargs -I % \
      oc -n ${REMOTE_PROJECT_MANAGEMENT} \
      patch pxruntime % \
      --type='json' -p='[{"op": "remove", "path": "/spec/shutdown"}]'
      


Data Virtualization

Restart the Data Virtualization service and then restart the service instance:

  1. Run the following command to restart the Data Virtualization service:
    cpd-cli manage restart \
    --components=dv \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
  2. Restart the Data Virtualization service instances:
    1. Set the INSTANCE_PROJECT to the project where the service instance exists:
      • If the service instance is in the operands project, run:
        export INSTANCE_PROJECT=${PROJECT_CPD_INST_OPERANDS}
      • If the service instance is in a tethered project, run:
        export INSTANCE_PROJECT=${PROJECT_CPD_INSTANCE_TETHERED}
        Important: If multiple tethered projects are associated with this instance of IBM Software Hub, make sure that the ${PROJECT_CPD_INSTANCE_TETHERED} environment variable is set to the correct project name before you run the export command:
        echo $PROJECT_CPD_INSTANCE_TETHERED
      • Run the following command to restart the Data Virtualization service instance:
        oc patch bigsql db2u-dv \
        --namespace ${INSTANCE_PROJECT} \
        --patch '{"spec":{"shutdown":"false"}}' \
        --type=merge \


Db2

Run the following command to restart the Db2 service:

cpd-cli manage restart \
--components=db2oltp \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Note: Any instances that were shut down forcibly are automatically restarted.


Db2 Big SQL

Restart the Db2 Big SQL service and then restart the service instances.

  1. Run the following command to restart the Db2 Big SQL service:
    cpd-cli manage restart \
    --components=bigsql \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
  2. Run the following command to get the list of Db2 Big SQL service instance IDs:
    oc get cm \
    --namespace ${PROJECT_CPD_INST_OPERANDS} \
    -l component=db2bigsql \
    -o custom-columns="Instance Id:{.data.instance_id}, \
    InstanceName:{.data.instance_name}, \
    Created:{.metadata.creationTimestamp}"
  3. For each service instance, run the following command to restart the Db2 Big SQL service instance.

    Each time that you run the command, replace <instance-id> with the appropriate ID from the list of service instances.

    oc patch bigsql bigsql-<instance-id> \
    --namespace ${PROJECT_CPD_INST_OPERANDS} \
    --patch '{"spec":{"shutdown":"false"}}' \
    --type=merge


Db2 Data Management Console

Restart the Db2 Data Management Console service and then restart the service instances.

  1. Run the following command to restart the Db2 Data Management Console service:
    cpd-cli manage restart \
    --components=dmc \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Db2 Warehouse

Run the following command to restart the Db2 Warehouse service:

cpd-cli manage restart \
--components=db2wh \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Note: Any instances that were shut down forcibly are automatically restarted.


Decision Optimization

Run the following command to restart the Decision Optimization service:

cpd-cli manage restart \
--components=dods \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


EDB Postgres
Run the following command to restart the EDB Postgres service:
cpd-cli manage restart \
--components=edb_cp4d \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Execution Engine for Apache Hadoop

Run the following command to restart the Execution Engine for Apache Hadoop service:

cpd-cli manage restart \
--components=hee \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Unstructured Data Integration

Run the following command to restart the Unstructured Data Integration service:

cpd-cli manage restart \
--components=udp \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


IBM Knowledge Catalog

Run the following command to restart the IBM Knowledge Catalog service:

cpd-cli manage restart \
--components=wkc \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


IBM Knowledge Catalog Standard

Run the following command to restart the IBM Knowledge Catalog Standard service:

cpd-cli manage restart \
--components=ikc_standard \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


IBM Knowledge Catalog Premium

Run the following command to restart the IBM Knowledge Catalog Premium service:

cpd-cli manage restart \
--components=ikc_premium \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


IBM Manta Data Lineage

Run the following command to restart the IBM Manta Data Lineage service:

cpd-cli manage restart \
--components=datalineage \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


IBM Master Data Management

Run the following command to restart the IBM Master Data Management service:

cpd-cli manage restart \
--components=match360 \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


IBM StreamSets

Run the following command to restart the IBM StreamSets service:

cpd-cli manage restart \
--components=streamsets \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Informix

Run the following command to restart the Informix service:

cpd-cli manage restart \
--components=informix_cp4d \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


MANTA Automated Data Lineage

Run the following command to restart the MANTA Automated Data Lineage service:

cpd-cli manage restart \
--components=mantaflow \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


OpenPages

Restart the OpenPages service and then restart the service instances that are associated with the service.

  1. Run the following command to restart the OpenPages service.
    cpd-cli manage restart \
    --components=openpages \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
  2. Run the following command to restart an OpenPages service instance.
    Note: Use --extra-vars=cr_name=${OPENPAGES_INSTANCE_NAME} in the command only when you need to specify the instance name because the service instances does not use the default name.

    You can include the --tethered_instance_ns argument to specify an instance namespace when you use the cpd-cli manage restart command to restart OpenPages instances that are installed in tethered projects.

    cpd-cli manage restart \
    --components=openpages_instance \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --extra-vars=cr_name=${OPENPAGES_INSTANCE_NAME}


Orchestration Pipelines

Run the following command to restart the Orchestration Pipelines service:

cpd-cli manage restart \
--components=ws_pipelines \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Planning Analytics

Restart the Planning Analytics service and then restart the service instances that are associated with the service.

  1. Run the following command to restart the Planning Analytics service:
    cpd-cli manage restart \
    --components=planning_analytics \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
    Note: Any instances that were shut down forcibly are automatically restarted.
  2. Run the following command to list all of the Planning Analytics service instances on the cluster:
    oc get paserviceinstance --all-namespaces

    Identify the service instances that are associated with the instance of Planning Analytics that you want to restart.

  3. For each instance, run the following command to restart the Planning Analytics service instance.
    Each time that you run the command, replace the following values:
    • Replace <instance-id> with the appropriate ID from the list of service instances.
    • Replace <instance-namespace> with the namespace where the service instance is deployed.
    oc patch paserviceinstance <instance-id> \
    --namespace <instance-namespace> \
    --patch '{"spec":{"shutdown":"false"}}' \
    --type=merge


Product Master

Run the following command to restart the Product Master service:

cpd-cli manage restart \
--components=productmaster_instance \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


RStudio Server Runtimes

Run the following command to restart the RStudio® Server Runtimes service:

cpd-cli manage restart \
--components=rstudio \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


SPSS Modeler

Run the following command to restart the SPSS Modeler service:

cpd-cli manage restart \
--components=spss \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Synthetic Data Generator

Run the following command to restart the Synthetic Data Generator service:

cpd-cli manage restart \
--components=syntheticdata \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Watson Discovery

Run the following command to restart the Watson Discovery service:

cpd-cli manage restart \
--components=watson_discovery \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Watson Machine Learning

Run the following command to restart the Watson Machine Learning service:

cpd-cli manage restart \
--components=wml \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Watson OpenScale

Run the following command to restart the Watson OpenScale service.

cpd-cli manage restart \
--components=openscale \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Watson Speech services

Run the following command to restart the Watson Speech services:

cpd-cli manage restart \
--components=watson_speech \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Watson Studio
Run the following command to restart the Watson Studio service:
Restart only the Watson Studio service

Run the following command to shut down the Watson Studio service:

cpd-cli manage restart \
--components=ws \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Restart the Watson Studio service and its dependencies

Data Refinery is a dependency of the Watson Studio service. You might need to complete additional steps to restart the Data Refinery service when you restart the Watson Studio service.

  1. Get the name of the Data Refinery custom resource:
    oc get DataRefinery --namespace=${PROJECT_CPD_INST_OPERANDS}
  2. If the name of the Data Refinery custom resource is datarefinery-sample, create a file named refinery-cr.yaml in your work directory with the following content:
    override_components_meta:
      datarefinery:
        cr_name: datarefinery-sample
  3. Run the appropriate command based on the name of the Data Refinery custom resource:
    The name of the Data Refinery custom resource is datarefinery-cr
    cpd-cli manage restart \
    --components=ws \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --include_dependency=true
    The name of the Data Refinery custom resource is datarefinery-sample
    cpd-cli manage restart \
    --components=ws \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --include_dependency=true \
    --param-file=/tmp/work/refinery-cr.yaml


Watson Studio Runtimes

Run the following command to restart the Watson Studio Runtimes service:

cpd-cli manage restart \
--components=ws_runtimes \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


watsonx.ai

Run the following command to restart the watsonx.ai™ service:


cpd-cli manage restart \
--components=watsonx_ai \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


watsonx Assistant

Run the following command to restart the watsonx Assistant service instance:

cpd-cli manage restart \
--components=watson_assistant \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


watsonx BI

Run the following command to restart the watsonx™ BI service:

cpd-cli manage restart \
--components=watsonx_bi_assistant \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


watsonx Code Assistant

Run the following command to restart the watsonx Code Assistant™ service:

cpd-cli manage restart \
--components=wca \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


watsonx Code Assistant for Red Hat Ansible Lightspeed

Run the following command to restart the watsonx Code Assistant for Red Hat Ansible® Lightspeed service:

cpd-cli manage restart \
--components=wca_ansible \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


watsonx Code Assistant for Z Understand

Run the following command to restart the watsonx Code Assistant for Z Understand service:

cpd-cli manage restart \
--components=wca_z_understand \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


watsonx.data

To restart the watsonx.data™ service, you must restart wxdAddon, which provides the watsonx.data service. When you restart wxdAddon, wxd and wxdEngine are also restarted.

  1. Run the following command to restart the service (the wxdAddon component):
    cpd-cli manage restart \
    --components=watsonx_data \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Tip: You can restart individual components (such as wxd or wxdEngine) by using oc patch commands. For example, use these steps to restart wxdEngine.
  1. Run the following command with the namespace to get the engine or service instance names:
    oc get wxdengine --namespace ${PROJECT_CPD_INST_OPERANDS}

    An example of the result:

    
    NAME                  AGE
    lakehouse-presto-01   38h
    lakehouse-presto250   10h
  2. Configure and run the following command to restart the engine or service:
    oc patch wxdEngine <engine_or_service_instance> \
    --namespace ${PROJECT_CPD_INST_OPERANDS} \
    --patch '{"spec":{"shutdown":"false"}}' \
    --type=merge


watsonx.data intelligence

Run the following command to restart the watsonx.data intelligence service:

cpd-cli manage restart \
--components=watsonx_dataintelligence \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


watsonx.data Premium

Run the following command to restart the watsonx.data Premium service:

cpd-cli manage restart \
--components=watsonx_data_premium \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


watsonx.governance

Run the following command to restart the watsonx.governance™ service:

cpd-cli manage restart \
--components=watsonx_governance \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


watsonx Orchestrate

Run the following command to restart the watsonx Orchestrate service.

cpd-cli manage restart \
--components=watsonx_orchestrate \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}