[GH-ISSUE #905] [Bug]: failed use enable-ha with etcd #287

Closed
opened 2026-10-29 21:12:04 +00:00 by bsakaguchi · 10 comments
Owner

Originally created by @jieyang-su on GitHub (Sep 29, 2025).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/905

Bug Report

I'm encountering the same issue: After enabling High Availability (HA) mode in mooncake_master, the client service automatically deregisters from mooncake_master after running for a period of time, and the corresponding records in mooncake_master get released automatically.

rpc_service.cpp:48] Master Metrics: Storage: 12.00 B / 512.00 MB (0.0%) | Keys: 2 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/0, keys=0, size=0.00 B I0929 15:50:18.427733 862 master_service.cpp:913] client_id=4918870832766731220-5367791128432300194, action=client_expired I0929 15:50:18.427970 862 master_service.cpp:975] client_id=4918870832766731220-5367791128432300194, segment_name=192.168.2.31:14228, action=unmount_expired_segment I0929 15:50:22.423417 865 rpc_service.cpp:48] Master Metrics: Storage: 0.00 B / 0.00 B | Keys: 0 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/0, keys=0, size=0.00 B I0929 15:50:32.423494 865 rpc_service.cpp:48] Master Metrics: Storage: 0.00 B / 0.00 B | Keys: 0 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/0, keys=0, size=0.00 B I0929 15:50:42.423592 865 rpc_service.cpp:48] Master Metrics: Storage: 0.00 B / 0.00 B | Keys: 0 (soft-pinned: 0) | Clients: 0 | Requests

Besides, another problem occurs when I change the master_server_address in MooncakeDistributedStore from the original 192.168.2.38:xxxx to etcd://192.168.2.38:xxxx, accompanied by the following error messages:

I0929 15:53:03.083659 13943 client.cpp:43] client_id=18251773972531239281-15196092618122767747 I0929 15:53:03.083678 14018 transfer_engine.cpp:429] Metrics reporting thread started (interval: 5s) {"level":"warn","ts":"2025-09-29T15:53:08.087736Z","logger":"etcd-client","caller":"v3@v3.5.21/retry_interceptor.go:63","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc0004463c0/192.168.2.38:8888","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = \"error reading server preface: EOF\""} E0929 15:53:08.087975 13943 etcd_helper.cpp:58] key=mooncake-store/master_view, error=context deadline exceeded E0929 15:53:08.088001 13943 ha_helper.cpp:82] Failed to get master address due to etcd error E0929 15:53:08.088014 13943 client.cpp:151] Failed to get master address I0929 15:53:08.088208 13943 transfer_engine.cpp:471] Waiting for metrics reporting thread to join... I0929 15:53:09.084100 14018 transfer_engine.cpp:464] Metrics reporting thread stopped I0929 15:53:09.084162 13943 transfer_engine.cpp:473] Metrics reporting thread joined E0929 15:53:09.084185 13943 store_py.cpp:224] Failed to create client E0929 15:53:09.084237 13943 store_py.cpp:411] Client is not initialized

Before submitting...

  • Ensure you searched for relevant issues and read the [documentation]
