I'm setting up StarRocks using the operator on k8s...
# questions-and-troubleshooting
d
I'm setting up StarRocks using the operator on k8s in shared_data mode. From the FE pod, pinging port 9050 (heartbeat) of the BE pod gives me "Connection refused", (but starlet_port 9070 is successful). I see the same error from
fe.log
. Any idea what I might be missing here?
Copy code
2025-08-13 01:22:07.694Z WARN (heartbeat-mgr-pool-3|170) [HeartbeatMgr$BackendHeartbeatHandler.call():335] backend heartbeat got exception, addr: starrocks-cn-0.starrocks-cn-search.<namespace>.svc.cluster.local:9050
org.apache.thrift.TException: java.net.ConnectException: Connection refused (Connection refused)
	at com.starrocks.rpc.ThriftRPCRequestExecutor.call(ThriftRPCRequestExecutor.java:60) ~[starrocks-fe.jar:?]
	at com.starrocks.rpc.ThriftRPCRequestExecutor.callNoRetry(ThriftRPCRequestExecutor.java:40) ~[starrocks-fe.jar:?]
	at com.starrocks.system.HeartbeatMgr$BackendHeartbeatHandler.call(HeartbeatMgr.java:289) ~[starrocks-fe.jar:?]
	at com.starrocks.system.HeartbeatMgr$BackendHeartbeatHandler.call(HeartbeatMgr.java:264) ~[starrocks-fe.jar:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
	at java.lang.Thread.run(Thread.java:829) ~[?:?]
Below is my setup. FE pods are up, FE <-> CN communication seems to be off with this connection refused error, causing CN pods to crash every few mins. From reading other posts in the channel I understand "CN process might not be up and running as expected" - that might be a cause of this error. But not sure on how to debug further, appreciate any help!
Copy code
apiVersion: starrocks.com/v1
kind: StarRocksCluster
metadata:
  name: starrocks
  namespace: default
spec:
  starRocksFeSpec:
    image: docker.io/starrocks/fe-ubuntu:3.3-latest
    replicas: 2
    limits:
      cpu: 2
      memory: 6Gi
    requests:
      cpu: 2
      memory: 6Gi      
    configMapInfo:
      configMapName: starrockscluster-sample-fe-cm
      resolveKey: fe.conf
  starRocksCnSpec:
    image: docker.io/starrocks/cn-ubuntu:3.3-latest
    replicas: 1
    limits:
      memory: 32Gi
    requests:
      cpu: 2
      memory: 32Gi
    configMapInfo:
      configMapName: starrockscluster-sample-cn-cm
      resolveKey: cn.conf
---

apiVersion: v1
kind: ConfigMap
metadata:
  name: starrockscluster-sample-cn-cm
  namespace: default
  labels:
    cluster: starrockscluster-sample
data:
  cn.conf: |
    starlet_port = 9070
    be_port = 9060

---

apiVersion: v1
kind: ConfigMap
metadata:
  name: starrockscluster-sample-fe-cm
  namespace: default
  labels:
    cluster: starrockscluster-sample
data:
  fe.conf: |
    LOG_DIR = ${STARROCKS_HOME}/log
    DATE = "$(date +%Y%m%d-%H%M%S)"
    JAVA_OPTS="-Dlog4j2.formatMsgNoLookups=true -Xmx8192m -XX:+UseG1GC -Xlog:gc*:${LOG_DIR}/fe.gc.log.$DATE:time"
    http_port = 8030
    rpc_port = 9020
    query_port = 9030
    edit_log_port = 9010
    run_mode = shared_data
    cloud_native_meta_port = 6090
    cloud_native_storage_type = S3
k
cn pod status should tell you whether it is stable or not.
d
The cn container restarts every few mins... The pod never gets stable
k
shall figure out why the cn pod get restarted first.
d
CN pod logs :
Copy code
[Wed Aug 13 03:12:03 UTC 2025] Process conf file cn.conf ...
[Wed Aug 13 03:12:03 UTC 2025] Add myself (starrocks-cn-0.starrocks-cn-search.<namespace>.svc.cluster.local:9050) into FE ... 
[Wed Aug 13 03:12:03 UTC 2025] run start_cn.sh
cn.INFO log last few lines... all steps seem to have completed successfully
Copy code
W20250813 03:17:29.480020 140604041410368 starrocks_be.cpp:216] 'thrift_port' is deprecated, please update be.conf to use 'be_port' instead!
I20250813 03:17:29.480038 140604041410368 backend_base.cpp:78] StarRocksInternalService has started listening port on 9060
I20250813 03:17:29.480200 140604041410368 thrift_server.cpp:384] BackendService has started listening port on 9060
I20250813 03:17:29.480214 140604041410368 starrocks_be.cpp:225] CN start step 10: start thrift server successfully
I20250813 03:17:29.481536 140604041410368 starrocks_be.cpp:264] BRPC server bind to host: 0.0.0.0, port: 8060
I20250813 03:17:29.485944 140604041410368 server.cpp:1181] Server[starrocks::LakeServiceImpl+starrocks::BackendInternalServiceImpl<starrocks::PInternalService>+starrocks::BackendInternalServiceImpl<doris::PBackendService>] is serving on port=8060.
I20250813 03:17:29.485949 140604041410368 server.cpp:1184] Check out http://starrocks-cn-0:8060 in web browser.
I20250813 03:17:29.498243 140604041410368 starrocks_be.cpp:270] CN start step 11: start brpc server successfully
I20250813 03:17:29.502648 140604041410368 starrocks_be.cpp:279] CN start step 12: start http server successfully
I20250813 03:17:29.502810 140604041410368 thrift_server.cpp:384] heartbeat has started listening port on 9050
I20250813 03:17:29.502813 140604041410368 starrocks_be.cpp:297] CN start step 13: start heartbeat server successfully
I20250813 03:17:29.502814 140604041410368 starrocks_be.cpp:299] CN started successfully
I20250813 03:17:44.354837 140603738285632 daemon.cpp:187] Current memory statistics: process(172512760), query_pool(0), load(0), metadata(0), compaction(0), schema_change(0), column_pool(0), page_cache(0), update(0), chunk_allocator(0), passthrough(0), clone(0), consistency(0), datacache(0), jit(0)
I20250813 03:17:59.357913 140603738285632 daemon.cpp:187] Current memory statistics: process(172512760), query_pool(0), load(0), metadata(0), compaction(0), schema_change(0), column_pool(0), page_cache(0), update(0), chunk_allocator(0), passthrough(0), clone(0), consistency(0), datacache(0), jit(0)
I see this startup probe failure for the CN pod on k9s, which likely is causing the restart
Copy code
Warning  Unhealthy  2m40s (x1836 over 167m)  kubelet  Startup probe failed: Get "http://[2600:1f14:3188:d004:1558::3]:8040/api/health": dial tcp [2600:1f14:3188:d004:1558::3]:8040: connect: connection refused
k
looks like it is ipv6 enabled, dual ip stack in the environment?
d
Yes! Adding
priority_networks=::/0
to cn.conf solved the issue for me.
🙌 1