-
Notifications
You must be signed in to change notification settings - Fork 214
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
failed to call nfs_mount using the qt program (compilation kit qt5.15.2 msvc2019 64 bit) on window #511
Comments
The error message for tracking RPC is: Read from socket(1120) failed, errno:10057 (Unknown error). Closing socket. |
I added this sentence to the above code snippet: nfs_set_mountport(nfs, 2049); After returning a -14 status code, the breakpoint was traced and entered into the rpc_process_deply interface implemented in pdu. c at the following location: case PROG_UNAVAIL: |
Collect a network trace with wireshark. Generally, PROG_UNAVAIL means that either NFS or Portmapper is not configured/running on the server. Run "rpcinfo" on the server. It should list a whole bunch of program such as: |
The result of running the 'rpcinfo' command is as follows: It seems to have NFS or Portmapper configured/running. |
Ok. Collect a network trace with wireshark when you try to mount the share and I can have a look. |
seeing the same issue with v6, but only on Windows. Android and macOS were confirmed to work correctly. Issue observed in Kodi, see the link just above this comment. To be precise: with v5.0.2 all's fine, with v6.0.2 the issue is reproducible, |
@sahlberg here you go. NFS server is at 192.168.1.100 |
OK.This is the collected network tracking file: |
OK.My code is written like this, can you help me analyze where the problem occurred?
}` |
Get rid of this : |
why does the issue manifest only on Windows but not on macOS / Android? |
as far as I can see, in Kodi the only windows-specific code is a few defines that are used here: https://github.com/xbmc/xbmc/blob/e7e6ee63bf222e4a5896598d5520dd509dbaef1d/xbmc/filesystem/NFSFile.cpp#L947
the defines are: https://github.com/xbmc/xbmc/blob/e7e6ee63bf222e4a5896598d5520dd509dbaef1d/xbmc/filesystem/NFSFile.cpp#L35-L40
and there's no |
Indeed, everything was normal in v5.0.2, but in v6.0.2, this issue is reproducible |
So, I can't compile on windows and visual studio online must be the most clunky and insane development environment ever created. May god have mercy on people forced to use it :-) So, unless we get someone that can actually build and debug on windows we will have to do it the hard way :-( Please test the debug-511 branch. It will print a bunch of lines of what is happening in rpc_service() which is where all the socket stuff happens. |
Hello! After successfully calling nfs_mount, can I create a symbolic link in a certain path on my computer, such as D:/home? If possible, in the future, when using the program to read files, I can directly read files through the path, because I do not have relevant user experience. Can you guide me on how to use it? |
no, you can not have a link to D:\..in nfs.
Windows does not have soft-links in the same sense as unix has. In
posix, links are evaluated on the client-side which does not map that
well to windows where their "links" are evaluated on the server side.
So if you had a link from "somewhere" to D:\foo, then "D:\foo" is
would be passed to the nfs client which would have no idea what D:
even is and thus can not follow the link.
Don;t use links or reparse points with nfs.
does nfs_mount() work for you now?
If not, run your test program with the debug-511 branch of libnfs.
Send me all the output it prints to the terminal window and also a
wiresharp pcap network trace when you do it and I can have a look.
…On Tue, 14 Jan 2025 at 21:51, JieBinCao ***@***.***> wrote:
as far as I can see, in Kodi the only windows-specific code is a few defines that are used here: https://github.com/xbmc/xbmc/blob/e7e6ee63bf222e4a5896598d5520dd509dbaef1d/xbmc/filesystem/NFSFile.cpp#L947
ret = nfs_creat(m_pNfsContext, filename.c_str(), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, &m_pFileHandle);
the defines are: https://github.com/xbmc/xbmc/blob/e7e6ee63bf222e4a5896598d5520dd509dbaef1d/xbmc/filesystem/NFSFile.cpp#L35-L40
#define S_IRGRP 0
#define S_IROTH 0
#define S_IWUSR _S_IWRITE
#define S_IRUSR _S_IREAD
and there's no callnfs_set_mountport
Hello! After successfully calling nfs_mount, can I create a symbolic link in a certain path on my computer, such as D:/home? If possible, in the future, when using the program to read files, I can directly read files through the path, because I do not have relevant user experience. Can you guide me on how to use it?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thank you, I can use nfs_mount version 5.0.2 now, but it won't work in later versions |
new input from xbmc/xbmc#26262
|
@sahlberg I've modified nfsclient-async example to point to my server, here's the output with library built from that debug branch:
|
and this is nfsclient-sync:
|
|
oops, I forgot about wireshark dump. Here it is for nfsclient-sync run: |
and here're results of running nfsclient-sync on macOS: nfsclient-sync-macos.pcapng.gz
|
I failed to call nfs_mount using the qt program (compilation kit qt5.15.2 msvc2019 64 bit) on window, with a status code of -5 and error message: nfs_service failed, How to solve the problem that both ends of the network can be pinged? The RPC information of my Linux server is as follows:
program vers proto port service
100000 4 tcp 111
100000 3 tcp 111
100000 2 tcp 111
100000 4 udp 111
100000 3 udp 111
100000 2 udp 111
100024 1 udp 42449
100024 1 tcp 50421
100003 3 tcp 2049
100021 1 udp 36680
100021 3 udp 36680
100021 4 udp 36680
100021 1 tcp 33051
100021 3 tcp 33051
100021 4 tcp 33051
100005 1 udp 35199
100005 1 tcp 58483
100005 2 udp 50381
100005 2 tcp 35065
100005 3 udp 56087
100005 3 tcp 42365
My code snippet is as follows:
WSADATA wsaData;
#ifdef WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != 0) {
printf("Failed to start Winsock2\n");
return;
}
#endif
struct nfs_context *nfs = NULL;
struct nfsfh *nfsfh = NULL;
struct nfs_url *url = NULL;
struct nfsdir *nfsdir;
nfs = nfs_init_context();
if (nfs == NULL) {
printf("failed to init context\n");
return;
}
nfs_set_version(nfs, 3);
QString fp = "nfs://192.168.xxx.xxx/home/user/";
url = nfs_parse_url_full(nfs, fp.toStdString().c_str());
if (url == NULL) {
fprintf(stderr, "%s\n", nfs_get_error(nfs));
return;
}
int ret = nfs_mount(nfs, url->server, url->path);
if ( ret != 0) {
fprintf(stderr,"return ret: %d \n\r",ret);
fprintf(stderr, "Failed to mount nfs share : %s\n", nfs_get_error(nfs));
return;
}
The text was updated successfully, but these errors were encountered: