MQTT-bridge-mosquitto not working with AWS Iot

Hi,

   we have implemented https://github.com/nRFCloud/MQTT-bridge-mosquitto in our AWS account. but in we are getting error like 

1736241683: Client nrfcloud-bridge-local closed its connection.
MqttBridgeContainer
1736241683: Connecting bridge nrfcloud-bridge (mqtt.nrfcloud.com:8883)
MqttBridgeContainer
1736241652: Client nrfcloud-bridge-local closed its connection.
MqttBridgeContainer
1736241652: Connecting bridge nrfcloud-bridge (mqtt.nrfcloud.com:8883)
MqttBridgeContainer
1736241621: Client nrfcloud-bridge-local closed its connection.
MqttBridgeContainer
1736241621: Connecting bridge nrfcloud-bridge (mqtt.nrfcloud.com:8883)

   CloudFormation stack is successfully deployed. there is no error in that.

   Also it was working fine around 24 hours ago. suddenly we were not getting any data in AWS so we tried to redeploy it but the result is the same.

Thanks,  

  • Hi,

    While using this config file, we are facing the below error.

    Client nrfcloud-bridge-local disconnected: protocol error.
    Client local.DESKTOP-UQS9RRA.iot-bridge disconnected: protocol error.

  • Hi,

    We have tested internally using your config and certificate files and could not reproduce the issue. 
    Below are some updated instructions. Can you please try again by following instructions shown below?

    1. In your AWS account and region where the MQTT Bridge is installed, go to the Systems Manager Parameter Store console.

    2. Copy the certificates in the IotCert and IotKey parameters into files named local_IotCert.txt and local_IotKey.txt. Ensure the last line of each file has an end-of-line character at the end.

    3. Using the REST API, create an MQTT Team device. See nRF Cloud REST API documentation

    4. Store the 3 certificates returned in files named nrfcloud_caCert.txt, nrfcloud_clientCert.txt, and nrfcloud_privateKey.txt.

    5. Change all literal strings "\n" to end-of-line characters in all 3 files. Ensure the last line of each file has an end-of-line character at the end.

    6. Download mosquitto.org/.../mosquitto-2.0.11-install-windows-x64.exe

    7. Install it to the default location

    8. Add "%ProgramFiles%\Mosquitto" (without quotes) to the Windows PATH

    9. Create a directory from where you will run Mosquitto and store configuration files, such as "C:\Mosquitto".

    10. Open a Command Prompt window and "cd" to the run directory you created.

    11. Enter "mosquitto -h". You should see the help page and "mosquitto version 2.0.11" displayed.

    12. Copy the attached "config.txt" into that directory.

    13. Look for the “# Replace…” comment lines and replace the example strings with the correct strings for your case.

    14. Create a subdirectory "config".

    15. Copy the 5 files you created above, into that "config" directory. (local_IotCert.txt, local_IotKey.txt, nrfcloud_ca.crt, nrfcloud_clientCert.txt, nrfcloud_privateKey.txt)

    16. In the run directory, start the mosquitto broker with the command: "mosquitto -v -c config.txt".

    17. Verify that MQTT messages sent by devices in your nrfcloud team appear on your AWS account and region on the MQTT topics "data/#" as described in republished topics documentation.

    Please find uploaded revised 

    If you still experience issue, please consider trying on another computer and look thoroughly for any potential networking issue which may block some traffic.

    Best regards,
    Dejan

  • Hi,

    The issue in MQTT bridge should be fixed now. Fixed mqtt bridge mosquitto is available in the same location as it was previously. For re-deploying the bridge, you should follow the instructions provided in MQTT bridge mosquitto, get and compile the newest code, and use the --reset option to create a new MQTT Team device and new local credentials as described on the linked page. If this works, then you do not need a workaround anymore. You can also delete all account-* and mqtt-team-* devices on your team that you do not use, except mqtt-team-* device that will be newly created by your latest deployment. That device ID can be found in AWS Systems Manager Parameter Store in the parameter NrfCloudMqttTeamDeviceId. 

    Best regards,
    Dejan

Related