FUSE error: Transport endpoint is not connected
Asked Answered
J

6

83

I'm trying to implement the FUSE filesystem. I am receiving this error:

cannot access MountDir: Transport endpoint is not connected

This the relevant parts of the program. There are two directories, MirrorDir and MountDir, that exist withing the same directory as all of the code. I am calling the program like this:

./myFS -o nonempty -o allow_other MirrorDir MountDir

Can anyone see what I am doing wrong?

static struct fuse_operations xmp_oper = {
    .getattr    = xmp_getattr,
    .readdir    = xmp_readdir,
    .open       = xmp_open,
    .read       = xmp_read,
};

int main(int argc, char *argv[]) {
    int fuse_stat;
    char* mirrorDir;

    mirrorDir = malloc(sizeof(strlen(argv[argc-2]+1)));
    if (mirrorDir == NULL) {
        perror("main calloc");
        abort();
    }

    // Pull the rootdir out of the argument list and save it in my internal data
    mirrorDir = realpath(argv[argc-2], NULL);

    argv[argc-2] = argv[argc-1];
    argv[argc-1] = NULL;
    argc--;

    // turn over control to fuse
    fprintf(stderr, "about to call fuse_main\n");   
    fuse_stat = fuse_main(argc, argv, &xmp_oper, mirrorDir);
    fprintf(stderr, "fuse_main returned %d\n", fuse_stat);
    return fuse_stat;
}
Jennefer answered 14/4, 2013 at 18:10 Comment(0)
K
178

This typically is caused by the mount directory being left mounted due to a crash of your filesystem. Go to the parent directory of the mount point and enter fusermount -u YOUR_MNT_DIR.

If this doesn't do the trick, do sudo umount -l YOUR_MNT_DIR.

Khedive answered 12/11, 2013 at 2:54 Comment(8)
I had to sudo umount to get it to work. fusermount gave me: entry for <mount> not found in /etc/mtabMyosin
fusermount -u did not work in my case, so i tried sudo umount -l but I get this error message: umount: MOUNT_DIR: block devices not permitted on fs Any ideas?Devitt
Likewise, it was the second suggestion which worked for me.Phosphaturia
Likewise as well. sudo umount -l YOUR_MNT_DIR worked for me. I was using root user, which I got on with su -. Thank you so much :)Honorarium
umount -l also worked for me after receiving the access error Transport endpoint is not connected and umount on its own complaining Device or resource busy.Eugenie
For me only fusermount -uz YOUR_MNT_DIR worked (notice the extra z)Frear
This alone (the -l option) worked for me when rclone lost authorization and wouldn't re-mount in the same dir due to Transport endpoint not connected and fuser/umount not working. Thanks!Whiplash
Comment / solution from @Frear did solved my problemAbate
P
26

I mounted a ssh file system (sshfs command line) and left it mounted and I had same problem, fusermount -u YOUR_MNT_DIR solved my problem.

Prostitution answered 1/4, 2015 at 8:2 Comment(0)
I
1

In Azure, I tried to mount my container using user managed identities. I kept getting Transport endpoint is not connected until the Storage Blob Data Contributor permission was added to the managed identity.

Indusium answered 23/2, 2021 at 21:50 Comment(0)
D
0

You may check your /etc/hosts to verify it the master node is with a fully qualified name. More details in https://community.cloudera.com/t5/CDH-Manual-Installation/Setting-the-NameNode-port-8020-to-listen-outside-of-localhost/td-p/2257 and in How to configure hosts file for Hadoop ecosystem

Driest answered 9/9, 2016 at 0:55 Comment(0)
J
0

I encountered this problem like "Transport endpoint is not connected" or "Permission denied" when I use rclone to mount Microsoft OneDrive to a Ubuntu system. I am a normal user of the system, so by default my home directory is accessible only to me. When I created the mountpoint directory, it is also accessible only to me.

I finally figure out that these error messages are related to the file access privilege mode. Since I am a normal user but fusermount runs as root, it cannot access the mountpoint directory while mounting, and cannot access my home directory while unmounting, so it complaints. The solution is very simple: open the file access privilege of both the mountpoint directory and home directory to everyone by setting their mode bits to 777.

Jellybean answered 14/11, 2021 at 11:46 Comment(0)
G
0

A file with unreadable characters from a Windows box temporarily gave me this endpoint not connected error on an external USB drive each time I attempted to read it. I could unmount and re-mount the drive to wake things up, but accessing that file (or even the directory containing it) re-broke things.

I connected the drive to a different computer and renamed the file to resolve.


Details

I spent a couple late-night hours lazily browsing Wikipedia and downloading the better pics to my Microsoft Surface (Win10); some had Asian and Cyrillic characters.

Not my image, but more or less this:

Asian and Cyrillic filename characters

Today I used pscp -r -p to push the directory to my Linux Mint box--but pscp threw errors on several files. I don't explicitly recall verbatim, but this is very close if not the same: https://superuser.com/questions/769385/pscp-and-utf-8-characters

"user@remote_host:/Справочник/file.txt" "E:\Справочник\file.txt"
scp: E:/??????????/file.txt: Cannot create file

Back at my Linux box, trying to access the directory got me the Transport endpoint is not connected error. Then the entire drive became unusable--both in thunar file manager and at the CLI, with errors like "cannot get working directory" and other problems we'd expect with a damaged filesystem.

The fusermount command got me nowhere, but sudo umount -l worked several times.

Each time I un-and-re-mounted this drive (formatted exFAT), everything reverted to normal (read/write/delete worked as expected)--until I attempted to read/rename/remove the directory with the unreadable (UTF-8?) characters, at which point the entire drive again became inaccessible.

I connected the drive to the WinBox and renamed the files--all better.

I could probably add a character set support, but this was the first time in 20 years I've encountered this, so I doubt I'll bother.

Jonathan Brown's answer helped me diagnose this and conclude that the simple solution of carrying the drive upstairs could be the fix.

Gymnosperm answered 29/1, 2023 at 19:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.