google/tsunami-security-scanner · error · ParameterException
Number of plugin server rpc deadlines must be equal to…
Error message
Number of plugin server rpc deadlines must be equal to number of plugin server ports. Paths: %s. Ports: %s. Deadlines: %s
What it means
When --plugin-server-rpc-deadline-seconds is supplied, validate() requires its size to equal the number of plugin server paths/ports, since deadlines are matched positionally per server. A mismatch throws this ParameterException.
Solutions
- Provide one --plugin-server-rpc-deadline-seconds value per plugin server, in the same order as the paths/ports.
- Remove the deadlines flag entirely if you want defaults for all servers.
- Count servers vs deadlines in your config generation script and assert equality before launch.
Example fix
// before --plugin-server-filename=a.py --plugin-server-filename=b.py --plugin-server-port=8080 --plugin-server-port=8081 --plugin-server-rpc-deadline-seconds=30 // after --plugin-server-rpc-deadline-seconds=30 --plugin-server-rpc-deadline-seconds=60
Defensive patterns
Strategy: validation
Validate before calling
if (!deadlines.isEmpty() && deadlines.size() != serverCount) { throw new IllegalStateException("deadline/server count mismatch"); } Try / catch
try { options.validate(); } catch (ParameterException e) { log.error("Deadline count mismatch: {}", e.getMessage()); } Prevention
- Provide one deadline per server or none at all.
- Keep deadline ordering aligned with path/port ordering.
- Assert deadline count equals server count in deployment tooling.
When it happens
Trigger: Setting one deadline value while configuring two plugin servers, or setting deadlines but no paths/ports so pathCounts is 0 while the deadline list is non-empty.
Common situations: Tuning RPC timeouts for one plugin but running multiple servers, or default config templates that include a single deadline while deployments add more servers.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- Number of plugin server paths must be equal to number of…
- Number of remote plugin server paths must be equal to…
- Language server path
- Port out of range. Expected
- Port number must be an integer. Got
AI-assisted analysis of google/tsunami-security-scanner@363ba87b35 (2026-09-13).
Data as JSON: /api/errors/079c84bc41209708.
Report an issue: GitHub.
Appendix: source
Thrown at main/src/main/java/com/google/tsunami/main/cli/LanguageServerOptions.java:107
String.format("Port number must be an integer. Got %s instead.", pluginServerPort),
e);
}
}
}
var pathCounts = pluginServerFilenames == null ? 0 : pluginServerFilenames.size();
var portCounts = pluginServerPorts == null ? 0 : pluginServerPorts.size();
if (pathCounts != portCounts) {
throw new ParameterException(
String.format(
"Number of plugin server paths must be equal to number of plugin server ports."
+ " Paths: %s. Ports: %s.",
pathCounts, portCounts));
}
if (!pluginServerRpcDeadlineSeconds.isEmpty()) {
if (pluginServerRpcDeadlineSeconds.size() != pathCounts) {
throw new ParameterException(
String.format(
"Number of plugin server rpc deadlines must be equal to number of plugin server"
+ " ports. Paths: %s. Ports: %s. Deadlines: %s",
pathCounts, portCounts, pluginServerRpcDeadlineSeconds.size()));
}
}
}
if (!remotePluginServerAddress.isEmpty()) {
var addrCounts = remotePluginServerAddress.size();
var portCounts = remotePluginServerPort.size();
if (addrCounts != portCounts) {
throw new ParameterException(
String.format(
"Number of remote plugin server paths must be equal to number of plugin server "
+ "ports. Addresses: %s. Ports: %s.",
addrCounts, portCounts));
}View on GitHub (pinned to 363ba87b35)