1
votes

I have a Java application which has been Docusigning away nicely until it broke sometime last week (might have been anytime in the last couple of weeks) .

Nothing has changed on my side, so I suspect some change on the Docusign front.

The symptoms are very puzzling and are as follows :

Sign-in with OAuth works fine up to the stage when it attempts to get the access token, at which point it hangs until it times out. The initial phases (log in, call callback with generated oauth code which then calls the getAccesCode component ) work fine, and here's the kicker - if I plug the exact values from the hanging getAccessToken call into curl and execute it from the same server, it works fine.

Here are the details of the hanging call :

 getAccessToken request location='https://account-d.docusign.com/oauth/token'
getAccessToken request body=grant_type=authorization_code&code=<many characters>'
getAccessToken Request header  : Authorization:Basic Y2E1ZWM3N2UtMGQ4 + MORE

So it is definitely something to do with the Java libraries, however it is not possible to get a debug trace of the OAuth part on the Docusing server (although I know you can trace the actual API calls by enabling the Docusign logs it does not appear to trace the oauth steps )

What is puzzling is that it was working fine for months. And now works fine with curl, but just hangs in Java. I suspected SSL , but if that were the case why do the initial steps work ?

This is the Java stacktrace , interestingly does not always get dumped (but the hang always happens)

 java.net.SocketException: Connection timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:152)
    at java.net.SocketInputStream.read(SocketInputStream.java:122)
    at sun.security.ssl.InputRecord.readFully(InputRecord.java:442)
    at sun.security.ssl.InputRecord.read(InputRecord.java:480)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927)
    at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:884)
    at sun.security.ssl.AppInputStream.read(AppInputStream.java:102)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:658)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
    at org.apache.oltu.oauth2.client.URLConnectionClient.execute(URLConnectionClient.java:98)

As mentioned , running curl against https://account-d.docusign.com/oauth/token with parameters grant_type=authorization_code and the generated code=blah with the appropriate auth header works fine, returning the correct json response.

Any ideas anyone ? How can I trace the Docusign side to find out why it is hanging ? What has changed of late ? New SSL certs ? I'm stumped.

1

1 Answers

2
votes

Per Amit and DS Support, DocuSign has ended support for TLS1.0 in Demo from May 29th, 2018 and will soon end the support in PROD as well. Please test the connection on your end if you are using TLS1.0, if yes then you need to upgrade it to TLS1.1+ to again start using DS APIs. I am assuming if you have not done any code changes then this is the issue which you are seeing in your application.