Skip to content
This repository was archived by the owner on Feb 4, 2026. It is now read-only.
This repository was archived by the owner on Feb 4, 2026. It is now read-only.

Connection refused: Unable to run lightController.py file running #40

Description

@supriya-s-jadhav

I have created a folder "test" that has cert,public key, private key of gg_switch and gg_trafficlight,roo cert, lightcontroller.py and trafficlight.py. Ping command works fine. Now, when I am trying to run the below command:
cd path-to-certs-folder
python lightController.py --endpoint AWS_IOT_ENDPOINT --rootCA root-ca-cert.pem --cert switch.cert.pem --key switch.private.key --thingName GG_TrafficLight --clientId GG_Switch
I got errors as follows:
Traceback (most recent call last):
File "lightController.py", line 210, in
myAWSIoTMQTTShadowClient.connect()
File "/Library/Python/2.7/site-packages/AWSIoTPythonSDK/MQTTLib.py", line 1271, in connect
return self._AWSIoTMQTTClient.connect(keepAliveIntervalSecond)
File "/Library/Python/2.7/site-packages/AWSIoTPythonSDK/MQTTLib.py", line 513, in connect
return self._mqtt_core.connect(keepAliveIntervalSecond)
File "/Library/Python/2.7/site-packages/AWSIoTPythonSDK/core/protocol/mqtt_core.py", line 196, in connect
self.connect_async(keep_alive_sec, self._create_blocking_ack_callback(event))
File "/Library/Python/2.7/site-packages/AWSIoTPythonSDK/core/protocol/mqtt_core.py", line 223, in connect_async
raise e
socket.error: [Errno 61] Connection refused

What did I miss in the configuration setting? I appreciate your response to my query. Thank you so much in advance for your time and help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions