Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded Fuse emits CLI warning OSX, fails to mount with error #2650

Closed
scriptjs opened this issue May 10, 2016 · 10 comments · Fixed by #3098
Closed

Upgraded Fuse emits CLI warning OSX, fails to mount with error #2650

scriptjs opened this issue May 10, 2016 · 10 comments · Fixed by #3098
Assignees
Labels
kind/bug A bug in existing code (including security flaws) topic/commands Topic commands topic/fuse Topic fuse

Comments

@scriptjs
Copy link

scriptjs commented May 10, 2016

Installed stable fuse 2.8.3. CLI warns:

Error: unable to check fuse version.

Dear User,

Before mounting, we must check your version of OSXFUSE. We are protecting
you from a nasty kernel panic we found in OSXFUSE versions <2.7.2.[1]. To
make matters worse, it's harder than it should be to check whether you have
the right version installed...[2]. We've automated the process with the
help of a little tool. We tried to install it, but something went wrong[3].
Please install it yourself by running:

    go get github.com/jbenet/go-fuse-version/fuse-version

You can also stop ipfs from running these checks and use whatever OSXFUSE
version you have by running:

    ipfs config DontCheckOSXFUSE true

[1]: https://github.com/ipfs/go-ipfs/issues/177
[2]: https://github.com/ipfs/go-ipfs/pull/533
[3]: exit status 1
package github.com/jbenet/go-fuse-version/fuse-version: cannot download, $GOPATH not set. For more details see: go help gopath

I don't believe an installation of go should be a prerequisite for the check since I have installed an ipfs binary.

The key and value appear to have been added regardless (excerpt of ~/.ipfs/config below):

  "Discovery": {
    "MDNS": {
      "Enabled": true,
      "Interval": 10
    }
  },
  "DontCheckOSXFUSE": true,
  "Gateway": {
    "HTTPHeaders": null,
    "PathPrefixes": [],
    "RootRedirect": "",
    "Writable": false
  },

Regardless, this results in an invalid key:

$ ipfs mount
Error: config key invalid: DontCheckOSXFUSE %!s(bool=true)
You may be able to get this error to go away by setting it again:

    ipfs config DontCheckOSXFUSE true

Either way, please tell us at: http://github.com/ipfs/go-ipfs/issues
@scriptjs scriptjs changed the title Upgraded Fuse emits CLI warning OSX, fails to mount with error on Upgraded Fuse emits CLI warning OSX, fails to mount with error May 10, 2016
@whyrusleeping whyrusleeping added kind/bug A bug in existing code (including security flaws) topic/commands Topic commands topic/fuse Topic fuse labels May 13, 2016
@davidak
Copy link

davidak commented Jul 21, 2016

i also get this warning but i have fuse-version installed and GOPATH set correctly.

unibook:~ davidak$ fuse-version
OSXFUSE.FuseVersion: 27
OSXFUSE.AgentVersion: 2.8.3
OSXFUSE.AgentName: OSXFUSE
unibook:~ davidak$ ipfs mount
Error: unable to check fuse version.

Dear User,

Before mounting, we must check your version of OSXFUSE. We are protecting
you from a nasty kernel panic we found in OSXFUSE versions <2.7.2.[1]. To
make matters worse, it's harder than it should be to check whether you have
the right version installed...[2]. We've automated the process with the
help of a little tool. We tried to install it, but something went wrong[3].
Please install it yourself by running:

    go get github.com/jbenet/go-fuse-version/fuse-version

You can also stop ipfs from running these checks and use whatever OSXFUSE
version you have by running:

    ipfs config DontCheckOSXFUSE true

[1]: https://github.com/ipfs/go-ipfs/issues/177
[2]: https://github.com/ipfs/go-ipfs/pull/533
[3]: exit status 1
package github.com/jbenet/go-fuse-version/fuse-version: cannot download, $GOPATH not set. For more details see: go help gopath
unibook:~ davidak$ ipfs config DontCheckOSXFUSE true
unibook:~ davidak$ ipfs mount
Error: config key invalid: DontCheckOSXFUSE %!s(bool=true)
You may be able to get this error to go away by setting it again:

    ipfs config DontCheckOSXFUSE true

Either way, please tell us at: http://github.com/ipfs/go-ipfs/issues

unibook:~ davidak$ ipfs config DontCheckOSXFUSE true
Error: Failed to set config value: Wrong config type, expected bool (maybe use --json?)

@dannyid
Copy link

dannyid commented Aug 18, 2016

I, too, am getting these errors on ipfs mount and ipfs daemon --mount.

Initially the error is:

exec: "fuse-version": executable file not found in $PATH

I ran go get github.com/jbenet/go-fuse-version/fuse-version and ensured it was in my $PATH. Running fuse-version from the command line produces:

OSXFUSE.FuseVersion: 29
OSXFUSE.AgentVersion: 3.4.2
OSXFUSE.AgentName: OSXFUSE

After running ipfs config DontCheckOSXFUSE true and running ipfs mount again, I get the following error:

Error: config key invalid: DontCheckOSXFUSE %!s(bool=true)

I also tried running ipfs config DontCheckOSXFUSE --bool true which didn't help.

Checking the config file I do see the following line added:

"DontCheckOSXFUSE": true,

And when removed, I again get the original fuse-version error.

I'm on OSX 10.9.5. I've reproduced it on ipfs versions v0.4.1, v0.4.2 and 0.4.3-rc3.

@paulsnar
Copy link

Okay so I got kinda tired of this and looked into it.

According to mount_darwin.go, the config value expected to be attached to DontCheckOSXFUSE has to be a string containing the word "true". But somewhere within the config handling there is a check to make sure a string value "true" will be transformed into a boolean.

Therefore one cannot set it to the correct value by only using ipfs config DontCheckOSXFUSE true, since it will become a boolean and fail the above check (even --json doesn't work for some reason). However you can use ipfs config edit to set "DontCheckOSXFUSE": "true", which will bypass the FUSE check.

@whyrusleeping
Copy link
Member

Hey @dannyid and @paulsnar Thanks for looking into this, I pushed a patch here: #3098

If you guys could try it out and let me know if it solves the issue with the config stuff that would be very helpful

@paulsnar
Copy link

paulsnar commented Aug 18, 2016

@whyrusleeping this should fix one part of the issue, which is the confusing config behavior, but the actual problem is that Go's exec seems to sometimes not detect fuse-version even if it exists in $PATH (see this comment, for example).

I'll test your patch and look into this more in couple hours.

@whyrusleeping
Copy link
Member

whyrusleeping commented Aug 18, 2016

@paulsnar ah, in the comment you link to, there is an error printed rather sneakily at the end saying:

package github.com/jbenet/go-fuse-version/fuse-version: cannot download, $GOPATH not set. For more details see: go help gopath

That looks to me like it tried to install fuse-version itself and failed on the go get for the stated reason, but it shouldnt have gotten that far anyways, i'm left wondering what the error returned by exec.LookPath at the top is. If you can reproduce this issue, do you mind changing that statement to:

    if _, err := exec.LookPath("fuse-version"); err == nil {
        return nil // got it!
    } else {
        log.Error("LookPath error: ", err)
    }

recompiling, and seeing what it prints?

@dannyid
Copy link

dannyid commented Aug 19, 2016

This may be out of scope of this particular issue but with regard to fuse-version not being found due to no or wrong $GOPATH being set, I attempted to fix this by adding my go folder to my $GOPATH (the one with bin/, pkg/, and src/ in it, and it didn't help. I also tried adding the paths to each of the above folders and that didn't help either. I'm pretty new to Go so I have no idea if this is correct.

@Kubuxu
Copy link
Member

Kubuxu commented Aug 19, 2016

Can you show us an output of go env?

@dannyid
Copy link

dannyid commented Aug 19, 2016

@Kubuxu Actually, upon second check, my fuse-version issue has gone away. For the record, here's my go env though.

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/JohnDoe/Documents/github/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.6.2/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.6.2/libexec/pkg/tool/darwin_amd64"
GO15VENDOREXPERIMENT="1"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"

@roo2
Copy link

roo2 commented Dec 13, 2016

I also saw this issue in OSX 10.11.6 ipfs 0.4.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) topic/commands Topic commands topic/fuse Topic fuse
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants