redbo / cloudfuse

Filesystem (fuse) implemented on Mosso's Cloud Files
http://redbo.github.com/cloudfuse/
MIT License
392 stars 114 forks source link

Link has been severed #38

Closed BlakeGardner closed 11 years ago

BlakeGardner commented 12 years ago

Running Fedora release 15 (Lovelock)

When i mount a folder to cloudfiles i get an error after trying to list the buckets under the mount point.

cloudfuse /mnt/cloudfiles/

[root@ul966js ~]# :Server )ls -l /mnt/cloudfiles/ ls: reading directory /mnt/cloudfiles/: Link has been severed total 0

When i run the mount command with the -f parameter everything mounts and works as intended.

cloudfuse -f /mnt/cloudfiles/

I've repeated the exact same process i used to compile/configure cloudfuse on a Debian machine and it works perfectly without the -f flag.

I found the -f flag fix from this URL: http://makewhatis.com/2011/05/mounting-your-rackspace-cloudfiles-in-centosrhel-5-55-6-via-cloudfuse so it looks like this issue affects Centos/RHEL 5.5/5.6 as well.

everestx commented 12 years ago

I can confirm that this affects CentOS 6.0

jness commented 12 years ago

Identified the same issue under EL6:

 # cat /etc/redhat-release 
 Red Hat Enterprise Linux Server release 6.2 (Santiago)

 # uname -a
 Linux xxx 2.6.32-131.0.15.el6.x86_64 #1 SMP Tue May 10 15:42:40 EDT 2011 x86_64 x86_64 x86_64      GNU/Linux

 # cloudfuse --version
 FUSE library version: 2.8.3
 using FUSE kernel interface version 7.12
everestx commented 12 years ago

This is a bummer, since I don't really want to switch to debian. I tried strace against the fuse mount process and don't see any smoking guns. If anyone has any idea how I can track down the problem, let me know? Maybe compile with debug and run through gdb? Happy to help with the fix anyway I can.

vicomte commented 12 years ago

Running CentOS6.2 here. Compiled a version of libcurl that was on my Cent5 instances (7.15.0) and compiling against that fixes this. I will try to look at the api differences (changes from libcurl.so.3 to libcurl.so.4) up to 7.19.7-26.el6_2.4.x86_64 when I have a chance.

vicomte commented 12 years ago

This also worked for me with 7.18.2 but breaks on 7.19.0 (both non RH related sources)

paivaric commented 12 years ago

Is there a way to make cloudfuse work in Centos6.2?

vicomte commented 12 years ago

For cent6.2/3 I built curl/libcurl from source version 7.18.2 as static libraries and linked against libcurl.a from that instead of -lcurl in the cloudfuse Makefile. Building the shared versions overrides the system one and broke some python stuff for me.

impermisha commented 12 years ago

Any updates on Centos 6? Does Rackspace actively contribute too? Seems they are completely unaware it is busted.

heinstrom commented 12 years ago

I am also having this issue with CentOS/EL 6, it appears that the latest version of libcurl is causing some issues. It works fine on older versions.

heinstrom commented 12 years ago

Hey all, some wonderful person has compiled a cloudfuse binary dynamically linked to the old version of curl here: http://www.transdimensia.ravenhurst.com/2012/08/cloudfuse-on-cenos6.html

It worked for me on CentOS 6.3!

impermisha commented 12 years ago

Thanks! Date: Fri, 24 Aug 2012 07:11:07 -0700 From: notifications@github.com To: cloudfuse@noreply.github.com CC: impermisha@hotmail.com Subject: Re: [cloudfuse] Link has been severed (#38)

Hey all, some wonderful person has compiled a cloudfuse binary dynamically linked to the old version of curl here: http://www.transdimensia.ravenhurst.com/2012/08/cloudfuse-on-cenos6.html

It worked for me on CentOS 6.3!

          —

          Reply to this email directly or view it on GitHub.
tewner commented 12 years ago

I'm not an expert at compiling things, so it took me a few minutes to figure out how to statically link libcurl - it was easier than I expected. Again, it's been a long time - they may have been an (even) easier way to do this. This process is for people who want to build their own binary statically linked against a known-good version of libcurl:

  1. Download cURL - I used http://curl.haxx.se/download/curl-7.18.2.tar.bz2
  2. Open up the tar.bz2, run "./configure" and "make" . Don't run "make install".
  3. go back to the cloudfuse source and run "./configure" . I then ran "make" to get the gcc command.
  4. I then modified the gcc command -
    • I added a full path to libcurl.a in the list of objects.
    • I needed to link against libidn in order to get it to compile
    • I also specified the includes for curl. I don't know if this was required.

All told: gcc -g -O2 -I/root/curl-7.18.2/include -I/usr/include/libxml2 -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -o cloudfuse cloudfsapi.c cloudfuse.c /root/curl-7.18.2/lib/.libs/libcurl.a -lxml2 -pthread -L/lib64 -lfuse -lrt -ldl -Wl,-z,relro -L/usr/lib6464 -lssl -lcrypto -ldl -lz -lidn This should give you a version of cloudfuse with libcurl.a statically linked in. Hypothetically, you can now run make install and you're on you way.

You can verify that this binary doesn't dynamically load libcurl by running "ldd cloudfuse". You'll notice that libcurl isn't in the list.

redbo commented 11 years ago

This was kind of an ugly problem to track down, and I didn't fix it the way I wanted to, but cloudfuse should at least work on these systems now. I'll try to get it the way I want later.

If you want to know: libcurl on rhel-like OSs is linked against NSS instead of OpenSSL, like I'm used to. NSS has some weird thing where it stops working if you initalize it, then fork() (which is why everything worked fine if you ran it in the foreground, no fork to detach it). I just moved authentication to after the fork, so NSS gets initialized in the new process instead. This means there's less user feedback for auth problems, but at least it works.

fensoft commented 8 years ago

on ubuntu/debian: apt install libcurl4-openssl-dev and, yes, it will remove libcurl4-gnutls-dev package.