{"record":{"id":"c7b789106472e1bd","repo":"nats-io/nats-server","slug":"processroutedoriginclustermsgargs-bad-or-missing-s","errorCode":null,"errorMessage":"processRoutedOriginClusterMsgArgs Bad or Missing Size: '%s'","messagePattern":"processRoutedOriginClusterMsgArgs Bad or Missing Size: '(.+?)'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/route.go","lineNumber":265,"sourceCode":"\t\tc.pa.hdb = args[len(args)-2]\n\t\tc.pa.hdr = parseSize(c.pa.hdb)\n\n\t\t// Grab size.\n\t\tc.pa.szb = args[len(args)-1]\n\t\tc.pa.size = parseSize(c.pa.szb)\n\n\t\t// Grab queue names.\n\t\tif c.pa.reply != nil {\n\t\t\tc.pa.queues = args[5 : len(args)-2]\n\t\t} else {\n\t\t\tc.pa.queues = args[4 : len(args)-2]\n\t\t}\n\t}\n\tif c.pa.hdr < 0 {\n\t\treturn fmt.Errorf(\"processRoutedOriginClusterMsgArgs Bad or Missing Header Size: '%s'\", arg)\n\t}\n\tif c.pa.size < 0 {\n\t\treturn fmt.Errorf(\"processRoutedOriginClusterMsgArgs Bad or Missing Size: '%s'\", args)\n\t}\n\tif c.pa.hdr > c.pa.size {\n\t\treturn fmt.Errorf(\"processRoutedOriginClusterMsgArgs Header Size larger then TotalSize: '%s'\", arg)\n\t}\n\n\t// Common ones processed after check for arg length\n\tc.pa.origin = args[0]\n\tc.pa.account = args[1]\n\tc.pa.subject = args[2]\n\tif len(an) > 0 {\n\t\tc.pa.pacache = c.pa.subject\n\t} else {\n\t\tc.pa.pacache = arg[len(args[0])+1 : len(args[0])+len(args[1])+len(args[2])+2]\n\t}\n\treturn nil\n}\n\n// Process an inbound HMSG specification from the remote route.","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/route.go#L247-L283","documentation":"The total message-size token of the routed origin-cluster message failed to parse: parseSize returned a negative value for the last argument, which must be a non-negative decimal byte count. The parsed args slice is echoed; common causes are a corrupted size field or misaligned tokens from an incompatible route protocol version.","triggerScenarios":"Thrown at server/route.go:265 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the total size token is a valid non-negative integer","Align nats-server versions across the cluster","Rule out payload corruption by intermediaries (LBs, proxies) on the route connection"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3a66a489d262bf89b71a71c955c94920394532f3","analyzedAt":"2026-09-02T04:41:54.247Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}