LRE request timed out in Azure devOps

Viewed 57

I am using Azure self hosted agent to authenticate into LRE but getting timed out : please note that : I have been able to ping and telnet to same host for port 80 successfully and not using any proxy , also getting valid XML response with same URL in chrome browser and with SOAP UI (200)

Request :

    import requests
    import xml
    import xml.etree.ElementTree as ET
    from bs4 import BeautifulSoup
    import schedule
    import time
    from lxml import etree as ETN
    import zipfile
    ##import win32com.client as win32
    import openpyxl
    import configparser
    import http.client, urllib.parse
    import json

##Defining Host
URL='http://xxx.xx.xx.x
Host='xxx.xx.xx.x'
print(Host)
print(URL)
##Login to PC API
Auth='/LoadTest/rest/authentication-point/authenticate'
AuthURL=URL+Auth
print(AuthURL)



Authheaders = {

        'Connection': 'keep-alive',
        'Authorization': 'Basic XXXXXXXXXXXXXXXXXX',
        'Host':'xxx.xx.xx.x'
}
print(Authheaders)

try:
     Authresponse=requests.get('http://xxx.xx.xx.x:80/LoadTest/rest/authentication-point/authenticate', timeout=10)

except requests.exceptions.HTTPError as errh:
    print(errh)
except requests.exceptions.ConnectionError as errc:
    print(errc)
except requests.exceptions.Timeout as errt:
    print(errt)
except requests.exceptions.RequestException as err:
    print(err)

This is the error that I am getting :

HTTPConnectionPool(host='xxx.xx.xx.x', port=80): Max retries exceeded with url: /LoadTest/rest/authentication-point/authenticate (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x00000291D4THDC48>, 'Connection to xxx.xx.xx.x timed out. (connect timeout=10)'))

0 Answers
Related