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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Thingworx Native Interface error "could not establish a websocket connection"

SaranKarthick
16-Pearl

Thingworx Native Interface error "could not establish a websocket connection"

Hi Developers,

 

I'm trying to connect TWX industrial connectivity(8.3) to my composer(8.3). The composer is running in an image and the TWX industrial connectivity in my local. From my controls advisor page i got the instructions for the Thingworx properties in the kepware (PFA the instruction screenshot). The port which is configured for twx is 443 but the port in the instruction is showing blank. The property editor of Kepware is not accepting a null value for port, so i have given 443. Everything else i had done as per the instruction file.

 

Its not able to connect to my twx. 


Its giving the following error :

Connection to ThingWorx failed. | Platform = xxx.xxx.xx.xxx:443/Thingworx/WS, error = could not establish a websocket connection.

 

I had restarted the WSCommunication subsytem in TWX but still not able to get it working. 

 

Regards,

Saran

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @SaranKarthick.

 

You will need to obtain a certificate and configure your site.  You can designate the port to be used for SSL (443 is the default) in your config.

 

Please refer to these articles for more information:

 

Regards.

 

--Sharon

 

If my response has answered your question, please mark as Accepted Solution, for the benefit of others who may have the same question.

View solution in original post

9 REPLIES 9

Greetings @SaranKarthick,

 

As you mentioned that you have composer in the image and TWX industrial connectivity on the local. Can you access your ThingWorx Composer from local browser.

If yes, you need to give the same URL and port number in host and port of the Project Properties of Industrial Connectivity.

 

Thanks,

Himanshu

Hi @hchanana,

 

I am using the correct URL as mentioned in the Instructions. The port is missing in the instructions. But i had give the proper port too in the properties.

 

Regards,

Saran

 

Hi @hchanana,

 

I had changed the port to 8080 and tried. The instruction was showing the 8080 port correctly and i was able to establish the connection. Only it doesn't work with 443. Any idea where i might be going wrong.

 

Regards,

Saran 

Hi @SaranKarthick.

 

You will need to obtain a certificate and configure your site.  You can designate the port to be used for SSL (443 is the default) in your config.

 

Please refer to these articles for more information:

 

Regards.

 

--Sharon

 

If my response has answered your question, please mark as Accepted Solution, for the benefit of others who may have the same question.

Hi @slangley,

 

I had followed the Article - CS231610 and created the .keystore file and certreq.csr file. 

keytool -import -alias root -keystore <keystore> -trustcacerts -file <chainFile>

 

In the above command mentioned in the article i could not figure out what "chainFile" is. There is no mention of it in the TWX installation guide also.

 

Regards,

Saran

Hi @SaranKarthick.

 

Have you received your certificate yet?  Once you do, you should also be provided with a link to download the root and intermediate certificates in the chain.

 

Please let me know if this failed to answer your question.

 

Regards.

 

--Sharon

Hi @slangley,

 

We're working on a POC we still haven't got a certificate from CA. But is this the reason the port in not showing up in the Instruction page. (I have attached the instruction screenshot in my first comment)

 

Regards,

Saran

 

 

Hi @SaranKarthick.

 

SSL by definition requires a certificate, so the port designated for SSL will not function without it.

 

Ports are defined in server.xml located in {Tomcat_home}\conf.  The section for the SSL port is commented out by default so you would need to uncomment that section and configure your certificate/keystore per the instructions previously provided.

 

Regards.

 

--Sharon

Hi @slangley,

 

I had configured the server.xml file for the port of 443 and have done the keystore part. I haven't made it secure through the certificate. Since this is a POC project we'll use 8080 for now and once we move into production I'll follow the steps in the article. Thanks for your consistent help.

 

Regards,

Saran

Top Tags