Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

No upload to Nightscout, error message: ssl handshake aborted #305

Open
lulukuhl opened this issue Aug 3, 2021 · 11 comments
Open

No upload to Nightscout, error message: ssl handshake aborted #305

lulukuhl opened this issue Aug 3, 2021 · 11 comments

Comments

@lulukuhl
Copy link

lulukuhl commented Aug 3, 2021

I have been experiencing issues with Nightscout upload. The phone reads the data but then there is an error message:

Nightscout website not available.
Nightscout Status: SSL handshake aborted:ssl=0x5a0165c0:I/O error during system call, Connection reset by peer

  • Uploader Version Number: 7.1.
  • Your Android Phone Model Name (e.g. Samsung J1 Ace): Samsung S3
  • Android Version Number (e.g. use 4.4 for 4.4.4): 4.3.
  • Network Connection at the time the issue occurred (Wi-Fi, Mobile): Wifi
  • (if relevant) Nightscout website version (e.g. 0.8.4 Funnel cake, master / dev branch): master

Brief Explanation of Issue

I am still on an old version of the uploader which has been working really well the last years. Reason is that I still want to use an old phone (Samsung S3) where the battery is exchangeable thus being able to always have a fully charged battery since I charge it with an external charger. I haven't updated the uploader version since 7.1. is the one working best with the old Android version.

Can it be an issue that the Android version and the uploader version are fairly old? It suddenly stopped working yesterday night and I can't figure out the issue. Heroku and the Nightscout app seem to be working fine, it really is the upload that is the issue.

Thanks so much for your support!

Uploader Error Code

Nightscout website not available.
Nightscout Status: SSL handshake aborted:ssl=0x5a0165c0:I/O error during system call, Connection reset by peer

Steps to Reproduce (for bugs)

Severity Score

@Pogman
Copy link
Collaborator

Pogman commented Aug 3, 2021

Your NS server is having an issue. Try restarting the website.

@psit
Copy link

psit commented Aug 3, 2021

Just as a sidenote: If the changeable battery is your reason to stick with the old phone, maybe think about using a powerbank with Pass-Through Charging like VARTA ENERGY series and a USB OTG Y cable. You need one that draws power from external (powerbank), not from the phone. Just in case you have to drop your setup some day. This gives you 24/7 without interruption, but with increased weight.

@lulukuhl
Copy link
Author

lulukuhl commented Aug 4, 2021

Thank you! What does restart NS in this context mean? I even deployed again yesterday and it didn’t work.

@Pogman
Copy link
Collaborator

Pogman commented Aug 4, 2021

In Heroku use the more menu and restart all dynos...

ns-restart-website

Also your database may be full try deleting some of the older entries from your sites "admin tools" page...

ns-db-clean

@lulukuhl
Copy link
Author

lulukuhl commented Aug 4, 2021

In Heroku use the more menu and restart all dynos...

ns-restart-website

Also your database may be full try deleting some of the older entries from your sites "admin tools" page...

ns-db-clean

I habe done this! Still no luck.
however I get an error message when trying to delete the documents in the admin page.

Any other suggestions?
Do you think the problem is with the NS setup or NS in general or with the uploader phone and the uploader app?
I can try using a newer uploader phone!
Or start from scratch with the app…

@psit
Copy link

psit commented Aug 4, 2021

Do you use HTTPS? Who's your issuer of the certificate? Did it change recently? Just to make sure, you could try a new phone with a recent app version, just to make sure.
I could think of an SSL issue concerning Let's Encrypt and old Android phones. I'm not sure about the state of that issue, but maybe it relates.

@lulukuhl
Copy link
Author

lulukuhl commented Aug 4, 2021

At this point, I really don't know what I am doing anymore ;-)
But I ran an SSL test and got these results:
ns

I will use another android phone tonight and if this works then I just have to assume the fact that my battery swap system is outdated.
Thank you guys for helping! This community is really great and I appreciate the help!

@benceszasz
Copy link

@Pogman for me it seems to be a new general issue with old Android versions. I see many new similar issues with old Android phones on FB groups: the uploader was working fine for a long time, but recenty the uploader started to report SSL handshake error. I have checked it on Heroku and I have found that Heroku has just recently stopped supporting old TLS versions: https://help.heroku.com/SXWA00YI/tls-v1-0-v1-1-end-of-life-schedule

@lulukuhl
Copy link
Author

Thank you for the info.
Indeed I switched to Android 10 on the uploader phone and it works. The issue was always the ssl handshake. I found a new phone with external battery that can be charged on an external device (Nokia 1.3) so my issues are solved. Although it bothers me to be forced to spend money on an otherwise perfectly working mobile….
thanks again for the support

@Pogman
Copy link
Collaborator

Pogman commented Aug 14, 2021

@benceszasz ok thanks for that. Looks like older phones are just not compatible any more.

A brief look around shows that Android 5+ phones may be min spec for now.

TLS1.1 and TLS1.2 is not enabled in Android by default for API 19 or below. If an app is running on Device running Android API 19 or older and trying to make REST request to a server that requires TLS1.1 or above, it will fail.

@benceszasz
Copy link

@Pogman based on a quick googling it seems, that there are some workarounds to support TLS 1.2 and to enforce it in OkHttp with Android 4.x devices:
https://developer.squareup.com/blog/okhttp-3-13-requires-android-5/
https://ankushg.com/posts/tls-1.2-on-android/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants