I see the following logging moments after the server is started. I think it's from some kind of monitor thread that regularly checks the connections. But why the timeouts? My pool only has one connection (the template) on startup. I wouldn't expect a timeout this soon.
beginSequence(ASN1StreamReader.java:900) / readLDAPResponseFrom(LDAPMessage.java:1146) / run(LDAPConnectionReader.java:257)', revision=16923)"
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at com.unboundid.asn1.ASN1StreamReader.read(ASN1StreamReader.java:978)
at com.unboundid.asn1.ASN1StreamReader.readType(ASN1StreamReader.java:327)
at com.unboundid.asn1.ASN1StreamReader.beginSequence(ASN1StreamReader.java:900)
at com.unboundid.ldap.protocol.LDAPMessage.readLDAPResponseFrom(LDAPMessage.java:1146)
at com.unboundid.ldap.sdk.LDAPConnectionReader.run(LDAPConnectionReader.java:257)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
By default, the LDAP SDK creates a separate thread for each connection that is dedicated to reading responses from the server. This separate reader thread is necessary to support operations invoked through the asynchronous API, or cases in which the same connection is used concurrently by multiple threads.
In general, this thread just loops on a socket read and ensures that any data received on that socket is handled properly. However, for some StartTLS processing, it is necessary to periodically look to check if the socket might need to be converted to use a secure connection. In those cases, a socket timeout is used to cause the socket read to timeout so we can check whether it is necessary to perform any StartTLS processing before reading again.
As a result, a socket timeout exception encountered within the LDAP SDK should be a pretty normal occurrence and shouldn't be cause for concern. It is generally intended that these exceptions should be logged at the FINEST level and can be safely ignored. If you've found a case where such an exception isn't logged at FINEST, or if you think there might be a problem, then let me know and I can look into it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey Neil! Thanks for your quick reply and explanation! I was only wondering what these exceptions were caused by. I haven't seen any logged different from FINEST so I don't think there's need to look into this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just out of curiosity;
I see the following logging moments after the server is started. I think it's from some kind of monitor thread that regularly checks the connections. But why the timeouts? My pool only has one connection (the template) on startup. I wouldn't expect a timeout this soon.
beginSequence(ASN1StreamReader.java:900) / readLDAPResponseFrom(LDAPMessage.java:1146) / run(LDAPConnectionReader.java:257)', revision=16923)"
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at com.unboundid.asn1.ASN1StreamReader.read(ASN1StreamReader.java:978)
at com.unboundid.asn1.ASN1StreamReader.readType(ASN1StreamReader.java:327)
at com.unboundid.asn1.ASN1StreamReader.beginSequence(ASN1StreamReader.java:900)
at com.unboundid.ldap.protocol.LDAPMessage.readLDAPResponseFrom(LDAPMessage.java:1146)
at com.unboundid.ldap.sdk.LDAPConnectionReader.run(LDAPConnectionReader.java:257)
By default, the LDAP SDK creates a separate thread for each connection that is dedicated to reading responses from the server. This separate reader thread is necessary to support operations invoked through the asynchronous API, or cases in which the same connection is used concurrently by multiple threads.
In general, this thread just loops on a socket read and ensures that any data received on that socket is handled properly. However, for some StartTLS processing, it is necessary to periodically look to check if the socket might need to be converted to use a secure connection. In those cases, a socket timeout is used to cause the socket read to timeout so we can check whether it is necessary to perform any StartTLS processing before reading again.
As a result, a socket timeout exception encountered within the LDAP SDK should be a pretty normal occurrence and shouldn't be cause for concern. It is generally intended that these exceptions should be logged at the FINEST level and can be safely ignored. If you've found a case where such an exception isn't logged at FINEST, or if you think there might be a problem, then let me know and I can look into it.
Hey Neil! Thanks for your quick reply and explanation! I was only wondering what these exceptions were caused by. I haven't seen any logged different from FINEST so I don't think there's need to look into this.