{"record":{"id":"f19076f645f6aba8","repo":"google/tsunami-security-scanner","slug":"number-of-remote-plugin-server-paths-must-be-equal-to-number","errorCode":null,"errorMessage":"Number of remote plugin server paths must be equal to number of plugin server ports. Addresses: %s. Ports: %s.","messagePattern":"Number of remote plugin server paths must be equal to number of plugin server ports\\. Addresses: (.+?)\\. Ports: (.+?)\\.","errorType":"validation","errorClass":"ParameterException","httpStatus":null,"severity":"error","filePath":"main/src/main/java/com/google/tsunami/main/cli/LanguageServerOptions.java","lineNumber":120,"sourceCode":"                pathCounts, portCounts));\n      }\n\n      if (!pluginServerRpcDeadlineSeconds.isEmpty()) {\n        if (pluginServerRpcDeadlineSeconds.size() != pathCounts) {\n          throw new ParameterException(\n              String.format(\n                  \"Number of plugin server rpc deadlines must be equal to number of plugin server\"\n                      + \" ports. Paths: %s. Ports: %s. Deadlines: %s\",\n                  pathCounts, portCounts, pluginServerRpcDeadlineSeconds.size()));\n        }\n      }\n    }\n\n    if (!remotePluginServerAddress.isEmpty()) {\n      var addrCounts = remotePluginServerAddress.size();\n      var portCounts = remotePluginServerPort.size();\n      if (addrCounts != portCounts) {\n        throw new ParameterException(\n            String.format(\n                \"Number of remote plugin server paths must be equal to number of plugin server \"\n                    + \"ports. Addresses: %s. Ports: %s.\",\n                addrCounts, portCounts));\n      }\n\n      if (!remotePluginServerRpcDeadlineSeconds.isEmpty()) {\n        if (remotePluginServerRpcDeadlineSeconds.size() != addrCounts) {\n          throw new ParameterException(\n              String.format(\n                  \"Number of plugin server rpc deadlines must be equal to number of plugin server\"\n                      + \" ports. Paths: %s. Ports: %s. Deadlines: %s\",\n                  addrCounts, portCounts, pluginServerRpcDeadlineSeconds.size()));\n        }\n      }\n\n      for (int port : remotePluginServerPort) {\n        if (!(port <= NetworkEndpointUtils.MAX_PORT_NUMBER && port > 0)) {","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/google/tsunami-security-scanner/blob/363ba87b3543f8ae8e4304d3416818f03da7f262/main/src/main/java/com/google/tsunami/main/cli/LanguageServerOptions.java#L102-L138","documentation":"Remote plugin servers are configured as address/port pairs, so validate() requires remotePluginServerAddress.size() == remotePluginServerPort.size(). A count mismatch makes pairing impossible and throws this ParameterException.","triggerScenarios":"Running Tsunami with --remote-plugin-server-address entries but a different number of --remote-plugin-server-port entries, or omitting one of the two lists.","commonSituations":"Registering a new remote plugin server and updating only its address (or only its port), or environment-specific configs where one list is overridden per environment and the other is not.","solutions":["Supply matching counts of --remote-plugin-server-address and --remote-plugin-server-port, in the same order.","Audit your launch script so each remote server adds both an address and a port flag.","Generate the flags from a single list of {address, port} pairs to keep them in sync."],"exampleFix":"// before\n--remote-plugin-server-address=host1 --remote-plugin-server-address=host2 --remote-plugin-server-port=20000\n// after\n--remote-plugin-server-address=host1 --remote-plugin-server-address=host2 --remote-plugin-server-port=20000 --remote-plugin-server-port=20001","handlingStrategy":"validation","validationCode":"if (addresses.size() != ports.size()) { throw new IllegalStateException(\"remote address/port count mismatch\"); }","typeGuard":null,"tryCatchPattern":"try { options.validate(); } catch (ParameterException e) { log.error(\"Remote server pairing mismatch: {}\", e.getMessage()); }","preventionTips":["Define remote servers as {address, port} pairs and generate flags from that list.","Update address and port flags together per server.","Override environment-specific configs as whole pairs, not individual lists."],"tags":["cli","configuration","count-mismatch"],"backgroundTag":"conflicting-config-options","analyzedSha":"363ba87b3543f8ae8e4304d3416818f03da7f262","analyzedAt":"2026-09-13T01:50:53.990Z","contentChangedAt":"2026-09-13T01:50:53.990Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}