alibaba/nacos · error · IllegalArgumentException

invalid probeModify

Error message

invalid probeModify

What it means

Thrown by ConfigListenerHttpParamExtractor.extractParam when a line in the Listening-Configs probe body (the v1 config-listen protocol) does not contain between 2 and 4 word-separated tokens. This is an IllegalArgumentException (uncaught runtime), indicating the probe-modify payload is malformed. Word separator is char(2), line separator is char(1).

Source

Thrown at config/src/main/java/com/alibaba/nacos/config/server/paramcheck/ConfigListenerHttpParamExtractor.java:63

        ArrayList<ParamInfo> paramInfos = new ArrayList<>();
        String listenConfigs = request.getParameter("Listening-Configs");
        if (StringUtils.isBlank(listenConfigs)) {
            return paramInfos;
        }
        try {
            listenConfigs = URLDecoder.decode(listenConfigs, Constants.ENCODE);
        } catch (UnsupportedEncodingException e) {
            throw new NacosRuntimeException(ErrorCode.UnKnowError.getCode(), e);
        }
        if (StringUtils.isBlank(listenConfigs)) {
            return paramInfos;
        }
        String[] lines = listenConfigs.split(Character.toString(LINE_SEPARATOR_CHAR));
        for (String line : lines) {
            ParamInfo paramInfo = new ParamInfo();
            String[] words = line.split(Character.toString(WORD_SEPARATOR_CHAR));
            if (words.length < 2 || words.length > 4) {
                throw new IllegalArgumentException("invalid probeModify");
            }
            paramInfo.setDataId(words[0]);
            paramInfo.setGroup(words[1]);
            if (words.length == 4) {
                paramInfo.setNamespaceId(words[3]);
            }
            paramInfos.add(paramInfo);
        }
        return paramInfos;
    }
}

View on GitHub (pinned to 9b989acdf1)

Solutions

  1. Ensure the client encodes the Listening-Configs body using \x01 between config lines and \x02 between fields (dataId, group, md5, namespaceId).
  2. Upgrade the client SDK to a version that correctly builds the probe-modify payload.
  3. Avoid proxies or middleware that strip non-printable control characters.

Example fix

// before (malformed)
String body = "app.yml"; // single token, no group
// after
char w2 = (char) 2;
String line = "app.yml" + w2 + "DEFAULT_GROUP" + w2 + md5 + w2 + namespaceId;
Defensive patterns

Strategy: validation

Validate before calling

// Validate the listening-configs probe body before sending
char lineSep = (char) 1, wordSep = (char) 2;
for (String line : body.split(String.valueOf(lineSep))) {
    String[] words = line.split(String.valueOf(wordSep));
    if (words.length < 2 || words.length > 4) {
        throw new IllegalArgumentException("invalid probeModify line: " + line);
    }
}

Prevention

When it happens

Trigger: A client sends a config-listening long-polling request (v1 protocol) with a malformed Listening-Configs body where a line has fewer than 2 or more than 4 fields separated by the \x02 character. The expected format per line is dataId\x02group\x02[contentMd5]\x02[namespaceId].

Common situations: Custom or legacy client using wrong separators; corrupted probe payload; SDK bug generating the listening format; proxy/load-balancer mangling control characters.

Related errors


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