cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

java.net.SocketException caused by connecting to an HTTPS Endpoint.

pmessina
1-Newbie

java.net.SocketException caused by connecting to an HTTPS Endpoint.

I am developing a service in a thing that sends data to a 3rd Party rest endpoint through https.  And I get this error: 

Wrapped java.net.SocketException: Connection reset Cause: Connection reset

 

Here's the javascript for the service below:

 

var url = "https://{url} /{endpoint}";

var content = {
on: true
};

var header = {
Authorization: "Token {key}"
};

 

 

var params = {
headers: header /* JSON */,
url: url /* STRING */,
ignoreSSLErrors: true,
content: content, /* JSON */
};

 

var result = Resources["ContentLoaderFunctions"].GetJSON(params);

 

Any ideas to how this can be solved is appreciated.  Is it possible that Thingworx is ignoring the ignoreSSLErrors flag?  Thanks.

 

2 REPLIES 2
pgrodowski
13-Aquamarine
(To:pmessina)

Hello,

 

The error appears to be higher level then just a generic SSL error.

The connection is terminated, depending on how it's implemented you could try and catch the exception yourself and discard it, you'd have to check explicitly for this exception though if you want to do this, otherwise other exceptions are discarded also.

 

Is the data successfully send though?

 

Regards,

Pascal

mgoel
17-Peridot
(To:pgrodowski)

Hi @pmessina

 

Hope you are doing good. Could you please confirm if the issue has been resolved.

 

If yes, please mark the answer as accept as solution for the future reference. Thank you in advance.

Regards-Mohit Goel

Top Tags