| name | deployment |
| description | Use when FE or BE processes fail to start or stay alive. Covers port conflicts (YARN co-location), missing meta or storage directories, multi-NIC priority_networks misconfiguration, clock drift causing replica delta errors, BDB journal corruption blocking FE replay, HMS blocking FE startup, and SSL certificate expiry causing partial availability. Includes startup log triage for both FE and BE. |
| version | 2.0.0 |
| category | deployment |
| keywords | ["FE startup","BE startup","port conflict","BDB","JDK","priority_networks","helper","NTP"] |
| tools | ["ss"] |
| related_cases | ["case-005-ssl-certificate"] |
Deployment Troubleshooting
Investigation guide for FE and BE startup failures, port conflicts, BDB residual entries,
JDK/JRE issues, and priority network configuration.
Six root causes account for the vast majority of startup failures:
- Cause A — Port conflict (FE or BE port already in use)
- Cause B — Missing directories or meta path does not exist
- Cause C — Multi-NIC /
priority_networks misconfiguration
- Cause D — Clock drift (NTP not synced, delta >5s)
- Cause E — BDB corruption or residual member entry
- Cause F — HMS blocking FE startup (external catalog configured but HMS unreachable)
Metric Taxonomy — Read This First
Before diagnosing, understand the observable signals for startup failures.
FE startup signals (fe.log)
| Signal | Meaning |
|---|
port xxx is used | Port conflict — another process holds the port |
meta not exist | FE meta directory missing — must be created before start |
Could not initialize class...BackendServiceProxy | JRE installed instead of JDK; tools.jar missing |
Fe type:unknown, is ready:false + current node is not added | FE not registered — run ALTER SYSTEM ADD FOLLOWER/OBSERVER first |
backend ip saved in master does not equal to backend local ip | Wrong NIC selected — set priority_networks |
this replica exceeds max permissible delta:5000ms | Clock skew between FE nodes >5s — sync NTP |
connection refused on http_port | Network partition between FE nodes or wrong port in fe.conf |
Finished replaying journal absent after >60s | BDB journal replay stuck or HMS blocking startup |
BDB environment setup failed / LogFileNotFoundException | BDB corruption — requires recovery |
It conflicts with the socket already used by the member | BDB sees stale member entry — DbGroupAdmin -removeMember |
Start to connect to Hive metastore + no Connected | HMS unreachable, blocking FE catalog init |
BE startup signals (be.log)
| Signal | Meaning |
|---|
port xxx is used | Port conflict on BE (thrift, brpc, webserver, or heartbeat port) |
storage not exist | Storage path in be.conf storage_root_path does not exist |
Be http service did not start correctly | Webserver port conflict (YARN often uses 8088/8042) |
Could not initialize class...BackendServiceProxy | JRE instead of JDK |
load tablet from header failed | Corrupted tablet header — requires meta_tool cleanup |
Network / system checks
| Command | What it shows |
|---|
ss -lntp | grep <port> | Which process holds a given port |
telnet <host> <port> | TCP reachability between nodes |
timedatectl | NTP sync status and current time offset |
ntpstat | NTP synchronization state and stratum |
DbGroupAdmin -listMembers | Current BDB group membership (stale entries visible here) |
How to retrieve signals
Option 1 — FE log grep
grep -E "port.*is used|meta not exist|BackendServiceProxy|is ready:false|replaying journal|BDB.*fail" fe.log | tail -30
grep "permissible delta" fe.log | tail -10
grep -E "connect.*metastore|Finished replaying journal" fe.log | tail -20
Option 2 — BE log grep
grep -E "port.*is used|storage not exist|http service|load tablet.*failed" be.log | tail -20
Option 3 — Port occupancy
ss -lntp | grep <port>
for port in 8030 9020 9030 9010 8040 9050 9060 8060; do
echo -n "Port $port: "
ss -lntp | grep ":$port " || echo "free"
done
Option 4 — Clock and time
timedatectl status
date && ssh <fe2_host> date && ssh <fe3_host> date
ntpstat
Option 5 — BDB member status
java -jar $STARROCKS_HOME/fe/lib/starrocks-bdb-je-*.jar \
com.sleepycat.je.util.DbGroupAdmin \
-groupName StarRocks \
-nodeName <fe_node_name> \
-nodeHostPort <fe_host>:<bdb_port> \
-listMembers
Key rules for interpretation:
- If
Finished replaying journal never appears, distinguish between BDB stuck (Cause E) and HMS blocking (Cause F) by checking whether Start to connect to Hive metastore appears before the hang.
port xxx is used can be any of FE's 4 ports (http/rpc/query/edit) — check all: 8030, 9010, 9020, 9030.
- Clock skew errors reference a 5-second threshold; even 4.9s drift can cause intermittent
ready:false.
- BDB residual member entries persist across restarts;
DbGroupAdmin -removeMember is required even after the old FE host is decommissioned.
Startup Issue Reference
| Component | Symptom | Log keyword | Fix |
|---|
| FE | Process not found | port xxx is used | Change port in fe.conf; kill conflicting process |
| FE | Process not found | meta not exist | Create meta directory under FE install path |
| FE | Process not found | Could not initialize class...BackendServiceProxy | Install JDK (not JRE); Oracle JDK 1.8+ |
| FE | alive=false | Fe type:unknown, is ready:false + current node is not added | ALTER SYSTEM ADD FOLLOWER/OBSERVER "host:port" first |
| FE | alive=false | backend ip saved in master does not equal to backend local ip | Set priority_networks in fe.conf |
| FE | alive=false | this replica exceeds max permissible delta:5000ms | Sync clocks via NTP; max allowed delta is 5s |
| FE | alive=false | connection refused | Check network between FEs on http_port |
| FE | false on other FEs | Follower started without --helper | Clear meta; restart with --helper host:port |
| FE | Stuck is ready:false, large BDB | BDB folder growing, no checkpoint | Increase FE JVM heap in JAVA_OPTS; restart |
| FE | Startup hang, no Finished replaying | It conflicts with the socket already used by the member | DbGroupAdmin -removeMember to clean residual entries |
| FE | Startup hang, no Finished replaying | Start to connect to Hive metastore with no response | Check HMS reachability; temporarily remove catalog config |
| BE | Process not found | port xxx is used | Change conflicting port in be.conf |
| BE | Process not found | storage not exist | Create storage directory listed in storage_root_path |
| BE | Process not found | Be http service did not start correctly | Change webserver port; check YARN port conflicts |
| BE | Process not found | Could not initialize class...BackendServiceProxy | Install JDK, not JRE |
| BE | Process not found | load tablet from header failed | Use meta_tool to clean corrupted tablet |
| BE | Not visible in SHOW BACKENDS | — | ALTER SYSTEM ADD BACKEND "host:port" (heartbeat port, default 9050) |
| BE | Unavailable | Failed to get scan range, no queryable replica found | Disk full — add storage paths in be.conf storage_root_path |
Phase 1 — Identify Which Component Fails to Start
Step 1.1 — Determine what failed
pgrep -f StarRocksFE || echo "FE not running"
pgrep -f starrocks_be || echo "BE not running"
Step 1.2 — Read the startup log for the failed component
grep -E "ERROR|WARN|port.*is used|meta not exist|BackendServiceProxy|is ready:false|replaying|BDB" \
fe/log/fe.log | head -50
grep -E "ERROR|WARN|port.*is used|storage not exist|http service|load tablet" \
be/log/be.log | head -50
Log keyword → Cause mapping:
| Log keyword | Cause |
|---|
port xxx is used | Cause A |
meta not exist / storage not exist | Cause B |
backend ip saved in master / priority_networks | Cause C |
permissible delta / clock skew | Cause D |
BDB.*fail / conflicts with the socket already used | Cause E |
Start to connect to Hive metastore + startup hang | Cause F |
Phase 2 — Find Root Cause from Logs
Step 2.1 — Check port conflicts (Cause A signal)
ss -lntp | grep <port_number>
ss -lntp | grep -E ":8030|:9010|:9020|:9030"
ss -lntp | grep -E ":8040|:9050|:9060|:8060"
Step 2.2 — Check directories (Cause B signal)
grep "meta_dir" fe/conf/fe.conf
ls -la <meta_dir>
grep "storage_root_path" be/conf/be.conf
ls -la <storage_path>
Step 2.3 — Check clock sync (Cause D signal)
timedatectl status
date && ssh <fe2> date
Step 2.4 — Check BDB state (Cause E signal)
grep -E "BDB.*fail|LogFileNotFoundException|ReplicaConsistencyException|conflicts with the socket" \
fe/log/fe.log | tail -10
du -sh fe/meta/bdb/
Step 2.5 — Check HMS reachability (Cause F signal)
grep -i "hive\|metastore" fe/conf/fe.conf | head -10
telnet <hms-host> <hms-port>
Phase 3 — Take Action by Cause
Cause A — Port Conflict
Confirm all match:
fe.log or be.log shows port xxx is used
ss -lntp | grep <port> shows another process holding the port
Mechanism: StarRocks FE binds multiple ports at startup (http, rpc, query, edit log). BE binds thrift, brpc, webserver, and heartbeat ports. If any port is in use — commonly by YARN NodeManager (8042, 8088), or a previous StarRocks instance that did not exit cleanly — the process exits immediately without completing startup.
Actions:
ss -lntp | grep <port>
kill -9 $(pgrep -f StarRocksFE)
kill -9 $(pgrep starrocks_be)
→ Go to Phase 4: Verify Recovery
Cause B — Missing Directories / Meta
Confirm all match:
fe.log shows meta not exist OR be.log shows storage not exist
ls <meta_dir> or ls <storage_path> returns "No such file or directory"
Mechanism: FE requires a meta/ directory (default $STARROCKS_HOME/fe/meta) to initialize BDB journal storage. BE requires each storage_root_path directory to exist before it can mount tablet storage. These directories are never created automatically by StarRocks.
Actions:
mkdir -p $(grep meta_dir fe/conf/fe.conf | cut -d= -f2 | tr -d ' ')
mkdir -p fe/meta
mkdir -p /data/starrocks/storage
chown -R starrocks:starrocks /data/starrocks/storage
→ Go to Phase 4: Verify Recovery
Cause C — Multi-NIC / priority_networks Misconfiguration
Confirm all match:
fe.log shows backend ip saved in master does not equal to backend local ip
- Host has multiple network interfaces (
ip addr show shows multiple non-loopback IPs)
Mechanism: When a host has multiple NICs, StarRocks selects the first non-loopback IP by default, which may be a management or storage network rather than the intended cluster network. The priority_networks setting restricts IP selection to a specific CIDR subnet, ensuring all nodes use the same network for cluster communication.
Actions:
ip addr show | grep "inet " | grep -v "127.0.0"
echo "priority_networks = 10.0.1.0/24" >> fe/conf/fe.conf
echo "priority_networks = 10.0.1.0/24" >> be/conf/be.conf
→ Go to Phase 4: Verify Recovery
Cause D — Clock Drift (NTP Not Synced)
Confirm all match:
fe.log shows this replica exceeds max permissible delta:5000ms
timedatectl shows NTP synchronized: no OR time difference between hosts >5s
Mechanism: StarRocks FE uses BDB replication which requires synchronized clocks. The allowable delta is 5000ms (5 seconds). When clock drift exceeds this threshold, BDB rejects the replica's journal entries, causing the FE to stay in is ready:false state indefinitely.
Actions:
timedatectl status
ntpstat
systemctl start chronyd
chronyc makestep
date +%s
→ Go to Phase 4: Verify Recovery
Cause E — BDB Corruption or Residual Member
Confirm all match:
fe.log shows BDB environment setup failed, LogFileNotFoundException, ReplicaConsistencyException, OR It conflicts with the socket already used by the member
- FE startup hangs at BDB init and
Finished replaying journal never appears
Mechanism: BDB JE (Berkeley DB Java Edition) stores FE metadata journal. Unclean FE exits (OOM, kill -9, power loss) can leave truncated or checksum-mismatched journal entries. Additionally, when an FE node is removed from the cluster without proper deregistration, BDB retains its membership entry. The next FE startup conflicts with the stale entry, causing it to fail socket binding.
Actions:
java -jar $STARROCKS_HOME/fe/lib/starrocks-bdb-je-*.jar \
com.sleepycat.je.util.DbGroupAdmin \
-groupName StarRocks \
-nodeName <this_fe_node_name> \
-nodeHostPort <this_fe_host>:<bdb_port> \
-removeMember <stale_member_name>
→ Go to Phase 4: Verify Recovery
Cause F — HMS Blocking FE Startup
Confirm all match:
fe.log shows Start to connect to Hive metastore: <host>:<port>
Finished replaying journal never appears after HMS connection attempt
telnet <hms-host> <hms-port> fails or hangs
Mechanism: When a Hive external catalog is configured in fe.conf, FE initializes the catalog module during startup, which attempts a TCP connection to HMS. If HMS is unreachable and no connection timeout is configured, this call blocks indefinitely. FE never completes the startup sequence and remains unresponsive.
Actions:
telnet <hms-host> <hms-port>
ALTER CATALOG <catalog_name> SET PROPERTIES (
"hive.metastore.timeout" = "10"
);
→ Go to Phase 4: Verify Recovery
Phase 4 — Verify Recovery
SHOW FRONTENDS;
SHOW BACKENDS;
curl -s http://<fe_host>:8030/api/health
curl -s http://<be_host>:8040/api/health
grep "Finished replaying journal" fe/log/fe.log | tail -3
ss -lntp | grep -E ":8030|:9030|:8040|:9050"
SELECT COUNT(*) FROM information_schema.tables LIMIT 1;
SHOW CATALOGS;
SELECT COUNT(*) FROM <catalog_name>.<db_name>.<table_name> LIMIT 1;
Causal Chains
Chain 1: HMS Unreachable → FE Startup Blocks Indefinitely
FE process starts; begins loading catalog configurations from fe.conf
↓ observable: fe.log shows "Start to connect to Hive metastore: <host>:<port>"
FE catalog module attempts TCP connection to configured HMS endpoint
↓ observable: fe.log shows connection attempt with no response; no "Connected to HMS" confirmation
Connection attempt blocks on socket timeout (may be very long or infinite)
↓ observable: fe.log shows no progress for >60s after HMS connection attempt; FE process alive but unresponsive
FE startup sequence stalls before completing metadata replay
↓ observable: "Finished replaying journal" line never appears; FE never enters LEADER/FOLLOWER state
Cluster completely unavailable
FE HTTP port does not respond; all client connections refused.
Trigger conditions: Hive catalog added to fe.conf but HMS service down or misconfigured; firewall blocks HMS port; HMS hostname unresolvable from FE host.
Break point: Set short HMS connection timeout in catalog config; verify HMS reachability (telnet <hms_host> <port>) before starting FE; temporarily remove catalog config to allow FE to start.
Chain 2: Expired SSL Certificate → Partial Availability Window
SSL certificate on FE/BE HTTPS endpoint reaches expiry date
↓ observable: openssl s_client -connect <host>:<port> shows "Verify return code: 10 (certificate has expired)"
New client connections fail TLS handshake immediately
↓ observable: client-side errors: "SSL handshake failed"; FE log shows SSLHandshakeException
Existing long-lived connections (JDBC pool, internal FE-BE RPC) continue normally
↓ observable: some queries succeed (pooled connections); new connection attempts from fresh clients fail
Partial availability: some clients succeed, others fail depending on connection age
↓ observable: non-zero but non-100% error rate; no single point of failure in cluster health dashboard
Intermittent connectivity failures; diagnosis confused by partial success; issue appears non-deterministic.
Trigger conditions: Certificate renewal automation has failed silently; manual certificate installed without a renewal reminder.
Break point: Rotate and install renewed certificate; restart FE/BE to force all connections through new TLS context; add certificate expiry monitoring alert (30-day warning threshold).
Chain 3: BDB Journal Corruption → FE Cannot Replay Metadata → Permanent Startup Failure
FE exits abnormally (OOM, kill -9, power loss) while writing BDB journal
↓ observable: no clean shutdown entry in fe.log; OS-level evidence of abrupt termination
FE restarts and attempts to replay BDB journal from last checkpoint
↓ observable: fe.log shows "BDB environment setup" or "replaying journal from seq <N>"
BDB detects checksum mismatch or truncated record
↓ observable: fe.log shows "BDB environment setup failed", "LogFileNotFoundException", or "ReplicaConsistencyException"
Journal replay aborts; FE cannot reconstruct in-memory metadata
↓ observable: FE process exits or loops in restart; "Finished replaying journal" never appears
FE permanently unable to start without manual recovery
Entire cluster loses FE availability.
Trigger conditions: Unclean FE shutdown under high write load; disk I/O errors during journal write; BDB version mismatch after upgrade.
Break point: Use bdb_tool to inspect and truncate corrupted journal entries to last clean checkpoint; promote a healthy follower FE to leader; restore from recent FE metadata backup (image/ directory snapshot).
Related Cases
case-005-ssl-certificate — SSL handshake error against private object storage during Broker Load
Resources