{"record":{"id":"fcb470459652ef4a","repo":"apache/hadoop","slug":"fuseconnect-usrname-s-fusenewconnect-failed-wit","errorCode":null,"errorMessage":"fuseConnect(usrname=%s): fuseNewConnect failed with error code %d\n","messagePattern":"fuseConnect\\(usrname=(.+?)\\): fuseNewConnect failed with error code (.+?)\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.c","lineNumber":570,"sourceCode":" */\nstatic int fuseConnect(const char *usrname, struct fuse_context *ctx,\n                struct hdfsConn **out)\n{\n  int ret;\n  struct hdfsConn* conn;\n\n  char kpath[PATH_MAX] = { 0 };\n  if (gHdfsAuthConf == AUTH_CONF_KERBEROS) {\n    findKerbTicketCachePath(ctx, kpath, sizeof(kpath));\n  }\n\n  pthread_mutex_lock(&gConnMutex);\n  conn = hdfsConnFind(usrname, kpath);\n  if (!conn) {\n    ret = fuseNewConnect(usrname, ctx, &conn);\n    if (ret) {\n      pthread_mutex_unlock(&gConnMutex);\n      fprintf(stderr, \"fuseConnect(usrname=%s): fuseNewConnect failed with \"\n              \"error code %d\\n\", usrname, ret);\n      return ret;\n    }\n  }\n  conn->refcnt++;\n  conn->expirationCount = (gExpiryPeriod + gTimerPeriod - 1) / gTimerPeriod;\n  if (conn->expirationCount < 2)\n    conn->expirationCount = 2;\n  pthread_mutex_unlock(&gConnMutex);\n  *out = conn;\n  return 0;\n}\n\nint fuseConnectAsThreadUid(struct hdfsConn **conn)\n{\n  struct fuse_context *ctx;\n  char *usrname;\n  int ret;","sourceCodeStart":552,"sourceCodeEnd":588,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.c#L552-L588","documentation":"Error \"fuseConnect(usrname=%s): fuseNewConnect failed with error code %d\n\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.c:570 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the error code from fuseNewConnect; resolve the underlying connection failure (kinit, classpath, NameNode reachability) and retry the FUSE operation."],"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-22T20:17:22.307Z"}