Open aszx826477 opened 2 months ago
Hi, i had the same problem so i dove into the issue. The problem is an incomplete handling of the rpc answer. If the rpc request gets a MSG_DENIED error the reply is shorter than usual, so the unpacking fails. As i don't think this repo is maintained anymore (the last commit is over 5 years ago) i patched it myself: https://github.com/Pennyw0rth/NfsClient
Dear CharmingYang, I meet a problem while using your NfsClient library. Could you help me to see this problem. I use your sample code like this. When it getport from 10.232.94.126, it can get the correct port 635 from the NFS server (I print it)
However when running the mount
the RPC cannot unpack data correctly, it seems the data format is wrong but I don't know why.
Looking forward for your reply!
The Code written like this:
[2024-09-05 04:43:42 mnt_port] [2024-09-05 04:43:42 635] [2024-09-05 04:43:42 rpc.request:125 - unpack requires a buffer of 24 bytesTraceback (most recent call last): File "pyNfsClient/rpc.py", line 117, in request ) = struct.unpack('!LLLLLL', rpc)struct.error: unpack requires a buffer of 24 bytes] [2024-09-05 04:43:42 'value=1725511422 not in enum mountstat3': Traceback (most recent call last):; File: "index.py", line 31, in handler; mnt_res = mount.mnt(mount_path, None); File: "pyNfsClient/mount.py", line 38, in mnt; res = unpacker.unpack_mountres3(); File: "pyNfsClient/pack.py", line 1728, in unpack_mountres3; data.status = self.unpack_mountstat3(); File: "pyNfsClient/pack.py", line 1717, in unpack_mountstat3; raise XDRError('value=%s not in enum mountstat3' % data); xdrlib.Error: value=1725511422 not in enum mountstat3;]