Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT Client Exception After Failed Connection Attempt (IDFGH-1330) #3619

Closed
gregjesl opened this issue Jun 11, 2019 · 1 comment
Closed

MQTT Client Exception After Failed Connection Attempt (IDFGH-1330) #3619

gregjesl opened this issue Jun 11, 2019 · 1 comment

Comments

@gregjesl
Copy link
Contributor

gregjesl commented Jun 11, 2019

Environment

  • IDF version (run git describe --tags to find it): v4.0-dev-779-gbeff4adc7
  • Build System: Make
  • Compiler version (run xtensa-esp32-elf-gcc --version to find it): 1.22.0-80-g6c4433a5
  • Operating System: Windows
  • Power Supply: USB

Problem Description

If the MQTT client was unable to connect and esp_mqtt_client_stop() is called, an exception is thrown.

Expected Behavior

esp_mqtt_client_stop() should be able to handle the case where the client was never connected.

Background

I am attempting to support static IP addresses. I accidentally misconfigured the DNS server and as a result the ESP32 was unable to resolve the domain name for the MQTT server.

Debug Logs

E (11246) esp-tls: couldn't get hostname for :[MQTT server address]:
E (11247) esp-tls: Failed to open new connection
E (11247) TRANS_SSL: Failed to open a new connection
E (11253) MQTT_CLIENT: Error transport connect
Guru Meditation Error: Core  0 panic'ed (StoreProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x40183451  PS      : 0x00060730  A0      : 0x80183851  A1      : 0x3ffddf10
0x40183451: fini_message at C:/esp-idf/components/mqtt/esp-mqtt/lib/mqtt_msg.c:206

A2      : 0x3ffc0784  A3      : 0x000000e0  A4      : 0x00000000  A5      : 0x000000e0
A6      : 0x00000005  A7      : 0x3ffb3a04  A8      : 0x00000001  A9      : 0x00000003
A10     : 0x00000004  A11     : 0x00000000  A12     : 0x00000000  A13     : 0x8000007f
A14     : 0xffffff80  A15     : 0x00000080  SAR     : 0x00000004  EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000003  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffff5

ELF file SHA256: 6c7b844b4889c461910b429e7826d783952ae36905737ff6ae825b5c84947542

Backtrace: 0x40183451:0x3ffddf10 0x4018384e:0x3ffddf40 0x40182aa4:0x3ffddf60 0x40111835:0x3ffddf80 0x40115482:0x3ffddfc0
0x40183451: fini_message at C:/esp-idf/components/mqtt/esp-mqtt/lib/mqtt_msg.c:206

0x4018384e: mqtt_msg_disconnect at C:/esp-idf/components/mqtt/esp-mqtt/lib/mqtt_msg.c:206

0x40182aa4: esp_mqtt_client_stop at C:/esp-idf/components/mqtt/esp-mqtt/mqtt_client.c:1121
@github-actions github-actions bot changed the title MQTT Client Exception After Failed Connection Attempt MQTT Client Exception After Failed Connection Attempt (IDFGH-1330) Jun 11, 2019
@gregjesl
Copy link
Contributor Author

Pull request submitted

david-cermak pushed a commit to espressif/esp-mqtt that referenced this issue Jul 3, 2019
Closes espressif/esp-idf#3619
Closes #120
Merges #118

Signed-off-by: David Cermak <cermak@espressif.com>
@igrr igrr closed this as completed in 6289a26 Jul 25, 2019
trombik pushed a commit to trombik/esp-idf that referenced this issue Aug 9, 2019
david-cermak added a commit to espressif/esp-mqtt that referenced this issue Dec 16, 2022
…x static analysis warnings

closes espressif/esp-idf#3619 including mqtt commit 7223302
closes espressif/esp-idf#3215 including mqtt commit caf5007
egnor pushed a commit to egnor/esp-mqtt that referenced this issue Dec 23, 2022
egnor pushed a commit to egnor/esp-mqtt that referenced this issue Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant