Skip to content

pubsub sample unexpected hangup #129

@THOM-AwS

Description

@THOM-AwS

Im trying to work through the sample code but I keep getting stuck at trying to run the script, and it coming back with errors.

python pubsub.py --endpoint <REDACTED>-ats.iot.ap-southeast-2.amazonaws.com --cert ../../certs/7894bfe332-certificate.pem.crt --key ../../certs/7894bfe332-private.pem.key --root-ca ../../certs/AmazonRootCA1.pem --topic <TOPIC> --verbosity Info --client-id <ID>

[INFO ] [2020-10-28T12:53:33Z] [b6fc8010] [event-loop] - id=0x1b94c60: Initializing edge-triggered epoll
[INFO ] [2020-10-28T12:53:33Z] [b6fc8010] [event-loop] - id=0x1b94c60: Using eventfd for cross-thread notifications.
[INFO ] [2020-10-28T12:53:33Z] [b6fc8010] [event-loop] - id=0x1b94c60: Starting event-loop thread.
[INFO ] [2020-10-28T12:53:33Z] [b6fc8010] [dns] - id=0x1ac0f70: Initializing default host resolver with 16 max host entries.
[INFO ] [2020-10-28T12:53:33Z] [b6fc8010] [channel-bootstrap] - id=0x1ac11e0: Initializing client bootstrap with event-loop group 0x1bafa28
[INFO ] [2020-10-28T12:53:33Z] [b5754460] [event-loop] - id=0x1b94c60: main loop started
[INFO ] [2020-10-28T12:53:33Z] [b5754460] [event-loop] - id=0x1b94c60: default timeout 100000, and max events to process per tick 100
Connecting to <REDACTED>-ats.iot.ap-southeast-2.amazonaws.com with client ID '<THING>'...
[INFO ] [2020-10-28T12:53:35Z] [b6fc8010] [mqtt-client] - id=0x1c53a00: using ping timeout of 3000000000 ns
[WARN ] [2020-10-28T12:53:35Z] [b5754460] [socket] - id=0xb4c04860 fd=6: setsockopt() for NO_SIGNAL failed with errno 92. If you are having SIGPIPE signals thrown, you may want to install a signal trap in your application layer.
[ERROR] [2020-10-28T12:53:35Z] [b5754460] [socket] - id=0xb4c04860 fd=6: connect failed with error code 101.
[INFO ] [2020-10-28T12:53:35Z] [b5754460] [dns] - id=0x1ac0f70: recording failure for record 2403:b300:ff00::dee:1a72 for <REDACTED>-ats.iot.ap-southeast-2.amazonaws.com, moving to bad list
[ERROR] [2020-10-28T12:53:35Z] [b5754460] [channel-bootstrap] - id=0x1ac11e0: failed to create socket with error 1049
[WARN ] [2020-10-28T12:53:35Z] [b5754460] [socket] - id=0xb4c04860 fd=6: setsockopt() for NO_SIGNAL failed with errno 92. If you are having SIGPIPE signals thrown, you may want to install a signal trap in your application layer.
[INFO ] [2020-10-28T12:53:35Z] [b5754460] [socket] - id=0xb4c04860 fd=6: connection success
[INFO ] [2020-10-28T12:53:35Z] [b5754460] [mqtt-client] - id=0x1c53a00: sending disconnect message as part of graceful shutdown.
Traceback (most recent call last):
  File "pubsub.py", line 130, in <module>
    connect_future.result()
  File "/home/pi/.local/lib/python2.7/site-packages/concurrent/futures/_base.py", line 462, in result
    return self.__get_result()
  File "/home/pi/.local/lib/python2.7/site-packages/concurrent/futures/_base.py", line 414, in __get_result
    raise exception_type, self._exception, self._traceback
awscrt.exceptions.AwsCrtError: AwsCrtError(name='AWS_ERROR_MQTT_UNEXPECTED_HANGUP', message='The connection was closed unexpectedly.', code=5134)
[ERROR] [2020-10-28T12:53:36Z] [b6fc8010] [mqtt-client] - id=0x1c53a00: Connection is not open, and may not be closed

Even getting to this point was a total grind, as I had issues with the AWSCRT library working, some other dependencies that just would not go as I expect they would. I cannot get past this point now and I have looked at a lot of other pages around this theme.

Metadata

Metadata

Assignees

No one assigned

    Labels

    guidanceQuestion that needs advice or information.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions