<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><tt>FWIW - I don't think this is related to WildFly server. So I
decided to try and reproduce this in a trivial standalone
program and I was able to reproduce this. Here's the code to
reproduce this issue:</tt></p>
<p><tt><br>
import java.sql.*;<br>
<br>
public class ConnectionCloseTest {<br>
<br>
public static void main(final String[] args) throws
Exception {<br>
final String url =
"jdbc:mysql://localhost/?requireSSL=true";<br>
final String user = "youruser"; // set the right user<br>
final String pass = "yourpassword"; // set the right
password<br>
Class.forName("com.mysql.jdbc.Driver");<br>
final Connection conn = DriverManager.getConnection(url,
user, pass);<br>
System.out.println("Got connection");<br>
conn.close();<br>
System.out.println("Closed connection");<br>
}<br>
<br>
}</tt></p>
<p><tt>It's important to start the MySQL server with ssl enabled.
For that I just had to set:</tt></p>
<p><tt>[mysqld]<br>
ssl=1<br>
</tt></p>
<p><tt>in my MySQL server configuration. On the client side you will
need the mysql JDBC driver jar in the classpath. The one I used
for this test was mysql-connector-java-5.1.43.jar.</tt></p>
<p><tt>Running this with Java 8 doesn't throw any exceptions or WARN
logs. However, running it against Java 11 and even Java 12
latest EA build, throws an exception, which gets logged as a
WARN by the driver (and things move on) on connection close:</tt></p>
<p><tt><br>
</tt></p>
<p><tt>WARN: Caught while disconnecting...<br>
<br>
EXCEPTION STACK TRACE:<br>
<br>
<br>
<br>
** BEGIN NESTED EXCEPTION ** <br>
<br>
javax.net.ssl.SSLException<br>
MESSAGE: closing inbound before receiving peer's close_notify<br>
<br>
STACKTRACE:<br>
<br>
javax.net.ssl.SSLException: closing inbound before receiving
peer's close_notify<br>
at
java.base/sun.security.ssl.Alert.createSSLException(Alert.java:133)<br>
at
java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)<br>
at
java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:307)<br>
at
java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:263)<br>
at
java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:254)<br>
at
java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:650)<br>
at
java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:629)<br>
at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:2246)<br>
at
com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4234)<br>
at
com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1472)<br>
at ConnectionCloseTest.main(ConnectionCloseTest.java:13)<br>
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)<br>
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)<br>
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
at
java.base/java.lang.reflect.Method.invoke(Method.java:567)<br>
at
jdk.compiler/com.sun.tools.javac.launcher.Main.execute(Main.java:415)<br>
at
jdk.compiler/com.sun.tools.javac.launcher.Main.run(Main.java:192)<br>
at
jdk.compiler/com.sun.tools.javac.launcher.Main.main(Main.java:132)<br>
<br>
<br>
** END NESTED EXCEPTION **<br>
</tt></p>
<p><tt>-Jaikiran<br>
</tt></p>
<p><tt></tt><br>
</p>
<div class="moz-cite-prefix">On 22/01/19 7:43 AM, Dennis Gesker
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAJRXDBOaVJomT6XXfigyQNY6ABC_Sxmz0ZQGoutgLo5OYN3how@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">Hi Severing:
<div dir="auto"><br>
</div>
<div dir="auto">I'll post the generic error when I get to the
office. It seems to throw the complaints when it closes a
connection.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Here is the thing...</div>
<div dir="auto"><br>
</div>
<div dir="auto">1. I'm glad this found its way to you (being Red
Hat guy) as we first noticed it in WildFly 15.0.1. (But,
wasn't looking for it before as we only need it for a few XA
migration transactions.)</div>
<div dir="auto"><br>
</div>
<div dir="auto">2. It MIGHT be the driver as we use PostgreSQL
driver mostly -- in the same container -- and no errors there
on WildFly 15.0.1 and JDK 11.</div>
<div dir="auto"><br>
</div>
<div dir="auto">3. I will also try to fall back to JDK 8 and see
if it continues in WildFly 15.0.1.</div>
<div dir="auto"><br>
</div>
<div dir="auto">4. The error occurs -- it would seem -- as the
pool closes idle connections.</div>
<div dir="auto"><br>
</div>
<div dir="auto">5. I'll post the pool/data source config in
WildFly as well -- it seems correct and seems to work OK in my
application.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Oh, yeah...</div>
<div dir="auto"><br>
</div>
<div dir="auto">And, I found the form to be a contributor (not
comitter) and will fill that out tomorrow as well and submit
it to you directly.</div>
<div dir="auto"><br>
</div>
<div dir="auto">--drg</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Mon, Jan 21, 2019, 09:23 Severin Gehwolf <<a
href="mailto:sgehwolf@redhat.com" moz-do-not-send="true">sgehwolf@redhat.com</a>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon,
2019-01-21 at 07:57 -0700, Dennis Gesker wrote:<br>
> <br>
> Pasted:<br>
> <br>
> <a
href="https://paste.fedoraproject.org/paste/vEvp9RwN2rVvIKGiC0IvEQ"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true">https://paste.fedoraproject.org/paste/vEvp9RwN2rVvIKGiC0IvEQ</a><br>
<br>
Is this the full trace? I don't see any exceptions happening
in the<br>
log. Am I missing something?<br>
<br>
Thanks,<br>
Severin<br>
<br>
> On Mon, Jan 21, 2019 at 2:10 AM Severin Gehwolf <<a
href="mailto:sgehwolf@redhat.com" target="_blank"
rel="noreferrer" moz-do-not-send="true">sgehwolf@redhat.com</a>><br>
> wrote:<br>
> > Hi Dennis,<br>
> > <br>
> > On Sat, 2019-01-19 at 12:08 -0700, Dennis Gesker
wrote:<br>
> > > Hi Severin:<br>
> > > <br>
> > > A link to the txt file via Google Drive his
here.<br>
> > <br>
> > "Sorry, the file you have requested does not exist."<br>
> > <br>
> > Could you please upload it somewhere less
restricted? Maybe <br>
> > <a href="https://paste.fedoraproject.org/"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true">https://paste.fedoraproject.org/</a>
or something similar?<br>
> > <br>
> > I guess if you include me directly, a file
attachment would work<br>
> > too...<br>
> > It's the mailing lists which strip attachments.<br>
> > <br>
> > > I appreciate you and Alan taking a look.
Especially, information<br>
> > > submitted from someone who is not a part of
openjdk project.<br>
> > > I do hope the debug info helps. Let me know
anything else you<br>
> > need<br>
> > > and I will do my best to provide it.<br>
> > <br>
> > Sure. I'll be mostly doing the intermediary work:
getting the info<br>
> > added to the bug, though.<br>
> > <br>
> > > And, should your team decide to open a new
ticket or reopen this<br>
> > > original ticket in the JIRA could you add me to
the ticket?<br>
> > <br>
> > You'd have to become OpenJDK author for this[1].
It's not terribly<br>
> > difficult, but it's somewhat of an entry barrier I
understand.<br>
> > <br>
> > > BTW, (off topic), would your recommend
submitting a contributor<br>
> > > application to the openjdk project so bug
reports can be<br>
> > submitted<br>
> > > directly? <br>
> > <br>
> > If you intend to submit the occasional bug report
and fix it's<br>
> > easier<br>
> > for you long-term to attempt to become OpenJDK
author (which<br>
> > requires<br>
> > signing the OCA[2]).<br>
> > <br>
> > > The dev group at my company is VERY small (and
this message to<br>
> > your<br>
> > > group at the project is from my personal email)
but I'd be glad<br>
> > to<br>
> > > submit bug reports as we come across them in
our day to day use<br>
> > of<br>
> > > Java.<br>
> > <br>
> > If there are good reproducers for bugs this would be
very welcome.<br>
> > Thanks for investing some time in this!<br>
> > <br>
> > Cheers,<br>
> > Severin<br>
> > <br>
> > [1] <a href="http://openjdk.java.net/bylaws#author"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true">http://openjdk.java.net/bylaws#author</a><br>
> > <a
href="http://openjdk.java.net/projects/#project-author"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true">http://openjdk.java.net/projects/#project-author</a><br>
> > [2] <a href="http://oss.oracle.com/oca.pdf"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true">http://oss.oracle.com/oca.pdf</a><br>
> > <br>
> > > Cordially,<br>
> > > Dennis<br>
> > > <a href="mailto:dennis@gesker.com"
target="_blank" rel="noreferrer" moz-do-not-send="true">dennis@gesker.com</a><br>
> > > <br>
> > > On Fri, Jan 18, 2019 at 10:07 AM Severin
Gehwolf <<br>
> > <a href="mailto:sgehwolf@redhat.com"
target="_blank" rel="noreferrer" moz-do-not-send="true">sgehwolf@redhat.com</a><br>
> > > > wrote:<br>
> > > > On Thu, 2019-01-17 at 10:00 -0700, Dennis
Gesker wrote:<br>
> > > > [...]<br>
> > > > > Added the -Djavax.net.debug=all
option to my Wildfly startup<br>
> > and<br>
> > > > > waited for the pool to close a
connection to MySql at AWS.<br>
> > > > > <br>
> > > > > TXT file attached.<br>
> > > > > <br>
> > > > > javac 11.0.1<br>
> > > > > mysql jdbc driver 8.0.13<br>
> > > > > wildfly 15.0.1<br>
> > > > > <br>
> > > > > --drg<br>
> > > > <br>
> > > > Unfortunately the txt file got stripped by
the mailing list.<br>
> > Would<br>
> > > > you<br>
> > > > be able to upload it somewhere and post a
link?<br>
> > > > <br>
> > > > Thanks,<br>
> > > > Severin<br>
> > > > <br>
> > > <br>
> > > <br>
> > <br>
> <br>
> <br>
<br>
</blockquote>
</div>
</blockquote>
</body>
</html>