Page 1 of 1

javax.net.ssl.sslexception error when trying to add a new VPN

Posted: Mon Nov 27, 2017 4:22 pm
by Cyclops
Hello guys.
I have a Probox2 EX tvbox with android 4.4.2, when i try to import a new vpn connection, i put in the server, username and pass, when i click the import button i get this error: javax.net.ssl.sslexception: connection closed by peer.
I have already added a VPN some months ago and that worked fine, it connects and work flawless, so this happends only on adding a new one.
have seached around a bit and it seems to be related to 4.4.2.
i have the newest firmware for the box.
Any way around it?

EDIT: Somehow there was a extra javax snook into the title.

Re: javax.net.ssl.sslexception error when trying to add a new VPN

Posted: Tue Nov 28, 2017 8:06 am
by ordex
Hi Cyclops, are you using the latest version of OpenVPN Connect for Android? Does the connection log say something more?

Thanks

Re: javax.net.ssl.sslexception error when trying to add a new VPN

Posted: Tue Nov 28, 2017 4:45 pm
by Cyclops
Im using: 1.1.24 build 92 as far as i can see the log only start......logging when connecting, not when adding VPNs is there a log im missing someplace?

Re: javax.net.ssl.sslexception error when trying to add a new VPN

Posted: Sat Dec 02, 2017 3:17 pm
by ordex
No sorry, I miunderstood your previous message. There is no log for the "import" operation. This is kind of weird. I have never seen such error.
Do you have a chance to connect your phone to a laptop with a USB cable and run "adb logcat" ? It should show the full stacktrace of the crash. That would be helpful.

Thanks!

Re: javax.net.ssl.sslexception error when trying to add a new VPN

Posted: Wed Dec 06, 2017 11:23 am
by Cyclops
Hello again. sorry it took so long, here is what logcat says when i click the import button. i cut it down to show only the openvpn error, if you want the whole chebang let me know. (there is A LOT of stuff)

Code: Select all

E/OpenVPNClientBase( 5397): import_profile
E/OpenVPNClientBase( 5397): javax.net.ssl.SSLException: Connection closed by peer
E/OpenVPNClientBase( 5397):     at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
E/OpenVPNClientBase( 5397):     at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:405)
E/OpenVPNClientBase( 5397):     at com.android.okhttp.Connection.upgradeToTls(Connection.java:146)
E/OpenVPNClientBase( 5397):     at com.android.okhttp.Connection.connect(Connection.java:107)
E/OpenVPNClientBase( 5397):     at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:294)
E/OpenVPNClientBase( 5397):     at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
E/OpenVPNClientBase( 5397):     at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
E/OpenVPNClientBase( 5397):     at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
E/OpenVPNClientBase( 5397):     at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:89)
E/OpenVPNClientBase( 5397):     at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197)
E/OpenVPNClientBase( 5397):     at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:254)
E/OpenVPNClientBase( 5397):     at net.openvpn.openvpn.HttpsClient$Task.write(HttpsClient.java:337)
E/OpenVPNClientBase( 5397):     at net.openvpn.openvpn.HttpsClient$Task.get_session_id(HttpsClient.java:361)
E/OpenVPNClientBase( 5397):     at net.openvpn.openvpn.OpenVPNClientBase$7.run(OpenVPNClientBase.java:963)
E/OpenVPNClientBase( 5397):     at java.lang.Thread.run(Thread.java:841)

Re: javax.net.ssl.sslexception error when trying to add a new VPN

Posted: Wed Dec 06, 2017 1:42 pm
by ordex
Thanks a lot. This should be enough.
I'll get back to you once I'll have enough clue of what is going on.

One last question: does it happen when you try to import *every* profile? or only with particular ones?
May you upload the profile (without any sensible data) so that I can have it as reference?

Thanks

Re: javax.net.ssl.sslexception error when trying to add a new VPN

Posted: Thu Dec 07, 2017 7:44 am
by ordex
Hello,
may I ask you how are you importing the profile? Are you importing it from your own OpenVPN Access Server instance?

Generally it seems there is a connection problem to the server where the profile is stored.

Thanks

Re: javax.net.ssl.sslexception error when trying to add a new VPN

Posted: Thu Dec 07, 2017 4:28 pm
by Cyclops
Hello again.
Im not realy importing from a file. just adding a new server, tree squares on the top-right->import->import access server profile. i have a lifetime subscription from celo.net vpn's they have servers all over the world. all the servers work great on both my phone and my pc, i tried a free vpn server i quite randomly found on google just now to test if it was celo who had some problems, but it gave the same error, so i dont think its a server issue, plus i have already added a server on Android from celo some month ago, it connects perfectly. im almost sure it happened from one of the latest updates from OpenVPN connect on Android. adding a server on openvpn connect on PC works normal (and it connects)

Edit: Clarification

Re: javax.net.ssl.sslexception error when trying to add a new VPN

Posted: Sat Dec 09, 2017 10:49 am
by novaflash
Just barging in here. I've done tests with the latest version and it imports from Access Server just fine. I even did a bogus attempt, like with username test and password test, on sw1.celo.net and it reported that the authentication had failed. When it gets to that point, obviously communication with the server is working.

Connection closed by peer would seem to suggest that the connection was closed by the server for some reason. Don't quite know why though.

Anyways, the real reason I showed up here was to suggest an alternative. Go to the web interface using your web browser, change 'connect' to 'login' and enter your credentials. Then download either a user-locked or auto-login type profile, save it to disk, and then import that into your Android client.

Re: javax.net.ssl.sslexception error when trying to add a new VPN

Posted: Sat Dec 09, 2017 1:50 pm
by ordex
I'd recommend following novaflash's suggestion for the time being. Whatever the issue is, seems to be related to your version of Android. We'll keep an eye on the problem and we'll try to fix it once we'll get a better understanding.

Re: javax.net.ssl.sslexception error when trying to add a new VPN

Posted: Sun Dec 10, 2017 8:39 pm
by Cyclops
First thanks so much for helping, i didnt know you can import profiles straight from the servers.

It never ends hehe. new error after trying to import the .ovpn from a celo server.
"error parsing openvpn profile : client.ovpn : option_error : remote option not specified"
The exact same profile connects fine on windows 10. i also tried different servers, same thing.
I took a quick look at the client.ovpn but did not find any obvious place to start. same with the options in openvpn client.
Pretty sure this is an easy one, but not obvious to me.

Re: javax.net.ssl.sslexception error when trying to add a new VPN

Posted: Sun Dec 10, 2017 9:09 pm
by TinCanTech
The error is:
Cyclops wrote:
Sun Dec 10, 2017 8:39 pm
"error parsing openvpn profile : client.ovpn : option_error : remote option not specified"
Your client config does not know where to find the server because it requires a remote option.