-
Notifications
You must be signed in to change notification settings - Fork 95
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
InfluxDB write failed: connection failed #216
Comments
@ewwachter, make sure you have the correct Server URL, not |
Hi, thanks for the update, please see the log: 6.509 [D] Org: removed Please note that I've removed/replaced token, org, bucket values |
As you are using HTTPS you should have started with the SecureWrite example. Your code most probably fails due to certificate validation. // Accurate time is necessary for certificate validation and writing in batches
// For the fastest time sync find NTP servers in your area: https://www.pool.ntp.org/zone/
// Syncing progress and the time will be printed to Serial.
timeSync(TZ_INFO, "pool.ntp.org", "time.nis.gov");
// Alternatively, set insecure connection to skip server certificate validation
//client.setInsecure();
|
I see. What should I define as TZ_INFO? I cannot find this information. I'm currently based in the UK |
Set timezone string according to https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html
|
I've tried with Central Europe: "CET-1CEST,M3.5.0,M10.5.0/3" and it gives the same error, but now I can see the Synchronized time: Tue Apr 11 17:19:53 2023 Which is central europe and not the UK one. Can this be the issue? How can I find the TZ_INFO for UK? |
I did manage to change the timezone: #define TZ_INFO "GMT0BST,M3.5.0/1,M10.5.0/2" Now I get the correct datetime, but still got the same error |
Arduino Core for ESP8266 has a nice set of TZ constants: https://github.com/esp8266/Arduino/blob/master/cores/esp8266/TZ.h. |
It works! Many thanks. So, essentially for some reason it is not working securely? is that the issue? |
It looks like the default included certificate doesn't work now. I will check later. You can add the new server certificate in your app if needed: https://github.com/tobiasschuerg/InfluxDB-Client-for-Arduino#secure-connection |
Hi , @vlastahajek I m having the same issue using an ESP8266 running the basic write example , the error message is 01:56:34.755 -> 165.421 [D] POST request - http://192.168.0.31:8086/api/v2/write?org=9195xxxxxxxxf&bucket=ESP8266, data: 68bytes, type text/plain Thank you very much for any support on this |
@SPX10SF, there must be a connection problem between the ESP and the server. Check if you can reach the server from a different computer (e.g. from a mobile phone try load UI at http://192.168.0.31:808 |
Hi @vlastahajek , you re right , i m not able to access from a mobile phone . Mobile phone and computer are connected to the same wifi network . Looks like computer firewall is closing 8086 port . Thank you very much for your help ! |
Steps to reproduce:
I've tried to reproduce the basic write example: https://github.com/tobiasschuerg/InfluxDB-Client-for-Arduino/blob/master/examples/BasicWrite/BasicWrite.ino
I fulfilled the information, INFLUXDB_URL, INFLUXDB_TOKEN, INFLUXDB_TOKEN, INFLUXDB_ORG and INFLUXDB_BUCKET.
Expected behavior:
I would expect wifi connected and influxDB connect
Actual behavior:
Wifi is connected, but influxdb has error:
InfluxDB connection failed: connection failed
Writing: wifi_status,device=ESP8266,SSID= rssi=-84i
InfluxDB write failed: connection failed
Wait 10s
Specifications:
The text was updated successfully, but these errors were encountered: