blackducksoftware / hub-rest-api-python

HUB REST API Python bindings
Apache License 2.0
89 stars 104 forks source link

IN data bricks - SLError: HTTPSConnectionPool(host='jda.blackducksoftware.com', port=443): Max retries exceeded with url: /j_spring_security_check (Caused by SSLError(SSLError("bad handshake: SysCallError(110, 'ETIMEDOUT')"))) #183

Closed hanman2016 closed 3 years ago

hanman2016 commented 3 years ago

image

Hi ,

I am getting below error when running in azure datbricks envrironment , i provided all correct url,user and password

hub = HubInstance(urlbase, username, password, insecure=True) SLError: HTTPSConnectionPool(host='jda.blackducksoftware.com', port=443): Max retries exceeded with url: /j_spring_security_check (Caused by SSLError(SSLError("bad handshake: SysCallError(110, 'ETIMEDOUT')")))

skiyooka commented 3 years ago

Hello, this looks like a lower level SSL error which I cannot reproduce on my end. I recommend trying the following script (which gets hub-rest-api-python out of the picture). If the script does not work please open a technical support ticket with Synopsys.

import requests
from pprint import pprint

credentials = {
    'j_username': "sysadmin",
    'j_password': "PASSWORD"  # TODO: update as necessary
}

session = requests.session()

response = session.post(
    url="https://jda.blackducksoftware.com/j_spring_security_check",
    data=credentials,
    # verify=False,  # SSL certificate validation
)

if response.status_code == 204:
    print("Successfully authenticated")
else:
    print(f"Authentication failed with status code {response.status_code}")
    pprint(response)
    pprint(response.content)
OffBy0x01 commented 3 years ago

Closing as this appears to be a user/environment specific issue . Feel free to reopen if you can provide a repro.