-
Notifications
You must be signed in to change notification settings - Fork 8
Troubleshooting Hogarama
This page gives some hints how you can troubleshoot various problems with Hogarama
The error says that JBoss didn't find any data in the Mongodb. There can be several reasons for this.
- The Client didn't send data
- Fluentd didn't forward the data
- The connection from Hogajama (JBoss) to MongoDB is lost
- MongoDB is down
The easiest way to check whether the server part is functional is to use the Raspberry-PI-Mocks-GUI. Just open the Url and run a few values. It sends data to AMQ. If it works the OpenShift part works correctly and its probably a client issue.
Send a GET Request to ?location=...&actorName=...&duration=...
First thing is to check the Logs of the pods from the Fluentd, Hogajama and Mongodb. In Fluentd you should see something like this:
2018-09-30 21:38:32.334158357 +0200 habarama: {"sensorName":"GruenerGepard","type":"sparkfun","value":73,"location":"Wien","version":1,"time":"2018-09-30T21:38:32+02:00"}
2018-09-30 21:38:49.339616481 +0200 habarama: {"sensorName":"GruenerGepard","type":"sparkfun","value":75,"location":"Wien","version":1,"time":"2018-09-30T21:38:49+02:00"}
2018-09-30 21:39:06.346601746 +0200 habarama: {"sensorName":"GruenerGepard","type":"sparkfun","value":72,"location":"Wien","version":1,"time":"2018-09-30T21:39:06+02:00"}
2018-09-30 21:39:23.357627899 +0200 habarama: {"sensorName":"GruenerGepard","type":"sparkfun","value":73,"location":"Wien","version":1,"time":"2018-09-30T21:39:23+02:00"}
2018-09-30 21:39:40.369556706 +0200 habarama: {"sensorName":"GruenerGepard","type":"sparkfun","value":72,"location":"Wien","version":1,"time":"2018-09-30T21:39:40+02:00"}
If something is wrong, you most likely see some Error messages in the logs
Login-to-mongodb Then read the data:
> show collections
habarama
watering
wateringConfig
> db.habarama.find()
{ "_id" : ObjectId("5bafc64371a07b000b392391"), "sensorName" : "Mock Sensor", "type" : "wasser", "value" : 50, "location" : "Wien", "version" : 0, "time" : ISODate("2018-09-29T18:36:48.840Z") }
{ "_id" : ObjectId("5bafc64671a07b000b392392"), "sensorName" : "Mock Sensor", "type" : "wasser", "value" : 50, "location" : "Wien", "version" : 0, "time" : ISODate("2018-09-29T18:36:51.833Z") }
{ "_id" : ObjectId("5bafc64971a07b000b392393"), "sensorName" : "Mock Sensor", "type" : "wasser", "value" : 70, "location" : "Wien", "version" : 0, "time" : ISODate("2018-09-29T18:36:54.830Z") }
{ "_id" : ObjectId("5bb0743171a07b000b392394"), "sensorName" : "GruenerGepard", "type" : "sparkfun", "value" : 33, "location" : "Wien", "version" : 1, "time" : ISODate("2018-09-30T06:58:54.807Z"
) }
{ "_id" : ObjectId("5bb0744271a07b000b392395"), "sensorName" : "GruenerGepard", "type" : "sparkfun", "value" : 26, "location" : "Wien", "version" : 1, "time" : ISODate("2018-09-30T06:59:11.826Z"
) }
{ "_id" : ObjectId("5bb0745371a07b000b392396"), "sensorName" : "GruenerGepard", "type" : "sparkfun", "value" : 29, "location" : "Wien", "version" : 1, "time" : ISODate("2018-09-30T06:59:28.846Z"
Again there can be several reasons on server- or on client-side. Therefore it is important to limit the possible cause.
At regular intervals Hogajama checks whether it should activate the pump. See Using-Hogarama#configure-the-watering-strategy. If the rule triggers a watering request, you should see a little drop in the Hogajama chart (GUI) and a message in the Hogajama Logs:
20:08:10,001 INFO [com.gepardec.hogarama.service.schedulers.WateringScheduler] (EJB default - 4) Check for watering
20:08:10,002 INFO [com.gepardec.hogarama.service.schedulers.SensorsScheduler] (EJB default - 3) Load the sensorNames from the database
20:08:10,026 INFO [com.gepardec.hogarama.service.ActorServiceImpl] (EJB default - 4) sendActorMessage: location: Wien, actorName: Mock Sensor, duration: 5
20:08:10,059 INFO [com.gepardec.hogarama.mocks.cli.MqttClient] (EJB default - 4) Publising to ssl://broker-amq-mqtt-ssl-57-hogarama.cloud.itandtel.at:443
20:08:10,282 INFO [com.gepardec.hogarama.mocks.cli.MqttClient] (EJB default - 4) Published 1 of 1
You can also find these in mongodb: Login-to-mongodb Then read the data:
> db.watering.find()
{ "_id" : ObjectId("5bb074b620808801b9e850be"), "className" : "com.gepardec.hogarama.domain.watering.WateringData", "time" : ISODate("2018-09-30T07:01:10.046Z"), "name" : "GruenerGepard", "locat
ion" : "Wien", "duration" : 5 }
{ "_id" : ObjectId("5bb074f220808801b9e850bf"), "className" : "com.gepardec.hogarama.domain.watering.WateringData", "time" : ISODate("2018-09-30T07:02:10.007Z"), "name" : "GruenerGepard", "locat
ion" : "Wien", "duration" : 5 }
The watering request will be sent to a Topic with name actor.location.actorname
of the broker-amq pod.
Go to the pod, locate and follow the link Open Java Console
. It will open the Jolokia JMX console. Go e.g. to Topic->actor/Wien/GruenerGepard
You see values for enqueued and dequeued messages and number of consumers. There should be at least one consumer (Raspi) and the same value for enqueued and dequeued messages (number of watering requests).
- Home
- Setup Guide
- Using Hogarama
-
Cloud Components
- AMQ
- MongoDB
- Single Sign On
- Hogajama
- Kafka
- Habarama
- Troubleshooting Hogarama
- Optional Modules
- Developer Guideline