Code Monkey home page Code Monkey logo

Comments (14)

willscott avatar willscott commented on July 21, 2024

That should be sufficient for a mount that has visible files.

You can look at the helloworld example, and the backing implementation of the billy memfs https://github.com/go-git/go-billy/blob/master/memfs/memory.go to see a fairly simple usage as a library with a file displayed in the mount.

from go-nfs.

DUOLabs333 avatar DUOLabs333 commented on July 21, 2024

Is it possible to see all errors of the server that may point to why a particular command fails?

from go-nfs.

DUOLabs333 avatar DUOLabs333 commented on July 21, 2024

However, while I can list a specific file by doing ls mount/A.txt, if I try to get any more information, I get [ERROR] call to {some address} failed: Invalid file handle

from go-nfs.

willscott avatar willscott commented on July 21, 2024

when writing the library, i would use wireshark to watch the connection and see what error messages were returned to the client.

there is standard logging interface used by the library, but some error conditions will return errors to the client without resulting in a meaningful server error log.

from go-nfs.

DUOLabs333 avatar DUOLabs333 commented on July 21, 2024

Does the library look at the Sys() method when listing files?

from go-nfs.

willscott avatar willscott commented on July 21, 2024

Sys is probed in order to set the uid and gid of files https://github.com/willscott/go-nfs/blob/master/file.go#L115 they will be owned as root if sys does not return a unix-compatible struct.

from go-nfs.

DUOLabs333 avatar DUOLabs333 commented on July 21, 2024

I got wireshark set up, but then I realized I have no idea how to interpret the payload (this is NFS over TCP, I don't know if Wireshark has something for that). I think I should be seeing NFS as the protocol, but all I see is TCP.

from go-nfs.

willscott avatar willscott commented on July 21, 2024

wireshark should normally have automatic payload interpretation for NFS. It may not be doing it by default if the traffic is on a non-standard port. You can force decoding as NFS by right clicking and using 'Decode As...'

if you alternatively capture packets on the relevant port while attempting to open / ls the directory, i'm happy to look at the capture and see if I can understand what's going wrong.

from go-nfs.

DUOLabs333 avatar DUOLabs333 commented on July 21, 2024

I tried to use "Decode As...." but every time I try to add "NFS" it always reset itself. The tcpdump file is attached below (mounting and listing)
nfs.dmp

from go-nfs.

DUOLabs333 avatar DUOLabs333 commented on July 21, 2024

If I use osview, Wireshark does decode it as NFS, so maybe it's they way I set up the server? I copied it straight from the README though.

from go-nfs.

DUOLabs333 avatar DUOLabs333 commented on July 21, 2024

Got it to work --- for CachingHandler, I needed to use 1024 instead of 1.

from go-nfs.

willscott avatar willscott commented on July 21, 2024

great - sorry for the trouble getting that to work.

  • I'll open an issue to better log that as a bad configuration
  • for future reference, the wireshark 'decode as' protocol to use is 'RPC', which does successfully decode the dump you provided above

from go-nfs.

DUOLabs333 avatar DUOLabs333 commented on July 21, 2024

I don't see 'RPC' (or ONC-RPC) in the list of available protocols.

from go-nfs.

DUOLabs333 avatar DUOLabs333 commented on July 21, 2024

Ah, I figured it out --- RPC is in the Current section.

from go-nfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.