{"record":{"id":"15622d7b758c9ce0","repo":"redis/jedis","slug":"unparseable-moving-target","errorCode":null,"errorMessage":"Unparseable MOVING target: ","messagePattern":"Unparseable MOVING target: ","errorType":"exception","errorClass":"MalformedMaintenanceEventException","httpStatus":null,"severity":"error","filePath":"src/main/java/redis/clients/jedis/MaintenancePushCodec.java","lineNumber":123,"sourceCode":"    }\n    return new FailedOverEvent((Long) c.get(1), shardIds(c, 2));\n  }\n\n  /** Diagnostic shard-id list (stringified JSON array), logging only; required on the wire. */\n  private static String shardIds(List<Object> c, int i) {\n    return SafeEncoder.encode((byte[]) c.get(i));\n  }\n\n  /** MOVING target {@code host:port}; throws when the target is absent or unparseable. */\n  private static HostAndPort parseHostPort(List<Object> c, int i) {\n    if (i >= c.size() || !(c.get(i) instanceof byte[])) {\n      throw new MalformedMaintenanceEventException(\n          \"MOVING target must be a host:port byte[] at index \" + i + \": \" + c);\n    }\n    try {\n      return HostAndPort.from(SafeEncoder.encode((byte[]) c.get(i)));\n    } catch (Exception e) {\n      throw new MalformedMaintenanceEventException(\"Unparseable MOVING target: \" + c, e);\n    }\n  }\n\n  private static MalformedMaintenanceEventException malformed(String type, List<Object> c) {\n    return new MalformedMaintenanceEventException(\"Malformed \" + type + \" push: \" + c);\n  }\n\n  private MaintenancePushCodec() {\n  }\n}\n","sourceCodeStart":105,"sourceCodeEnd":134,"githubUrl":"https://github.com/redis/jedis/blob/6dac31d4c224fb3257c216f3985340c6f500cdcb/src/main/java/redis/clients/jedis/MaintenancePushCodec.java#L105-L134","documentation":"After confirming the MOVING target element is a byte[], the codec attempts HostAndPort.from(new String(bytes)). If the bytes do not parse as host:port, the original exception is wrapped in MalformedMaintenanceEventException(\"Unparseable MOVING target: ...\", e).","triggerScenarios":"A MOVING push event whose target bytes are not a valid host:port pair — e.g. missing port, hostname containing invalid characters, IPv6 literal without brackets, or empty target bytes sent by the server.","commonSituations":"Server/proxy emitting non-standard endpoint formats (e.g. unix socket paths or IPv6 without brackets); localization/encoding issues corrupting the payload; misconfigured managed-Redis endpoint announcements.","solutions":["Check the raw target string in the exception message and correct the server-side endpoint configuration (valid host:port)","For IPv6 targets, ensure the server emits bracketed literals that HostAndPort can parse","Upgrade jedis if a newer HostAndPort parser supports the target format being sent"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  HostAndPort target = codec.parseMovingTarget(raw);\n} catch (MalformedMaintenanceEventException e) {\n  logger.warn(\"Unparseable MOVING target from server: {}\", e.getMessage());\n}","preventionTips":["Ensure the server announces targets as standard host:port byte strings (bracket IPv6)","Check managed-Redis endpoint configuration for exotic address formats","Upgrade jedis when new address formats need parsing support"],"tags":["redis","push-events","host-port-parsing","malformed-data"],"backgroundTag":"invalid-argument-format","analyzedSha":"6dac31d4c224fb3257c216f3985340c6f500cdcb","analyzedAt":"2026-09-08T04:55:01.204Z","contentChangedAt":"2026-09-08T04:55:01.204Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}