Originally created by @jieyang-su on GitHub (Sep 29, 2025). Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/905 ### Bug Report I'm encountering the same issue: After enabling High Availability (HA) mode in mooncake_master, the client service automatically deregisters from mooncake_master after running for a period of time, and the corresponding records in mooncake_master get released automatically. > rpc_service.cpp:48] Master Metrics: Storage: 12.00 B / 512.00 MB (0.0%) | Keys: 2 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/0, keys=0, size=0.00 B I0929 15:50:18.427733 862 master_service.cpp:913] client_id=4918870832766731220-5367791128432300194, action=client_expired I0929 15:50:18.427970 862 master_service.cpp:975] client_id=4918870832766731220-5367791128432300194, segment_name=192.168.2.31:14228, action=unmount_expired_segment I0929 15:50:22.423417 865 rpc_service.cpp:48] Master Metrics: Storage: 0.00 B / 0.00 B | Keys: 0 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/0, keys=0, size=0.00 B I0929 15:50:32.423494 865 rpc_service.cpp:48] Master Metrics: Storage: 0.00 B / 0.00 B | Keys: 0 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/0, keys=0, size=0.00 B I0929 15:50:42.423592 865 rpc_service.cpp:48] Master Metrics: Storage: 0.00 B / 0.00 B | Keys: 0 (soft-pinned: 0) | Clients: 0 | Requests Besides, another problem occurs when I change the master_server_address in MooncakeDistributedStore from the original 192.168.2.38:xxxx to etcd://192.168.2.38:xxxx, accompanied by the following error messages: > `I0929 15:53:03.083659 13943 client.cpp:43] client_id=18251773972531239281-15196092618122767747 I0929 15:53:03.083678 14018 transfer_engine.cpp:429] Metrics reporting thread started (interval: 5s) {"level":"warn","ts":"2025-09-29T15:53:08.087736Z","logger":"etcd-client","caller":"v3@v3.5.21/retry_interceptor.go:63","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc0004463c0/192.168.2.38:8888","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = \"error reading server preface: EOF\""} E0929 15:53:08.087975 13943 etcd_helper.cpp:58] key=mooncake-store/master_view, error=context deadline exceeded E0929 15:53:08.088001 13943 ha_helper.cpp:82] Failed to get master address due to etcd error E0929 15:53:08.088014 13943 client.cpp:151] Failed to get master address I0929 15:53:08.088208 13943 transfer_engine.cpp:471] Waiting for metrics reporting thread to join... I0929 15:53:09.084100 14018 transfer_engine.cpp:464] Metrics reporting thread stopped I0929 15:53:09.084162 13943 transfer_engine.cpp:473] Metrics reporting thread joined E0929 15:53:09.084185 13943 store_py.cpp:224] Failed to create client E0929 15:53:09.084237 13943 store_py.cpp:411] Client is not initialized` ### Before submitting... - [ ] Ensure you searched for relevant issues and read the [documentation]
bsakaguchi 2026-10-29 21:12:04 +00:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jieyang-su commented on GitHub (Sep 30, 2025):

I used the code of mooncake version 0.3.5 and compiled the version myself,
cmake .. -DUSE_ETCD=ON -DUSE_ETCD_LEGACY=ON -DSTORE_USE_ETCD=ON

<!-- gh-comment-id:3349697682 --> @jieyang-su commented on GitHub (Sep 30, 2025): I used the code of mooncake version 0.3.5 and compiled the version myself, cmake .. -DUSE_ETCD=ON -DUSE_ETCD_LEGACY=ON -DSTORE_USE_ETCD=ON
Author
Owner

@jieyang-su commented on GitHub (Sep 30, 2025):

I see when i use --enable-ha=true,Clients always equal 0

rpc_service.cpp:48] Master Metrics: Storage: 12.00 B / 512.00 MB (0.0%) | Keys: 2 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/12, keys=0, size=0.00 B
I0930 04:04:54.632275 109 rpc_service.cpp:48] Master Metrics: Storage: 12.00 B / 512.00 MB (0.0%) | Keys: 2 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/12, keys=0, size=0.00 B
I0930 04:04:59.741089 106 master_service.cpp:913] client_id=16593133999795219164-7881236446236542107, action=client_expired
I0930 04:04:59.741125 106 master_service.cpp:975] client_id=16593133999795219164-7881236446236542107, segment_name=192.168.2.31:14238, action=unmount_expired_segment
I0930 04:05:04.632360 109 rpc_service.cpp:48] Master Metrics: Storage: 0.00 B / 0.00 B | Keys: 0 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/12, keys=0, size=0.00 B
I0930 04:05:14.632475 109 rpc_service.cpp:48] Master Metrics: Storage: 0.00 B / 0.00 B | Keys: 0 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/12, keys=0, size=0.00 B
I0930 04:05:24.632560 109 rpc_service.cpp:48] Master Metrics: Storage: 0.00 B / 0.00 B | Keys: 0 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/12, keys=0, size=0.00 B

when i use --enable-ha=false,the metric have not the Clients。

