MsAWSIoT connection issue on server

0
I have  facing a mqtt connection error when the application is running on mendix sandbox server, i am not sure how to fix it as it is working on the Mendix Modeler 7.19 on local machine. I am using aws things certificates and i have placed them in the resources folder in the Modeler and i think they will be deployed to the server. Can anyone guide me on how to resolve it.  The Error log is below.  :27:44 PMAPPINFOWebUI: Login OK: user 'demo' (Number of concurrent sessions: 1). 5:28:09 PMAPPINFOmxawsiot.impl.MqttConnector$MqttConnection: creating new MqttConnection 5:28:09 PMAPPINFOmxawsiot.actions.SubscribeToTopic: executeAction: topic: device/Awais_MF200/telemetry/hexiwear 5:28:09 PMAPPINFOmxawsiot.impl.MqttConnector$MqttConnection: MqttConnector.subscribe 5:28:09 PMAPPINFOmxawsiot.impl.MqttConnector$MqttConnection: Number of objects in mqttHandlers map: 0 5:28:09 PMAPPINFOmxawsiot.impl.MqttConnector$MqttConnection: new MqttConnection 5:28:09 PMAPPINFOmxawsiot.impl.MqttConnector$MqttConnection: new MqttConnection client id MxClient_6b6b460b-e1ef-49e6-b6e4-4d6c102afa79_4dedd2cd-21ca-4a91-62c7-a956d2059c8f_a22u7er40mti5n-ats.iot.us-east-1.amazonaws.com_8883 5:28:09 PMAPPINFOmxawsiot.impl.MqttConnector$MqttConnection: resourcesPath: /home/vcap/app/model/resources/ 5:28:09 PMAPPINFOmxawsiot.impl.MqttConnector$MqttConnection: Connecting to broker: ssl://a22u7er40mti5n-ats.iot.us-east-1.amazonaws.com:8883 5:28:10 PMAPPERRORmxawsiot.impl.MqttConnector$MqttConnection: org.eclipse.paho.client.mqttv3.MqttException: Invalid client ID 5:28:10 PMAPPINFOat org.eclipse.paho.client.mqttv3.internal.ClientState.notifyReceivedAck(ClientState.java:990) 5:28:10 PMAPPINFOat org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:31) 5:28:10 PMAPPERRORmxawsiot.impl.MqttConnector$MqttConnection: org.eclipse.paho.client.mqttv3.MqttException: Invalid client ID 5:28:10 PMAPPINFOat org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:118) 5:28:10 PMAPPINFOat java.lang.Thread.run(Thread.java:748) 5:28:10 PMAPPINFOat java.lang.Thread.run(Thread.java:748) 5:28:10 PMAPPINFOat org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:31) 5:28:10 PMAPPINFOat org.eclipse.paho.client.mqttv3.internal.ClientState.notifyReceivedAck(ClientState.java:990) 5:28:10 PMAPPINFOat org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:118) 5:28:10 PMAPPINFOAdvanced stacktrace: 5:28:10 PMAPPERRORConnector: An error has occurred while handling the request. [User 'demo' with session id '1d6304d4-4822-4170-94e6-e45ab7b15e7b' and roles 'Administrator'] 5:28:10 PMAPPERRORConnector: com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: Invalid client ID (2) 5:28:10 PMAPPINFOat Hexiwear.ACT_SubscribeTo_Topic (JavaAction : 'Data - subscribe to MQTT topic')
asked
1 answers
1

Hi Awais,

It seems to be that AWS changed the length of their Client ID. When you were running the app locally the unique client ID that was generated was short enough to be accepted. When you deployed to the cloud the ID was too long. 

In order to fix this issue i made a pull request on the connector repo. I'll make sure this gets merged and updated to the appstore ASAP.

https://github.com/mendix/MxAwsIotConnector/pull/3

Regards

Simon

 

answered