I can only establish a certain amount of connections, seems like if a pooled connection is used again, the connection somehow gets corrupted (or something with the underlying ssl engine).
I can reproduce this issue using Python with requests module, separate get requests in a loop, no sessions.
In the end I get a "javax.net.ssl.SSLProtocolException: Received message has bad padding" exception, exactly during the first request exceeding "initialConnections" count (default is 100).
If I try to set "pooledConnections" to false, that doesn't work either (directly throws an "W/SocketClient: write error (Broken pipe)" error).
Any ideas, or is something wrong with the server configuration?
Complete stack trace:
org.restlet.ext.nio.internal.connection.Connection onError
WARNING: Received message has bad padding, stacktrace: [Ljava.lang.StackTraceElement;@41af1c78
javax.net.ssl.SSLProtocolException: Received message has bad padding
at com.android.org.conscrypt.ConnectionStateTLS.decrypt(ConnectionStateTLS.java:310)
at com.android.org.conscrypt.ConnectionState.decrypt(ConnectionState.java:132)
at com.android.org.conscrypt.SSLRecordProtocol.unwrap(SSLRecordProtocol.java:382)
at com.android.org.conscrypt.SSLEngineImpl.unwrap(SSLEngineImpl.java:463)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:383)
at org.restlet.ext.nio.internal.channel.ReadableSslChannel.onDrain(ReadableSslChannel.java:109)
at org.restlet.ext.nio.internal.buffer.Buffer.process(Buffer.java:549)
at org.restlet.ext.nio.internal.channel.ReadableBufferedChannel.read(ReadableBufferedChannel.java:171)
at org.restlet.ext.nio.internal.buffer.Buffer.fill(Buffer.java:387)
at org.restlet.ext.nio.internal.way.InboundWay.onFill(InboundWay.java:264)
at org.restlet.ext.nio.internal.buffer.Buffer.process(Buffer.java:593)
at org.restlet.ext.nio.internal.way.Way.processIoBuffer(Way.java:498)
at org.restlet.ext.nio.internal.way.InboundWay.processIoBuffer(InboundWay.java:353)
at org.restlet.ext.nio.internal.way.Way.onSelected(Way.java:451)
at org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:316)
at org.restlet.ext.nio.internal.connection.Connection.onSelected(Connection.java:611)
at org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:316)
at org.restlet.ext.nio.internal.controller.ConnectionController.onSelected(ConnectionController.java:215)
at org.restlet.ext.nio.internal.controller.ServerConnectionController.onSelected(ServerConnectionController.java:109)
at org.restlet.ext.nio.internal.controller.ConnectionController.selectKeys(ConnectionController.java:303)
at org.restlet.ext.nio.internal.controller.ConnectionController.doRun(ConnectionController.java:166)
at org.restlet.ext.nio.internal.controller.Controller.run(Controller.java:152)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
I can only establish a certain amount of connections, seems like if a pooled connection is used again, the connection somehow gets corrupted (or something with the underlying ssl engine).
I can reproduce this issue using Python with requests module, separate get requests in a loop, no sessions.
In the end I get a "javax.net.ssl.SSLProtocolException: Received message has bad padding" exception, exactly during the first request exceeding "initialConnections" count (default is 100).
If I try to set "pooledConnections" to false, that doesn't work either (directly throws an "W/SocketClient: write error (Broken pipe)" error).
Server parameters are set like this:
Any ideas, or is something wrong with the server configuration?
Complete stack trace:
org.restlet.ext.nio.internal.connection.Connection onError WARNING: Received message has bad padding, stacktrace: [Ljava.lang.StackTraceElement;@41af1c78 javax.net.ssl.SSLProtocolException: Received message has bad padding at com.android.org.conscrypt.ConnectionStateTLS.decrypt(ConnectionStateTLS.java:310) at com.android.org.conscrypt.ConnectionState.decrypt(ConnectionState.java:132) at com.android.org.conscrypt.SSLRecordProtocol.unwrap(SSLRecordProtocol.java:382) at com.android.org.conscrypt.SSLEngineImpl.unwrap(SSLEngineImpl.java:463) at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:383) at org.restlet.ext.nio.internal.channel.ReadableSslChannel.onDrain(ReadableSslChannel.java:109) at org.restlet.ext.nio.internal.buffer.Buffer.process(Buffer.java:549) at org.restlet.ext.nio.internal.channel.ReadableBufferedChannel.read(ReadableBufferedChannel.java:171) at org.restlet.ext.nio.internal.buffer.Buffer.fill(Buffer.java:387) at org.restlet.ext.nio.internal.way.InboundWay.onFill(InboundWay.java:264) at org.restlet.ext.nio.internal.buffer.Buffer.process(Buffer.java:593) at org.restlet.ext.nio.internal.way.Way.processIoBuffer(Way.java:498) at org.restlet.ext.nio.internal.way.InboundWay.processIoBuffer(InboundWay.java:353) at org.restlet.ext.nio.internal.way.Way.onSelected(Way.java:451) at org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:316) at org.restlet.ext.nio.internal.connection.Connection.onSelected(Connection.java:611) at org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:316) at org.restlet.ext.nio.internal.controller.ConnectionController.onSelected(ConnectionController.java:215) at org.restlet.ext.nio.internal.controller.ServerConnectionController.onSelected(ServerConnectionController.java:109) at org.restlet.ext.nio.internal.controller.ConnectionController.selectKeys(ConnectionController.java:303) at org.restlet.ext.nio.internal.controller.ConnectionController.doRun(ConnectionController.java:166) at org.restlet.ext.nio.internal.controller.Controller.run(Controller.java:152) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:841)