<!-- gh-comment-id:3349871478 --> @jieyang-su commented on GitHub (Sep 30, 2025): I see when i use --enable-ha=true,Clients always equal 0 > rpc_service.cpp:48] Master Metrics: Storage: 12.00 B / 512.00 MB (0.0%) | Keys: 2 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/12, keys=0, size=0.00 B I0930 04:04:54.632275 109 rpc_service.cpp:48] Master Metrics: Storage: 12.00 B / 512.00 MB (0.0%) | Keys: 2 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/12, keys=0, size=0.00 B I0930 04:04:59.741089 106 master_service.cpp:913] client_id=16593133999795219164-7881236446236542107, action=client_expired I0930 04:04:59.741125 106 master_service.cpp:975] client_id=16593133999795219164-7881236446236542107, segment_name=192.168.2.31:14238, action=unmount_expired_segment I0930 04:05:04.632360 109 rpc_service.cpp:48] Master Metrics: Storage: 0.00 B / 0.00 B | Keys: 0 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/12, keys=0, size=0.00 B I0930 04:05:14.632475 109 rpc_service.cpp:48] Master Metrics: Storage: 0.00 B / 0.00 B | Keys: 0 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/12, keys=0, size=0.00 B I0930 04:05:24.632560 109 rpc_service.cpp:48] Master Metrics: Storage: 0.00 B / 0.00 B | Keys: 0 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/12, keys=0, size=0.00 B when i use --enable-ha=false,the metric have not the Clients。
Author
Owner

@stmatengss commented on GitHub (Sep 30, 2025):

I used the code of mooncake version 0.3.5 and compiled the version myself, cmake .. -DUSE_ETCD=ON -DUSE_ETCD_LEGACY=ON -DSTORE_USE_ETCD=ON

Could you update to 0.3.6.post1? It is recommended to use pip install as the first choice.

<!-- gh-comment-id:3350141550 --> @stmatengss commented on GitHub (Sep 30, 2025): > I used the code of mooncake version 0.3.5 and compiled the version myself, cmake .. -DUSE_ETCD=ON -DUSE_ETCD_LEGACY=ON -DSTORE_USE_ETCD=ON Could you update to 0.3.6.post1? It is recommended to use pip install as the first choice.
Author
Owner

@ykwd commented on GitHub (Sep 30, 2025):

After enabling High Availability (HA) mode in mooncake_master, the client service automatically deregisters from mooncake_master after running for a period of time, and the corresponding records in mooncake_master get released automatically.

In older versions of Mooncake, if HA was enabled on the master but not on the client (i.e., the master_server_address in the client was not an etcd-prefixed address), the client could connect to the master but would not send heartbeat requests. As a result, after 30 seconds of timeout, the master would mark the client as disconnected.

Solution 1: Enable HA on both the master and the client, or disable HA on both sides.

Solution 2: Update to the latest version of Mooncake.

<!-- gh-comment-id:3350210592 --> @ykwd commented on GitHub (Sep 30, 2025): > After enabling High Availability (HA) mode in mooncake_master, the client service automatically deregisters from mooncake_master after running for a period of time, and the corresponding records in mooncake_master get released automatically. In older versions of Mooncake, if HA was enabled on the master but not on the client (i.e., the `master_server_address` in the client was not an etcd-prefixed address), the client could connect to the master but would not send heartbeat requests. As a result, after 30 seconds of timeout, the master would mark the client as disconnected. **Solution 1:** Enable HA on both the master and the client, or disable HA on both sides. **Solution 2:** Update to the latest version of Mooncake.
Author
Owner

@ykwd commented on GitHub (Sep 30, 2025):

Besides, another problem occurs when I change the master_server_address in MooncakeDistributedStore from the original 192.168.2.38:xxxx to etcd://192.168.2.38:xxxx, accompanied by the following error messages:
0929 15:53:08.087975 13943 etcd_helper.cpp:58] key=mooncake-store/master_view, error=context deadline exceeded E0929 15:53:08.088001 13943 ha_helper.cpp:82] Failed to get master address due to etcd error E0929

This error seems to be caused by the client not connecting to etcd. You may want to check whether master_server_address is set correctly.

I used the code of mooncake version 0.3.5 and compiled the version myself,
cmake .. -DUSE_ETCD=ON -DUSE_ETCD_LEGACY=ON -DSTORE_USE_ETCD=ON

