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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Can't publish model to Analytics manager

ashu_shukla
8-Gravel

Can't publish model to Analytics manager

Hi guys,

I was following this tutorial to operationalize my model but I'm getting an error whenever I publish the model to Analytics manager:

Model deployement failed on connector TW.AnalysisServices.ThingPredictorConnector

I tried the solution on this post but I couldn't find the ThingPredictor jar.

I'm currently on the hosted trial. Is this something that is not available with the trial. If so, how can I get access?

1 ACCEPTED SOLUTION

Accepted Solutions
jwyatt
10-Marble
(To:cmorfin)

Just 100% confirming, but the current version of ATE that you're using is the "r3" version which we updated on the DevPortal last week, correct? (cmorfin, sorry if I failed to update you that we changed out the ATE version.)

 

A few other notes:

 

1) DockerMachinePTC *must* be running, since you're able to access ThingWorx Foundation itself. Without DockerMachinePTC running, you'll never get a response when you go to 192.168.99.100:8080. 

 

2) If you're not seeing DockerMachinePTC running in the VirtualBox GUI, then it's almost certain that you opened VirtualBox without doing so as Administrator. I've done so myself on multiple occasions, and it's always confusing. Long story short, everything in ATE/TTE runs on the Administrator account. If you check (via GUI or CLI) as a non-admin user (even one with admin privileges), then you'll get a response that DockerMachinePTC isn't running... even though it obviously is because you can bring up Foundation and the Analytics Mashups for Builder and Manager. 

 

3) Also, ThingPredictor has a pretty short timeout. For instance, if you got ATE to install correctly on day 1, but then didn't try and set up an Analytics Provider until day 2, then it's probably timed out and won't connect. For that matter, it appears that ThingPredictor may not always startup on its own whenever you stop/start ATE (for shutting down your computer, for instance). In either instance, you'll need to open cmd.exe by right-clicking and selecting "run as administrator", and then issuing the following command:

docker-machine ssh DockerMachinePTC docker restart predictionms

This is discussed on the following page in the troubleshooting section:

https://developer.thingworx.com/resources/guides/operationalize-analytics-model/analysis-provider

 

However, you've been so thorough in troubleshooting everything else, I have my suspicions that you've already tried this. 

 

If that is the case (and ThingPredictor is *STILL* not connecting), please let us know.

 

In which case, trying out the mods suggested by cmorfin would definitely be the next step (though those should not be required in the r3 version of ATE). 

View solution in original post

10 REPLIES 10
cmorfin
19-Tanzanite
(To:ashu_shukla)

Hi

 

I think this is the same situation as https://community.ptc.com/t5/ThingWorx-Developers/Error-Connecting-to-ThingPredictor/m-p/545442#M27649 

 

Kind regards

Christophe

Hi,

I went to the download page as described and I cant find the Ubuntu installation files. The link from the post (https://developer.thingworx.com/resources/downloads/analytics-trial-edition) downloads the windows installer by default and there's no option to select OS whatsoever.

The installation guides do mention a Ubuntu installation zip being in existence though.

cmorfin
19-Tanzanite
(To:ashu_shukla)

Hi

 

The Analytics Trial Edition is indeed only available for Windows.

I am checking internally why the guide does mention Linux.

 

Kind regards

Christophe

 

Hi @cmorfin,

So I've managed to setup ATE on a windows machine now but I'm still getting the same error when publishing a model. Everything else is working fine. Also the guide here says to look for some green square in Connected Clients. My connectedClient tab comes empty.TW_connclient_empty.jpg

 

The only thing that's slightly off is that when I do docker-machine ls, it says DockerMachinePTC is stopped and when I try to start it using docker-machine start, I gives following error:

TW_docker_error.jpg

 

I don't know what exactly is the problem with ThingPredictor here...

Plz help...

cmorfin
19-Tanzanite
(To:ashu_shukla)

Hi

 

While investigating https://community.ptc.com/t5/ThingWorx-Developers/Model-deployment-failed-on-connector-TW-AnalysisServices/m-p/545857  I identified that the version of ATE downloaded is not the correct version that includes ThingPredictor configuration.

A new version should be uploaded soon.

However following the steps at https://www.ptc.com/en/support/article?n=CS284194 should allow to make it work with this current version.

 

Hope this helps

Regards

Christophe

 

Hi @cmorfin@jwyatt

So I've managed to setup the new TW ATE r3 on a Win8.1 machine but it still is giving the following error when publishing the model:

Model deployment failed on connector For input string: "0.0"

I've tried restarting the ThingPredictor service which restarts successfully according to the logs with terminal output:

PS C:\Windows\system32> docker-machine ssh DockerMachinePTC docker restart predictionms
predictionms

and output in logs:

INFO  [2018-05-07 11:23:03,076] com.thingworx.communications.client.endpoints.ClientCommunicationEndpoint: Authentication Request was SUCCESSFUL [tworx session id: 6, connection group id: 170]
INFO  [2018-05-07 11:23:03,077] com.thingworx.communications.client.endpoints.ClientCommunicationEndpoint: Successfully reconnected client endpoint [id: 0] : [active: 1, max: 1]
INFO  [2018-05-07 11:23:03,077] com.thingworx.communications.client.ConnectedThingClient: Communications Endpoint Opened
INFO  [2018-05-07 11:23:03,080] com.thingworx.communications.common.endpoints.monitor.ConnectivityMonitorTask: Endpoint reconnected [name: AnalysisSDKClient, id: 0]
INFO  [2018-05-07 11:23:03,962] com.thingworx.communications.client.things.filetransfer.FileTransferVirtualThing: Creating new AnalysisClient [name: 7681b1ef7b0c1758311734-1, stagingPath: null]
INFO  [2018-05-07 11:23:04,000] com.ptc.analysis.client.impl.AnalysisClient: Successfully set client on the Application Delegate

but when I publish the model, the logs show this error:

ERROR [2018-05-07 11:38:32,899] com.thingworx.communications.client.connection.netty.ThingworxClientConnectionHandler: WebSocket error: com/thingworx/communications/client/connection/netty/ThingworxClientConnectionHandler$1, closing connection!

I'm attaching the thingpredictor log file for further inspection.

This is the status of connectedClients in AnalyticsProvider details:

connected_clients_status.jpg

 

Also, the system-environment-variables.properties file already has the lines mentioned in this article so I guess ThingPredictor is there.

Can you guys help me with this error now

 

jwyatt
10-Marble
(To:cmorfin)

Just 100% confirming, but the current version of ATE that you're using is the "r3" version which we updated on the DevPortal last week, correct? (cmorfin, sorry if I failed to update you that we changed out the ATE version.)

 

A few other notes:

 

1) DockerMachinePTC *must* be running, since you're able to access ThingWorx Foundation itself. Without DockerMachinePTC running, you'll never get a response when you go to 192.168.99.100:8080. 

 

2) If you're not seeing DockerMachinePTC running in the VirtualBox GUI, then it's almost certain that you opened VirtualBox without doing so as Administrator. I've done so myself on multiple occasions, and it's always confusing. Long story short, everything in ATE/TTE runs on the Administrator account. If you check (via GUI or CLI) as a non-admin user (even one with admin privileges), then you'll get a response that DockerMachinePTC isn't running... even though it obviously is because you can bring up Foundation and the Analytics Mashups for Builder and Manager. 

 

3) Also, ThingPredictor has a pretty short timeout. For instance, if you got ATE to install correctly on day 1, but then didn't try and set up an Analytics Provider until day 2, then it's probably timed out and won't connect. For that matter, it appears that ThingPredictor may not always startup on its own whenever you stop/start ATE (for shutting down your computer, for instance). In either instance, you'll need to open cmd.exe by right-clicking and selecting "run as administrator", and then issuing the following command:

docker-machine ssh DockerMachinePTC docker restart predictionms

This is discussed on the following page in the troubleshooting section:

https://developer.thingworx.com/resources/guides/operationalize-analytics-model/analysis-provider

 

However, you've been so thorough in troubleshooting everything else, I have my suspicions that you've already tried this. 

 

If that is the case (and ThingPredictor is *STILL* not connecting), please let us know.

 

In which case, trying out the mods suggested by cmorfin would definitely be the next step (though those should not be required in the r3 version of ATE). 

jwyatt
10-Marble
(To:jwyatt)

Whoops! Seems like our posts went out simultaneously.

 

The good news, it looks like ThingPredictor connected! Great!

 

The bad news... why are you not able to publish your Model?

 

Having a valid Analytics Provider should be all that's required to publish a Model from Builder to Manager. 

 

cmorfin, any ideas? 

 

Publishing has always just worked for me (assuming ThingPredictor was up and connected). 

 

Hi @jwyatt and @cmorfin,

As you can see in the post above, I did try to restart ThingPredictor before publishing a model and as suggested by the logs, It looks like it was also started successfully. Also I can see the graph in connected clients also. All this suggest that ThingPredictor must work fine.

Have you seen the error that's been generated. Can someone figure out what that actually is?

Closing the topic as the issue is now resolved.

Main problem seemed to be the wrong installation version.

ATEr3 resolved most of the issues.

The 'input string 0.0' problem was indeed because of using integer in CSV. The issue was resolved after changing type to DOUBLE in metadata file.

Top Tags