IoT サービスと通信するためにラズベリー pi を取得しようとしています。この時点では、サンプル スクリプトを実行しているだけです。生成された証明書、リベラルなアクセス ポリシーを取得し、作成したデバイスからエンドポイントを盗みました。スクリプトを実行しようとすると、次のようになります。
2016-08-06 23:30:56,282 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Paho MQTT Client init.
2016-08-06 23:30:56,283 - AWSIoTPythonSDK.core.protocol.mqttCore - INFO - ClientID: basicPubSub
2016-08-06 23:30:56,283 - AWSIoTPythonSDK.core.protocol.mqttCore - INFO - Protocol: MQTTv3.1.1
2016-08-06 23:30:56,283 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Register Paho MQTT Client callbacks.
2016-08-06 23:30:56,283 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - mqttCore init.
2016-08-06 23:30:56,284 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Load CAFile from: certs/iot-root-cert.pem
2016-08-06 23:30:56,284 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Load Key from: certs/xxxxx-private.pem.key
2016-08-06 23:30:56,284 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Load Cert from: certs/xxxxx-certificate.pem.crt
2016-08-06 23:30:56,285 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Custom setting for backoff timing: baseReconnectTime = 1 sec
2016-08-06 23:30:56,285 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Custom setting for backoff timing: maximumReconnectTime = 32 sec
2016-08-06 23:30:56,285 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Custom setting for backoff timing: minimumConnectTime = 20 sec
2016-08-06 23:30:56,286 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Custom setting for publish queueing: queueSize = -1
2016-08-06 23:30:56,286 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Custom setting for publish queueing: dropBehavior = Drop Newest
2016-08-06 23:30:56,286 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Custom setting for draining interval: 0.5 sec
2016-08-06 23:30:56,287 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Set maximum connect/disconnect timeout to be 10 second.
2016-08-06 23:30:56,287 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Set maximum MQTT operation timeout to be 5 second
2016-08-06 23:30:56,288 - AWSIoTPythonSDK.core.protocol.mqttCore - INFO - Connection type: TLSv1.2 Mutual Authentication
2016-08-06 23:30:57,124 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Disconnect result code 1
2016-08-06 23:30:58,525 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Disconnect result code 1
2016-08-06 23:31:00,973 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Disconnect result code 1
2016-08-06 23:31:05,463 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Disconnect result code 1
2016-08-06 23:31:07,079 - AWSIoTPythonSDK.core.protocol.mqttCore - ERROR - Connect timeout.
Traceback (most recent call last):
File "basicPubSub.py", line 153, in <module>
myAWSIoTMQTTClient.connect()
File "/usr/local/lib/python2.7/dist-packages/AWSIoTPythonSDK/MQTTLib.py", line 355, in connect
return self._mqttCore.connect(keepAliveIntervalSecond)
File "/usr/local/lib/python2.7/dist-packages/AWSIoTPythonSDK/core/protocol/mqttCore.py", line 291, in connect
raise connectTimeoutException()
core.exception.AWSIoTExceptions.connectTimeoutException
websocket を試すと同じことが起こります。到達可能性の問題ではないようです。その URL をうまくカールできます (ただし、応答はありません)。アイデア?