{"record":{"id":"ff5d0752f3ab2c0a","repo":"apache/hadoop","slug":"libhadoop-cannot-be-loaded","errorCode":null,"errorMessage":"libhadoop cannot be loaded.","messagePattern":"libhadoop cannot be loaded\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/unix/DomainSocket.java","lineNumber":193,"sourceCode":"\n  private void unreference(boolean checkClosed) throws ClosedChannelException {\n    if (checkClosed) {\n      refCount.unreferenceCheckClosed();\n    } else {\n      refCount.unreference();\n    }\n  }\n\n  /**\n   * Create a new DomainSocket listening on the given path.\n   *\n   * @param path         The path to bind and listen on.\n   * @return             The new DomainSocket.\n   * @throws IOException raised on errors performing I/O.\n   */\n  public static DomainSocket bindAndListen(String path) throws IOException {\n    if (loadingFailureReason != null) {\n      throw new UnsupportedOperationException(loadingFailureReason);\n    }\n    if (validateBindPaths) {\n      validateSocketPathSecurity0(path, 0);\n    }\n    int fd = bind0(path);\n    return new DomainSocket(path, fd);\n  }\n\n  /**\n   * Create a pair of UNIX domain sockets which are connected to each other\n   * by calling socketpair(2).\n   *\n   * @return                An array of two UNIX domain sockets connected to\n   *                        each other.\n   * @throws IOException    on error.\n   */\n  public static DomainSocket[] socketpair() throws IOException {\n    int fds[] = socketpair0();","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/unix/DomainSocket.java#L175-L211","documentation":"Error \"libhadoop cannot be loaded.\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/unix/DomainSocket.java:193 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Build or install the Hadoop native library (libhadoop) for your platform and ensure it is on java.library.path or in LD_LIBRARY_PATH.","Check hadoop.native.lib is not disabled and that the native library matches the OS and architecture.","If native domain sockets are not required, use TCP sockets instead of UNIX domain sockets."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}