- FE fails to restart
- FE fails to provide services
- Recover metadata on a new FE node with the metadata backup.
<image_dir> means the non-empty image_dir configured in fe.conf, or <meta_dir>/image when image_dir is unset or empty. Replace this placeholder in commands with the resolved path. BDB journals remain under <meta_dir>/bdb, while ROLE, VERSION, and image files, including format subdirectories such as v2, are under <image_dir>. Complete metadata backups and restores must include both locations.
FE fails to restart
FE nodes may fail to restart if the metadata is damaged or incompatible with the cluster after rollback.Metadata incompatibility after rollback
When you downgrade your cluster, FEs may fail to restart if the metadata is incompatible with that before the downgrade. You can identify this issue if you encounter the following exception while downgrading the cluster:- Stop all FE nodes.
-
Back up the metadata directories
meta_dirof all FE nodes. Include each node’s<image_dir>if it is stored outsidemeta_dir. -
Add the configuration
metadata_ignore_unknown_operation_type = trueto the configuration files fe.conf of all FE nodes. - Start all FE nodes, and check whether your data and metadata are intact.
-
If both your data and metadata are intact, execute the following statement to create an image file for your metadata:
-
After the new image file is transmitted to the directory
<image_dir>of all FE nodes, you can remove the configurationmetadata_ignore_unknown_operation_type= truefrom all FE configuration files and restart the FE nodes.
Metadata damage
Both damage to BDBJE metadata and the database metadata will cause failures to restart.BDBJE metadata damage
VLSN Bug
You can identify the VLSN bug based on the following error message:-
Clear the metadata directory
meta_dirof the FE node that throws this exception. Also clear its<image_dir>if it is stored outsidemeta_dir. -
Restart the FE node using the Leader FE node as the helper.
- This bug has been fixed in StarRocks v3.1. You can avoid this issue by upgrading your cluster to v3.1 or later.
- This solution does not apply if more than half of the FE nodes have encountered this issue. You must follow the instructions provided in Measure of the last resort to fix the issue.
RollbackException
You can identify this issue based on the following error message:ReplicaWriteException
You can identify this issue based on the keywordremoveReplicaDb from the FE log fe.log.
-
Drop the failed Follower or Observer node.
-
Add the failed node back to the cluster.
-
Clear the metadata directory
meta_dirof the failed node. Also clear its<image_dir>if it is stored outsidemeta_dir. -
Restart the failed node using the Leader FE node as the helper.
- After the failed node recovers to a healthy status, you need to upgrade the BDBJE packages in your cluster to starrocks-bdb-je-18.3.16.jar (or upgrade your cluster to v3.0 or later), following the order of Followers first and then the Leader.
InsufficientLogException
You can identify this issue based on the following error message:- The metadata on the Follower node lags behind that of the Leader node, which has already done a CheckPoint of metadata within itself. The Follower node cannot perform incremental updates on its metadata, thus full metadata synchronization is required.
- The original Leader node writes and checkpoints its metadata, but fails to synchronize it to Follower FE nodes before it hangs. After being restarted, it becomes a Follower node. With dirty metadata checkpointed, the Follower node cannot perform incremental deletion of its metadata, thus full metadata synchronization is required.
HANDSHAKE_ERROR: Error during the handshake between two nodes
You can identify this issue based on the following error message:DatabaseNotFoundException
You can identify this issue based on the following error message:metadata_failure_recovery = true in the FE configuration file fe.conf.
To solve this issue, you need to remove the configuration and restart the node.
The database metadata damage
You can identify the database metadata damage issue based on one of the following error messages:Ignore Error Journal ID (Preferred)
- Shut down all FE nodes.
-
Back up the metadata directories
meta_dirof all FE nodes. Include each node’s<image_dir>if it is stored outsidemeta_dir. -
Locate the erroneous journal ID in the logs.
xxxin the following log represents the erroneous journal ID. -
Add the following configuration to all fe.conf files and start the FE nodes.
-
If the startup still again, identify the new failed journal ID through Step 3, add it to the fe.conf, and then restart the nodes with the previous configurations unchanged.
- If the system still fails to start after the above steps, or if there are too many failed journal IDs, proceed to Recovery Mode.
Recovery Mode
- Stop all FE nodes.
-
Back up the metadata directories
meta_dirof all FE nodes. Include each node’s<image_dir>if it is stored outsidemeta_dir. -
Add the configuration
metadata_enable_recovery_mode = trueto the configuration files fe.conf of all FE nodes. Note that data loading is forbidden in this mode. -
Start all FE nodes, and query tables in the cluster to check whether your data is intact.
You must wait until metadata recovery is completed if the following error is returned when you query these tables:
You can execute the following statement from the Leader FE node to view the progress of metadata recovery:This statement will show the partitions that failed to be recovered. You can follow the advice returned to recover the partitions. If nothing is returned, it indicates the recovery is successful.
-
If both your data and metadata are intact, execute the following statement to create an image file for your metadata:
-
After the new image file is transmitted to the directory
<image_dir>of all FE nodes, you can remove the configurationmetadata_enable_recovery_mode = truefrom all FE configuration files and restart the FE nodes.
FE fails to provide services
FE will not provide services when Follower FE nodes fail to perform Leader election. When this issue occurs, you may find the following log record repeating:1. The majority of Follower nodes are not running
If the majority of the Follower nodes are not running, the FE group will not provide services. Here, ‘majority’ indicates1 + (Follower node count/2). Please note that the Leader FE node itself is a Follower, but Observer nodes are not Followers.
-
You can identify the role of each FE node from the
<image_dir>/ROLEfile: -
You can view the total number of Follower nodes from the BDBJE log:
2. Node IP is changed
If thepriority_networks of the node is not configured, the FE node will randomly select an available IP address once it is restarted. If the IP address recorded in the BDBJE metadata is different from that used to start the node, the FE will not provide services.
-
You can view the IP address recorded in the BDBJE metadata from the
<image_dir>/ROLEfile:The value172.26.92.154before the first underscore is the IP address recorded in the BDBJE metadata. -
You can view the IP address used to start the node from the FE log:
priority_networks of the node in the FE configuration file fe.conf to the IP address recorded in <image_dir>/ROLE, and restart the node.
3. System clock among nodes is not synchronized
You can identify this issue based on the following error message from fe.out, fe.log or fe/meta//bdb/je.info.0:4. Available disk space is insufficient
After you upgrade the database to v3.0 or later, or upgrade BDBJE to v18 or later, the node may fail to restart when the available space of the disk that storesmeta_dir is less than 5 GB.
You can view the BDBJE version from the .jar package under the directory fe/lib.
To solve this issue, you can scale up the disk, or allocate a dedicated disk with larger capacity for the FE metadata.
5. edit_log_port is changed
If the edit_log_port recorded in the BDBJE metadata is different from that configured in fe.conf, the FE will not provide services.
You can view the edit_log_port recorded in the BDBJE metadata from the <image_dir>/ROLE file:
9312 before the second underscore is the edit_log_port recorded in the BDBJE metadata.
To solve this issue, you need to set the edit_log_port of the node in the FE configuration file fe.conf to the edit_log_port recorded in <image_dir>/ROLE, and restart the node.
6. JVM heap size is insufficient
You can view the JVM memory usage using thejstat command:
O remain high, it indicates that the JVM heap size is insufficient.
To solve this issue, you must increase the JVM heap size.
7. Latch timeout. com.sleepycat.je.log.LogbufferPool_FullLatch
You can identify this issue based on the following error message:8. InsufficientReplicasException
You can identify this issue based on the following error message:9. UnknownMasterException
You can identify this issue based on the following error message:SHOW FRONTENDS, if the Leader FE node cannot be found, there could be several reasons:
- If it is observed that more than half of the FE nodes are undergoing Full GC, and the duration is notably long.
- Or if the log contains the keyword
java.lang.OutOfMemoryError: Java heap space.
10. Measure of the last resort
Warning You can try the following solution as the last resort only when none of the preceding solutions works. This solution is designed only for extreme cases, such as:- The majority of Follower nodes cannot be restarted.
- Follower nodes cannot perform Leader election due to bugs of BDBJE.
- Exceptions other than those mentioned in preceding sections.
- Stop all FE nodes.
-
Back up the metadata directories
meta_dirof all FE nodes. Include each node’s<image_dir>if it is stored outsidemeta_dir. -
Run the following commands on all the servers that host the FE nodes to identify the node with the latest metadata.
Example output:The node with the largest
lastVLSNvalue has the latest metadata. -
Find the role (Follower or Observer) of the FE node that has the latest metadata from the
<image_dir>/ROLEfile:If multiple nodes have the latest metadata, it is recommended to proceed with a Follower node. If multiple Follower nodes have the latest metadata, you can proceed with any of them. - Perform the corresponding operations based on the role of the FE node you chose in the previous step.
-
Add the following configurations to fe.conf:
- Restart the node, and check whether your data and metadata are intact.
-
Check whether the current FE node is the Leader FE node.
- If the field
Aliveistrue, this FE node is properly started and added to the cluster. - If the field
RoleisLEADER, this FE node is the Leader FE node.
- If the field
- If the data and metadata are intact, and the role of the node is Leader, you can remove the configuration you added earlier and restart the node.
-
Change the role of the FE node from
OBSERVERtoFOLLOWERin the<image_dir>/ROLEfile. -
Add the following configurations to fe.conf:
- Restart the node, and check whether your data and metadata are intact.
-
Check whether the current FE node is the Leader FE node.
- If the field
Aliveistrue, this FE node is properly started and added to the cluster. - If the field
RoleisLEADER, this FE node is the Leader FE node.
- If the field
- If the data and metadata are intact, and the role of the node is Leader, you can remove the configuration you added earlier. However, do not restart the node.
-
Add a new Follower node (on a new server) to the cluster.
-
Start a new FE node on the new server using the temporary Leader FE node as the helper.
-
Once the new FE node is started successfully, check the status and roles of both FE nodes:
- If the field
Aliveistrue, this FE node is properly started and added to the cluster. - If the field
RoleisFOLLOWER, this FE node is a Follower FE node. - If the field
RoleisLEADER, this FE node is the Leader FE node.
- If the field
- If the new Follower is successfully running in the cluster, you can then stop all nodes.
-
Add the following configurations to the fe.conf of the new Follower only:
-
For StarRocks v2.5, v3.0, v3.1.9 and earlier patch versions, and v3.2.4 and earlier patch versions:
-
For StarRocks v3.1.10 and later patch versions, v3.2.5 and later patch versions, and v3.3 and later:
-
For StarRocks v2.5, v3.0, v3.1.9 and earlier patch versions, and v3.2.4 and earlier patch versions:
- Restart the new Follower node, and check whether your data and metadata are intact.
-
Check whether the current FE node is the Leader FE node.
- If the field
Aliveistrue, this FE node is properly started and added to the cluster. - If the field
RoleisLEADER, this FE node is the Leader FE node.
- If the field
- If the data and metadata are intact, and the role of the node is Leader, you can remove the configuration you added earlier and restart the node.
-
Clear the metadata directories
meta_dirof the FE nodes that you want to add back to the cluster. Also clear their<image_dir>directories if they are stored outsidemeta_dir. -
Start new Follower nodes using the new Leader FE node as the helper.
-
Add the Follower nodes back to the cluster.
Recover metadata on a new FE node with metadata backup
Follow these steps if you want to start a new FE node with the metadata backup:-
Copy the backed-up
meta_dirand any separately stored<image_dir>to the new FE node. Setmeta_dirandimage_dirin fe.conf to match the restored locations. -
In the configuration file of the FE node, set
bdbje_reset_election_grouptotrue. -
Start the FE node.
-
Check whether the current FE node is the Leader FE node.
If the field
RoleisLEADER, this FE node is the Leader FE node. Make sure its IP address is the that of the current FE node. -
If the data and metadata are intact, and the role of the node is Leader, you must remove the configuration
bdbje_reset_election_groupand restart the node. -
Now you have successfully start a new Leader FE node with the metadata backup. You can add new Follower nodes using the new Leader FE node as the helper.