Connection to AWS client fails #331
Replies: 4 comments 7 replies
-
Hello @AbdullahGaw , Thank you very much for your submission. Could you please provide the following information:
I am assuming that you have made no changes in your code/permission that would result in the behavior described: This might also be an interesting discussion to review : https://repost.aws/questions/QUMnBK_fMNSJayc8JG0YtP2A/timeouts-using-aws-iot-device-sdk-python Best regards, Yasmine |
Beta Was this translation helpful? Give feedback.
-
Hi @AbdullahGaw, we tried to reproduce the issue locally but failed. It would be nice if you could share more details on configurations and connect setup. The The true question is that why the client failed to connect. From the second part of the log, we can see that the connection was timed out, which mean, the client did not received responses from the server (within 30 second). Would you mind checkout the IoT service log to see if the server receive the "CONNECT" request and sending the CONNACK packet out in time? There are many possible causes here. Let's start with checking the service log. Instructions on iot watch logs |
Beta Was this translation helpful? Give feedback.
-
Could you mention what the root problem was, in case others stumble on this issue? |
Beta Was this translation helpful? Give feedback.
-
Hi @bretambrose, Yes, I was putting it together, Short answer: Long answer: I hope this is helpful and makes sense, Thank you @yasminetalby and @xiazhvera |
Beta Was this translation helpful? Give feedback.
-
I am trying to publish to MQTT using (some code snippets):
from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient
client = AWSIoTMQTTClient(client_id)
configure(client)
**inside configure function
client_id.configureMQTTOperationTimeout(60)
client_id.configureEndpoint(end_point, port)
client_id.configureCredentials(path_to_CA, path_to_private_key, path_to_cert_pem)
up tothis point all the logs show up without issues, and confirming the steps above worked. once it reaches this line, below
client.connect()
it freezes, and the IoT console eventually timesout (sometimes i tried to keep console alive for over 15 minutes)
however only once, with one of the IoTs I have this worked and it wokred randomly after 2 hours from my last attempt to run the ascript.
is this normal ? if so what is the time maximum and minimum it takes ?
how can i avoid this ?
Beta Was this translation helpful? Give feedback.
All reactions