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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Can´t create a predictive model by using sample-data Analytics 8.1

Erik25
11-Garnet

Can´t create a predictive model by using sample-data Analytics 8.1

Hi,

i can´t create a filter and don´t see any Field Values. I click on a random available field and no data is shown.

-     ThingWorx Analytics 8.1 Docker version installed.
-     Can´t find any error in the application.log or <<docker command: docker logs predictionms > C:\prediction.log>>.

Which logs are relevant for this ?

I´m also looking for better examples like the sample-data with step by step instructions for TW-Analytics 8.1.

Kind regards,

Erik Schmidt

1 ACCEPTED SOLUTION

Accepted Solutions
cmorfin
19-Tanzanite
(To:Erik25)

Hi Erik

Thank you for this.

Your API router does run on port 9800 (probably set this way by the installation because the usual port 80 is already taken), so you should not change to port 80 in the properties file.

I initially thought that you created the nginx container yourself on port 9800, so I meant to re-create it on port 80 (and have properties files in sync with that). I understand now that this has been done by the installer itself.
You can check https://www.ptc.com/en/support/article?n=CS273969 as there are indeed other settings in system-environment-variables.properties to change to reflect the port. This should help for some of the problem however it seems that the filter issue still remain ... at least in my case.

So to summarize:

- the port used in properties file mentioned in Article Viewer | PTC should match the port of the nginx container

- if you can change ThingWorx (as I guess it is the one to use port 80) from port 80 to something else and reinstall ThingWorx Analytics on port 80, that should give you better behaviour

- I am still investigating the issue with filter when the port is not 80

Thank you

Kind rgerads

Christophe

View solution in original post

11 REPLIES 11
jgreiner
12-Amethyst
(To:Erik25)

Hi Erik,

I believe the parking data that was sent with the 8.1 release may not have been updated to reflect some of the changes from 8.0 release to 8.1.

Please follow this link to Download the 8.1 sample data.

Warm Regards,

John

Erik25
11-Garnet
(To:jgreiner)

Thank you for sharing the sample_data : ).

i can also upload the data successfully, but when i create the predictive model, no field values are displayed and after saving the model, status --> failed

All docker services running.

I found the following error in the trainingms container log:

I thing there is a connection problem between the dockersystem with microservices and ThingWorxCore ?

cmorfin
19-Tanzanite
(To:Erik25)

Hi Erik

For the original question on filters I have done a quick test and it worked for me with parking data.

It looks more like a browser issue, so you may want to try with a different browser and/or enable the browser debug mode to check for errors there.

Also you may want to try the following:

- add a name for the filter before selecting the feature

- create the filter from the Data menu instead of Model, select parking and View > Filter

Regarding the error you get when creating a model, could you give the following info:

- on what OS version is ThingWorx Analytics installed ?

- can you attach ps.log file created by the command docker ps -a > ps.log

- can you attache nginx.log created by command docker logs nginx > nginx.log

Hope this helps

Kind regards

Christophe

Erik25
11-Garnet
(To:cmorfin)

Hi Christophe,

thank you for your extensive response !

OS: Win 10 Pro

Logfiles ps and nginx attached

I tested the following situations without success

  • load parking data
  • Browser 61.0.3163.100 and Firefox 56.0
  • add a name for the filter before selecting the feature
  • create the filter in a different way
  • debug mode

    • Timeouts...
    • Interesting other failure in other logs
      • Datathing are not connected!
        • Currently i waiting for a support case regarding the reimport from analytics extensions
          • I suspect that there is a mistake here
cmorfin
19-Tanzanite
(To:Erik25)

Hi Erik

Thank you for this.

It seems that you have slightly modified the out of the box installation, Your nginx container is not using the default configuration.

Could you give some more info on what you did at this level ?

the nginx is expected on port 80, since in your case it is on 9800, several things will indeed be broken and indeed you will receive message such as "Unable to reach data source at [http://172.18.0.1/datasets]" as you have seen, since nothing is running on port 80.

I was able to reproduce the behaviour you have with the filter by changing the port of the nginx container.

If you need to keep nginx on port 9800, you should be able to get things working better by modifying %USERPROFILE%/twx-analytics/edge-config/analytics-server.properties and change the port for the  property analytics.server.

Then restart the ThingWorx Analytics Server.

Hope this helps.

Kind regards

Christophe

cmorfin
19-Tanzanite
(To:cmorfin)

Hi Erik

I seem to have done a mistake in my previous test.

The issue does seem to lie with the change of port, however the change in analytics-server.properties does not appear to be sufficient.

I am still looking into this.

However if you had the option to run on port 80 as per defautl this shoudl help getting a better behaviour.

Kind regards

Christophe

Erik25
11-Garnet
(To:cmorfin)

Hi Christophe,

the port in analytics-server.properties is a default port. I have tested it by reinstalling "ThingWorx-Analytics-Server-Docker-Windows-Standalone-8-1-0-r3" with minimal configuration
host: <ip of the maschine where twx installed>

Port: <tomcat twx port>
Appkey: created appkey via twx

default configs in system-environment-variables.properties

microservices.server=172.18.0.1
working.directory=/tmp/microservices

aws.accessKeyId=

aws.secretKey=

thingworx.hostname=172.20.4.48

thingworx.port=80

thingworx.application.key=<same as above>

thingworx.isSecure=false

dataset.webservices.url=

dataset.app.id=

dataset.app.key=

I changed the port to 80, but that makes currently more mistakes than before : )

cmorfin
19-Tanzanite
(To:Erik25)

Hi Erik

Thank you for this.

Your API router does run on port 9800 (probably set this way by the installation because the usual port 80 is already taken), so you should not change to port 80 in the properties file.

I initially thought that you created the nginx container yourself on port 9800, so I meant to re-create it on port 80 (and have properties files in sync with that). I understand now that this has been done by the installer itself.
You can check https://www.ptc.com/en/support/article?n=CS273969 as there are indeed other settings in system-environment-variables.properties to change to reflect the port. This should help for some of the problem however it seems that the filter issue still remain ... at least in my case.

So to summarize:

- the port used in properties file mentioned in Article Viewer | PTC should match the port of the nginx container

- if you can change ThingWorx (as I guess it is the one to use port 80) from port 80 to something else and reinstall ThingWorx Analytics on port 80, that should give you better behaviour

- I am still investigating the issue with filter when the port is not 80

Thank you

Kind rgerads

Christophe

Erik25
11-Garnet
(To:cmorfin)

Hi Christophe,

that is the solution ! Now everything is running as it should be , thanks alot !


Failure:

  • If port 80 is used by another service like the twx core or skype the analytic installer use  an another port like 9600
    • system-environment-variables ( ../twx-analytics\config )
      • microservices.server=172.18.0.1
    • analytics-server ( ../twx-analytics\edge-config )
  • microservices.server and analytics.server must have the same ip and port
    • microservices.server=172.18.0.1 ? <-- default analytic installation (port 80 blocked), no port was specified.

Solution:

  • Change the connector port from thingworx from 80 to 8080 (or somthing else)
    • ../Tomcat\conf/server.xml
      • <Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
  • Port 80 should now be unused
    • testing with cmd.exe
      • netstat -ano | find "80"
  • reinstall thingworx analytic server
    • with new port 8080
      • filters and creating predictive models runs fine
    • correct configs

I hope this helps !

Kind regards
Erik Schmidt // inray Industrie GmbH

cmorfin
19-Tanzanite
(To:Erik25)

For information I have submitted a Jira to R&D to investigate the behaviour of the filter when the port is not 80.

More details at https://www.ptc.com/en/support/article?n=CS274167

jebeck
6-Contributor
(To:Erik25)

Erik - I thought you might be interested that the ThingWorx Developer Portal recently published a analytics quickstart guide for 8.1 that includes a data set. 

https://developer.thingworx.com/resources/guides/analytics-builder-quickstart-v2

Top Tags