alibaba/nacos · critical · ConnectException
no available server, currentServerAddr : {currentServerAddr}
Error message
no available server, currentServerAddr : {currentServerAddr} What it means
Thrown by ServerHttpAgent.httpPost when the time window (readTimeoutMs) expires before a successful POST and before retry exhaustion. The loop condition currentTimeMillis() <= endTime became false while still iterating servers. The message includes currentServerAddr to show which node was last attempted.
Source
Thrown at client/src/main/java/com/alibaba/nacos/client/config/http/ServerHttpAgent.java:179
ex);
throw ex;
}
if (serverListMgr.getIterator().hasNext()) {
currentServerAddr = serverListMgr.getIterator().next();
} else {
maxRetry--;
if (maxRetry < 0) {
throw new ConnectException(
"[NACOS HTTP-POST] The maximum number of tolerable server reconnection errors has been reached");
}
serverListMgr.refreshCurrentServerAddr();
}
} while (System.currentTimeMillis() <= endTime);
LOGGER.error("no available server, currentServerAddr : {}", currentServerAddr);
throw new ConnectException("no available server, currentServerAddr : " + currentServerAddr);
}
@Override
public HttpRestResult<String> httpDelete(String path, Map<String, String> headers,
Map<String, String> paramValues,
String encode, long readTimeoutMs) throws Exception {
final long endTime = System.currentTimeMillis() + readTimeoutMs;
String currentServerAddr = serverListMgr.getCurrentServer();
int maxRetry = this.maxRetry;
HttpClientConfig httpConfig = HttpClientConfig.builder()
.setReadTimeOutMillis(Long.valueOf(readTimeoutMs).intValue())
.setConTimeOutMillis(
ConfigHttpClientManager.getInstance().getConnectTimeoutOrDefault(100))
.build();
do {
try {
Header newHeaders = Header.newInstance();
if (headers != null) {View on GitHub (pinned to 9b989acdf1)
Solutions
- Increase the POST readTimeoutMs for config write calls.
- Investigate server-side latency (GC logs, disk I/O, thread dumps) on currentServerAddr.
- Reduce network hops/latency between client and the cluster.
- If the address is stale/wrong, ensure serverListMgr has the correct, current server list.
Defensive patterns
Strategy: retry
Validate before calling
// set a generous write timeout long writeTimeoutMs = Math.max(readTimeoutMs, 10_000);
Try / catch
try {
configService.publishConfig(dataId, group, content);
} catch (Exception e) {
if (e.getMessage().startsWith("no available server, currentServerAddr")) {
log.error("write timed out against {}", e.getMessage());
}
} Prevention
- Increase the write readTimeoutMs.
- Investigate slow server responses (GC, disk).
- Keep the server list lean and current.
When it happens
Trigger: POST attempts each take long enough (slow TLS handshakes, read timeouts) that the cumulative wall-clock exceeds endTime; the deadline elapses mid-retry.
Common situations: Short write timeout, high-latency network, or a server that accepts connections but responds very slowly (e.g. GC stall, disk contention on the server).
Related errors
- no available server
- [NACOS HTTP-POST] The maximum number of tolerable server rec
- request timeout after {timeout} milliseconds, requestId={req
- [NACOS HTTP-GET] The maximum number of tolerable server reco
- [NACOS HTTP-DELETE] The maximum number of tolerable server r
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/f963793b1306f17b.
Report an issue: GitHub.