Rally host is non-existent or unreachable via pyral

2024/10/12 10:28:09

I am trying to call rally server simply using below:

rally = Rally(server, user, password, workspace=workspace, project=project)

But it is giving below error:

    Traceback (most recent call last):File "testprint.py", line 20, in <module>rally = Rally(server, user=user, password=password, workspace=workspace,  project=project)File "C:\RallyRestToolkitForPython-master\pyral\restapi.py", line 259, in __init__self.contextHelper.check(self.server, wksp, proj, self.isolated_workspace)File "C:\RallyRestToolkitForPython-master\pyral\context.py", line 171, in checkuser_response = self._getUserInfo()File "C:\RallyRestToolkitForPython-master\pyral\context.py", line 276, in _getUserInforaise RallyRESTAPIError(problem)
pyral.context.RallyRESTAPIError: Target Rally host: 'rally1.rallydev.com  ' non-existent or unreachable

Since i am behind proxies, i put HTTP and HTTPS proxies in python code:

os.environ['HTTPS_PROXY'] = "PROXY:PORT"
os.environ['https_proxy'] = "PROXY:PORT"
os.environ['HTTP_PROXY'] = "PROXY:PORT"

It is now failing with below error:

Traceback (most recent call last):File "testprint.py", line 20, in <module>rally = Rally(server, user=user, password=password, workspace=workspace,  project=project)File "C:\RallyRestToolkitForPython-master\pyral\restapi.py", line 259, in __init__self.contextHelper.check(self.server, wksp, proj, self.isolated_workspace)File "C:\RallyRestToolkitForPython-master\pyral\context.py", line 171, in checkuser_response = self._getUserInfo()File "C:\RallyRestToolkitForPython-master\pyral\context.py", line 276, in _getUserInforaise RallyRESTAPIError(problem)
pyral.context.RallyRESTAPIError: 'Cannot connect to proxy.', error('Tunnel connection failed: 504 Unknown Host

My proxies are working, as i have run other code to verify.

Answer

I just had to work through this issue and it was caused by my Python installation not using TLS 1.2. You will need to ensure the version of OpenSSL that is being used by your Python support TLS 1.2.

To see the TLS version in use you can do this check:

python -c "import requests; print(requests.get('https://www.howsmyssl.com/a/check', verify=False).json()['tls_version'])"

To see which OpenSSL is in use:

python -c "import ssl; print(ssl.OPENSSL_VERSION)"

I don't have the resolution to get OpenSSL updated to the right version. I am sure you will be able to find something for your own environment.

https://en.xdnf.cn/q/118211.html

Related Q&A

Query tangled array in Pymongo

I am trying to query a very tangled collection. The schema:{tags: {variables: [{value: 3x9, var_name: s},{value: 12:00AM, var_name: x},{value: goog, var_name: y}]},url: https://www.google.com}]The Quer…

manipulating value of pandas dataframe cell based on value in previous row without iteration

I have a pandas dataframe with~3900 rows and 6 columns compiled from Google Finance . One of these columns defines a time in unix format, specifically defining a time during the trading day for a marke…

Convert ctypes code to cython

Id like to convert some ctypes code to use cython instead, but Im struggling. Essentially, the ctypes code:copies the contents (floats) of two lists into C-compatible structs sends the structs to my b…

Enable PyROOT Ubuntu 14.04

I downloaded madpgraph5, but when I run it I get the following error:ERROR: ROOT file called ROOT.py or ROOT.pyc is not foundERROR: Please check that ROOT is properly installed.When I try locate ROOT.p…

pygal on windows - cannot access classes from pygal

I have such short script:import pygal if __name__ == __main__:bar_chart = pygal.Bar()and following error: AttributeError: module object has no attribute BarDo you have any idea what is wrong? Shall I …

Parsing table for a link

Ive been able to isolate a row in a html table using Beautiful Soup in Python 2.7. Been a learning experience, but happy to get that far. Unfortunately Im a bit stuck on this next bit.I need to get t…

build matrix from blocks

I have an object which is described by two quantities, A and B (in real case they can be more than two). Objects are correlated depending on the value of A and B. In particular I know the correlation m…

How to convert string with UTC offset

I have date as In [1]: a = "Sun 10 May 2015 13:34:36 -0700"When I try to convert it using strptime, its giving error.In [3]: datetime.strptime(a, "%a %d %b %Y %H:%M:%S %Z"...: ) ---…

regex multiline not working on repeated patterns

I am trying to get a regex expression to match multiple patterns with multilines but it keeps matching everything. For instance I want to match two times this code:STDMETHOD(MyFunc)( D2D1_SIZE_U size, …

Django Rest Framework slug_field error

I have this serializer and model. I want to show in my API the field username of User model, but I receive this error.AttributeError at /api/v1/client_share_requests/1/Profile object has no attribute u…