If you only want to use the HA feature of the Mooncake store, only need to set STORE_USE_ETCD to ON; the other two options can be set to OFF.

<!-- gh-comment-id:3350273256 --> @ykwd commented on GitHub (Sep 30, 2025): > Besides, another problem occurs when I change the master_server_address in MooncakeDistributedStore from the original 192.168.2.38:xxxx to etcd://192.168.2.38:xxxx, accompanied by the following error messages: > 0929 15:53:08.087975 13943 etcd_helper.cpp:58] key=mooncake-store/master_view, error=context deadline exceeded E0929 15:53:08.088001 13943 ha_helper.cpp:82] Failed to get master address due to etcd error E0929 This error seems to be caused by the client not connecting to etcd. You may want to check whether master_server_address is set correctly. > I used the code of mooncake version 0.3.5 and compiled the version myself, > cmake .. -DUSE_ETCD=ON -DUSE_ETCD_LEGACY=ON -DSTORE_USE_ETCD=ON If you only want to use the HA feature of the Mooncake store, only need to set STORE_USE_ETCD to ON; the other two options can be set to OFF.
Author
Owner

@jieyang-su commented on GitHub (Sep 30, 2025):

Besides, another problem occurs when I change the master_server_address in MooncakeDistributedStore from the original 192.168.2.38:xxxx to etcd://192.168.2.38:xxxx, accompanied by the following error messages:
0929 15:53:08.087975 13943 etcd_helper.cpp:58] key=mooncake-store/master_view, error=context deadline exceeded E0929 15:53:08.088001 13943 ha_helper.cpp:82] Failed to get master address due to etcd error E0929

This error seems to be caused by the client not connecting to etcd. You may want to check whether master_server_address is set correctly.

I used the code of mooncake version 0.3.5 and compiled the version myself,
cmake .. -DUSE_ETCD=ON -DUSE_ETCD_LEGACY=ON -DSTORE_USE_ETCD=ON

If you only want to use the HA feature of the Mooncake store, only need to set STORE_USE_ETCD to ON; the other two options can be set to OFF.

Thank you for your reply @ykwd . I confuse that how to set mooncake_master_server for using enable-ha. The startup command for mooncanke_master now is as follows:

nohup mooncake_master --enable-ha=true --etcd-endpoints="0.0.0.0:2379;0.0.0.0:2381;0.0.0.0:2383" --client-ttl=30 > /mooncake_master.log 2>&1

Master service started on port 50051, enable_gc=0, max_threads=4, enable_metric_reporting=1, metrics_port=9003, default_kv_lease_ttl=5000, default_kv_soft_pin_ttl=1800000, allow_evict_soft_pinned_objects=1, eviction_ratio=0.1, eviction_high_watermark_ratio=1, enable_ha=1, etcd_endpoints=0.0.0.0:2379;0.0.0.0:2381;0.0.0.0:2383, client_ttl=30, rpc_thread_num=0, rpc_port=0, rpc_address=0.0.0.0, rpc_conn_timeout_seconds=0, rpc_enable_tcp_no_delay=1, cluster_id=mooncake_cluster, memory_allocator=offset I0930 07:11:07.213142 2518 ha_helper.cpp:126] Init master service... I0930 07:11:07.213160 2518 ha_helper.cpp:130] Init leader election helper... I0930 07:11:07.222239 2518 ha_helper.cpp:137] Trying to elect self as leader... E0930 07:11:07.223930 2518 etcd_helper.cpp:52] key=mooncake-store/master_view, error=key not found in etcd I0930 07:11:07.223937 2518 ha_helper.cpp:38] No leader found, trying to elect self as leader I0930 07:11:07.227583 2518 ha_helper.cpp:64] Successfully elected self as leader I0930 07:11:12.227792 2518 ha_helper.cpp:155] Starting master service... I0930 07:11:12.248557 2518 rpc_service.cpp:180] HTTP metrics server started on port 9003 I0930 07:11:12.248714 2538 rpc_service.cpp:48] Master Metrics: Storage: 0.00 B / 0.00 B | Keys: 0 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/0, keys=0, size=0.00 B I0930 07:11:22.248800 2538 rpc_service.cpp:48] Master Metrics: Storage: 0.00 B / 0.00 B | Keys: 0 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/0, keys=0, size=0.00 B

