alibaba/nacos · error · NacosLoadException

serverList is empty,please check configuration

Error message

serverList is empty,please check configuration

What it means

Error "serverList is empty,please check configuration" thrown in alibaba/nacos.

Source

Thrown at maintainer-client/src/main/java/com/alibaba/nacos/maintainer/client/address/DefaultServerListManager.java:48

/**
 * Server list Manager.
 *
 * @author Nacos
 */
public class DefaultServerListManager extends AbstractServerListManager {
    
    private final AtomicInteger currentIndex = new AtomicInteger();
    
    public DefaultServerListManager(NacosClientProperties properties) {
        super(properties);
    }
    
    @Override
    public void start() throws NacosException {
        super.start();
        List<String> serverList = getServerList();
        if (serverList.isEmpty()) {
            throw new NacosLoadException("serverList is empty,please check configuration");
        } else {
            currentIndex.set(ThreadLocalRandom.current().nextInt(serverList.size()));
        }
    }
    
    @Override
    protected String getModuleName() {
        return "Naming";
    }
    
    @Override
    protected NacosRestTemplate getNacosRestTemplate() {
        return HttpClientManager.getInstance().getNacosRestTemplate();
    }
    
    @Override
    public String genNextServer() {
        int index = currentIndex.incrementAndGet() % getServerList().size();

View on GitHub (pinned to 9b989acdf1)

Solutions

  1. Review the input and runtime state for maintainer serverList empty, correct the reported problem, and retry.

When it happens

Trigger: Thrown at maintainer-client/src/main/java/com/alibaba/nacos/maintainer/client/address/DefaultServerListManager.java:48 when the library encounters an invalid state.

Common situations: The maintainer client was started without any configured server address.


AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14). Data as JSON: /api/errors/a26f319f8a5ff9af. Report an issue: GitHub.