Anaplan SSL wrong version number issue in Import action

Options
rahulnair
rahulnair Member, ALL USERS, Community Member Posts: 5 Occasional Contributor

Hello Team,

 

I have Pyhton code that connects to Anaplan using API 2.0 and import data.I am using proxy server to connect. This was working fine until yesterday we found below error from my application. 

 

Error occurred:- Exception method name:- auth_request exception details:- HTTPSConnectionPool(host='auth.anaplan.com', port=443): Max retries exceeded with url: /token/authenticate (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1122)')))

 

Let me know if you need more details.

Comments

  • rahulnair
    rahulnair Member, ALL USERS, Community Member Posts: 5 Occasional Contributor

    Thanks @DaanishSoomar for the reply  

    Please find below code, As I mention earlier my program was working until yesterday now authenticate itself is not working. 

     

    def auth_request(header, body):
    '''
    :param header: Authorization type, CACertificate or Basic
    :param body: POST request body: encodedData (150-character nonce), encodedSignedData (encodedData value signed by private key)
    '''
    try:
    anaplan_url='https://auth.anaplan.com/token/authenticate'

    if body == None:
    r=requests.post(anaplan_url, headers=header,proxies= "http://proxyserver:8080")
    else:
    r=requests.post(anaplan_url, headers=header, data=json.dumps(body),proxies= "http://proxyserver:8080")
    #Return the JSON array containing the authentication response, including AnaplanAuthToken
    return r.text
    except Exception as e:
    configs.LogException("auth_request",e)

     

    When I use http://proxyserver:8080 proxy I get following error

    Error occurred:- Exception method name:- auth_request exception details:- HTTPSConnectionPool(host='auth.anaplan.com', port=443): Max retries exceeded with url: /token/authenticate (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_ACCESS_DENIED] tlsv1 alert access denied (_ssl.c:1122)')))

     

    When use https://proxyserver:8080 proxy I get following error

    Error occurred:- Exception method name:- getTokenCACErt exception details:- HTTPSConnectionPool(host='auth.anaplan.com', port=443): Max retries exceeded with url: /token/authenticate (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1122)')))

     

     

  • rahulnair
    rahulnair Member, ALL USERS, Community Member Posts: 5 Occasional Contributor

    Thanks @riyazpasha @ben_speight  for the reply. 

     

    Yes, it was proxy issue. Providing resolution for this if anyone encounters in future.

    Instead of https, http in proxy json value worked for me.

     

    "https" : "http://servername:8080"