question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python Paho Mqtt error cannot connect to thing on AWS IoT

See original GitHub issue

I am facing problems, when trying to connect to AWS IoT via python. My code worked previously so there isn’t anything I can change there, I suspect there is something on AWS side probably ? As you can see at the last line I am having SSL problems. Traceback (most recent call last): File "flint.py", line 44, in <module> mqttc.connect("a2yye602yte99c.iot.us-west-2.amazonaws.com", port=8883) #AWS IoT service hostname and portno File "/usr/local/lib/python2.7/dist-packages/paho/mqtt/client.py", line 686, in connect return self.reconnect() File "/usr/local/lib/python2.7/dist-packages/paho/mqtt/client.py", line 821, in reconnect ciphers=self._tls_ciphers) File "/usr/lib/python2.7/ssl.py", line 891, in wrap_socket ciphers=ciphers) File "/usr/lib/python2.7/ssl.py", line 566, in __init__ self.do_handshake() File "/usr/lib/python2.7/ssl.py", line 788, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 alert certificate unknown (_ssl.c:581)

Also yesterday when the error popped in for the first time, there was some notification on AWS IoT console : notify

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kejsiStrugacommented, Apr 7, 2018

Hello @embRTS , in case your certificate is in pending mode then it is not possible to connect to AWS (SSL encryption works this way, your first have to get authenticated that you are who you are pretending to be and afterwards you exchange data) . I am guessing you cannot even telnet AWS. Why don’t you just create another certificate, in case this is the problem ?

In my case it was some DNS issue that appeared only when I was trying to connect with AWS using WI-FI bundle. Fixed it by changing some configurations in my router.

Regards,

Kejsi

0reactions
gbassan-brcommented, Nov 9, 2017

I had the same problem with “SSLV3_ALERT_CERTIFICATE_UNKNOWN” because the certificate was not active on AWS IoT console. Once I activated it paho is working just fine

Read more comments on GitHub >

github_iconTop Results From Across the Web

Connecting M2MQTT Paho Python Client to AWS IoT | AWS re:Post
I am having difficulty connecting to AWS IoT with the following Python script. I followed AWS IoT Core console and created a Thing...
Read more >
AWS IoT and Raspberry Pi with paho-mqtt don't connect
If the connect and subscribe messages are shown and nothing happens after it, this is normal because you are only subscribing to a...
Read more >
Diagnosing connectivity issues - AWS IoT Core
A successful connection to AWS IoT requires:
Read more >
Connection and publishing operations using paho-mqtt not ...
Later, I received the following error(there is no connection):. python awsiot-publish.py. Loaded MQTT configuration information.
Read more >
Paho Python MQTT Client - Working with Connections
The MQTT client uses a TCP/IP connection to the broker. Once the connection is established the client can send data to the broker, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found