Comments (14)
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.
Is it possible to see all errors of the server that may point to why a particular command fails?
from go-nfs.
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.
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.
Does the library look at the Sys() method when listing files?
from go-nfs.
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.
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.
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.
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.
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.
Got it to work --- for CachingHandler, I needed to use 1024
instead of 1
.
from go-nfs.
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.
I don't see 'RPC' (or ONC-RPC) in the list of available protocols.
from go-nfs.
Ah, I figured it out --- RPC
is in the Current
section.
from go-nfs.
Related Issues (20)
- There are still places where FileID zero is returned, which confuses linux HOT 9
- Still getting stale file handle issues: see #100 HOT 3
- `onRename` errors out with "comparing uncomparable type" HOT 4
- if `fs.Remove` fails with `non-empty directory`, the server should forward that. HOT 1
- Incorrect handling of an open file's `Name()` HOT 1
- If `Read` is above a certain size, it will return nothing HOT 1
- onReadDirPlus with small cache yields no results, but no error HOT 2
- Some Write calls leads to data loss HOT 30
- A git clone will lead to the server displaying files with corrupted permissions HOT 9
- Unnecessary error messages for non-errors HOT 8
- make `onlookup` use stat rather than readdir HOT 1
- Can't load multiple libraries exposed through server HOT 15
- This package now requires go1.21 HOT 1
- tagged releases
- fs.Stat is called when fs.Lstat should be called HOT 5
- support backing systems without exposed fileids
- Sockets don't work through mount HOT 11
- "Illegal instruction" when trying to run `su user` in chroot in mount HOT 29
- `flock` hangs HOT 3
- GETATTR does not set fhandle in returned struct HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-nfs.