Hi everyone,
I was trying restless to publish in IoT core with no results.
After running the main.py, the error message appearing is:
Creating JWT...
JWT: eyJ0eXAiOiAiSldUIiwgImFsZyI6ICJSUzI1NiJ9.eyJleHAiOiAxNjI3ODA2NDU5LCAiYXVkIjogIm...
===================...the key continues....====================
eJ4Zi-zpMILdJavJMsOGQgZkdroFjc-XBEEzx3uFCzEHxftd9fc5PMqZgmwWhbBjX9NvDAmSg==
Traceback (most recent call last):
File "", line 98, in
File "", line 87, in get_mqtt_client
File "/lib/umqtt/simple.py", line 99, in connect
MQTTException: 5
Line 98 in main.py:
client = get_mqtt_client(config.google_cloud_config['project_id'], config.google_cloud_config['cloud_region'], config.google_cloud_config['registry_id'], config.google_cloud_config['device_id'], jwt)
Line 87 in get_mqtt_client function:
client.connect()
Line 99 is related a connect routine inside umqtt.simple.py library, that rise an error:
raise MQTTException(resp[3])
The exception 5 referes to "connection refused, not authorized".
What I have done:
Public_key.pem is in GC registry.
Decode_rsa had been used on Private_key.
I have tried several times with new key pairs generated, with similar results.
If I comment the "rise exception", the program continues but none message is publish in IoT Core.
I have tried with umqtt.simple2 with similar results.
Please give me your support.. I am stuck more than a week on this issue.
Hi everyone, I was trying restless to publish in IoT core with no results. After running the main.py, the error message appearing is: Creating JWT... JWT: eyJ0eXAiOiAiSldUIiwgImFsZyI6ICJSUzI1NiJ9.eyJleHAiOiAxNjI3ODA2NDU5LCAiYXVkIjogIm... ===================...the key continues....==================== eJ4Zi-zpMILdJavJMsOGQgZkdroFjc-XBEEzx3uFCzEHxftd9fc5PMqZgmwWhbBjX9NvDAmSg==
Traceback (most recent call last): File "", line 98, in
File "", line 87, in get_mqtt_client
File "/lib/umqtt/simple.py", line 99, in connect
MQTTException: 5
Line 98 in main.py: client = get_mqtt_client(config.google_cloud_config['project_id'], config.google_cloud_config['cloud_region'], config.google_cloud_config['registry_id'], config.google_cloud_config['device_id'], jwt)
Line 87 in get_mqtt_client function: client.connect()
Line 99 is related a connect routine inside umqtt.simple.py library, that rise an error:
raise MQTTException(resp[3])
The exception 5 referes to "connection refused, not authorized".
What I have done:
Please give me your support.. I am stuck more than a week on this issue.
Thank you.