600SeriesAndroidUploader icon indicating copy to clipboard operation
600SeriesAndroidUploader copied to clipboard

No upload to Nightscout, error message: ssl handshake aborted

Open lulukuhl opened this issue 2 years ago • 11 comments

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

lulukuhl avatar Aug 03 '21 20:08 lulukuhl

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

Pogman avatar Aug 03 '21 21:08 Pogman

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.

psit avatar Aug 03 '21 21:08 psit

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

lulukuhl avatar Aug 04 '21 00:08 lulukuhl

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

Pogman avatar Aug 04 '21 01:08 Pogman

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…

lulukuhl avatar Aug 04 '21 04:08 lulukuhl

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.

psit avatar Aug 04 '21 05:08 psit

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!

lulukuhl avatar Aug 04 '21 06:08 lulukuhl

@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

benceszasz avatar Aug 14 '21 09:08 benceszasz

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

lulukuhl avatar Aug 14 '21 11:08 lulukuhl

@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.

Pogman avatar Aug 14 '21 14:08 Pogman

@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/

benceszasz avatar Aug 14 '21 22:08 benceszasz