Closed dependabot[bot] closed 1 year ago
Does this version of the connector actually work with our code?
Need to test this before merging with a recon job to see that it connects/disconnects properly.
Just tested this locally. Looks like it no worky:
org.hps.conditions.database:CONFIG Initializing conditions system with detector 'HPS_Run2021Pass0_v0' and run 14166
org.hps.conditions.database:INFO Opening conditions db connection ...
url: jdbc:mysql://hpsdb.jlab.org:3306/hps_conditions
user: hpsuser
org.hps.conditions.database:WARNING Failed to connect to database jdbc:mysql://hpsdb.jlab.org:3306/hps_conditions - Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
org.hps.conditions.database:WARNING Failed to connect to database jdbc:mysql://hpsdb.jlab.org:3306/hps_conditions - Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
org.hps.conditions.database:WARNING Failed to connect to database jdbc:mysql://hpsdb.jlab.org:3306/hps_conditions - Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
org.hps.conditions.database:WARNING Failed to connect to database jdbc:mysql://hpsdb.jlab.org:3306/hps_conditions - Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
org.hps.conditions.database:WARNING Failed to connect to database jdbc:mysql://hpsdb.jlab.org:3306/hps_conditions - Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
no idea, need to get some CI tests going
@cbravo135 Yeah, I think I tried this long ago and saw similar issues.
@baltzell Agree with you on the CI for PRs. We probably could have some "sanity check" style tests that run on github. Just typing mvn
in the local hps-java runs all the integration tests but it isn't automatic until there's a merge to master which triggers Jenkins.
@baltzell This PR probably would require a change on the server side. Does JLab want to support this change?
what exactly is the problem here, it can't connect to Jlab's databse?
what exactly is the problem here, it can't connect to Jlab's databse?
It seems like a basic failure in the initial handshake which is probably due to the connector version not matching the MySQL server version. I think they need to be the same from what I am reading online. The error doesn't have much information in it though. Maybe the server log would have more detail but we can't access that, as far as I know.
I'd suspect other things, like firewall or java versions, they do weird stuff with certificates and such.
I'd suspect other things, like firewall or java versions, they do weird stuff with certificates and such.
Could be any number of things but if the current connector version works and the updated one doesn't then I would suspect an incompatibility there. Some stackoverflow stuff I am reading suggests that the connector and server versions are closely coupled and need to match. But we could talk to the JLab applications group about it to see if they have more details. (They could check the server log for a better error message, for instance.)
Here is some more stuff it dumped after the timeout:
Exception in thread "main" java.lang.RuntimeException: Failed to connect to database after 10 attempts: jdbc:mysql://hpsdb.jlab.org:3306/hps_conditions
at org.hps.conditions.database.DatabaseConditionsManager.createConnection(DatabaseConditionsManager.java:158)
at org.hps.conditions.database.DatabaseConditionsManager.openConnection(DatabaseConditionsManager.java:709)
at org.hps.conditions.database.DatabaseConditionsManager.setDetector(DatabaseConditionsManager.java:784)
at org.hps.evio.EvioToLcio.checkConditions(EvioToLcio.java:227)
at org.hps.evio.EvioToLcio.run(EvioToLcio.java:465)
at org.hps.evio.EvioToLcio.main(EvioToLcio.java:90)
Caused by: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:829)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:449)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:242)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:189)
at org.hps.conditions.database.DatabaseConditionsManager.createConnection(DatabaseConditionsManager.java:150)
... 5 more
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:317)
at com.mysql.cj.protocol.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:204)
at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1369)
at com.mysql.cj.NativeSession.connect(NativeSession.java:133)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:949)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:819)
... 11 more
Caused by: javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake
at java.base/sun.security.ssl.SSLSocketImpl.handleEOF(SSLSocketImpl.java:1687)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1496)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1394)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:441)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:412)
at com.mysql.cj.protocol.ExportControlled.performTlsHandshake(ExportControlled.java:347)
at com.mysql.cj.protocol.StandardSocketFactory.performTlsHandshake(StandardSocketFactory.java:194)
at com.mysql.cj.protocol.a.NativeSocketConnection.performTlsHandshake(NativeSocketConnection.java:101)
at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:308)
... 16 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:483)
at java.base/sun.security.ssl.SSLSocketInputRecord.readFully(SSLSocketInputRecord.java:461)
at java.base/sun.security.ssl.SSLSocketInputRecord.decodeInputRecord(SSLSocketInputRecord.java:243)
at java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:181)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:110)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1488)
... 23 more
New versions of various thingies also require various new cert stuff, with evolving stuff at JLab, seen it many times, hard to say. Need to dive in and figure it out. I'd definitely say get up to date with jdk11 or jdk17 to start with, there's even certificate issues I've seen there. And get a basic "mvn install with no tests" CI github action running in 11 or 17.
This version of MySQL connector is not compatible with the MySQL server version at JLAB.
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version
or @dependabot ignore this minor version
.
If you change your mind, just re-open this PR and I'll resolve any conflicts on it.
Bumps mysql-connector-java from 5.1.26 to 8.0.28.
Changelog
Sourced from mysql-connector-java's changelog.
... (truncated)
Commits
7ff2161
Updating copyright yearsb13af38
Fix for DateTimeTest according to changes in MySQL server.5c7b775
Update in test for Bug#96900 (30355150).e1169ee
Fix for Bug#99260 (31189960), statement.setQueryTimeout,creates a database co...05778ef
Fix for Bug#103324 (32770013), X DevAPI Collection.replaceOne() missing match...48219f2
Fix for Bug#105197 (33461744), Statement.executeQuery() may return non-naviga...24cf7e2
Fix for Bug#105323 (33507321), README.md contains broken links.ad46620
Fix for Bug#96900 (30355150), STATEMENT.CANCEL()CREATE A DATABASE4d19ea1
Fix for Bug#104067 (33054827), No reset autoCommit after unknown issue occurs.bc45d35
Fix for Bug#85223 (25656020), MYSQLSQLXML SETSTRING CRASH.Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/JeffersonLab/hps-java/network/alerts).