{"record":{"id":"827e30a7f6b1bd49","repo":"alibaba/nacos","slug":"http-client-invalid-read-timeout-827e30","errorCode":null,"errorMessage":"[http-client] invalid read timeout:{}","messagePattern":"\\[http-client\\] invalid read timeout:(.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"maintainer-client/src/main/java/com/alibaba/nacos/maintainer/client/utils/ParamUtil.java","lineNumber":100,"sourceCode":"        try {\n            return Integer.parseInt(connectTimeoutStr);\n        } catch (NumberFormatException e) {\n            final String msg = \"[http-client] invalid connect timeout:\" + connectTimeoutStr;\n            LOGGER.error(\"[settings] {}\", msg, e);\n            throw new IllegalArgumentException(msg, e);\n        }\n    }\n    \n    private static int initReadTimeout() {\n        String readTimeoutStr =\n            NacosClientProperties.PROTOTYPE.getProperty(MAINTAINER_CLIENT_READ_TIMEOUT_KEY,\n                DEFAULT_READ_TIMEOUT);\n        try {\n            return Integer.parseInt(readTimeoutStr);\n        } catch (NumberFormatException e) {\n            final String msg = \"[http-client] invalid read timeout:\" + readTimeoutStr;\n            LOGGER.error(\"[settings] {}\", msg, e);\n            throw new IllegalArgumentException(msg, e);\n        }\n    }\n    \n    private static int initMaxRetryTimes() {\n        String maxRetryTimesStr =\n            NacosClientProperties.PROTOTYPE.getProperty(MAINTAINER_CLIENT_MAX_RETRY_TIMES_KEY,\n                String.valueOf(DEFAULT_MAX_RETRY_TIMES));\n        try {\n            return Integer.parseInt(maxRetryTimesStr);\n        } catch (NumberFormatException e) {\n            final String msg = \"[http-client] invalid max retry times:\" + maxRetryTimesStr;\n            LOGGER.error(\"[settings] {}\", msg, e);\n            throw new IllegalArgumentException(msg, e);\n        }\n    }\n    \n    private static long initRefreshIntervalMills() {\n        String refreshIntervalMillsStr = NacosClientProperties.PROTOTYPE.getProperty(","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/maintainer-client/src/main/java/com/alibaba/nacos/maintainer/client/utils/ParamUtil.java#L82-L118","documentation":"Thrown by ParamUtil.initReadTimeout as an IllegalArgumentException when the read-timeout configuration value cannot be parsed as an integer. The property key is MAINTAINER_CLIENT_READ_TIMEOUT_KEY with a default of DEFAULT_READ_TIMEOUT. Runs at class-load time in the ParamUtil static initializer.","triggerScenarios":"Setting the system property or environment variable for MAINTAINER_CLIENT_READ_TIMEOUT_KEY to a non-numeric string (e.g. '30s', 'fast'). NumberFormatException is caught, logged, and re-thrown as IllegalArgumentException.","commonSituations":"Properties file or JVM argument uses a duration suffix ('30s') instead of a raw millisecond integer. Misconfigured environment variable. Config templating bug that injected a non-numeric placeholder.","solutions":["Set MAINTAINER_CLIENT_READ_TIMEOUT_KEY to a valid integer in milliseconds (e.g. 30000).","Remove the custom override to use the default value.","Audit all config sources (properties files, -D flags, env vars) for non-numeric read-timeout values."],"exampleFix":"# before\nnacos.maintainer.client.read.timeout=30s\n\n# after\nnacos.maintainer.client.read.timeout=30000","handlingStrategy":"validation","validationCode":"String raw = System.getProperty(\"nacos.maintainer.client.read.timeout\", \"\");\nif (!raw.isEmpty()) {\n    try { Integer.parseInt(raw); } catch (NumberFormatException e) {\n    throw new IllegalArgumentException(\"read.timeout must be a numeric millisecond value, got: \" + raw);\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Specify read timeout as a raw integer in milliseconds.","Run a config validation pass at startup to catch non-numeric timeout values before ParamUtil loads.","Keep a documented default in config templates so overrides are intentional."],"tags":["configuration","maintainer-client","timeout","number-format","initialization"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}