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

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

Highlighted
Level 3

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.

 

1 REPLY

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

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