question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Host not responding error with https (same host works with http)

See original GitHub issue

Hi,

I am trying to use this library for automating the tests of our rest api.

It works well for http requests. But when I try to use https (unverified, self-signed certificates), I run into the following issue:

group Retrieval Test Case :: Gets the list of grou... 
Server: foo.com
...
Session created with foo.com
[ WARN ] host=foo.com uri: /mycontext not responding, Retrying in 0.93 seconds ...
[ WARN ] host=foo.com uri: /mycontext not responding, Retrying in 1.87 seconds ...
[ WARN ] host=foo.com uri: /mycontext not responding, Retrying in 4.33 seconds ...
[ ERROR ] host=foo.com uri: /mycontext not responding, Max. Retries reached quitting !!!
group Retrieval Test Case :: Gets the list of grou... <path>/ssl_.py:307: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  warnings.warn(
<path>ssl_.py:114: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  warnings.warn(
...
...
group Retrieval Test Case :: Gets the list of grou... | FAIL |
RetryException: host=foo.com uri: /mycontext not responding

The following is my test case:

*** Settings ***
Documentation     Test Suite
Library           OperatingSystem
Library           String
Library           RequestsLibrary
Library           Collections         
Resource          variables.txt

*** Test Cases ***

group Retrieval Test Case
    [Documentation]                         Gets the list of groups in the system
    [Tags]                                  SAMPLE
    Log To Console                          \nServer: foo.com
    ${auth}=                                Create List  user   password
    Create Session                          fooAlias        https://foo.com      auth=${auth}       verify=False    debug=1
    Log To Console                          \nSession created with foo.com
    ${resp}=                                Get Request       fooAlias         /mycontext
    Should Be Equal As Strings              ${resp.status_code}    200

To troubleshoot, I tried to manually run the “create_session” method and “get_request” method with appropriate arguments in the python interpreter and there I get a 200 response.

Could you please help identify what’s going wrong here?

Thanks

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:20 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
bulkancommented, May 18, 2016
0reactions
ramzgcommented, May 18, 2016

@bulkan Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Host not responding error with https (same host works with http)
Hi, I am trying to use this library for automating the tests of our rest api. It works well for http requests. But...
Read more >
error "host not responding" SCVMM in for cluster host - TechNet
we have hyper-v cluster in VMM ,It was working fine but now from some days it showing "host not responding " for only...
Read more >
HTTPS hostname doesnt work but HTTPS over IP is ok
HTTPS, like all TCP/IP based protocols using host names, works by looking up the host name and then connecting to the IP, so...
Read more >
Why is SSL/HTTPS not working on my site? - Support | one.com
There can be several reasons why SSL/HTTPS is not working on your site. Please see if one of the causes listed below helps...
Read more >
Troubleshooting an ESXi host in a "not responding" state ...
Unable to access the specified host, either it doesn't exist, the server software is not responding, or there is a network problem
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found