For convenience, I wrote a simple test myself: (This problem was encountered in sglang+mooncake)
`from mooncake.store import MooncakeDistributedStore
import time
import threading
store = MooncakeDistributedStore()
store.setup(
"192.168.2.31", # Your node's ip address
"192.168.2.38:2379", # P2P handshake (no HTTP metadata)
51210241024, # 512MB segment size
12810241024, # 128MB local buffer
"rdma", # Use TCP (RDMA for high performance)
"mlx5_2", # Leave empty; Mooncake auto-picks RDMA devices when needed
"192.168.2.38:50051" # master_server_address
)

attempt_count = 0
while True:
attempt_count += 1
keys = ['fd8886064cd208934888ddc8781fd6bff9ad72bbacab47d6b11419a0de792b30_0_k', 'bdcbac5573bd436b906cd5dba328c02090f4fe0f59055a0d8ad6e7144f0c6011_0_k']
values = [b"value1", b"value2"]
results = store.put_batch(keys, values)
status = "success" if results == 0 else f"failed with code: {results}"
time.sleep(1800)`

After one ttl, the registered memory is automatically logged out。I have checked mooncake-store-preview.md and I have also changed mooncake_master_service to etcd://IP:Port ;IP:Port; ...; IP:Port,but there will be another problem, as mentioned above

<!-- gh-comment-id:3350380080 --> @jieyang-su commented on GitHub (Sep 30, 2025): > > Besides, another problem occurs when I change the master_server_address in MooncakeDistributedStore from the original 192.168.2.38:xxxx to etcd://192.168.2.38:xxxx, accompanied by the following error messages: > > 0929 15:53:08.087975 13943 etcd_helper.cpp:58] key=mooncake-store/master_view, error=context deadline exceeded E0929 15:53:08.088001 13943 ha_helper.cpp:82] Failed to get master address due to etcd error E0929 > > This error seems to be caused by the client not connecting to etcd. You may want to check whether master_server_address is set correctly. > > > I used the code of mooncake version 0.3.5 and compiled the version myself, > > cmake .. -DUSE_ETCD=ON -DUSE_ETCD_LEGACY=ON -DSTORE_USE_ETCD=ON > > If you only want to use the HA feature of the Mooncake store, only need to set STORE_USE_ETCD to ON; the other two options can be set to OFF. Thank you for your reply @ykwd . I confuse that how to set mooncake_master_server for using enable-ha. The startup command for mooncanke_master now is as follows: nohup mooncake_master --enable-ha=true --etcd-endpoints="0.0.0.0:2379;0.0.0.0:2381;0.0.0.0:2383" --client-ttl=30 > /mooncake_master.log 2>&1 > `Master service started on port 50051, enable_gc=0, max_threads=4, enable_metric_reporting=1, metrics_port=9003, default_kv_lease_ttl=5000, default_kv_soft_pin_ttl=1800000, allow_evict_soft_pinned_objects=1, eviction_ratio=0.1, eviction_high_watermark_ratio=1, enable_ha=1, etcd_endpoints=0.0.0.0:2379;0.0.0.0:2381;0.0.0.0:2383, client_ttl=30, rpc_thread_num=0, rpc_port=0, rpc_address=0.0.0.0, rpc_conn_timeout_seconds=0, rpc_enable_tcp_no_delay=1, cluster_id=mooncake_cluster, memory_allocator=offset > I0930 07:11:07.213142 2518 ha_helper.cpp:126] Init master service... > I0930 07:11:07.213160 2518 ha_helper.cpp:130] Init leader election helper... > I0930 07:11:07.222239 2518 ha_helper.cpp:137] Trying to elect self as leader... > E0930 07:11:07.223930 2518 etcd_helper.cpp:52] key=mooncake-store/master_view, error=key not found in etcd > I0930 07:11:07.223937 2518 ha_helper.cpp:38] No leader found, trying to elect self as leader > I0930 07:11:07.227583 2518 ha_helper.cpp:64] Successfully elected self as leader > I0930 07:11:12.227792 2518 ha_helper.cpp:155] Starting master service... > I0930 07:11:12.248557 2518 rpc_service.cpp:180] HTTP metrics server started on port 9003 > I0930 07:11:12.248714 2538 rpc_service.cpp:48] Master Metrics: Storage: 0.00 B / 0.00 B | Keys: 0 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/0, keys=0, size=0.00 B > I0930 07:11:22.248800 2538 rpc_service.cpp:48] Master Metrics: Storage: 0.00 B / 0.00 B | Keys: 0 (soft-pinned: 0) | Clients: 0 | Requests (Success/Total): Put=0/0, Get=0/0, Exist=0/0, Del=0/0, DelAll=0/0, Ping=0/0, | Eviction: Success/Attempts=0/0, keys=0, size=0.00 B` For convenience, I wrote a simple test myself: (This problem was encountered in sglang+mooncake) `from mooncake.store import MooncakeDistributedStore import time import threading store = MooncakeDistributedStore() store.setup( "192.168.2.31", # Your node's ip address "192.168.2.38:2379", # P2P handshake (no HTTP metadata) 512*1024*1024, # 512MB segment size 128*1024*1024, # 128MB local buffer "rdma", # Use TCP (RDMA for high performance) "mlx5_2", # Leave empty; Mooncake auto-picks RDMA devices when needed "192.168.2.38:50051" # master_server_address ) attempt_count = 0 while True: attempt_count += 1 keys = ['fd8886064cd208934888ddc8781fd6bff9ad72bbacab47d6b11419a0de792b30_0_k', 'bdcbac5573bd436b906cd5dba328c02090f4fe0f59055a0d8ad6e7144f0c6011_0_k'] values = [b"value1", b"value2"] results = store.put_batch(keys, values) status = "success" if results == 0 else f"failed with code: {results}" time.sleep(1800)` After one ttl, the registered memory is automatically logged out。I have checked mooncake-store-preview.md and I have also changed mooncake_master_service to etcd://IP:Port ;IP:Port; ...; IP:Port,but there will be another problem, as mentioned above
Author
Owner

