Search method fails occasionally. - WeOnlyDo Discussion board

Search method fails occasionally. (wodVPN)

by buruss, Tuesday, December 23, 2014, 14:27 (3623 days ago)

Hi.

I created a vpn client/server project.
There's one vpn client and several vpn servers.

A vpn client connects to a vpn server at a time and processes some tasks and disconnects.
The vpn client does this job through each vpn server in turns.

The problem is that sometimes wodVPN.search method fails with timeout error after 10 seconds elapsed in "Linking" state.
I've tried both SrchUDPSingle and SrchUDPDouble option, but got the same result.

After terminating all client/server processes, and re-run them, same problem occurs after about 5 to 10 turns.
But sometimes occurs at very first turn. So this is quite random situation, nothing's regular.
Also not specific to certain peers.

Hmm, what should I do to fix this problem? Is there any suggestion?

Thank you.

Search method fails occasionally.

by wodSupport, Wednesday, December 24, 2014, 00:41 (3623 days ago) @ buruss

Hi.

This is normal for Search sometimes to fail. One of the reasons is that you're using same Name/ID when re-sending new search, with new instance of wodVPN. Mediator needs 15 seconds to "forget" about you and your location. If you don't wait that long and try again with new name, remote side will receive old information, from previous instance, and thus it will be unable to connect there anymore.

After SearchDone completes, it is also possible for Link to fail, if it's unable to penetrate firewalls using UDP hole punching technique, or with direct connection.

So, make longer retry waits, that will help for Search.

Kreso