Skip to content

[E][WiFiGeneric.cpp:641] hostByName(): DNS Failed for CE #1595

Closed
@wegunterjr

Description

@wegunterjr

Hardware:

Board: ESP32 Dev Module
Core Installation/update date: version 3.5.4/ says most up to date (Seems wrong?)
IDE name: Platform.io
Flash Frequency: 40Mhz
Upload Speed: 115200

Description:

Not sure what is happening, but this is the error I am getting:

[E][WiFiGeneric.cpp:641] hostByName(): DNS Failed....
`

I think it has to do with calling WiFi.begin(sid, pwd), but wanted to verify..

Activity

jontay81

jontay81 commented on Jul 30, 2018

@jontay81

Hardware:
Boards: Adafruit Feather ESP32, HiLetgo ESP32 Dev Board
Core Installation/update date: July 7. 2018 install date
IDE name: VSCode / Arduino Extension
Flash Frequency: 80Mhz
Upload Speed: 115200

Description:
Having this same error when scanning for BLE signals then issuing a POST request over WiFi to a LAN server with DNS setup through my router.

It occurs intermittently - somewhere between 1 and 4 hours after reset. After one occurrence, the error occurs every time the device attempts a POST request.

Haven't tested on an internet DNS lookup or using a LAN IP address yet.

[V][HTTPClient.cpp:140] beginInternal(): url: http://dev-wifi:3100/api/beacon
[D][HTTPClient.cpp:181] beginInternal(): host: dev-wifi port: 3100 url: /api/beacon
[E][WiFiGeneric.cpp:659] hostByName(): DNS Failed for dev-wifi
[D][HTTPClient.cpp:846] connect(): failed connect to dev-wifi:3100
[W][HTTPClient.cpp:1124] returnError(): error(-1): connection refused

I suppose there's a way to catch the error and reset the wifi connection that might work. I'll update this if I find a workaround.

copercini

copercini commented on Oct 12, 2018

@copercini
Contributor

I'm also getting it during or after BLE scans

copercini

copercini commented on Oct 12, 2018

@copercini
Contributor

This seems to happen here when a task has a priority too high (over 4) or may the wifi code isn't pinned to arduino core

copercini

copercini commented on Oct 12, 2018

@copercini
Contributor

I think I found the problem: there is a task that handle the hostByName() command here

This task has priority 2, so if you create other tasks with more priority, the reported bug will appear

roger-zacharczyk

roger-zacharczyk commented on Feb 13, 2019

@roger-zacharczyk

Having the same issue despite the update. The message "STA IP..., GW... " is logged, though, so it gets all the addresses needed.

roger-zacharczyk

roger-zacharczyk commented on Feb 13, 2019

@roger-zacharczyk

Nevermind that. I passed "http://hostname" instead of just "hostname".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      [E][WiFiGeneric.cpp:641] hostByName(): DNS Failed for CE · Issue #1595 · espressif/arduino-esp32