marianobarrios / tls-channel Goto Github PK
View Code? Open in Web Editor NEWA Java library that implements a ByteChannel interface over SSLEngine, enabling easy-to-use (socket-like) TLS for Java applications.
License: MIT License
A Java library that implements a ByteChannel interface over SSLEngine, enabling easy-to-use (socket-like) TLS for Java applications.
License: MIT License
ServerTlsChannel.Builder
has .withEngineFactory
- is there a particular reason why ClientTlsChannel.Builder
doesn't? (Like, is it not safe, or broken, or something? Or, just hasn't been done?)
Hi,
thanks for creating this great library which supports developers to create secure software.
Version 0.8.1
Expected Behavior When I execute openssl s_client -connect $IP:$PORT
to examine the example code of the non-blocking server works as expected and I can send messages to the example program.
Unexpected Behavior
But when I use the same example - except the SSLEngine setup: I used a different Certificate created via BouncyCastle - in an Android app the following Exception occurs.
Exception
java.lang.IllegalStateException: Handshake has already been started at com.android.org.conscrypt.OpenSSLEngineImpl.beginHandshakeInternal(OpenSSLEngineImpl.java:335)
at com.android.org.conscrypt.OpenSSLEngineImpl.beginHandshake(OpenSSLEngineImpl.java:325)
at tlschannel.impl.TlsChannelImpl.doHandshake(TlsChannelImpl.java:502)
at tlschannel.impl.TlsChannelImpl.handshake(TlsChannelImpl.java:485)
at tlschannel.impl.TlsChannelImpl.read(TlsChannelImpl.java:163)
at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:266)
at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:271)
at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:276)
As far as I understood, what seems to happen is that there is a read() which throws a NeedsReadException
inside writeToChannel()
, then the exception bubbles up to doHandshake( false)
and therefore skips the rest of the try block and so in the next execution of tlsChannel.read(...)
the code tries to begin the handshake again and the SSLEngine
complains.
Excerpt from TlsChannelImpl.java:492
private void doHandshake(boolean force) throws IOException, EofException {
if (!force && negotiated) {
return;
}
try {
if (invalid || shutdownSent) {
throw new ClosedChannelException();
}
if (force || !negotiated) {
logger.log(Level.FINEST, "Calling SSLEngine.beginHandshake()");
engine.beginHandshake(); // <-- this is called the first time and then after the NeedsReadException when we run into the next read(...) call, its executed the second time which leads to the ISE
writeAndHandshake(); // <-- here a NeedsReadException is thrown so we jump to the finally block
if (engine.getSession().getProtocol().startsWith("DTLS")) {
throw new IllegalArgumentException("DTLS not supported");
}
// call client code
try {
initSessionCallback.accept(engine.getSession());
} catch (Exception e) {
logger.log(Level.FINEST, "client code threw exception in session initialization callback", e);
throw new TlsChannelCallbackException("session initialization callback failed", e);
}
negotiated = true;
} finally {
initLock.unlock();
}
}
when using Selector loop for client channel, if TLS Server sends multiple TLS Records in same TCP packet, we only get the first TLS Record from read method.
tcpdump show packet contains multiple TLS Records
48 2021-08-16 15:23:50.236035636 x.x.x.x -> y.y.y.y TLSv1.2 1391 Application Data, Application Data, Application Data
TLSv1.2 Record Layer: Application Data Protocol: Application Data
Content Type: Application Data (23)
Version: TLS 1.2 (0x0303)
Length: 173
Encrypted Application Data: e0e5033ea1811614857cb954f51fa26e21919788d611f895...
TLSv1.2 Record Layer: Application Data Protocol: Application Data
Content Type: Application Data (23)
Version: TLS 1.2 (0x0303)
Length: 173
Encrypted Application Data: e0e5033ea181161522c96bca30dde18cd7ad32e352c874bc...
TLSv1.2 Record Layer: Application Data Protocol: Application Data
Content Type: Application Data (23)
Version: TLS 1.2 (0x0303)
Length: 964
Encrypted Application Data: e0e5033ea181161636ff5acc89b1cddf97ec288eb3f3e204...
here in the log you can see it reads 1325 from rawsocket, but then sends only 149 bytes, which would be just the first TLS record
08-16-2021 15:23:50,236 TRACE [TlsChannelImpl] Read from channel; response: 1325, buffer: java.nio.DirectByteBuffer[pos=1325 lim=4096 cap=4096]
08-16-2021 15:23:50,237 TRACE [TlsChannelImpl] engine.unwrap() result [status=OK,handshakeStatus=NOT_HANDSHAKING,bytesProduced=149,bytesConsumed=178]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@41ec220d; inPlain: ByteBufferSet[array=[java.n
io.HeapByteBuffer[pos=149 lim=4096 cap=4096]], offset=0, length=1]
08-16-2021 15:23:50,237 TRACE [Connection] Total Bytes read from TLS Buffer: 149
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Location: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Configuration option packageRules[0].minimumReleaseAge
should be a string
Question,
in class TlsChannelImpl(), there is a buffersInitialSize = 4096;
i have debugged and found that it always much larger than 4096...
should the initial buffer size come from:
SSLSession session = engine.getSession();
int networkBufferSize = session.getPacketBufferSize();
int minimumApplicationBufferSize = session.getApplicationBufferSize();
I did try it, it worked of course, and i didnt see resize called once
i made inEncrypted and outEncrypted buffers the networkBufferSize
and the inPlain buffer minimumApplicationBufferSize
or is this not important..
Mitch
Hi @marianobarrios, thanks for providing this very useful library!
I try to use it for a https proxy and encountered the following problem: When the wrapped socket was closed while someone still wants to emit data, the TlsChannelImpl.wrapAndWrite(ByteBufferSet)
seems to hang in a endless loop. Example stack dump:
java.lang.Thread.State: RUNNABLE
at sun.security.ssl.SSLEngineImpl.wrap([email protected]/SSLEngineImpl.java:146)
at sun.security.ssl.SSLEngineImpl.wrap([email protected]/SSLEngineImpl.java:123)
at tlschannel.impl.TlsChannelImpl.callEngineWrap(TlsChannelImpl.java:411)
at tlschannel.impl.TlsChannelImpl.wrapLoop(TlsChannelImpl.java:393)
at tlschannel.impl.TlsChannelImpl.wrapAndWrite(TlsChannelImpl.java:383)
at tlschannel.impl.TlsChannelImpl.write(TlsChannelImpl.java:368)
at tlschannel.ServerTlsChannel.write(ServerTlsChannel.java:291)
at tlschannel.ServerTlsChannel.write(ServerTlsChannel.java:296)
at tlschannel.ServerTlsChannel.write(ServerTlsChannel.java:301)
at <my code>
The log is filled with
Oct 02 07:50:55 ip-172-31-0-148.eu-central-1.compute.internal java[24592]: 2022/10/02 07:50:54.938 TRACE TlsChannelImpl - engine.wrap() result: [status=CLOSED,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]; engine status: NOT_HANDSHAKING; srcBuffer: ByteBufferSet[[java.nio.HeapByteBuffer[pos=14 lim=117 cap=32768]]:0:1], outEncrypted: BufferHolder{name='outEncrypted', allocator=tlschannel.TrackingAllocator@2c83ec10, plainData=false, maxSize=17408, opportunisticDispose=true, buffer=java.nio.DirectByteBuffer[pos=0 lim=17408 cap=17408], lastSize=17408}
Oct 02 07:50:55 ip-172-31-0-148.eu-central-1.compute.internal java[24592]: 2022/10/02 07:50:54.938 TRACE TlsChannelImpl - engine.wrap() result: [status=CLOSED,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]; engine status: NOT_HANDSHAKING; srcBuffer: ByteBufferSet[[java.nio.HeapByteBuffer[pos=14 lim=117 cap=32768]]:0:1], outEncrypted: BufferHolder{name='outEncrypted', allocator=tlschannel.TrackingAllocator@2c83ec10, plainData=false, maxSize=17408, opportunisticDispose=true, buffer=java.nio.DirectByteBuffer[pos=0 lim=17408 cap=17408], lastSize=17408}
Oct 02 07:50:55 ip-172-31-0-148.eu-central-1.compute.internal java[24592]: 2022/10/02 07:50:54.938 TRACE TlsChannelImpl - engine.wrap() result: [status=CLOSED,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]; engine status: NOT_HANDSHAKING; srcBuffer: ByteBufferSet[[java.nio.HeapByteBuffer[pos=14 lim=117 cap=32768]]:0:1], outEncrypted: BufferHolder{name='outEncrypted', allocator=tlschannel.TrackingAllocator@2c83ec10, plainData=false, maxSize=17408, opportunisticDispose=true, buffer=java.nio.DirectByteBuffer[pos=0 lim=17408 cap=17408], lastSize=17408}
I assume that TlsChannelImpl.wrapAndWrite(ByteBufferSet)
should also check the closed state of the channel because in this case the source buffer will never be consumed.
Please let me know if I can add any additional information.
So how im using this is, i get a standard socket connected
then i switch over to TLS via tlsChannel = ClientTlsChannel.newBuilder(socketChannel, _sslContext).withRunTasks(false).build();
and it all works... i successfully get a TLS secured socket
but if i try to disconnect, and start over it fails
to disconnect i just do a close on the socket (java.nio.channels.SocketChannel .close())
then wait... and restart the process, i get socket connected, but cant get the tlschannel going
its also very hard to debug :)
it also happens if i disconnect the device (pull ethernet out), the socket does close, and code tries to get it going,
socket connects, but tls channel fails....
do i need to do anything with tlschannel to have it ready for another connection?
i wait 15 seconds after disconnect, before retry
ok, while debugging, it sometimes works.... so there is some delay, that i need
this one gonna be hard to figure out :(
i'll keep at it, and if you have any ideas.... toss em in
thanks
mitch
On https://github.com/marianobarrios/tls-channel/blob/master/src/main/java/tlschannel/util/DirectBufferDeallocator.java#L34, there is a call to Class.getMethod: Class.forName("sun.nio.ch.DirectBuffer").getMethod("cleaner", (Class<?>[]) null)
. The next line is Class.forName("sun.misc.Cleaner").getMethod("clean")
.
Is there any particular reason to pass null
as the value of the varargs parameter in the first line? It's not incorrect, but I think it's unnecessary, and is causing at least one user problems when used with GraalVM. See https://jira.mongodb.org/browse/JAVA-4309 (the MongoDB Java driver vendors this library), and the resulting GraalVM issue at oracle/graal#3815.
Hopefully the GraalVM issue will be fixed, but I'd like to work around it by removing the null
parameter in our vendored copy of your library, and upstream the change here if you're willing. What do you think?
Hi Mariano,
I just wanted to say a big thanks for the very well done tls-channel lib.
I've been developing a server backend for our PvP mobile game for the last 3 years using tls-channel. Right now we are close to release and I started testing the server with simulated heavy load and the server started hanging. Unfortunately, it's hard to recreate the issue. Sometimes it happens after 7 hours of running under heavy load and sometimes after 12 hours.
This is the info I have at the moment:
ServerTlsChannel.newBuilder(socketChannel, sslContext).withRunTasks(false).build();
What happens:
The main thread goes in a loop and stays in the loop even after I stop all simulated clients from trying to send traffic.
The server logs show that after the first null result from getTask(), the method starts returning null for other channels too.
Also, it looks like the Read method returns the same bytes for some (or all channels?), because the main thread keeps handling messages even though I have stopped all simulated traffic to the server.
If you have any suggestions how to further debug the issue I can run the tests again.
Here's the Read method
private void read(final SelectionKey key)
{
final HPSClient client = (HPSClient)key.attachment();
//System.out.println("READ...");
try
{
while(true)
{
readBuffer.clear();
final int numRead = client.hpsTlsChannel.read(readBuffer);
if(numRead < 1)
{
if(numRead == -1)
{
killKey(key, client);
}
return;
}
final HPSMessage msg = hpsMsgContainer.getMessage(HPSMessage.MSG_PROTOCOL_READ_DATA, client, numRead);
readBuffer.flip();
msg.data.put(readBuffer);
msg.data.flip();
eventSystem.sendMessage(msg);
}
}
catch (final NeedsReadException ex)
{
//System.out.println("NeedsReadException...");
// In some very rare cases we may need to write
if(client.hpsGetWriteQueue().peek() != null)
{
key.interestOps(SelectionKey.OP_WRITE);
}
else
{
key.interestOps(SelectionKey.OP_READ);
}
}
catch (final NeedsWriteException ex)
{
//System.out.println("NeedsWriteException...");
key.interestOps(SelectionKey.OP_WRITE);
}
catch(final WouldBlockException ex)
{
// Wait for the channel to become ready - do not change key.interestOps
}
catch (final NeedsTaskException ex)
{
final var task = ex.getTask();
if(task == null)
{
System.out.println("NeedsTaskException getTask() is null");
return;
}
//System.out.println("NeedsTaskException...");
final HPSMessage msg = hpsMsgContainer.getMessage(HPSMessage.MSG_EVENT_EXEC_SSL_TASK, client);
msg.task = task;
eventSystem.sendMessage(msg);
}
catch(final IOException ex)
{
//System.out.println("IO EX: " + ex);
//ex.printStackTrace();
killKey(key, client);
}
}
Have you considered using static exceptions for flow control like:
static final class StacklessException extends Exception {
public StacklessException(String msg) { super(msg); }
public Throwable fillInStackTrace() { return this; }
}
static final StacklessException NEEDS_WRITE_EXCEPTION = new StacklessException("NEEDS_WRITE_EXCEPTION");
... then in your code just throw it without calling new ...
if (c == 0)
throw NEEDS_WRITE_EXCEPTION;
As you know creating exceptions with new
is literally 100x more expensive than creating a regular Object. Even with overriding fillInStackTrace it's still like 20x more expensive. If you use a static instance, there is virtually zero performance penalty.
You have quite a few flow-control exceptions that don't hold state so they're all candidates for static instances. And there might be some that are holding state that is not critical in which case you could drop the state and go static.
Just a thought. Nice project.
Hi,
I want to use this library code, but my JVM doesn't have "sun.misc" available
I'm locked in to JVM 1.8 (embedded device)
any suggestions?
i changed this code in class DirectBufferAllocator just to make it run
`@Override
public void free(ByteBuffer buffer) {
// GC does it
buffer = null;
// this does not work in NX MASTER
// do not wait for GC (and finalizer) to run
//deallocator.deallocate(buffer);
}`
dont think this is a solution...
memory just draining too
(0000177582) Memory Available = 399114240 <380928>
(0000178600) Memory Available = 398606336 <507904>
(0000179599) Memory Available = 398098432 <507904>
(0000180600) Memory Available = 397590528 <507904>
(0000181600) Memory Available = 397209600 <380928>
(0000182584) Memory Available = 396828672 <380928>
(0000183600) Memory Available = 396320768 <507904>
(0000184599) Memory Available = 395812864 <507904>
(0000185600) Memory Available = 395431936 <380928>
and so on
i see the buffer(s) are constantly being created/freed
that make sense?
thanks
Mitch
The method ByteBuffer#flip on Java 8 returns a java.nio.Buffer, not a java.nio.ByteBuffer.
java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
at tlschannel.impl.TlsChannelImpl.callEngineUnwrap(TlsChannelImpl.java:302)
at tlschannel.impl.TlsChannelImpl.unwrapLoop(TlsChannelImpl.java:258)
at tlschannel.impl.TlsChannelImpl.readAndUnwrap(TlsChannelImpl.java:592)
at tlschannel.impl.TlsChannelImpl.handshakeLoop(TlsChannelImpl.java:566)
at tlschannel.impl.TlsChannelImpl.writeAndHandshake(TlsChannelImpl.java:544)
at tlschannel.impl.TlsChannelImpl.doHandshake(TlsChannelImpl.java:514)
at tlschannel.impl.TlsChannelImpl.handshake(TlsChannelImpl.java:487)
at tlschannel.impl.TlsChannelImpl.read(TlsChannelImpl.java:165)
at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:266)
at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:271)
at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:276)
Hello
For a project I'm working on, the read method was hanging (no exceptions thrown, just hanging forever). I don't know how to reproduce it, but it was happening consistently on my application when I requested a certain site. It seems to be a race condition, as the issue went away if I ran some println between reads /shrug,
This behavior only happens in 4.0.0, so I have downgraded to 3.2.0 for now.
Automatically handskake dont' work.
My code:
`
while (!stop) {
selector.select();
Iterator<SelectionKey> iterator = selector.selectedKeys().iterator();
while (iterator.hasNext()) {
SelectionKey key = iterator.next();
iterator.remove();
if (key.isValid()) {
try {
if (key.isAcceptable()) {
SocketChannel socketChannel = ((ServerSocketChannel) key.channel()).accept();
socketChannel.configureBlocking(false);
TlsChannel tlsChannel = ServerTlsChannel.newBuilder(socketChannel, context).build();
SelectionKey newKey = socketChannel.register(selector, SelectionKey.OP_READ);
connections.put(tlsChannel, new NIOConnection(socketChannel));
newKey.attach(tlsChannel);
}
else if (key.isReadable()) {
TlsChannel socketChannel = (TlsChannel) key.attachment();
NIOConnection connection = connections.get(socketChannel);
int readResult = connection.read();
if (readResult == RW_READY) {
connection.processing();
key.interestOps((key.interestOps() ^ SelectionKey.OP_READ) | SelectionKey.OP_WRITE);
}
else if (readResult == RW_CLOSE) {
socketChannel.close();
connections.remove(socketChannel);
}
}
else if (key.isWritable()) {
TlsChannel socketChannel = (TlsChannel) key.attachment();
NIOConnection connection = connections.get(socketChannel);
int readResult = connection.write();
if (readResult == RW_READY) {
key.interestOps((key.interestOps() ^ SelectionKey.OP_WRITE) | SelectionKey.OP_READ);
}
else if (readResult == RW_CLOSE) {
socketChannel.close();
connections.remove(socketChannel);
}
}
} catch (NeedsReadException e) {
key.interestOps(SelectionKey.OP_READ);
} catch (NeedsWriteException e) {
key.interestOps(SelectionKey.OP_WRITE);
}
}
}
`
As stated in the documentation, but i when reading, the handshake should occur automatically, but when reading I get encrypted information, approximately this content
���
I'm using tls channel client with selector. If server send packets back to back, selector is usually not triggering.
If WINDOW_UPDATE, PRIORITY, HEADER AND CONTINUATION like the picture below, it's problem.
If WINDOW_UPDATE, PRIORITY, HEADER AND CONTINUATION like the picture below, it's OK.
Do you have a solution for that?
In tests of the MongoDB Java driver that use this library, I've seen occasional, non-deterministic failures where AsynchronousTlsChannelGroup#processPendingInterests
throws CancelledKeyException
, causing AsynchronousTlsChannelGroup.loop
to exit. It happens in cases where we are forcing the server to close the socket in order to test failure scenarios.
I'm not exactly sure why this is happening, but I do see that in AsynchronousTlsChannelGroup.loop
there is already code that wraps calls to java.nio.channels.SelectionKey#interestOps(int)
in a try/catch of CancelledKeyException
. Does it make sense to do a similar thing in AsynchronousTlsChannelGroup#processPendingInterests
, e.g.
private void processPendingInterests() {
for (SelectionKey key : selector.keys()) {
RegisteredSocket socket = (RegisteredSocket) key.attachment();
int pending = socket.pendingOps.getAndSet(0);
if (pending != 0) {
try {
key.interestOps(key.interestOps() | pending);
} catch (CancelledKeyException e) {
// ignore
}
}
}
}
Hi @marianobarrios this library is really great and saved me tons of times. Now that I am thinking of some changes that is also useful to be applied, but didn't see anywhere on how I can contribute. Just wondering could you please provide some guideline and/or instructions?
I'm trying to write a non blocking client but when trying to read I keep getting a NeedsReadException
which doesn't make sense as I understand. Probably I'm doing something wrong, would it be possible to provide a NonBlockingClient example as well that I could just follow.
I just finished testing something i built using this. Tried testing for a variety of scenarios and it seems that tlsChannel client doesn't check whether the server is speaking ssl. You can call write
and it won't give you any error. In my case, it was the server closing the connection after a given timeout that stopped the client. otherwise it just doesn't return any error (in blocking mode).
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
.github/workflows/main.yml
actions/checkout v4
actions/setup-java v4
build.gradle
com.diffplug.spotless 6.25.0
com.github.spotbugs 6.0.20
org.slf4j:jul-to-slf4j 2.0.16
ch.qos.logback:logback-classic 1.3.14
org.junit.jupiter:junit-jupiter-api 5.10.3
org.junit.jupiter:junit-jupiter-engine 5.10.3
gradle/wrapper/gradle-wrapper.properties
gradle 8.9
Dear Marian,
While we are trying to run SimpleBlockingClient ,we are getting error in server at read method.
Exception in thread "main" tlschannel.TlsChannelCallbackException: SSLEngine creation callback failed
at tlschannel.ServerTlsChannel.initEngine(ServerTlsChannel.java:350)
at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:262)
at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:272)
at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:277)
at tlschannel.example.SimpleBlockingServer.main(SimpleBlockingServer.java:50)
Caused by: java.lang.IllegalStateException: SSLContextImpl is not initialized
at sun.security.ssl.SSLContextImpl.engineCreateSSLEngine(SSLContextImpl.java:191)
at javax.net.ssl.SSLContext.createSSLEngine(SSLContext.java:329)
at tlschannel.ServerTlsChannel.defaultSSLEngineFactory(ServerTlsChannel.java:88)
at tlschannel.ServerTlsChannel.access$1(ServerTlsChannel.java:87)
at tlschannel.ServerTlsChannel.initEngine(ServerTlsChannel.java:347)
... 4 more
Hi,
could you please clarify the license of the tls-channel code:
Thanks
it is causing us problems because we use tls-channel together with https://github.com/teragrep/rlp_01 which is then used within logback i.e. https://github.com/teragrep/jla_01 etc logging frameworks which themselves are implementation backends for slf4j. this causes a circular problem because slf4j provider is not yet available when tls-channel tries to use it.
it causes version dependency with slf4j on the logging framework side as well.
please see another justification from jwtk/jjwt#34
This library seems very promising. Any idea on how this can be used with https://github.com/AsyncHttpClient/async-http-client
I'm not very familiar with TLS and SSL and so it seems very hard to wire this up.
Any help would be much appreciated.
The method AsynchronousTlsChannelGroup.registerSocket
initiates an asynchronous activity and returns. This method is called from the constructor of AsynchronousTlsChannel
, which does not wait on RegisteredSocket.registered
until the registration is complete (I am not suggesting that it should). As a result, it is possible to create an AsynchronousTlsChannel
and call its close
method concurrently with AsynchronousTlsChannelGroup
registering its registeredSocket.socketChannel
. This scenario does not abuse the API, but it allows executions where the following happens:
AsynchronousTlsChannelGroup.registerPendingSockets
observes a closed SocketChannel
polled from pendingRegistrations
.SocketChannel.register
called on a closed SocketChannel
throws a ClosedChannelException
.AsynchronousTlsChannelGroup.loop
exits its while
loop as a result of the ClosedChannelException
thrown from registerPendingSockets
.AsynchronousTlsChannelGroup.selectorThread
terminates, rendering the AsynchronousTlsChannelGroup
broken.We shade tls-channel in mongo-java-driver, and received a report which boils down to the bug I described. I can imagine two straightforward approaches on fixing it:
RegisteredSocket.registered
in AsynchronousTlsChannel.close
before closing tlsChannel
, registeredSocket
. The problem with this approach is that it makes the AsynchronousTlsChannel.close
method blocking while currently it is not blocking1.ClosedChannelException
in AsynchronousTlsChannelGroup.registerPendingSockets
similarly to how it was done in 59b85a7 to fix #18. This approach seems to be fine.1 My understanding is that lingering on close cannot be configured for a SocketChannel
in non-blocking mode, and TlsChannelBuilder.withWaitForCloseConfirmation
has no effect if the underlying channel is non-blocking.
Hello.
I am encountering problems when using TLS-Channel for this page:
https://wpt.live/css/css-color/color-001.html
This is the only page that I am encountering problems with.
Whenever I try to read from the channel (after sending headers), the ByteChannel only gives -1.
This works fine when I use HTTP instead of HTTPS, and skip using tls-channel, so I suspect that it is a problem with tls-channel.
Edit: Right before it logs that it is returning -1, TLS Channel also logs that it receives 1206 bytes from the stream. However, I logged whether I actually received that from ByteChannel#read() in my code (I only call ByteChannel#read at one point in my code), and tls-channel never actually gives me those 1206 bytes.
11.10.2021 21:47:01.142 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Called engine.beginHandshake()
11.10.2021 21:47:01.144 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.wrap() result: [status=BUFFER_OVERFLOW,handshakeStatus=NEED_WRAP,bytesProduced=0,bytesConsumed=0]; engine status: NEED_WRAP; srcBuffer: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=0 cap=0]], offset=0, length=1], outEncrypted: tlschannel.impl.BufferHolder@4dcc3233
11.10.2021 21:47:01.145 TRACE [Thread-1] tlschannel.impl.BufferHolder - enlarging buffer outEncrypted, increasing from 4096 to 8192 (automatic enlarge)
11.10.2021 21:47:01.145 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.wrap() result: [status=BUFFER_OVERFLOW,handshakeStatus=NEED_WRAP,bytesProduced=0,bytesConsumed=0]; engine status: NEED_WRAP; srcBuffer: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=0 cap=0]], offset=0, length=1], outEncrypted: tlschannel.impl.BufferHolder@4dcc3233
11.10.2021 21:47:01.145 TRACE [Thread-1] tlschannel.impl.BufferHolder - enlarging buffer outEncrypted, increasing from 8192 to 16384 (automatic enlarge)
11.10.2021 21:47:01.146 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.wrap() result: [status=BUFFER_OVERFLOW,handshakeStatus=NEED_WRAP,bytesProduced=0,bytesConsumed=0]; engine status: NEED_WRAP; srcBuffer: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=0 cap=0]], offset=0, length=1], outEncrypted: tlschannel.impl.BufferHolder@4dcc3233
11.10.2021 21:47:01.146 TRACE [Thread-1] tlschannel.impl.BufferHolder - enlarging buffer outEncrypted, increasing from 16384 to 17408 (automatic enlarge)
11.10.2021 21:47:01.147 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.wrap() result: [status=OK,handshakeStatus=NEED_UNWRAP,bytesProduced=396,bytesConsumed=0]; engine status: NEED_UNWRAP; srcBuffer: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=0 cap=0]], offset=0, length=1], outEncrypted: tlschannel.impl.BufferHolder@4dcc3233
11.10.2021 21:47:01.147 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Writing to channel: java.nio.DirectByteBuffer[pos=0 lim=396 cap=17408]
11.10.2021 21:47:01.149 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NEED_UNWRAP,bytesProduced=0,bytesConsumed=0]. Engine status: NEED_UNWRAP; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.149 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.176 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 2726, buffer: java.nio.DirectByteBuffer[pos=2726 lim=4096 cap=4096]
11.10.2021 21:47:01.177 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=OK,handshakeStatus=NEED_TASK,bytesProduced=0,bytesConsumed=127]. Engine status: NEED_TASK; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.189 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.wrap() result: [status=OK,handshakeStatus=NEED_UNWRAP,bytesProduced=6,bytesConsumed=0]; engine status: NEED_UNWRAP; srcBuffer: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=0 cap=0]], offset=0, length=1], outEncrypted: tlschannel.impl.BufferHolder@4dcc3233
11.10.2021 21:47:01.190 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Writing to channel: java.nio.DirectByteBuffer[pos=0 lim=6 cap=17408]
11.10.2021 21:47:01.190 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=OK,handshakeStatus=NEED_UNWRAP,bytesProduced=0,bytesConsumed=6]. Engine status: NEED_UNWRAP; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.191 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=OK,handshakeStatus=NEED_TASK,bytesProduced=0,bytesConsumed=28]. Engine status: NEED_TASK; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.192 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NEED_UNWRAP,bytesProduced=0,bytesConsumed=0]. Engine status: NEED_UNWRAP; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.192 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.192 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 1370, buffer: java.nio.DirectByteBuffer[pos=3935 lim=4096 cap=4096]
11.10.2021 21:47:01.192 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NEED_UNWRAP,bytesProduced=0,bytesConsumed=0]. Engine status: NEED_UNWRAP; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.192 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.202 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 161, buffer: java.nio.DirectByteBuffer[pos=4096 lim=4096 cap=4096]
11.10.2021 21:47:01.204 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=OK,handshakeStatus=NEED_TASK,bytesProduced=0,bytesConsumed=4080]. Engine status: NEED_TASK; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.249 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NEED_UNWRAP,bytesProduced=0,bytesConsumed=0]. Engine status: NEED_UNWRAP; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.249 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.250 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 344, buffer: java.nio.DirectByteBuffer[pos=360 lim=4096 cap=4096]
11.10.2021 21:47:01.250 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=OK,handshakeStatus=NEED_TASK,bytesProduced=0,bytesConsumed=286]. Engine status: NEED_TASK; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.256 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=OK,handshakeStatus=NEED_WRAP,bytesProduced=0,bytesConsumed=74]. Engine status: NEED_WRAP; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.256 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.wrap() result: [status=OK,handshakeStatus=FINISHED,bytesProduced=90,bytesConsumed=0]; engine status: FINISHED; srcBuffer: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=0 cap=0]], offset=0, length=1], outEncrypted: tlschannel.impl.BufferHolder@4dcc3233
11.10.2021 21:47:01.257 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Writing to channel: java.nio.DirectByteBuffer[pos=0 lim=90 cap=17408]
11.10.2021 21:47:01.257 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.wrap() result: [status=OK,handshakeStatus=NOT_HANDSHAKING,bytesProduced=450,bytesConsumed=412]; engine status: NOT_HANDSHAKING; srcBuffer: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=412 lim=412 cap=412]], offset=0, length=1], outEncrypted: tlschannel.impl.BufferHolder@4dcc3233
11.10.2021 21:47:01.257 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Writing to channel: java.nio.DirectByteBuffer[pos=0 lim=450 cap=17408]
11.10.2021 21:47:01.258 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.258 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.258 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.261 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.261 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.261 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.262 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.262 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.262 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.262 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.262 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.262 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.263 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.263 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.263 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.263 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.263 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.264 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.264 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.265 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.265 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.265 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.265 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.265 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.266 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.266 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.266 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.266 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.266 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.266 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.267 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.267 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.267 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.267 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.268 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.268 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.268 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.268 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.268 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.268 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.268 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.268 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.269 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.269 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.269 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.269 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.269 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.269 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.269 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.270 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.270 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.270 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.270 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.270 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.270 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.270 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.270 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.271 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.271 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.271 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.271 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.271 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.271 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.271 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.271 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.271 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.272 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.272 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.272 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.272 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.272 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.272 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.272 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.272 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.272 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.273 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.273 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.273 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.273 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.273 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.273 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.273 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.273 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.273 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.274 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.274 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.274 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.274 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.274 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.274 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.274 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.274 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.274 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.275 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.275 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.275 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.275 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.275 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.275 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.275 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.275 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.276 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.276 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.276 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.276 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.276 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.276 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.276 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.276 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.277 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.277 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.277 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.277 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.277 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.277 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.277 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.277 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.277 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.277 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.278 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.278 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.278 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.278 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.278 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.278 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.278 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.278 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.278 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.278 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.279 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.279 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.279 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.280 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.280 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.280 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.281 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.281 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.281 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.281 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.281 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.282 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.282 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.282 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.282 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.283 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.283 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.283 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.283 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.283 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.283 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.284 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.284 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.284 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 255, buffer: java.nio.DirectByteBuffer[pos=255 lim=4096 cap=4096]
11.10.2021 21:47:01.286 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=OK,handshakeStatus=FINISHED,bytesProduced=0,bytesConsumed=255]. Engine status: FINISHED; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.286 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.286 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.286 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.286 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.287 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.287 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.287 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.287 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.287 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.287 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.287 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.288 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.288 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.288 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.288 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.288 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.288 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.289 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.289 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.289 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.289 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.290 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.290 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.290 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.290 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.290 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.290 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.290 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.290 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.291 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.291 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.291 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.291 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.291 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.291 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.291 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.292 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.292 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.292 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.292 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.292 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.292 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.292 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.292 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.293 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.293 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.293 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.293 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.293 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.293 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.293 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.293 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.293 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.294 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.294 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.294 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.294 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.294 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.294 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.295 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.295 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.295 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.295 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.295 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.295 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.296 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.296 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.296 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.296 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.296 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.297 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.297 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.297 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.297 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.297 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.297 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.297 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.298 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.298 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.298 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.299 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.299 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.299 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.300 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.300 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.300 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.300 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.300 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.300 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.301 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.301 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.301 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.301 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.301 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.301 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.301 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.301 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.301 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.302 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.302 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.302 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.302 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.302 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.302 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.302 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.302 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.302 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.303 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.303 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.303 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.303 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.303 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.303 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.303 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.303 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.303 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.303 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.303 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.304 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.304 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.304 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.304 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.304 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.304 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.304 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.305 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.305 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.305 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.305 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.305 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.305 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.305 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.305 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.305 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.306 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.306 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.306 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.306 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.306 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.306 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.307 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.307 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.307 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.307 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.307 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.307 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.307 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.307 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.307 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.308 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.308 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.308 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.308 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.308 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.308 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.309 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.309 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.309 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.309 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.309 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.309 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.309 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.309 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.309 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.310 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.310 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.310 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.310 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.310 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.310 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.311 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.311 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.311 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.311 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.311 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.311 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.311 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.312 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.312 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.313 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.313 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.313 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 1206, buffer: java.nio.DirectByteBuffer[pos=1206 lim=4096 cap=4096]
11.10.2021 21:47:01.314 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=OK,handshakeStatus=FINISHED,bytesProduced=0,bytesConsumed=255]. Engine status: FINISHED; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.314 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.314 TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: -1, buffer: java.nio.DirectByteBuffer[pos=951 lim=4096 cap=4096]
If using the FixedSslContextStrategy, non tls connections will terminate. EX:
ServerTlsChannel.Builder builder = ServerTlsChannel.newBuilder(rawChannel, sslContext);
Curl output:
❯ curl http://localhost:8282/ curl: (7) Failed to connect to localhost port 8282: Connection refused
If I change the same builder to the following, curl will hang indefinitely:
ServerTlsChannel.Builder builder = ServerTlsChannel.newBuilder(rawChannel, sniIOp-> Optional.of(sslContext));
I think this is caused by a NeedsReadException thrown in the readFromChannel mehtod in TlsChannelImpl during the initEngine call.
To remedy this I created a nasty hack on my end that detects the NeedsReadException and throws a ClosedChannelException. See below
package test.channel;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.ByteBuffer;
import java.nio.channels.ByteChannel;
import java.nio.channels.ClosedChannelException;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.concurrent.Callable;
import java.util.function.Consumer;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLSession;
import tlschannel.NeedsReadException;
import tlschannel.ServerTlsChannel;
import tlschannel.TlsChannel;
import tlschannel.TrackingAllocator;
import tlschannel.impl.ByteBufferSet;
import tlschannel.impl.TlsChannelImpl;
import tlschannel.impl.TlsChannelImpl.EofException;
public class ServerTlsChannelFix implements TlsChannel {
private ServerTlsChannel delegate;
public ServerTlsChannelFix(ServerTlsChannel serverTlsChannel) {
this.delegate = Objects.requireNonNull(serverTlsChannel);
}
public SSLContext getSslContext() {
return delegate.getSslContext();
}
@Override
public long read(ByteBuffer[] dstBuffers, int offset, int length) throws IOException {
ByteBufferSet dest = new ByteBufferSet(dstBuffers, offset, length);
TlsChannelImpl.checkReadBuffer(dest);
if (!isSniRead()) {
try {
initEngine();
} catch (EofException e) {
return -1;
}
}
return getImpl().read(dest);
}
@Override
public long write(ByteBuffer[] srcs, int offset, int length) throws IOException {
ByteBufferSet source = new ByteBufferSet(srcs, offset, length);
if (!isSniRead()) {
try {
initEngine();
} catch (EofException e) {
throw new ClosedChannelException();
}
}
return getImpl().write(source);
}
@Override
public void renegotiate() throws IOException {
if (!isSniRead()) {
try {
initEngine();
} catch (EofException e) {
throw new ClosedChannelException();
}
}
getImpl().renegotiate();
}
@Override
public void handshake() throws IOException {
if (!isSniRead()) {
try {
initEngine();
} catch (EofException e) {
throw new ClosedChannelException();
}
}
getImpl().handshake();
}
// hax
private static final Field ServerTlsChannel_sniRead_FIELD = unchecked(() -> {
for (var field : ServerTlsChannel.class.getDeclaredFields()) {
if (!"sniRead".equals(field.getName()))
continue;
if (!boolean.class.isAssignableFrom(field.getType()))
continue;
field.setAccessible(true);
return field;
}
throw new NoSuchElementException();
});
protected boolean isSniRead() {
return (boolean) unchecked(() -> ServerTlsChannel_sniRead_FIELD.get(delegate));
}
private static final Field ServerTlsChannel_impl_FIELD = unchecked(() -> {
for (var field : ServerTlsChannel.class.getDeclaredFields()) {
if (!"impl".equals(field.getName()))
continue;
if (!TlsChannelImpl.class.isAssignableFrom(field.getType()))
continue;
field.setAccessible(true);
return field;
}
throw new NoSuchElementException();
});
protected TlsChannelImpl getImpl() {
return (TlsChannelImpl) unchecked(() -> ServerTlsChannel_impl_FIELD.get(delegate));
}
private static final Method ServerTlsChannel_initEngine_METHOD = unchecked(() -> {
for (var meth : ServerTlsChannel.class.getDeclaredMethods()) {
if (!"initEngine".equals(meth.getName()))
continue;
if (!Void.TYPE.equals(meth.getReturnType()))
continue;
if (meth.getParameterCount() != 0)
continue;
meth.setAccessible(true);
return meth;
}
throw new NoSuchElementException();
});
protected void initEngine() throws IOException, EofException {
try {
ServerTlsChannel_initEngine_METHOD.invoke(delegate);
} catch (Throwable t) {
if (t instanceof InvocationTargetException && t.getCause() != null)
t = t.getCause();
if (t instanceof NeedsReadException)
throw new ClosedChannelException();
if (t instanceof EofException)
throw (EofException) t;
if (t instanceof IOException)
throw (IOException) t;
throw (((Object) t) instanceof java.lang.RuntimeException) ? java.lang.RuntimeException.class.cast(t)
: new RuntimeException(t);
}
}
private static <X> X unchecked(Callable<X> callable) {
Objects.requireNonNull(callable);
try {
return callable.call();
} catch (Exception e) {
throw (((Object) e) instanceof java.lang.RuntimeException) ? java.lang.RuntimeException.class.cast(e)
: new RuntimeException(e);
}
}
// delegates
@Override
public int hashCode() {
return delegate.hashCode();
}
@Override
public boolean equals(Object obj) {
return delegate.equals(obj);
}
@Override
public ByteChannel getUnderlying() {
return delegate.getUnderlying();
}
@Override
public SSLEngine getSslEngine() {
return delegate.getSslEngine();
}
@Override
public Consumer<SSLSession> getSessionInitCallback() {
return delegate.getSessionInitCallback();
}
@Override
public boolean getRunTasks() {
return delegate.getRunTasks();
}
@Override
public TrackingAllocator getPlainBufferAllocator() {
return delegate.getPlainBufferAllocator();
}
@Override
public TrackingAllocator getEncryptedBufferAllocator() {
return delegate.getEncryptedBufferAllocator();
}
@Override
public long read(ByteBuffer[] dstBuffers) throws IOException {
return delegate.read(dstBuffers);
}
@Override
public int read(ByteBuffer dstBuffer) throws IOException {
return delegate.read(dstBuffer);
}
@Override
public long write(ByteBuffer[] srcs) throws IOException {
return delegate.write(srcs);
}
@Override
public int write(ByteBuffer srcBuffer) throws IOException {
return delegate.write(srcBuffer);
}
@Override
public void close() throws IOException {
delegate.close();
}
@Override
public String toString() {
return delegate.toString();
}
@Override
public boolean isOpen() {
return delegate.isOpen();
}
@Override
public boolean shutdown() throws IOException {
return delegate.shutdown();
}
@Override
public boolean shutdownReceived() {
return delegate.shutdownReceived();
}
@Override
public boolean shutdownSent() {
return delegate.shutdownSent();
}
}
I use a scenario where I receive data from a client connection as follows
int nReady = selector.select(this.readTimeout);
if (nReady == 0) {
throw new TimeoutException("read timed out");
}
Set<SelectionKey> polledEvents = this.selector.selectedKeys();
Iterator<SelectionKey> eventIter = polledEvents.iterator();
while (eventIter.hasNext()) {
SelectionKey currentKey = eventIter.next();
System.err.println("currentKey <" + currentKey + ">");
// tlsChannel needs to know about both
if (currentKey.isReadable() || currentKey.isWritable()) {
try {
readBytes = tlsChannel.read(byteBuffer);
}
} catch (Exception e) {
// something
}
eventIter.remove();
}
If server has sent a with multiple calls to write or with an array of buffers, does not differ:
for (ByteBuffer byteBuffer : byteBufferList) {
long bytesWritten = establishedContext.socket().write(new ByteBuffer[] {
byteBuffer
});
LOGGER.info("wrote <{}>", bytesWritten);
}
then tlsChannel is read only once and it does not trigger ready operation in the next invocation to selector.select. the data is unavailable and lost, however if the client code is changed so that:
while (true) {
readBytes = tlsChannel.read(byteBuffer);
if (readBytes <= 0) {
break;
}
}
all data is available and read, however expected behaviour is that selector would be ready immediately as there is still data not read. this change does not comform my needs because client buffers may be smaller than send buffers, however in the where we see the abnormal behviour they are larger.
I currently use HAProxy in front of RabbitMQ and MongoDB to do TLS termination. I then use a java based load balancer to handle http termination for websocket. I prefer the Java route because it is more flexible, and would love to combine the two.
Let's say I have an insecure server running on tcp://host_foo:5555. Is it possible to use this library to perform TLS termination on tls://host_bar:6555 and then insecurely tunnel the traffic to host_foo?
In other words:
[xyc_client] <-- secure tcp (tls) --> [tls-channel-server] <-- insecure tcp --> [xyc_server]
Thanks for a great library with easy to use interface.
I tried non-blocking, https://github.com/marianobarrios/tls-channel/blob/master/src/test/scala/tlschannel/example/NonBlockingClient.java. It works for reading short stream. For long stream, it does not read complete stream. Sometimes, I got NeedsReadException. Note that, the channel is running in its own thread, and the connection is always connected, and it did not close by the peer.
I tried blocking example (https://github.com/marianobarrios/tls-channel/blob/master/src/test/scala/tlschannel/example/SimpleBlockingClient.java) , it works perfectly.
Any thought?
Here's the codes: (blocking) - works
private void tlsBlockingRun () {
// initialize the SSLContext, a configuration holder, reusable object
ByteBuffer requestBuffer = sendAuthenticationRequestTls();
ByteBuffer responseBuffer = ByteBuffer.allocate(initialReadBufferSizeBytes);
responseBuffer.order(ByteOrder.LITTLE_ENDIAN);
ByteArrayOutputStream accumulatedData = new ByteArrayOutputStream();
boolean requestSent = false;
try {
SSLContext sslContext = SSLContext.getDefault();
// connect raw socket channel normally
try (SocketChannel rawChannel = SocketChannel.open()) {
connected = rawChannel.connect(new InetSocketAddress(host,port));
// create TlsChannel builder, combining the raw channel and the SSLEngine, using minimal
// options
ClientTlsChannel.Builder builder = ClientTlsChannel.newBuilder(rawChannel, sslContext);
// instantiate TlsChannel
try (TlsChannel tlsChannel = builder.build()) {
int c;
while (requestBuffer.remaining() > 0) {
tlsChannel.write(requestBuffer);
}
Trace.debug ("sent AuthenticationRequest");
// being HTTP 1.0, the server will just close the connection at the end
while ((c = tlsChannel.read(responseBuffer)) != -1) {
if (c > 0) {
Trace.debug ("read " + c + " bytes");
responseBuffer.flip();
byte[] bytesFromBuffer = new byte[c];
responseBuffer.get(bytesFromBuffer);
accumulatedData.write(bytesFromBuffer);
responseBuffer.clear();
processAccumulatedData(accumulatedData);
} else {
Trace.debug ("read return " + c);
}
}
Trace.debug ("Out of the loop");
}
}
} catch (IOException | NoSuchAlgorithmException | InterruptedException ex) {
Trace.debug ("Exception ... ");
}
}
non-Blocking code - does not work (did not read the complete stream)
private void tlsNonBlockingRun() {
ByteBuffer requestBuffer = sendAuthenticationRequestTls();
ByteBuffer responseBuffer = ByteBuffer.allocate(initialReadBufferSizeBytes); // use small buffer to cause selector loops
responseBuffer.order(ByteOrder.LITTLE_ENDIAN);
ByteArrayOutputStream accumulatedData = new ByteArrayOutputStream();
boolean requestSent = false;
try {
// initialize the SSLContext, a configuration holder, reusable object
SSLContext sslContext = SSLContext.getDefault();
Selector selector = Selector.open();
// connect raw socket channel normally
try (SocketChannel rawChannel = SocketChannel.open()) {
rawChannel.configureBlocking(false);
rawChannel.connect(new InetSocketAddress(host,port));
// Note that the raw channel (and not the wrapped one) is registered in the selector
rawChannel.register(selector, SelectionKey.OP_CONNECT);
// create TlsChannel builder, combining the raw channel and the SSLEngine, using minimal
// options
ClientTlsChannel.Builder builder = ClientTlsChannel.newBuilder(rawChannel, sslContext);
// instantiate TlsChannel
try (TlsChannel tlsChannel = builder.build()) {
mainloop:
while (true) {
// loop blocks here
selector.select(500);
Iterator<SelectionKey> iterator = selector.selectedKeys().iterator();
while (iterator.hasNext()) {
SelectionKey key = iterator.next();
iterator.remove();
if (key.isConnectable()) {
if (rawChannel.finishConnect()) {
// the channel is registered for writing, because TLS connections are initiated by
// clients.
rawChannel.register(selector, SelectionKey.OP_WRITE);
connected = true;
}
} else if (key.isReadable() || key.isWritable()) {
try {
if (!requestSent) {
// do HTTP request
tlsChannel.write(requestBuffer);
if (requestBuffer.remaining() == 0) {
requestSent = true;
}
} else {
int c = tlsChannel.read(responseBuffer);
if (c > 0) {
responseBuffer.flip();
byte[] bytesFromBuffer = new byte[c];
responseBuffer.get(bytesFromBuffer);
accumulatedData.write(bytesFromBuffer);
responseBuffer.clear();
processAccumulatedData(accumulatedData);
}
if (c < 0) {
tlsChannel.close();
break mainloop;
}
}
} catch (NeedsReadException e) {
key.interestOps(SelectionKey.OP_READ); // overwrites previous value
Trace.debug ("NeedsReadException");
} catch (NeedsWriteException e) {
key.interestOps(SelectionKey.OP_WRITE); // overwrites previous value
Trace.debug ("NeedsWriteException");
} catch (InterruptedException e) {
Trace.debug ("InteruptedExeception");
Trace.debug ("InteruptedException");
}
} else {
throw new IllegalStateException();
}
}
}
}
}
} catch (IOException | NoSuchAlgorithmException ex) {
}
}
I created a multi-threading version of a NIO server application here https://github.com/teragrep/rlp_03/blob/multi-thread/src/main/java/com/teragrep/rlp_03/SocketProcessor.java#L109
However I can't simply get around the idea how the tls-channel would fit into the picture because I offload the connection processing after the accepting and creating the socket (runAcceptSelector) to dedicated thread selectors (runMessageSelector) which are interested in their own share of sockets.
Would it be possible to get consulting on the matter?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.