hms-networks / flexy-cumulocity-connector

A connector-based solution to Cumulocity for linking Ewon devices using a direct data path with a Flexy Java application.
Apache License 2.0
3 stars 2 forks source link

NPE thrown during retrieval of MQTT status in device provisioning client. #35

Closed alexjhawk closed 8 months ago

alexjhawk commented 1 year ago

Original Report By: @janhumble Original Report Permalink: https://github.com/hms-networks/flexy-cumulocity-connector/issues/31#issuecomment-1447129264 Original Report Content:

We are trying to connect the Flexy with the latest instructions and certificate path to a public Cumulocity tenant. We are getting null pointers on mqtt ssl handshake. Running firmware 14.5s on a Flexy 205. image Has this been verified with Cumulocity recently?

janhumble commented 1 year ago

Thank you Alex for looking into this. We are trying to troubleshoot a remote device for a customer. We are also seeing some errors in the modem and DNS. It's using the Ewon modem. EVENT LOGS

alexjhawk commented 1 year ago

The likely culprit is the DNS issue you are seeing in the event log: dns-No response from server (certs.godaddy.com)

If the system cannot resolve the DNS for certs.godaddy.com, it cannot download the required CA certificate to connect to Cumulocity. This is indicated also by the entry in the event log mqtt-Problem configuring SSL/TLS which tells us the certificate is either incorrect or corrupt/missing.

janhumble commented 1 year ago

We replaced the internal modem, and it connected fine. Worked for a few hours. Next day it lost connection and won't re-establish MQTT broker connection. We are at a loss. image

it-hms commented 1 year ago

This exception is caught and the software continues to run, but the stacktrace is printed because of the log level being 6. I realize that this can cause some confusion.

There some cellular settings that should be changed from the defaults. Please check Max outgoing call duration in system->Communication->Internet Connection-> Modem->Outgoing->Global
This value should be 0 indicating no limit for outgoing calls. Here, the MQTT connection is regarded as a "call" to the cellular modem.

image