Symptom
A cluster fails to be created or a cluster member fails to be added, and the system displays a message indicating the database connection pointer is null.
Possible Cause
- Failure to create a cluster: If you use the same device code when importing a template for bulking adding devices or adding different cameras in VCN single-node system mode, the device code of cameras added on different VCNs is the same. After the VCNs are deployed as a stack, cameras with the same device code exist on different VCNs on the device management page of the C/S client, as shown in Figure 1.

- Failure to add a cluster member: When you add a cluster member, if one or multiple cameras of the member have the same device code as the cameras in the cluster, the cluster member will fail to be added.
Solution
If one or multiple cameras connected to a slave server have the same device code as the cameras of other cluster members or cameras in the cluster, log in to the OMU portal of the slave server and switch to the slave server to single-node system mode, log in to the C/S client and delete the cameras (ensure that the device code of each cameras in the stack network is unique), and switch the slave server back to the stack mode.
- Log in to the OMU portal of the VCN as the Admin user. Choose Local Configuration > Basic Configuration.
- Click Edit.
- Set Deployment mode to Single-node.
- In the Users and Devices panel on the left of the Workspace tab page, double-click Devices.
- Click the Local Domain tab.
- Select the camera to delete and click Delete in the upper right corner of the device list.
- Log in to the OMU portal of the VCN as the Admin user. Choose Local Configuration > Basic Configuration.
- Click Edit.
- Set Deployment mode to Standby node.
- Set Upper-level IP address to the IP address of the master node and add the slave server to the stack again.
- Create the cluster or add the cluster member again and check whether the operation can succeed