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

Configuring anomaly detection on thingworx 8.3

olatz
13-Aquamarine

Configuring anomaly detection on thingworx 8.3

Hi,

 

I've configured an anomaly detection alert but it is getting "failed" status after being on "calibration" status for a long time.

 

My environment is:

- Thingworx platform 8.3 and H2 on Ubuntu 

- Anaylitics Server 8.3 on Ubuntu in a different virtual machine

Analytics is working ok because I've created some models before.

 

I am following the link https://www.ptc.com/en/support/article?n=CS265488 but it is a little bit confusing because it is explained on a windows and without having analytics server installed before.

 

I am getting confused with the ports. In the video expains that it is using 8080,8081,8090, 8091. But in my case results models are on 8900 and training on 9400. 

 

I can't find the resolution because I couldn't find where the problem it is. I will appreciate any help. Thanks in advance. 

 

Olatz

 

 

 

ACCEPTED SOLUTION

Accepted Solutions
cmorfin
19-Tanzanite
(To:olatz)

Hi @olatz 

 

Given the error you are getting, I would recommend you check https://www.ptc.com/en/support/article?n=CS270006.

Also https://www.ptc.com/en/support/article?n=CS292986 could lead to similar error, but the first article was definitely more common in 8.3.

 

Hope this helps

Kind regards

Christophe

 

View solution in original post

6 REPLIES 6
cmorfin
19-Tanzanite
(To:olatz)

Hi @olatz 

 

Thank you for the details. I understand your confusion.

The thing is, until and including release 8.3, the anomaly detection does not use ThingWorx Analytics Server. Only starting with release 8.4 does anomaly detection uses ThingWorx Analytics Server.

This is why the video you saw in the article https://www.ptc.com/en/support/article?n=CS265488   do not use ThingWorx Analytics Server.

As indicated in the video Deploying Training and Results microservices, you need to download the  ThingWorx-Analytics-ThingWatcher-8-3-0 media from PTC Software Download page, then follow the steps on the video.

The steps are very similar between Linux and Windows.

 

Hope this helps

Kind regards

Christophe

slangley
23-Emerald II
(To:cmorfin)

Hi @olatz.

 

If the previous response answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

olatz
13-Aquamarine
(To:cmorfin)

Thanks for the information cmorfin. After installing and configuring thingwatcher as it explains in the videos, anomaly detection doesn't work on my system. Anomaly alert ends in "failure" status. 

I'm getting the following errors:

 

- training log: 

"ERROR [2020-01-07 08:30:26,075] com.thingworx.analytics.ccc.job.local.AsynchronousMemoryJobExecutor:    Call to TrainingJob [20200107] failed due to:
 ! com.fasterxml.jackson.databind.exc.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@77a01d19; line: 1, column: 12] (through reference chain: com.thingworx.analytics.results.api.ResultResponse["code"])"

 

- results log:

"INFO [2020-01-07 08:30:26,047] io.dropwizard.jersey.jackson.JsonProcessingExceptionMapper: Mapping exception: class javax.ws.rs.NotFoundException
! javax.ws.rs.NotFoundException: HTTP 404 Not Found
! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:323)"

 

- ApplicationLog.log:

2020-01-07 14:30:26.306+0100 [L: ERROR] [O: c.t.s.s.a.a.AnomalyMonitor] [I: ] [U: Administrator] [S: ] [T: WSExecutionProcessor-967] Anomaly Alert [PiThing_AH-temperature-Temperatura_Anomala] Failed when in [TRAINING] State. Thingwatcher Error Code :: [WAT1001E] Message :: Operation exception. {Throwable=[Trainer.TrainingJobErrorException: Training job with id 1 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@77a01d19; line: 1, column: 12] (through reference chain: com.thingworx.analytics.results.api.ResultResponse["code"])]}]

 

Thanks in advance for your help.

 

cmorfin
19-Tanzanite
(To:olatz)

Hi @olatz 

 

Given the error you are getting, I would recommend you check https://www.ptc.com/en/support/article?n=CS270006.

Also https://www.ptc.com/en/support/article?n=CS292986 could lead to similar error, but the first article was definitely more common in 8.3.

 

Hope this helps

Kind regards

Christophe

 

olatz
13-Aquamarine
(To:cmorfin)

Thanks for the information. After setting the file.storage.path parameter in microservice.properties file it seems that it is working becase, finally, it has passed to monitoring status. 

But an error remains in results log:

 

"192.168.243.87 - - [08/Jan/2020:07:43:22 +0000] "POST /results/models HTTP/1.1" 201 1024 "-" "Jersey/2.23.2 (HttpUrlC onnection 1.8.0_92)" 595
INFO [2020-01-08 02:43:26,867] io.dropwizard.jersey.jackson.JsonProcessingExceptionMapper: Mapping exception: class javax.ws.rs.NotFoundException
! javax.ws.rs.NotFoundException: HTTP 404 Not Found
! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:323)...."

 

Any idea of what is it? The alert is in Monitoring status but, after this error, I am not convince it it is working properly.

 

Thanks in advance.

 

Olatz

cmorfin
19-Tanzanite
(To:olatz)

Hi @olatz 

 

You can ignore this error. As you can see it is reported as INFO only and it is a trace we do get when accessing the /results/models or /training url the first time.

If your alert is in monitoring state, this indicates that it is functioning.

 

Kind regards

Christophe

 

Announcements


Top Tags