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

poll error (Success) #479

Open
wudyw opened this issue Apr 11, 2024 · 4 comments
Open

poll error (Success) #479

wudyw opened this issue Apr 11, 2024 · 4 comments
Labels
is:bug Bug description.

Comments

@wudyw
Copy link

wudyw commented Apr 11, 2024

I created a session using libssh, but sometimes it print this log, I SET the timeout is 100ms, the timeout is too small to lead this issue?

//log

Apr 11 16:05:21 localhost mefd[1919462]: [337:04.38809] DBG MEFD.APP: (dbg_msg_callback:92) NETCONF:nc_sock_connect(10.4.2.64, 830, -1, -1)
Apr 11 16:05:21 localhost mefd[1919462]: [337:04.38809] NOTE MEFD.APP: (dbg_msg_callback:89) NETCONF:Trying to connect via IPv4 to 10.4.2.64:830.
Apr 11 16:05:21 localhost mefd[1919462]: [337:04.38810] NOTE MEFD.APP: (dbg_msg_callback:89) NETCONF:Successfully connected to 10.4.2.64:830 over IPv4.
Apr 11 16:05:22 localhost mefd[1919462]: [337:04.38856] NOTE MEFD.APP: (dbg_msg_callback:89) NETCONF:Interactive SSH authentication method was disabled.
Apr 11 16:05:22 localhost mefd[1919462]: [337:04.38856] NOTE MEFD.APP: (dbg_msg_callback:89) NETCONF:Publickey SSH authentication method was disabled.
Apr 11 16:05:22 localhost mefd[1919462]: [337:04.38856] NOTE MEFD.APP: (dbg_msg_callback:89) NETCONF:Password authentication (host "10.4.2.64", user "admin").
Apr 11 16:05:22 localhost mefd[1919462]: [337:04.39044] NOTE MEFD.APP: (dbg_msg_callback:89) NETCONF:Authentication successful.

Apr 11 16:05:24 localhost mefd[1919462]: [337:04.41821] WARNING MEFD.APP: (dbg_msg_callback:86) NETCONF:Unexpected reply without data to a <get> RPC.
Apr 11 16:05:25 localhost mefd[1919462]: [337:04.41922] ERROR MEFD.APP: (dbg_msg_callback:83) NETCONF:poll error (Success).
@wudyw
Copy link
Author

wudyw commented Apr 11, 2024

I think this issue is caused by timeout in nc_recv_reply() is too small, I modified it to 10ms, it is much easier to trigger, then I modified it to 1s, didn't see any error.
I wonder if timeout, why the ret is not NC_MSG_WOULDBLOCK /*waiting for another message timed out */, is it not timeout?

@michalvasko
Copy link
Member

What libnetconf2 version are you using? What NETCONF client and server are you using? I do not understand that from waht you wrote. And what nc_recv_reply() timeout are you talking about, can you mention the project/source file?

@michalvasko michalvasko added the is:bug Bug description. label Apr 12, 2024
@wudyw
Copy link
Author

wudyw commented May 14, 2024

What libnetconf2 version are you using? What NETCONF client and server are you using? I do not understand that from waht you wrote. And what nc_recv_reply() timeout are you talking about, can you mention the project/source file?

libnetconf2 I used is 3.0.8, I just used libnetconf2 as a client, the server is Nokia router.

r = nc_recv_reply(session, rpc, msgid, 100, &envp, &op);

The time out is 100, the 4th para in nc_recv_reply

@CESNET CESNET deleted a comment from wudyw May 15, 2024
@michalvasko
Copy link
Member

michalvasko commented May 15, 2024

What libssh version are you using? Based on what you said, it seems ssh_channel_poll_timeout() is returning something it is not supposed to and there was a bug a long time ago that SSH_AGAIN was returned even though it should not have been.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:bug Bug description.
Projects
None yet
Development

No branches or pull requests

2 participants