{"record":{"id":"312a351f84a35a2f","repo":"apache/shardingsphere","slug":"invalid-path-s","errorCode":null,"errorMessage":"Invalid path `%s`.","messagePattern":"Invalid path `(.+?)`\\.","errorType":"console","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"critical","filePath":"proxy/bootstrap/src/main/java/org/apache/shardingsphere/proxy/arguments/BootstrapArguments.java","lineNumber":113,"sourceCode":"    \n    /**\n     * Get unix domain socket path.\n     *\n     * @return socket path\n     */\n    public Optional<String> getSocketPath() {\n        if (args.length < 3) {\n            return Optional.empty();\n        }\n        List<String> addresses = Arrays.asList(args[2].split(\",\"));\n        return addresses.stream().filter(address -> !InetAddresses.isInetAddress(address)).filter(this::isValidPath).findFirst();\n    }\n    \n    private boolean isValidPath(final String path) {\n        try {\n            Paths.get(path);\n        } catch (final InvalidPathException ignored) {\n            throw new IllegalArgumentException(String.format(\"Invalid path `%s`.\", path));\n        }\n        return true;\n    }\n}\n","sourceCodeStart":95,"sourceCodeEnd":118,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/proxy/bootstrap/src/main/java/org/apache/shardingsphere/proxy/arguments/BootstrapArguments.java#L95-L118","documentation":"IllegalArgumentException ('Invalid path `%s`.') thrown by BootstrapArguments.isValidPath while parsing the third bootstrap argument. Each comma-separated entry in args[2] is tested with InetAddresses.isInetAddress; non-IP entries are treated as Unix socket paths and validated with Paths.get(path) — an InvalidPathException (illegal characters, NUL byte, malformed path on the OS) is caught and rethrown as this exception.","triggerScenarios":"Starting the proxy with a third argument whose non-address component is not a legal filesystem path on the platform, e.g. `java -jar proxy.jar 3307 server.yaml 'bad\u0000path'` or a path with characters invalid on the OS; valid examples are IPs (`127.0.0.1`) or socket paths (`/tmp/ss.sock`).","commonSituations":"Copy-pasting bind-address lists with smart quotes or template placeholders; passing Windows-style paths on Linux or vice versa; stray whitespace/control characters in generated start scripts.","solutions":["Provide the third argument as comma-separated values where each is either a literal IP address or a syntactically valid absolute socket path for the host OS","Remove invalid characters/control bytes from generated startup scripts; retype the argument rather than pasting from formatted docs","If you do not need address/socket overrides, omit the third argument entirely (fewer than 3 args returns Optional.empty())"],"exampleFix":"# before\njava -jar shardingsphere-proxy-bootstrap.jar 3307 conf/server.yaml '127.0.0.1, “/tmp/ss.sock”'\n\n# after\njava -jar shardingsphere-proxy-bootstrap.jar 3307 conf/server.yaml 127.0.0.1,/tmp/ss.sock","handlingStrategy":"validation","validationCode":"// validate each comma-separated entry before launch\nfor (String entry : addressArg.split(\",\")) {\n    String e = entry.trim();\n    boolean ip = InetAddresses.isInetAddress(e);\n    boolean path;\n    try { Paths.get(e); path = true; } catch (final InvalidPathException ex) { path = false; }\n    if (!ip && !path) { throw new IllegalArgumentException(\"Bad address/socket entry: \" + e); }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use plain ASCII, OS-valid absolute paths for socket entries; avoid smart quotes from copy-paste","Omit the third argument when no address/socket override is needed"],"tags":["bootstrap","cli","arguments","startup","path"],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}