@jieyang-su commented on GitHub (Sep 30, 2025):

I used the code of mooncake version 0.3.5 and compiled the version myself, cmake .. -DUSE_ETCD=ON -DUSE_ETCD_LEGACY=ON -DSTORE_USE_ETCD=ON

Could you update to 0.3.6.post1? It is recommended to use pip install as the first choice.

Of course, but there are some parameter changes in the new version, so it seems that the md file has not been updated at startup. Therefore, I chose to use Mooncake's 0.3.5 version to adapt to sglangv0.5.2.
By the way, pip seems to be unable to enable enable-ha, which I can use without enabling it, but it seems that enabling it requires compiling myself.

<!-- gh-comment-id:3350390739 --> @jieyang-su commented on GitHub (Sep 30, 2025): > > I used the code of mooncake version 0.3.5 and compiled the version myself, cmake .. -DUSE_ETCD=ON -DUSE_ETCD_LEGACY=ON -DSTORE_USE_ETCD=ON > > Could you update to 0.3.6.post1? It is recommended to use pip install as the first choice. Of course, but there are some parameter changes in the new version, so it seems that the md file has not been updated at startup. Therefore, I chose to use Mooncake's 0.3.5 version to adapt to sglangv0.5.2. By the way, pip seems to be unable to enable enable-ha, which I can use without enabling it, but it seems that enabling it requires compiling myself.
Author
Owner

@ykwd commented on GitHub (Sep 30, 2025):

After one ttl, the registered memory is automatically logged out

