Skip to content

issue running basicPubSub.py #27

@Priyalc

Description

@Priyalc

Hi,

I am trying to ran basicPubSub.py from Amzon EC2 machine, after giving path for root CA, Cerificates & private key file path while running file i get below error:

2016-11-19 23:58:52,719 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Paho MQTT Client init.
2016-11-19 23:58:52,719 - AWSIoTPythonSDK.core.protocol.mqttCore - INFO - ClientID: basicPubSub
2016-11-19 23:58:52,719 - AWSIoTPythonSDK.core.protocol.mqttCore - INFO - Protocol: MQTTv3.1.1
2016-11-19 23:58:52,719 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Register Paho MQTT Client callbacks.
2016-11-19 23:58:52,720 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - mqttCore init.
2016-11-19 23:58:52,720 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Load CAFile from: /home/ec2-user/certificates/VeriSign-Class+3-Public-Primary-Certification-Authority-G5.pem
2016-11-19 23:58:52,720 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Load Key from: /home/ec2-user/certificates/3b7c2ac37b-private.pem.key
2016-11-19 23:58:52,720 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Load Cert from: /home/ec2-user/certificates/3b7c2ac37b-certificate.pem.crt
2016-11-19 23:58:52,720 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Custom setting for backoff timing: baseReconnectTime = 1 sec
2016-11-19 23:58:52,720 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Custom setting for backoff timing: maximumReconnectTime = 32 sec
2016-11-19 23:58:52,720 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Custom setting for backoff timing: minimumConnectTime = 20 sec
2016-11-19 23:58:52,720 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Custom setting for publish queueing: queueSize = -1
2016-11-19 23:58:52,720 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Custom setting for publish queueing: dropBehavior = Drop Newest
2016-11-19 23:58:52,720 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Custom setting for draining interval: 0.5 sec
2016-11-19 23:58:52,720 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Set maximum connect/disconnect timeout to be 10 second.
2016-11-19 23:58:52,720 - AWSIoTPythonSDK.core.protocol.mqttCore - DEBUG - Set maximum MQTT operation timeout to be 5 second
2016-11-19 23:58:52,721 - AWSIoTPythonSDK.core.protocol.mqttCore - INFO - Connection type: TLSv1.2 Mutual Authentication
Traceback (most recent call last):
File "basicPubSub.py", line 133, in
myAWSIoTMQTTClient.connect()
File "/usr/local/lib/python2.7/site-packages/AWSIoTPythonSDK/MQTTLib.py", line 403, in connect
return self._mqttCore.connect(keepAliveIntervalSecond)
File "/usr/local/lib/python2.7/site-packages/AWSIoTPythonSDK/core/protocol/mqttCore.py", line 290, in connect
self._pahoClient.connect(self._host, self._port, keepAliveInterval) # Throw exception...
File "/usr/local/lib/python2.7/site-packages/AWSIoTPythonSDK/core/protocol/paho/client.py", line 655, in connect
return self.reconnect()
File "/usr/local/lib/python2.7/site-packages/AWSIoTPythonSDK/core/protocol/paho/client.py", line 777, in reconnect
sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
File "/usr/lib64/python2.7/socket.py", line 557, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
socket.gaierror: [Errno -2] Name or service not known

Please suggest. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions