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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Connect thingworx analytics to thingworx core

xotzHelper
11-Garnet

Connect thingworx analytics to thingworx core

Hi,

i'm trying to start a thingworx analytics docker and when it's trying to connect to thingworx core i get the error on the image. Can anyone help me please.

 

I know it's related to WS(websockets) and something is blocking the requests, but i don't know how to deactive that block. 

 

Anotação 2020-09-01 104718.png

 

Thank you.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi, thanks for the help @cmorfin .

 

What i did to make this work was disable the ufw on ubuntu and it worked. No error is reported.

 

Thank you once again.

View solution in original post

11 REPLIES 11

@xotzHelper ,

 

Thank you for posting to the PTC Community.

 

In order to assist you, I have some clarifying questions:

 

  • What version of ThingWorx Platform Server (what you called "Core)?
  • What version of ThingWorx Analytics?
  • Is this a docker deployment?
  • Is port 80 open on the ThingWorx Platform Server? I see that the connection is timing out, and Port 80 is not a standard port for ThingWorx Analytics to connect to, typically the default is 8080

Regards,

 

Neel

  1. Thingworx version 8.5
  2. Thingworx analytics version 9.0
  3. yes
  4. i using port 80 pointing to port 8080 on docker.

 

Thanks @nsampat.

@xotzHelper ,

 

Part of the issue you may be experiencing is a mis-match in version.

 

ThingWorx Analytics 9.0 requires ThingWorx Platform Server 9.0

 

Please either use Thingworx Analytics 8.5.1 or newer (up to TWA 8.5.7) with ThingWorx Platform Server 8.5, or update your ThingWorx Platform Server to 9.0 to use ThingWorx Analytics 9.0.

 

Information about compatibility can be found here: https://support.ptc.com/help/thingworx/analytics/r9/en/#page/analytics%2Fcompatibility%2Fthingworxanalytics_compatibility_8_5_later.html%23wwID0EMLQQ

 

Regards,

 

Neel

Tested with thingworx foundation 9.0 and thingworx analytics 9.0 resulted in the same error.

Anotação 2020-09-01 161908.png

@xotzHelper ,

 

Some additional items:

 

  • Did you restart ThingWorx Analytics Server 9.0 after changing the endpoint configuration for the ThingWorx Platform Server 9.0 in system-environment-variables.properties ?
  • Is the Application Key assigned to ThingWorx Analytics Server 9.0 active, not expired, and provided administrator access?
  • Is your ThingWorx Platform Server Trial Edition or a commercial license?
  • Is you ThingWorx Analytics Server Trial Edition or a commercial install?
  • Are you able to attach the TWA 9.0 twas-twx-adapter.log found in /<PATH/ThingWorxAnalytics/ThingWorxAnalyticsServer/data/logs ?

 

Regards,

 

Neel

Hi.

 

  • yes,
  • AppKey is valid,
  • Everything is commercial,
  • i attached the logs.

Thank you @nsampat. I was following the thingworx docker tutorial.

@xotzHelper ,

 

Unfortunately, I am not familiar with the ThingWorx Docker Tutorial you have mentioned. Are you able to provide a link to what you are referring to?

 

Regarding your issue, can you verify that all the required ports are opened, and that the two containers are able to see each other?

 

https://docs.docker.com/engine/reference/commandline/port/

 

The error messages in the adapter.log you provided are stating that same thing,

 

ERROR c.t.c.c.e.ClientCommunicationEndpoint - Refilling connections on [endpoint 0, uri: ws://172.17.0.1:80/Thingworx/WS] failed : timeout waiting for websocket handshake to complete

 

Are you using SSL deployment for ThingWorx?

 

If there is some urgency to this discussion, please note I am based in North America UTC -4. If you desire more direct assistance, the next step would be to open a case with our support team here: https://support.ptc.com/apps/case_logger_viewer/cs/auth/ssl/log

 

Regards,

 

Neel

Hi, I don't have urgency for now.

 

I follow the tutorial inside the zip on thingworx dockerfiles -> ThingWorx-Foundation-DockerFiles-9-0-1 (6 MB)

https://support.ptc.com/appserver/auth/it/esd/product.jsp?prodFamily=TWX

 

 

I not using SSL. As i stated before seems to me that thingworx is blocking WS requests. Maybe tomcat is blocking ?

 

Thank you @nsampat 

 

@xotzHelper ,

 

My specialty is only with ThingWorx Analytics. Since you have indicated that the connection endpoint and ports are set correctly, I will have to ask for additional assistance to review what may be wrong with the connection.

 

@posipova or @slangley are you able to assist with ThingWorx Platform Server Docker deployments?

 

Regards,

 

Neel

cmorfin
19-Tanzanite
(To:nsampat)

@xotzHelper 

 

I did a test with ThingWorx 9.0 and ThingWorx Analytics 9.0 as docker and got initially the same error.
It appears this would be related to how docker interact with the firewall (at least it is in my case).

You can maybe run the following test to confirm if you have the same behaviour:

  1. make sure ThingWorx containers are up 
  2. start the ThingWorx Analytics containers with docker-compose up -d
  3. confirm that twas-adapter-ms container report the same timeout error
  4. stop the twas-adapter-ms container with docker stop twas-adapter-ms
  5. stop the firewall (sudo service firewalld stop for example on CENTOS)
  6. start the twas-adapter-container with sudo docker start twas-adapter-ms

 

At this stage it works for me: the Analytics remote thing get created after a little why in ThingWorx.

Can you confirm if that works for you too ?

 

Obviously this would not be the right operational mode but it allows to pinpoint the issue. You would need then to find the right firewall/iptable configuration.

 

Hope this helps

Christophe

Hi, thanks for the help @cmorfin .

 

What i did to make this work was disable the ufw on ubuntu and it worked. No error is reported.

 

Thank you once again.

Top Tags