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

Anomaly detection stuck in calibration status

drieder
15-Moonstone

Anomaly detection stuck in calibration status

Hello Everyone,

 

i have a situation where the temperature sensor of a remote thing is tracked via thingworx. So i have a remote thing deployed via the Java SDK and a corresponding thing in my Composer.

 

The thing has the property "Temperature", it is logged and the thing also has a value Stream assigned. Now when adding a anomaly alert to this property and leave everything at default, the status of the alert remains at "Calibrating". I am following this guide btw.

 

Any ideas what prevents the status from going from "Calibrating" to "Training"? 

 

The Temperature doesn't change much, it stays at room temperature. Does the value need to change in a specific intervall in order to be recognized during the calibration phase?

 

Thank you for your help.

 

Best Regards,

Dominik

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

Hi Dominik

 

The calibrating phase will change to training  if ThingWatcher has received a sufficient number of data points (580) and if Min. Data Collection Time  (set on the alert) is over.

So if the sensor value is collected every minute, it will stay in calibrating for at least 580 minutes in order to get 580 data points.

This can be one reason for the calibrating phase to take a long time.

You can also check the ApplicationLog.log, Tomcat log and training and result log file to see if any messages are issued.

 

Hope this helps

Kind regards

Christophe

 

drieder
15-Moonstone
(To:cmorfin)

Hi Christophe, thank you.

 

Its strange because my values update every second so it should be done after 600 seconds but i already have it running for an hour. Eventhough the value does not change, i have the dataChange properties set to "Always" so it should be recognized as an update shouldn't it?

 

Also the Min. Data Collection Time is set to 1 minute.

 

I will let it run for another few hours, but just in case i'll leave the log files attached.

 

Kind Regards,

Dominik

cmorfin
19-Tanzanite
(To:drieder)

Hi Dominik

 

I looked at the log files and though there are no errors, there is something that is odd.

You seem to have used the default yml files for both training and result microservice. This means that they are both trying to start on port 8080 (application) and 8081 (administration).
Usually they will both run on the same machine so obviously at least one of them will fail.

I would expect some bind exception that I do not see but we do see some stop sequence.
In addition if you run them on the ThingWorx server and if it uses port 8080, you will want to change both yml fiel to use different unused port on the machine.

See Configure Service Ports under Set Up and Run ThingWatcher Microservices at https://developer.thingworx.com/resources/guides/anomaly-detection-how-guide/set-and-run-thingwatcher-micro-services 

 

The videos at https://www.ptc.com/en/support/article?n=CS265488 can be useful, especially the one on deploying microservices as jar files .

 

Kind regards

Christophe

drieder
15-Moonstone
(To:cmorfin)

Hi Christophe,

 

realy looks like this is the reason. I will try it out and let you know if it worked.

 

Best Regards,

Dominik

drieder
15-Moonstone
(To:cmorfin)

Hello Christophe,

 

unfortunatly changing the ports didn't help. I think the problem could be that I used the docker installer for Anomaly Detection.

 

But now when trying the approach with executing the jar files (result and training) I get an error while trying to execute the following command in the folder where I extracted the files:

 

java -Dproperties.file=C:\Users\d.rieder\Desktop\ThingWorxProjekt\Analytics\AnomalyMicroservices-Windows\AnomalyMicroservices-Windows\microservices.properties -jar result-standalone-2.0.2-bin.jar server results-h2-file.yml

 

It says error "Main Class .file=C:\Users\...\microservices could not be found or loaded". It also occurs when I try different paths, so I thing it has to do something with java not being able to find the .file class maybe?

 

Any help with this is appreciated very much

cmorfin
19-Tanzanite
(To:drieder)

That seems the same issue as https://community.ptc.com/t5/ThingWorx-Developers/Not-able-to-run-Anomaly-Detection/m-p/549957#M28593 

 

Can you try retyping the command if you did  a copy paste ?

Kind regards

Christophe

 

Top Tags