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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Connection to Thingworx Failed - Could not establish a secure socket connection

hughesi
4-Participant

Connection to Thingworx Failed - Could not establish a secure socket connection

I'm unable to create a connection between KepServerEX V6.7 and Thingworx v8.5, both running locally on the same machine.

 

I have tried the recommended troubleshooting to no avail:

1.Verify that the host, port, resource, and application key are all valid and correct. Confirmed.

2.Verify that the host machine can reach the Composer on the ThingWorx Platform. Confirmed.

3.Verify that the proper certificate settings are enabled if using a self- signed certificate or no encryption. Confirmed.

 

The KepServer logs give me the following error: TW SSL_VERSION: Error tls runtime version: OpenSSL 1.0.2s-1 28 May 2019, does not match compiled version: OpenSSL 1.0.2j-3 26 Sep 2016

 

For background, I am using the 'org.apache.coyote.http11.Http11AprProtocol' protocol.

ACCEPTED SOLUTION

Accepted Solutions
slangley
23-Emerald II
(To:hughesi)

Hi @hughesi.

 

From the notes in the case, it appears the issue was solved by making the following config changes in Kepware:

 

  • Trust All Certificates set to true
  • Disable Encryption set to false
  • Connect to port 8443

 

If you agree that this was the correct solution, please mark this post as the Accepted Solution for the benefit of others with the same issue.

 

Regards.

 

--Sharon

View solution in original post

6 REPLIES 6
Velkumar
19-Tanzanite
(To:hughesi)

Hi @hughesi ,

 

Have you tired with disabling 'Trust self-signed certificates' and 'Trust all Certificates'.

 

/VR

hughesi
4-Participant
(To:Velkumar)

@Velkumar unfortunately that gives the same error in KepServer:

 

TW_SSL_VERSION: Error tls runtime version: OpenSSL 1.0.2s-1  28 May 2019, does not match compiled version: OpenSSL 1.0.2j-3  26 Sep 2016

hughesi
4-Participant
(To:hughesi)

I upgraded KepServerEX from Version 6.7.1046 to V6.8.796 and the OpenSSL error is no longer showing, but it still won't connect.


[WARN] 2020-03-03 15:23:32,125 SDK Version: 2.2.7
[WARN] 2020-03-03 15:23:32,125 TLS Library: OpenSSL
[WARN] 2020-03-03 15:23:32,125 TLS Library Version: 1.1.1d-1
[ERROR] 2020-03-03 15:23:33,161 Error intializing socket connection.  Err = 10061
[ERROR] 2020-03-03 15:23:33,161 twWs_Connect: Error restarting socket.  Error 0
[ERROR] 2020-03-03 15:23:33,161 twApi_Connect: Max number of connect retries: 1, has been reached
Connection to ThingWorx failed. | Platform = localhost:80/Thingworx/WS, error = could not initialize a secure socket connection.
[ERROR] 2020-03-03 15:23:33,161 twMessage_Send: Error sending Message with RequestId 1026
[WARN] 2020-03-03 15:23:33,161 sendCtlFrame: Not connected
[WARN] 2020-03-03 15:23:33,161 msgHandlerOnClose: WEBSOCKET CLOSED
[ERROR] 2020-03-03 15:23:35,316 Error intializing socket connection.  Err = 10061
[ERROR] 2020-03-03 15:23:35,316 twWs_Connect: Error restarting socket.  Error 0
[ERROR] 2020-03-03 15:23:35,628 twApi_Connect: Max number of connect retries: 1, has been reached

slangley
23-Emerald II
(To:hughesi)

Hi @hughesi.

 

It's recommended that a case be opened for this issue so we can take a closer look at things.  With your approval, I will be happy to open the case on your behalf.

 

Regards.

 

--Sharon

 

 

hughesi
4-Participant
(To:slangley)

Hello @slangley,

 

Absolutely, let's create a case for this.

slangley
23-Emerald II
(To:hughesi)

Hi @hughesi.

 

From the notes in the case, it appears the issue was solved by making the following config changes in Kepware:

 

  • Trust All Certificates set to true
  • Disable Encryption set to false
  • Connect to port 8443

 

If you agree that this was the correct solution, please mark this post as the Accepted Solution for the benefit of others with the same issue.

 

Regards.

 

--Sharon

Announcements


Top Tags