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

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

Open
Austriker opened this issue Nov 24, 2022 · 3 comments

Comments

@Austriker
Copy link

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.

@Austriker
Copy link
Author

I solved the issue by downgrading to python 3.8

@95rade
Copy link

95rade commented Nov 24, 2022 via email

@arzieg
Copy link

arzieg commented Jun 29, 2023

Hi @Austriker , i tried to reproduce the problem, but in my configuration it works. I could open >4 simultaneous connection to different hosts.

Environment:
robotframework 6.0.1
robotframework-sshlibrary 3.8.0
paramiko 3.2.0
python 3.11.3
Linux: sles12.5
Which python 3.11.x version did you use?

regards arne

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

No branches or pull requests

3 participants