Yes. This result is expected. In older versions, if HA was enabled on the master, then HA also had to be enabled on the client (i.e., you must provide the address in the form of etcd://IP:Port;IP:Port;...;IP:Port). Otherwise, the client would not periodically send heartbeats to the master, and the master would consider the client timed out and disconnected.

I have also changed mooncake_master_service to etcd://IP:Port ;IP:Port; ...; IP:Port,but there will be another problem, as mentioned above

From the previous logs, the error seems to be caused by the client timing out when fetching data from etcd. You should check whether the server where the client is running can actually connect to etcd. Also, I noticed that the etcd endpoints you provided contain three different IPs—please confirm that you have indeed started three etcd instances and configured them with the corresponding IPs. For easier debugging, you might try starting with just a single etcd instance first.

<!-- gh-comment-id:3350849444 --> @ykwd commented on GitHub (Sep 30, 2025): > After one ttl, the registered memory is automatically logged out Yes. This result is expected. In older versions, if HA was enabled on the master, then HA also had to be enabled on the client (i.e., you must provide the address in the form of etcd://IP:Port;IP:Port;...;IP:Port). Otherwise, the client would not periodically send heartbeats to the master, and the master would consider the client timed out and disconnected. > I have also changed mooncake_master_service to etcd://IP:Port ;IP:Port; ...; IP:Port,but there will be another problem, as mentioned above From the previous logs, the error seems to be caused by the client timing out when fetching data from etcd. You should check whether the server where the client is running can actually connect to etcd. Also, I noticed that the etcd endpoints you provided contain three different IPs—please confirm that you have indeed started three etcd instances and configured them with the corresponding IPs. For easier debugging, you might try starting with just a single etcd instance first.
Author
Owner

@jieyang-su commented on GitHub (Sep 30, 2025):

After one ttl, the registered memory is automatically logged out

Yes. This result is expected. In older versions, if HA was enabled on the master, then HA also had to be enabled on the client (i.e., you must provide the address in the form of etcd://IP:Port;IP:Port;...;IP:Port). Otherwise, the client would not periodically send heartbeats to the master, and the master would consider the client timed out and disconnected.

I have also changed mooncake_master_service to etcd://IP:Port ;IP:Port; ...; IP:Port,but there will be another problem, as mentioned above

From the previous logs, the error seems to be caused by the client timing out when fetching data from etcd. You should check whether the server where the client is running can actually connect to etcd. Also, I noticed that the etcd endpoints you provided contain three different IPs—please confirm that you have indeed started three etcd instances and configured them with the corresponding IPs. For easier debugging, you might try starting with just a single etcd instance first.

Thank you for your suggestion @ykwd . I have reviewed my parameters and found that I forgot to set the rpc-address when starting mooncake_master_server. I found that the default is 0.0.0.0, so it cannot be used across hosts.
Now, it is working normally in preliminary testing.
nohup mooncake_master --enable-ha=true --etcd-endpoints="0.0.0.0:2379;0.0.0.0:2381;0.0.0.0:2383" --rpc-address=xxx.xxx.xxx.xxx --client-ttl=30 > /mooncake_master.log 2>&1

<!-- gh-comment-id:3351036064 --> @jieyang-su commented on GitHub (Sep 30, 2025): > > After one ttl, the registered memory is automatically logged out > > Yes. This result is expected. In older versions, if HA was enabled on the master, then HA also had to be enabled on the client (i.e., you must provide the address in the form of etcd://IP:Port;IP:Port;...;IP:Port). Otherwise, the client would not periodically send heartbeats to the master, and the master would consider the client timed out and disconnected. > > > I have also changed mooncake_master_service to etcd://IP:Port ;IP:Port; ...; IP:Port,but there will be another problem, as mentioned above > > From the previous logs, the error seems to be caused by the client timing out when fetching data from etcd. You should check whether the server where the client is running can actually connect to etcd. Also, I noticed that the etcd endpoints you provided contain three different IPs—please confirm that you have indeed started three etcd instances and configured them with the corresponding IPs. For easier debugging, you might try starting with just a single etcd instance first. Thank you for your suggestion @ykwd . I have reviewed my parameters and found that I forgot to set the rpc-address when starting mooncake_master_server. I found that the default is 0.0.0.0, so it cannot be used across hosts. Now, it is working normally in preliminary testing. nohup mooncake_master --enable-ha=true --etcd-endpoints="0.0.0.0:2379;0.0.0.0:2381;0.0.0.0:2383" --rpc-address=xxx.xxx.xxx.xxx --client-ttl=30 > /mooncake_master.log 2>&1
Author
Owner

@ykwd commented on GitHub (Sep 30, 2025):

Glad to hear the issue is resolved! Happy to help anytime.

<!-- gh-comment-id:3351054070 --> @ykwd commented on GitHub (Sep 30, 2025): Glad to hear the issue is resolved! Happy to help anytime.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/Mooncake#287
No description provided.