Search code examples
google-cloud-iot

Error running source run-gateway for Google IOT


I have been trying to find help for this problem and there hasn't been too much success. I keep getting this error. I was following this guide: https://cloud.google.com/community/tutorials/cloud-iot-gateways-rpi and I haven't been able to get past step 14.

source run-gateway

Creating JWT using RS256 from private key file rsa_private.pem
on_publish, userdata None, mid 1
Unable to find key 1
connect status False
on_connect Connection Refused: not authorised.
on_disconnect 5: The connection was refused.
connect status False
connect status False
connect status False
^CTraceback (most recent call last):
  File "./cloudiot_mqtt_gateway.py", line 356, in <module>
    main()
  File "./cloudiot_mqtt_gateway.py", line 284, in main
    time.sleep(1)

Solution

  • I was able to successfully get the gateway running but had to manually modify the script. Make sure that you have updated the run-gateway shell script to point to your registry ID and project ID.

    If any of the parameters are incorrect (e.g. device, project, region) then your device will be disconnected from the device bridge.