Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

send_data call in registeredMetric doesn`t handle exceptions #165

Open
KohliDev opened this issue Oct 17, 2017 · 0 comments
Open

send_data call in registeredMetric doesn`t handle exceptions #165

KohliDev opened this issue Oct 17, 2017 · 0 comments

Comments

@KohliDev
Copy link
Contributor

send_data stops sending the data once it receives the exception from DCC_Comms only the collector thread keeps on working:

2017-10-17 19:43:27 UTC 1900 INFO [SendThread] liota.entities.metrics.registered_metric.send_data(120) - Publishing values for the resource Network Bytes Received 
2017-10-17 19:43:27 UTC 1900 ERROR [SendThread] liota.lib.transports.mqtt.publish(324) - MQTT Publish exception:4 result code
None
2017-10-17 19:43:27 UTC 1900 ERROR [SendThread] liota.lib.transports.mqtt.publish(327) - MQTT Publish exception
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/liota/lib/transports/mqtt.py", line 325, in publish
    raise Exception("MQTT Publish exception:{0} result code".format(mess_info.rc))
Exception: MQTT Publish exception:4 result code
2017-10-17 19:43:27 UTC 1900 INFO [Collector-30] liota.entities.metrics.registered_metric.collect(111) - Disk Usage Stats Sample Value: 78133.0
2017-10-17 19:43:28 UTC 1900 INFO [Collector-28] liota.entities.metrics.registered_metric.collect(111) - CPU Utilization Sample Value: 4.48
2017-10-17 19:43:32 UTC 1900 INFO [Collector-3] liota.entities.metrics.registered_metric.collect(111) - CPU Process Sample Value: 3
2017-10-17 19:43:32 UTC 1900 INFO [Collector-6] liota.entities.metrics.registered_metric.collect(111) - Network Bytes Received Sample Value: 1171826.0
2017-10-17 19:43:32 UTC 1900 INFO [Collector-1] liota.entities.metrics.registered_metric.collect(111) - Memory Free Sample Value: 62.1
2017-10-17 19:43:32 UTC 1900 INFO [Collector-3] liota.entities.metrics.registered_metric.collect(111) - Disk Usage Stats Sample Value: 78135.0
2017-10-17 19:43:33 UTC 1900 INFO [Collector-4] liota.entities.metrics.registered_metric.collect(111) - CPU Utilization Sample Value: 3.77
2017-10-17 19:43:37 UTC 1900 INFO [Collector-11] liota.entities.metrics.registered_metric.collect(111) - CPU Process Sample Value: 3
2017-10-17 19:43:37 UTC 1900 INFO [Collector-11] liota.entities.metrics.registered_metric.collect(111) - Disk Usage Stats Sample Value: 78135.0

It doesn`t start sending after the re-connection as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant