{"record":{"id":"7b66c4c3e02efeae","repo":"pinpoint-apm/pinpoint","slug":"s-load-fail-caused-by-s","errorCode":null,"errorMessage":"%s load fail Caused by:%s","messagePattern":"(.+?) load fail Caused by:(.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"agent-module/agent-tools/src/main/java/com/navercorp/pinpoint/tools/NetworkAvailabilityChecker.java","lineNumber":111,"sourceCode":"        }\n\n        try {\n            checkGRPCSpan(grpcTransportConfig);\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n\n    }\n\n    private static String getActiveProfile(Properties defaultProperties) {\n        return defaultProperties.getProperty(ACTIVE_PROFILE_KEY, DEFAULT_PROFILE);\n    }\n\n    private static void loadFileProperties(Properties properties, Path filePath) {\n        try (InputStream inputStream = Files.newInputStream(filePath)) {\n            properties.load(inputStream);\n        } catch (IOException e) {\n            throw new IllegalStateException(String.format(\"%s load fail Caused by:%s\", filePath, e.getMessage()), e);\n        }\n    }\n\n    private static void checkGRPCBase(GrpcTransportConfig grpcTransportConfig) throws Exception {\n        String ip = grpcTransportConfig.getAgentCollectorIp();\n        int port = grpcTransportConfig.getAgentCollectorPort();\n\n        NetworkChecker checker = new TCPChecker(\"TCP Base\", ip, port);\n        checker.check();\n    }\n\n    private static void checkGRPCMeta(GrpcTransportConfig grpcTransportConfig) throws Exception {\n        String ip = grpcTransportConfig.getMetadataCollectorIp();\n        int port = grpcTransportConfig.getMetadataCollectorPort();\n\n        NetworkChecker checker = new TCPChecker(\"TCP Meta\", ip, port);\n        checker.check();\n    }","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/agent-tools/src/main/java/com/navercorp/pinpoint/tools/NetworkAvailabilityChecker.java#L93-L129","documentation":"loadFileProperties loads a key=value properties file into a Properties object via Files.newInputStream. If an IOException occurs while opening/reading the file, it wraps the cause in an IllegalStateException with '<path> load fail Caused by:<message>'.","triggerScenarios":"main passes a properties file path that does not exist, is a directory, is locked, or has bad encoding, so Files.newInputStream or properties.load throws IOException.","commonSituations":"Wrong -D config path when running NetworkAvailabilityChecker, file not copied into the working directory, permission issues, or a corrupted/UTF-16 encoded properties file causing MalformedInput IOException.","solutions":["Verify the file path exists and is readable before running","Fix the path passed to the checker in your command/config","Re-save the properties file as ISO-8859-1/UTF-8 without BOM","Check file permissions and that the path is a regular file"],"exampleFix":"// before\njava ... NetworkAvailabilityChecker -config ./conf/props\n// after\nls -l conf/checker.properties && java ... NetworkAvailabilityChecker -config conf/checker.properties","handlingStrategy":"try-catch","validationCode":"Path p = Path.of(configPath);\nif (!Files.isRegularFile(p) || !Files.isReadable(p)) throw new IllegalArgumentException(\"Properties file missing or unreadable: \" + p);","typeGuard":null,"tryCatchPattern":"try { checker.run(propsPath); } catch (IllegalStateException e) { if (e.getMessage().contains(\"load fail\")) { log.error(\"Check properties path/encoding: {}\", propsPath); } throw e; }","preventionTips":["Verify the -config path exists relative to the working directory","Ship properties files as plain ASCII/ISO-8859-1 without BOM","Check file permissions in containers/deployment scripts","Log the absolute resolved path before loading"],"tags":["java","properties","io"],"backgroundTag":"file-read-failed","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}