Re: network error: SSLException while building HttpClient

59 views
Skip to first unread message

ratten

unread,
Oct 15, 2020, 1:46:26 PM10/15/20
to public...@ankidroid.org
Hello and thanks for developing an Android Client for Anki.

I setup my own ankisyncd-server and setup a nginx as proxy with a self-signed SSL-Certificate.

Then I syncd from my Desktop-Anki to it, that works fine (I used the standart my-server-name:27701). Now I wanna use my new Smartphone with the new installed empty AnkiDroid.

My AnkiDroid Version is 2.13.5
Android Version: 10 ACR
UUID: 00945474-ea8c-41fc-be76-c5630f4bba8b
Scheduler: std


I konfigured my ankiDroid to talk to my server:
Sync-URL: https://my-server.lan/home
Media-URL: https://my-server.lan/data

After authentification ich got the following Error:

network-error SSLExeption while Building httpClient.

I started searching, for my error in the ngnix.conf:
```
server {
listen 80;
listen [::]:80;

listen 443 ssl;
listen [::]:443 ssl;

server_name my-server.lan;
root /usr/share/nginx/html;

ssl_certificate /etc/ssl/certs/anki.crt;
ssl_certificate_key /etc/ssl/private/anki.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

location /home/ {
proxy_pass http://my-server.lan:27701/;
client_max_body_size 10M;
}

location /data/ {
proxy_pass http://my-server.lan:27701/msync/;
client_max_body_size 10M;
}
}

```
I tryed to debug with my old smartphone where I didn't update AnkiDroid, so it can use port:80. It has the AnkiDroid Version:2.11.2 with Android 7.1.2

with the setting:

Sync-URL: http://my-server.lan/home
Media-URL: http://my-server.lan/data

syncing works, but not with https I got a similar Error:
Connection break after waitingtime. maybe there is a problem with your Internetconnection or you have a very big file in your mediadirectory.

network-error SSLExeption while Building httpClient.

I build the SSL-Certificate with this Command:
openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/anki.key -out /etc/ssl/certs/anki.crt
I exported it with firefox and imported it in Android 10.

Because I read that the missing certificate can be an issue-result.

But now I don't know how to continue debugging.

Maybe someone can help me debugging the problem. I'm still learning IT-stuff, so maybe I haven't seen a mistake in the configurations.

best wishes
Susanne

signature.asc

David Allison

unread,
Oct 15, 2020, 7:43:43 PM10/15/20
to anki-a...@googlegroups.com
Hi, you should use a https:// URL when accessing your sync server. AnkiDroid no longer supports insecure connections.

You'll also need to configure HTTPS for your server.

All the best,

David





--
You received this message because you are subscribed to the Google Groups "AnkiDroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anki-android...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/anki-android/20201015172123.d5liehflv54nojvf%40no.
Reply all
Reply to author
Forward
0 new messages