B4J Tutorial [Server] SSL Connections

Status
Not open for further replies.

Bladimir Carrillo

Member
Licensed User
Hi all,

My app was running ok, but I have updated the keystore.jks by renew certificate date expiration and I have an error. I can access ok when by http, but not by https.

url: pichincha.sismac.net/sts

Note. After error, I have tested with old keystore.jks file, by the error persists.

Thank you in advance for any help to solve it.

Error:
ndRun(ExecuteProduceConsume.java:213)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(Exec
uteProduceConsume.java:147)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPoo
l.java:654)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool
.java:572)
at java.lang.Thread.run(Unknown Source)
2017-01-30 13:02:40.286:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-35:
java.lang.NoSuchMethodError: sun.security.ssl.SupportedEllipticCurvesExtension.c
urveIds()[I
at sun.security.ssl.ServerHandshaker.setupEphemeralECDHKeys(ServerHandsh
aker.java:1470)
at sun.security.ssl.ServerHandshaker.trySetCipherSuite(ServerHandshaker.
java:1272)
at sun.security.ssl.ServerHandshaker.chooseCipherSuite(ServerHandshaker.
java:1076)
at sun.security.ssl.ServerHandshaker.clientHello(ServerHandshaker.java:7
42)
at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.jav
a:225)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker$1.run(Unknown Source)
at sun.security.ssl.Handshaker$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ssl.Handshaker$DelegatedTask.run(Unknown Source)
at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.fill(SslConn
ection.java:613)
at org.eclipse.jetty.server.NegotiatingServerConnection.fill(Negotiating
ServerConnection.java:153)
at org.eclipse.jetty.server.NegotiatingServerConnection.onFillable(Negot
iatingServerConnection.java:98)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstra
ctConnection.java:261)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:
192)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstra
ctConnection.java:261)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoin
t.java:75)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceA
ndRun(ExecuteProduceConsume.java:213)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(Exec
uteProduceConsume.java:147)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPoo
l.java:654)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool
.java:572)
at java.lang.Thread.run(Unknown Source)
2017-01-30 13:02:59.268:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-33: Unexpected
thread death: org.eclipse.jetty.util.thread.QueuedThreadPool$3@595550f0 in qtp1
681595665{STARTED,8<=17<=200,i=1,q=0}
2017-01-30 13:02:59.237:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-40: Unexpected
thread death: org.eclipse.jetty.util.thread.QueuedThreadPool$3@595550f0 in qtp1
681595665{STARTED,8<=17<=200,i=1,q=0}
2017-01-30 13:02:59.205:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-39: Unexpected
thread death: org.eclipse.jetty.util.thread.QueuedThreadPool$3@595550f0 in qtp1
681595665{STARTED,8<=17<=200,i=1,q=0}
2017-01-30 13:02:59.190:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-37: Unexpected
thread death: org.eclipse.jetty.util.thread.QueuedThreadPool$3@595550f0 in qtp1
681595665{STARTED,8<=17<=200,i=1,q=0}
2017-01-30 13:02:59.159:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-38: Unexpected
thread death: org.eclipse.jetty.util.thread.QueuedThreadPool$3@595550f0 in qtp1
681595665{STARTED,8<=17<=200,i=1,q=0}
2017-01-30 13:02:59.284:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-35: Unexpected
thread death: org.eclipse.jetty.util.thread.QueuedThreadPool$3@595550f0 in qtp1
681595665{STARTED,8<=17<=200,i=1,q=0}
2017-01-30 13:03:12.082:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-42:
java.lang.NoSuchMethodError: sun.security.ssl.SupportedEllipticCurvesExtension.c
urveIds()[I
at sun.security.ssl.ServerHandshaker.setupEphemeralECDHKeys(ServerHandsh
aker.java:1470)
at sun.security.ssl.ServerHandshaker.trySetCipherSuite(ServerHandshaker.
java:1272)
at sun.security.ssl.ServerHandshaker.chooseCipherSuite(ServerHandshaker.
java:1076)
at sun.security.ssl.ServerHandshaker.clientHello(ServerHandshaker.java:7
42)
at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.jav
a:225)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker$1.run(Unknown Source)
at sun.security.ssl.Handshaker$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ssl.Handshaker$DelegatedTask.run(Unknown Source)
at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.fill(SslConn
ection.java:613)
at org.eclipse.jetty.server.NegotiatingServerConnection.fill(Negotiating
ServerConnection.java:153)
at org.eclipse.jetty.server.NegotiatingServerConnection.onFillable(Negot
iatingServerConnection.java:98)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstra
ctConnection.java:261)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:
192)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstra
ctConnection.java:261)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoin
t.java:75)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceA
ndRun(ExecuteProduceConsume.java:213)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(Exec
uteProduceConsume.java:147)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPoo
l.java:654)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool
.java:572)
at java.lang.Thread.run(Unknown Source)
2017-01-30 13:03:12.114:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-42: Unexpected
thread death: org.eclipse.jetty.util.thread.QueuedThreadPool$3@595550f0 in qtp1
681595665{STARTED,8<=17<=200,i=6,q=0}
2017-01-30 13:03:12.114:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-45:
java.lang.NoSuchMethodError: sun.security.ssl.SupportedEllipticCurvesExtension.c
urveIds()[I
at sun.security.ssl.ServerHandshaker.setupEphemeralECDHKeys(ServerHandsh
aker.java:1470)
at sun.security.ssl.ServerHandshaker.trySetCipherSuite(ServerHandshaker.
java:1272)
at sun.security.ssl.ServerHandshaker.chooseCipherSuite(ServerHandshaker.
java:1076)
at sun.security.ssl.ServerHandshaker.clientHello(ServerHandshaker.java:7
42)
at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.jav
a:225)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker$1.run(Unknown Source)
at sun.security.ssl.Handshaker$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ssl.Handshaker$DelegatedTask.run(Unknown Source)
at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.fill(SslConn
ection.java:613)
at org.eclipse.jetty.server.NegotiatingServerConnection.fill(Negotiating
ServerConnection.java:153)
at org.eclipse.jetty.server.NegotiatingServerConnection.onFillable(Negot
iatingServerConnection.java:98)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstra
ctConnection.java:261)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:
192)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstra
ctConnection.java:261)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoin
t.java:75)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceA
ndRun(ExecuteProduceConsume.java:213)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(Exec
uteProduceConsume.java:147)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPoo
l.java:654)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool
.java:572)
at java.lang.Thread.run(Unknown Source)
2017-01-30 13:03:12.145:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-45: Unexpected
thread death: org.eclipse.jetty.util.thread.QueuedThreadPool$3@595550f0 in qtp1
681595665{STARTED,8<=17<=200,i=6,q=0}
2017-01-30 13:03:12.254:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-47:
java.lang.NoSuchMethodError: sun.security.ssl.SupportedEllipticCurvesExtension.c
urveIds()[I
at sun.security.ssl.ServerHandshaker.setupEphemeralECDHKeys(ServerHandsh
aker.java:1470)
at sun.security.ssl.ServerHandshaker.trySetCipherSuite(ServerHandshaker.
java:1272)
at sun.security.ssl.ServerHandshaker.chooseCipherSuite(ServerHandshaker.
java:1076)
at sun.security.ssl.ServerHandshaker.clientHello(ServerHandshaker.java:7
42)
at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.jav
a:225)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker$1.run(Unknown Source)
at sun.security.ssl.Handshaker$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ssl.Handshaker$DelegatedTask.run(Unknown Source)
at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.fill(SslConn
ection.java:613)
at org.eclipse.jetty.server.NegotiatingServerConnection.fill(Negotiating
ServerConnection.java:153)
at org.eclipse.jetty.server.NegotiatingServerConnection.onFillable(Negot
iatingServerConnection.java:98)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstra
ctConnection.java:261)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:
192)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstra
ctConnection.java:261)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoin
t.java:75)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceA
ndRun(ExecuteProduceConsume.java:213)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(Exec
uteProduceConsume.java:147)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPoo
l.java:654)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool
.java:572)
at java.lang.Thread.run(Unknown Source)
2017-01-30 13:03:12.286:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-47: Unexpected
thread death: org.eclipse.jetty.util.thread.QueuedThreadPool$3@595550f0 in qtp1
681595665{STARTED,8<=17<=200,i=6,q=0}
2017-01-30 13:03:12.348:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-49:
java.lang.NoSuchMethodError: sun.security.ssl.SupportedEllipticCurvesExtension.c
urveIds()[I
at sun.security.ssl.ServerHandshaker.setupEphemeralECDHKeys(ServerHandsh
aker.java:1470)
at sun.security.ssl.ServerHandshaker.trySetCipherSuite(ServerHandshaker.
java:1272)
at sun.security.ssl.ServerHandshaker.chooseCipherSuite(ServerHandshaker.
java:1076)
at sun.security.ssl.ServerHandshaker.clientHello(ServerHandshaker.java:7
42)
at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.jav
a:225)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker$1.run(Unknown Source)
at sun.security.ssl.Handshaker$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ssl.Handshaker$DelegatedTask.run(Unknown Source)
at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.fill(SslConn
ection.java:613)
at org.eclipse.jetty.server.NegotiatingServerConnection.fill(Negotiating
ServerConnection.java:153)
at org.eclipse.jetty.server.NegotiatingServerConnection.onFillable(Negot
iatingServerConnection.java:98)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstra
ctConnection.java:261)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:
192)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstra
ctConnection.java:261)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoin
t.java:75)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceA
ndRun(ExecuteProduceConsume.java:213)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(Exec
uteProduceConsume.java:147)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPoo
l.java:654)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool
.java:572)
at java.lang.Thread.run(Unknown Source)
2017-01-30 13:03:12.379:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-49: Unexpected
thread death: org.eclipse.jetty.util.thread.QueuedThreadPool$3@595550f0 in qtp1
681595665{STARTED,8<=17<=200,i=6,q=0}
2017-01-30 13:03:12.801:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-41:
java.lang.NoSuchMethodError: sun.security.ssl.SupportedEllipticCurvesExtension.c
urveIds()[I
at sun.security.ssl.ServerHandshaker.setupEphemeralECDHKeys(ServerHandsh
aker.java:1470)
at sun.security.ssl.ServerHandshaker.trySetCipherSuite(ServerHandshaker.
java:1272)
at sun.security.ssl.ServerHandshaker.chooseCipherSuite(ServerHandshaker.
java:1076)
at sun.security.ssl.ServerHandshaker.clientHello(ServerHandshaker.java:7
42)
at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.jav
a:225)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker$1.run(Unknown Source)
at sun.security.ssl.Handshaker$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ssl.Handshaker$DelegatedTask.run(Unknown Source)
at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.fill(SslConn
ection.java:613)
at org.eclipse.jetty.server.NegotiatingServerConnection.fill(Negotiating
ServerConnection.java:153)
at org.eclipse.jetty.server.NegotiatingServerConnection.onFillable(Negot
iatingServerConnection.java:98)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstra
ctConnection.java:261)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:
192)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstra
ctConnection.java:261)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoin
t.java:75)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceA
ndRun(ExecuteProduceConsume.java:213)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(Exec
uteProduceConsume.java:147)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPoo
l.java:654)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool
.java:572)
at java.lang.Thread.run(Unknown Source)
2017-01-30 13:03:12.832:WARN:eek:ejut.QueuedThreadPool:qtp1681595665-41: Unexpected
thread death: org.eclipse.jetty.util.thread.QueuedThreadPool$3@595550f0 in qtp1
681595665{STARTED,8<=17<=200,i=6,q=0}
 

Bladimir Carrillo

Member
Licensed User
I don't think that it is related to the SSL key. Http2 requires some configuration. Start with disabling this feature.
After several failed attempts, I've finally been able to solve the problem. First I tried to solve it by recompiling the application with different name, but it did not work. Then I decided to configure a new server with http and https access the same as the first, I ran the application and the problem disappeared. Users can now enter the application via https without problem.

Any ideas ?
 

LucaMs

Expert
Licensed User

jeffwu-00

Member
Licensed User
I used B4J Tutorial [Server] SSL Connections (https://www.b4x.com/android/forum/threads/server-ssl-connections.40130/) and established an https server. But my host credentials are generated using Keytool, not valid credentials. If I use httpjob.download (), I can connect to the https server normally. But if I use httpjob.PostString () I cannot connect to the https server. I found a solution for [B4X] Trust all SSL Socket in the forum (https://www.b4x.com/android/forum/threads/b4x-trust-all-ssl-socket.101952/#content). I do n’t know how B4J (1st post) and B4A (2nd post) mentioned in this solution should be used. Thank you.
 
Status
Not open for further replies.
Top