s3fs: Bad file descriptor when mounting S3 bucket on EC2 instance

1

I uploaded some files to S3 and I want to access them in an EC2 instance. I am trying to get s3fs to work. I SSH'ed into my EC2 instance and then mounted an S3 bucket on the local folder /mnt/s3 using:

s3fs -o allow_other -o uid=1000,gid=1000,use_cache=/home/ubuntu/cache arte-mexicano /mnt/s3

I can see the files no problem, even without the allow_other option. The filesizes are also OK when I use ls -l, but when I try to look at some random text file, I get an error:

ubuntu@some-ip:/mnt/s3/some-folder$ cat README.md
cat: README.md: Bad file descriptor

I tried opening it with Vim as well with no success. The allow_other option also didn't solve my problem.

Any ideas are welcome!

EDIT 1

Asked for by @AndrewGaul:

Using double debug option (-d -d):

ubuntu@some-ip:/mnt$ s3fs -d -d -o allow_other -o uid=1000,gid=1000,use_cache=/home/ubuntu/cache arte-mexicano /mnt/s3
FUSE library version: 2.9.2
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.22
flags=0x0000f7fb
max_readahead=0x00020000
   INIT: 7.19
   flags=0x00000019
   max_readahead=0x00020000
   max_write=0x00020000
   max_background=0
   congestion_threshold=0
   unique: 1, success, outsize: 40

Using double debug plus -f:

ubuntu@some-ip:/mnt$ s3fs -d -d -f -o allow_other -o uid=1000,gid=1000,use_cache=/home/ubuntu/cache arte-mexicano /mnt/s3
s3fs_check_service
FUSE library version: 2.9.2
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.22
flags=0x0000f7fb
max_readahead=0x00020000
s3fs_init
   INIT: 7.19
   flags=0x00000019
   max_readahead=0x00020000
   max_write=0x00020000
   max_background=0
   congestion_threshold=0
   unique: 1, success, outsize: 40
s3fs_destroy

I get similar logs in both cases, but I don't quite know what they mean. Both hang there until I stop them with ctrl+C, and neither gets mounted after that.

amazon-web-services
amazon-ec2
amazon-s3
mount
s3fs
asked on Stack Overflow Jul 14, 2015 by Felipe Gerard • edited Jul 15, 2015 by Felipe Gerard

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0