alibaba/nacos · error · NacosApiException
PARAMETER_MISSING
PARAMETER_MISSING
Error message
Required parameter 'healthy' type Boolean is not present
What it means
Thrown by UpdateHealthForm.validate() when the 'healthy' Boolean field is null in a manual health-status update request. Nacos lets an admin force an instance's healthy flag; without it the operation is undefined, so validate() returns HTTP 400 PARAMETER_MISSING. It is the first check after fillDefaultValue().
Source
Thrown at naming/src/main/java/com/alibaba/nacos/naming/model/form/UpdateHealthForm.java:60
private String clusterName;
private String ip;
private Integer port;
public UpdateHealthForm() {
}
/**
* check param.
*
* @throws NacosApiException NacosApiException
*/
public void validate() throws NacosApiException {
fillDefaultValue();
if (healthy == null) {
throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.PARAMETER_MISSING,
"Required parameter 'healthy' type Boolean is not present");
}
if (StringUtils.isBlank(serviceName)) {
throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.PARAMETER_MISSING,
"Required parameter 'serviceName' type String is not present");
}
if (StringUtils.isBlank(ip)) {
throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.PARAMETER_MISSING,
"Required parameter 'ip' type String is not present");
}
if (port == null) {
throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.PARAMETER_MISSING,
"Required parameter 'port' type Integer is not present");
}
}
/**
* fill default value.View on GitHub (pinned to 9b989acdf1)
Solutions
- Send an explicit 'healthy=true' or 'healthy=false'.
- Use a boolean literal, not empty string; some clients send 'on'/'off' which Spring may not map to Boolean.
- Pre-validate: Objects.requireNonNull(form.getHealthy()).
Example fix
// before curl -X PUT '.../health/instance' -d 'serviceName=my-service&ip=10.0.0.1&port=8080' // after curl -X PUT '.../health/instance' -d 'serviceName=my-service&ip=10.0.0.1&port=8080&healthy=false'
Defensive patterns
Strategy: validation
Validate before calling
if (healthy == null) {
throw new IllegalArgumentException("healthy flag is required (true/false)");
}
form.setHealthy(healthy); Type guard
static boolean hasHealthyFlag(Boolean b) {
return b != null;
} Prevention
- Send healthy=true or healthy=false as a literal, never empty.
- If using a checkbox, map unchecked to false explicitly.
- Pre-validate the whole UpdateHealthForm before submit.
When it happens
Trigger: PUT/POST to the instance health update endpoint (e.g. /v3/admin/ns/health/instance or legacy /nacos/v1/ns/health/instance) with no 'healthy' param, or a value Spring cannot parse to Boolean.
Common situations: Sending healthy='' (empty) which becomes null Boolean; calling the beat/health API for the first time and forgetting the flag; UI checkbox that submits nothing when unchecked.
Related errors
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/1498b456a3a3336b.
Report an issue: GitHub.