MarketSquare / MarketSquare/SSHLibrary

Login With Public Key timeouts when opening more that 3 different connections

Open
#422 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
167
Forks
145
PR merge metrics
No merged PRs in 30d

Description

Hi,

- robotframework 6.0.1
- python 3.11
- robotframework-sshlibrary 3.8.0
- linux

I am trying to setup my test suite to test 16 similar devices using SSH. But I get an error when trying to open the 4 connection: `TimeoutError: timed out`

Here is the an example of my code.
```
*** Settings ***
Documentation Demo

Library SSHLibrary
Suite Setup Open All Connections ${devices}
Suite Teardown Close All Connections

*** Keywords ***
Open Connection And Log In
[Arguments] ${HOST} ${ALIAS}
Open Connection ${HOST} alias=${ALIAS}
Login With Public Key ${USERNAME} ${ssh_keyfile}

Open All Connections
[Arguments] ${TESTS}
FOR ${test} IN @{TESTS}
Open Connection And Log In ${test}[host] ${test}[id]
END
```

Detailed error for the robotframework log:
```
# ERROR
SSHLibrary . Login With Public Key ${USERNAME}, ${ssh_keyfile}
Documentation:
Logs into the SSH server using key-based authentication.

Start / End / Elapsed: 20221124 16:06:51.363 / 20221124 16:06:54.372 / 00:00:03.009
16:06:51.363 INFO Logging into '192.168.2.205:22' as 'test'.
16:06:54.367 FAIL TimeoutError: timed out
```

- I tried to change the order of the devices but it's still timeouts.
- I tried changing the default timeout `Set Default Configuration timeout=5 minutes` but it hangs also and it just takes longer to timeout. it's always the connection number 4 that fails.

I changed the code to open and close every connection directly in the test case:
```
Verify Demo
FOR ${test} IN @{TEST}
Open Connection And Log In ${test}[host] ${test}[id]
Verify Demo
Close Connection
END
```
Still fails at the 4 connection.

However there is no issue if I try to open 6 times the same IP.

Thanks for your help.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reported Robot Framework flow in `Open Connection And Log In`, especially `Open Connection` followed by `Login With Public Key`, and reproduce it with four different device IPs. Compare it with opening six connections to the same IP; done means the fourth distinct connection no longer times out, or the limitation and required configuration are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.