Restarting Connectware
Learn how to safely restart Connectware.
This section explains how to restart Connectware. Restarting may be necessary when applying configuration changes, troubleshooting issues, or performing maintenance tasks.
Restarting Connectware on Kubernetes
In Kubernetes environments, restarting Connectware requires scaling down all controller resources to zero before scaling them back up. The following procedure ensures a proper restart without data loss.
The following procedure will scale everything that is currently deployed in the target namespace.
If you have any workload besides Connectware Core Services in this namespace, they will be restarted too.
Prerequisites
kubectl
installed and configured to point at the target Kubernetes clusterA shell capable of storing variables (e.g. bash)
Procedure
Store the namespace that is used for Connectware in a variable:
CONNECTWARE_NS=<namespace here>
Verify what will be restarted using this procedure:
kubectl get sts,deployment -n $CONNECTWARE_NS
If this displays any workload that is not part of the Connectware Core Services, note down their scaling. You'll need to scale them to their original value after finishing this procedure.
Store the number of replicas configured for the broker:
BROKER_REPLICAS=$(kubectl get --no-headers -o custom-columns=":spec.replicas" sts broker -n $CONNECTWARE_NS)
Optional: If you use the optional control-plane-broker, store the number of replicas configured for it:
CONTROL_PLANE_REPLICAS=$(kubectl get --no-headers -o custom-columns=":spec.replicas" sts control-plane-broker -n $CONNECTWARE_NS)
Scale down all StatefulSets and Deployments:
kubectl get deploy,sts -n $CONNECTWARE_NS -o name | xargs -I % kubectl scale -n $CONNECTWARE_NS % --replicas 0
Wait for all pods to be terminated. You can monitor this progress with (terminate with Ctrl+C when no more pods are showing):
while [ True ]; do clear; kubectl get pod -n $CONNECTWARE_NS ; sleep 5; done
Scale up all workloads to 1:
kubectl get deploy,sts -n $CONNECTWARE_NS -o name | xargs -I % kubectl scale -n $CONNECTWARE_NS % --replicas 1
Scale broker to the number of replicas recorded earlier:
kubectl -n $CONNECTWARE_NS scale sts broker --replicas $BROKER_REPLICAS
Optional: If you use the optional control-plane-broker, scale control-plane-broker to the original number of replicas:
kubectl -n $CONNECTWARE_NS scale sts control-plane-broker --replicas $CONTROL_PLANE_REPLICAS
Monitor pods and verify all reach the Running status and report ready:
while [ True ]; do clear; kubectl get pod -n $CONNECTWARE_NS ; sleep 5; done
Optional: Scale any additional workloads in this namespace to the values you noted down earlier.
Verifying after Restarting
After restarting Connectware, verify that all services are running correctly:
Check the service status via the Admin UI. For more information, see System Status and Service Logs.
Verify that the connections to the data sources are reestablished.
Confirm that any previously configured mappings or workflows are functioning.
Troubleshooting when Restarting Fails
If Connectware does not start properly after restart:
Check logs for errors.
For Kubernetes:
kubectl logs -n $CONNECTWARE_NS <podname>
For Docker:
docker compose logs <your-connectware-container>
Verify network connectivity between components.
Ensure that the configuration files are valid and correctly formatted.
If problems persist, contact Cybus support at [email protected].
Last updated
Was this helpful?