-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
DNS record not found #174
Comments
@flexiti Please provide us your code and your device type that you are using. Thank you |
Now I have another symptoms (more code?), in any case, as you get an error like this below- from this moment each call is completed with error until a soft reset. Debug with error:Download: http://api.thingspeak.com:80/update?key=YOXULSNC3XXXXXXX&field6=23.9&field2=52.7&field3=13&status=dev_ip:192.168.0.188 onDataSent --> ResponseCode: 0 MB TcpConnection error: -8 Normal debug:Download: http://api.thingspeak.com:80/update?key=YOXULSNC3RXXXXXX&field6=23.9&field2=52.9&field3=11&status=dev_ip:192.168.0.188 MB_HttpClient_onReceive buf: 68359 MB_HttpClient_onReceive code: 200 Send Time --> 28.07.2015 16:20:37 TCP connection closing |
Hi, I will publish source on GitHub. Can you tell me how best to publish it on Git and not publish Git Wi-Fi passwords,...... ? I'll be grateful for the tip or best practices. Best Regards and thanks Mariusz From: Dmitry Kireev [mailto:notifications@github.com] @flexiti https://github.com/flexiti Please provide us your code and your device type that you are using. Thank you — |
You can define ssid and password variables globally in Eclipse Environment settings for all your projects. |
I think you set it in Environment section |
ok, thanks |
I found problem, the test device is DHT22 and ESP01, Can anyone verify this? |
My log file, before and after non existing server connection (non existing server marked as KEIL) THINGSPEAK Download: http://api.thingspeak.com:80/update?key=YOXULSNCXXXXXX&field6=23.2&field2=48.7&status=dev_ip:192.168.0.188 MB_HttpClient_onReceive buf: 70988 MB_HttpClient_onReceive code: 200 Send Time --> 30.07.2015 16:08:08 MB_TcpClient_onFinished state=3 KEIL Download: http://192.168.0.98:1002/u?k&f6=23.2&f2=48.8&s Send Time --> 30.07.2015 16:09:09 MB_TcpClient_onFinished state=4 THINGSPEAK Download: http://api.thingspeak.com:80/update?key=YOXULSNCXXXXXXX&field6=23.1&field2=49.0&status=dev_ip:192.168.0.188 MB_HttpClient_onReceive buf: 70990 MB_HttpClient_onReceive code: 200 Send Time --> 30.07.2015 16:10:09 MB_TcpClient_onFinished state=4 |
Btw. Previous logs are direct IP address, when I use http://api.thingspeak.com still have problem with DNS after one or few hours. If it hapens, continues until reset. DNS error example.THINGSPEAK Download: http://api.thingspeak.com:80/update?key=YOXULSNCXXXXXXXXX&field6=22.6&field2=49.4&status=dev_ip:192.168.0.188 Send Time --> 30.07.2015 17:25:03 MB_TcpClient_onFinished state=4 |
Simple bug example |
@flexiti : I just tried your Simple bug example and noticed the following :
Then I see the the request to the non-exsisting server :
And the following request to thingspeak :
Although the onDataSent(HttpClient& client, bool successful), is called with bool = false (not successful). It looks to me that the actual communication is working correctly. Can you verify that ? Is a big difference in looking for the underlying issue. |
Yes, Ansver from thingspeak server is ok (or only looks ok?), but Sming-HttpClient interpreting is as a fail. Why ? I suppose some variables that are not properly initialized before the start of the connection or previous defective call something 'destroys' |
I've seen this code in the httpserver_bootstrap example.
So there is an addtional call to reset() after completion. Could you update your "simple bug program" to :
Notice the added thingSpeak.reset(). |
Problem is deeper (not HttpClient class but maybe in TCPconnection class ) ps. thingSpeak.reset nothing changes |
I don't know whether this is a separate issue or the cause of the above but I see in
It returns the result of tcp_connection but that will also return true if the connection fails due to abort/timeout/other (is statement from lwip documentation) |
For me this is weird: |
I found a solution to "not existing server" problem. (https://github.com/flexiti/HttpClient_Bug ) SimngCore-Network-TcpClient.cppvoid TcpClient::onError(err_t err)
} |
First : I was wrong in my statement above on connect, sorry for the confusion, but.. This is TcpClose code :
This is debuglog :
Knowing the reason, now to solve. I will work on that but from tomorrow on I am out for a couple of days, so solution might take a little longer. |
read my last post :) |
Yes I saw it wen I pushed the "comment" button. |
Or for solution add the |
And we need to check whether the buffer/stream is deleted correctly otherwise there will be memory leakage |
yes,can You ? ..... and reset in TcpConnect must be done twice bool TcpClient::connect(String server, int port) |
Maybe best location is in TcpClient::onfinished. |
@flexiti : I submitted a PR to solve this to the latest idea that we had. |
This problem is solved, now only #200 |
After 2 and more hours of work DHT example reading loop ( every 2 minutes) I have :
8:17:52.338, connect to: api.thingspeak.com
8:17:52.338, realloc 121 -> 252
8:18:05.993, DNS record not found: api.thingspeak.com
8:18:05.993, -TCP connection
8:18:05.993, Failed
Using direct IP work all the time
The text was updated successfully, but these errors were encountered: