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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Thingwatcher FAILED after training phase

drichter
15-Moonstone

Thingwatcher FAILED after training phase

Hi,

 

I try to test the anomaly detection. First I try it with a simple service which generates data. This Fails after a short time of "Training". Than I try it with the simulator of the tutorial (https://developer.thingworx.com/resources/guides/anomaly-detection-how-guide/training-anomaly-alerts). Same problem. The application logs displays:

 

Returning a FAILED state for TimedValue [timestamp=1521462500513, value=0.25]. ThingWatcherMessage [timestamp=2018-03-19T12:28:20.573, severity=ERROR, state=ThingWatcherInternalState [internal=OBTAINING_MODEL, external=TRAINING], messageCode=WAT1001E, messageText=Operation exception. {Throwable=[Trainer.TrainingJobErrorException: Training job with id 8 entered into an incomplete state [FAILED] unable to process models.  Error message: [UnrecognizedPropertyException: Unrecognized field "code" (class com.thingworx.analytics.results.api.ResultResponse), not marked as ignorable (7 known properties: "status", "tags", "id", "description", "lastModified", "name", "resultUri"])_ at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@61698e8a; line: 1, column: 12] (through reference chain: com.thingworx.analytics.results.api.ResultResponse["code"])]}]]_com.thingworx.analytics.thingwatcher.exceptions.ThingWatcherOperationException: Error accessing PMML Model URI, cannot download model_    at com.thingworx.analytics.thingwatcher.ThingWatcherInternal.isModelAvailableAfterTraining(ThingWatcherInternal.java:673)_    at com.thingworx.analytics.thingwatcher.ThingWatcherInternal.runStateMachineFor(ThingWatcherInternal.java:410)_    at com.thingworx.analytics.thingwatcher.ThingWatcherInternal.bareMonitor(ThingWatcherInternal.java:302)_    at com.thingworx.analytics.thingwatcher.ThingWatcherInternal.monitor(ThingWatcherInternal.java:229)_    at com.thingworx.analytics.thingwatcher.ThingWatcher.monitor(ThingWatcher.java:57)_    at com.thingworx.system.subsystems.alerts.anomalyalert.AnomalyMonitor.monitor(AnomalyMonitor.java:258)_    at com.thingworx.system.subsystems.alerts.data.Alert.doAnomalyEvaluation(Alert.java:565)_    at com.thingworx.system.subsystems.alerts.handlers.NumberAlert.evaluateAlarm(NumberAlert.java:136)_    at com.thingworx.system.subsystems.alerts.data.AlertList.checkAlerts(AlertList.java:87)_    at com.thingworx.things.Thing.rawSetPropertyVTQ(Thing.java:4051)_    at com.thingworx.things.Thing.rawSetPropertyVTQ(Thing.java:3872)_    at com.thingworx.things.Thing.handleSetPropertyWithoutUpdate(Thing.java:4117)_    at com.thingworx.things.Thing.internalSetPropertyVTQ(Thing.java:4108)_    at com.thingworx.things.Thing.setPropertyVTQ(Thing.java:4230)_    at com.thingworx.things.Thing.forcePropertiesVTQ(Thing.java:4132)_    at com.thingworx.things.connected.RemoteThing.UpdateSubscribedPropertyValues(RemoteThing.java:836)_    at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source)_    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)_    at java.lang.reflect.Method.invoke(Method.java:498)_    at com.thingworx.common.processors.ReflectionProcessor.processService(ReflectionProcessor.java:261)_    at com.thingworx.handlers.ReflectionServiceHandler.processService(ReflectionServiceHandler.java:50)_    at com.thingworx.things.Thing.processServiceRequestDirect(Thing.java:7723)_    at com.thingworx.things.Thing.processAPIServiceRequest(Thing.java:7661)_    at com.thingworx.webservices.processors.APIProcessor.executeService(APIProcessor.java:299)_    at com.thingworx.webservices.processors.APIProcessor.dispatchRequest(APIProcessor.java:73)_    at com.thingworx.system.subsystems.wsexecution.processor.WSExecutionInstance.run(WSExecutionInstance.java:49)_    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)_    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)_    at java.lang.Thread.run(Thread.java:748)_Caused by: com.thingworx.analytics.thingwatcher.Trainer$TrainingJobErrorException: Training job with id 8 entered into an incomplete state [FAILED] unable to process models.  Error message: [UnrecognizedPropertyException: Unrecognized field "code" (class com.thingworx.analytics.results.api.ResultResponse), not marked as ignorable (7 known properties: "status", "tags", "id", "description", "lastModified", "name", "resultUri"])_ at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@61698e8a; line: 1, column: 12] (through reference chain: com.thingworx.analytics.results.api.ResultResponse["code"])]_    at com.thingworx.analytics.thingwatcher.Trainer.lambda$getPMMLModelUri$1(Trainer.java:69)_    at java.util.Optional.orElseThrow(Optional.java:290)_    at com.thingworx.analytics.thingwatcher.Trainer.getPMMLModelUri(Trainer.java:69)_    at com.thingworx.analytics.thingwatcher.ThingWatcherInternal.isModelAvailableAfterTraining(ThingWatcherInternal.java:654)_    ... 28 more_

 

I have no idea what is wrong.

 

I use ThingWorx 8.2.2-b167 and i thing thingwatcher 8.2.0 (but I'm not sure).

ACCEPTED SOLUTION

Accepted Solutions
Chrischhan
13-Aquamarine
(To:drichter)

Hi,

 

I have seen a similar error. Could you please check if in the "microservices.properties" the results.destination.uri really points to your results mircoservice? I messed up the port an got only errors after training.

 

Regards

View solution in original post

6 REPLIES 6
nsampat
17-Peridot
(To:drichter)

Hello,

 

Thank you for posting your question to the Developer Community.

 

I would recommend that you review the following knowledge article:

 

https://www.ptc.com/en/support/article?n=CS269383

 

Please let us know if this helps.

 

Regards,

 

Neel

cmorfin
19-Tanzanite
(To:drichter)

Hi

 

Check also https://www.ptc.com/en/support/article?n=CS270006

 

Regards

Christophe

Chrischhan
13-Aquamarine
(To:drichter)

Hi,

 

I have seen a similar error. Could you please check if in the "microservices.properties" the results.destination.uri really points to your results mircoservice? I messed up the port an got only errors after training.

 

Regards

drichter
15-Moonstone
(To:Chrischhan)

Ok I miss to change the port :D

Hi

 

Where do I check the port?

I am using the TrialEdition, so my Microserver is running in DockerMachine.

 

Thanks.

Jessica

cmorfin
19-Tanzanite
(To:jessicalopo)

Hi

 

docker ps -a should tell you on what port the services are running

 

Regards

Christophe

 

Announcements


Top Tags