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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Thingwatcher: Status Anomaly "Initialization Failed"

mvolanti
7-Bedrock

Thingwatcher: Status Anomaly "Initialization Failed"

Hi everyone,

I'm in truble with anomaly detection, here is my state:

The microservers Result and Training started properly.   (I believe)

I tried to start an anomaly detection from simulated device by kepserverEX in the new composer, but gave me initializaztion Failed.

I notice this error in training/Healthcheck:     (localhost:8091)

"model-destination" : {

  "healthy" : false,

  "message" : "Could not establish connectivity to: results://localhost:8096/results/models"

  },

I noticed that:

Thingworx , microservices are in the same PC.

any suggestion?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
cmorfin
19-Tanzanite
(To:mvolanti)

Hi Maurizio

2 things:

1) in the alert subsystem you have the training and result uri swapped. You need to change this and restart.

2) in microservices.properties for file.storage.path could you set only a relative path. I seem to recall having problem when having a full absolute path. I was running successfully with simply file.storage.path=TWatcherStorage . A TWatcherStorage folder got created where the jar files are (not the folder name can be anything but use only ascii characters)


Hope this helps.

Kind regards

Christophe

View solution in original post

4 REPLIES 4
cmorfin
19-Tanzanite
(To:mvolanti)

Hi Maurizio

Could you provide the following information:

  • upload the training and result yml files.

I would like an upload of the files themselves and not a copy paste as you did in the other post (Thingwatcher microserver training error) as it appears that the copy/paste does not render the lines correctly.

  • add logging appenders to the yml files to print to file and send me the log file for both training and result ms after reproducing error.

I have attached 2 yml which contains the logging appenders. the yaml format is very sensitive to spaces and tabs so I'd rather not copy paste.
Copy the added lines or change the port in the attached files.

the log file swill be created under <Jar microservice folder>/logs .

Thanks

Christophe

Hi Christophe,


I use your .yml files and after some tests, here is my situation:



So I put those end point in the AlertProcessingSubsystem



Started anomaly detection:


my microservices.properties is:


The anomaly detection always fail :


Application log from Thingworx  give me some errors:

ERROR:  Anomaly Alert [AlertTest-Random2-anomalyok] Failed when in [TRAINING] State. Thingwatcher Error Code :: [WAT9999E]  Message :: Unexpected exception. {Throwable=[NonRetryableTrainingRequestException: Received error from POST of Training request with Code(415)_Message(Unsupported Media Type)_Details:_{code=415, message=HTTP 415 Unsupported Media Type}__}]

ERROR: Anomaly Alert [AlertTest-random1-anomaly2] Failed when in [TRAINING] State. Thingwatcher Error Code :: [WAT9999E]  Message :: Unexpected exception. {Throwable=[NonRetryableTrainingRequestException: Received error from POST of Training request with Code(415)_Message(Unsupported Media Type)_Details:_{code=415, message=HTTP 415 Unsupported Media Type}__}]

ERROR: Returning a FAILED state for TimedValue [timestamp=1499248207445, value=7.421176433563232]. ThingWatcherMessage [timestamp=2017-07-05T11:50:08.639, severity=ERROR, state=ThingWatcherInternalState [internal=TRAINING, external=TRAINING], messageCode=WAT9999E, messageText=Unexpected exception. {Throwable=[NonRetryableTrainingRequestException: Received error from POST of Training request with Code(415)_Message(Unsupported Media Type)_Details:_{code=415, message=HTTP 415 Unsupported Media Type}__}]]

Then I checked training healtcheck:

Could this be the cause of the problem? 

How can I fix the ("message" : "Could not establish connectivity to: results://192.168.200.206:9080/results/models")?

Thanks a lot!!

cmorfin
19-Tanzanite
(To:mvolanti)

Hi Maurizio

2 things:

1) in the alert subsystem you have the training and result uri swapped. You need to change this and restart.

2) in microservices.properties for file.storage.path could you set only a relative path. I seem to recall having problem when having a full absolute path. I was running successfully with simply file.storage.path=TWatcherStorage . A TWatcherStorage folder got created where the jar files are (not the folder name can be anything but use only ascii characters)


Hope this helps.

Kind regards

Christophe

Thanks Christophe a lot!!! Now I am in monitoring mode!

Top Tags