-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Remote library fails to connect in some scenarios #3300
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
Comments
This sounds pretty strange. Some questions related to the problem below:
|
Hi @pekkaklarck,
Always, and so far it's reproducible on all machines I've tried. I don't know if the example worked in the past.
I'm not quite certain why it doesn't work as it is, but I'm inclined to think that something leaves the It could well be the case that the mistake is in the example (but I couldn't figure out where), which is why I wanted to run this change by the Robot Framework maintainers, to see if my change is a red herring covering up the root cause instead of addressing it.
Sure, let's discuss this in the PR. |
The PR #3299 looks great. It would be great to know why the fix is needed but investigating it can be a somewhat big task. The main reason I'd like to understand this is that I'm slightly worried does the change affect performance. We recently got #3362 about performance issues with the Remote library and making performance worse is definitely not a good idea. I think I'll test the performance locally before merging the PR. |
I tested PR #3300 locally and found no performance problems. It has now been merged. Thanks @TChatzigiannakis! |
Hi, For instance, for .NET Remote Libraries, it is possible that the XMLRPC is sitting on top the standard .NET Microsoft remoting channel (HttpChannel), that takes something like ~1 seconds to open and validate a new HTTP connection (not sure what cause such huge delay... perhaps to prevent DDOS attacks? or because it is obsolete technology?). With this #3300 change, simply loading a remote library from .NET will now takes roughly 1+1+1 seconds for each keyword to load. Such 3 seconds are due to the three operations Without this fix (e.g. RF 3.1) loading the same library was super-fast, since all the calls was going on the same context. Would it be possible to refine the current fix, and at least register the whole library using the same context? Thanks, L |
Update: the performance degradation is due to a slow DNS resolution of 'localhost' to 127.0.0.1 used to connect the Remote library. If you are affected by this issue, the address resolution of localhost takes approx 1 second. Now, using robotframework 3.1 we never noticed it, but the OS issue was still there. The fix #3300 that closes and reopen the xmlrpc channel for each and every function is letting this issue to surface, with the effect of super-slow library load when using localhost. Given that the xmlrpc is a protocol that natively supports multi-part requests (HTTP streams), this fix is essentially degrading performances at startup. |
Hello,
I tried to run this example with Robot Framework but ran into some issues. To reproduce what I'm about to describe:
npm install
in the base directorynode webdriver-manager update
innode_modules\webdriver-manager\bin
npm run start
in the base directorynpm run robotremote
in the base directorynpm run re2e
in the base directoryYou should get errors like the following:
I've tried to debug this issue and the source seems to be that a
Transport
object is shared between method calls in theXmlRpcRemoteClient
class in Remote.py. I've attempted a change to have a newTransport
andServerProxy
object every time, which seems to resolve the issue:I'd like to hear your thoughts on whether this is a good approach, or if there are good reasons to keep the
Transport
andServerProxy
objects alive along with theXmlRpcRemoteClient
. (If the latter is the case, it would be very appreciated if you could point me to a workaround to get the example working.)The text was updated successfully, but these errors were encountered: