Skip to main content

Service Startup and Shutdown Recommendation Manual

Background

During service use, server migration, data center inspection, and similar situations may require shutting down or restarting servers. In these cases, services must be stopped in advance. Although our program allows servers to be shut down without stopping services first and supports automatic service startup after server startup, standardized operations are still necessary to shut down, start, and inspect services in order to avoid data loss.

Shut Down Services

  1. Log in to the server. All operations below are based on root permissions.

  2. Shut down the MySQL database. This is required. For multi-node environments, perform this operation on the corresponding node.

sudo docker stop guandata_db

  1. Shut down the Cassandra database. This is required. For multi-node environments, perform this operation on the corresponding node.

sudo docker stop cassandra

  1. Shut down k8s services. This is optional. Perform this operation on each node.

sudo systemctl stop kubelet

  1. Shut down Docker services. This is optional. Perform this operation on each node.

sudo systemctl disable docker

sudo systemctl stop docker

Note: For multi-node operations, start from the master node.

Start Services

Normally, services start automatically on boot. If service exceptions occur after a server restart, try the following commands:

  1. Restart Docker services. This can be performed on each node.

sudo systemctl enable docker

sudo systemctl restart docker

  1. Restart k8s services. This can be performed on each node.

sudo systemctl restart kubelet

  1. Restart the Cassandra database. For multi-node environments, perform this operation on the corresponding node.

sudo docker restart cassandra

  1. Restart the MySQL database. For multi-node environments, perform this operation on the corresponding node.

sudo docker restart guandata_db

Note: For multi-node operations, start from the master node.

Check Service Status

  1. Open the Guandata login page directly and check whether the login page opens normally.

  2. After logging in to the server with root permissions, run the kubectl get pods command to obtain the pod list shown below.

image.png

Check the status of the corresponding pods. Running indicates normal running status.

If a pod is in an abnormal status, run kubectl delete pod guandata-server-pod-name to delete the corresponding pod. After the pod is deleted, it is automatically recreated and restarted.

If restarting a single pod still cannot restore services, try restarting Docker according to the operations in Start Services.

Note: If services still cannot be enabled normally after the operations above, contact the corresponding Guandata personnel. We will provide professional support.