Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uses TLS 2.1 in JDBC tests. No AUTO cherry-pick #2628

Merged
merged 1 commit into from
Mar 14, 2022
Merged

Conversation

ncordon
Copy link
Contributor

@ncordon ncordon commented Mar 14, 2022

What

Forces TLS 2.1 in the JDBC tests

Why

We have tests failing in our internal build system due to SSL exceptions:

org.neo4j.graphdb.QueryExecutionException: Failed to invoke procedure `apoc.model.jdbc`: Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
	at app//org.neo4j.kernel.impl.query.QueryExecutionKernelException.asUserException(QueryExecutionKernelException.java:35)
	at app//org.neo4j.cypher.internal.javacompat.ResultSubscriber.converted(ResultSubscriber.java:426)
	at app//org.neo4j.cypher.internal.javacompat.ResultSubscriber.fetchResults(ResultSubscriber.java:369)
	at app//org.neo4j.cypher.internal.javacompat.ResultSubscriber.materialize(ResultSubscriber.java:92)
	at app//org.neo4j.cypher.internal.result.StandardInternalExecutionResult.initiate(StandardInternalExecutionResult.scala:65)
	at app//org.neo4j.cypher.internal.result.ClosingExecutionResult.$anonfun$initiate$1(ClosingExecutionResult.scala:58)
	at app//scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
	at app//org.neo4j.cypher.internal.result.ClosingExecutionResult.safely(ClosingExecutionResult.scala:99)
	at app//org.neo4j.cypher.internal.result.ClosingExecutionResult.initiate(ClosingExecutionResult.scala:58)
	at app//org.neo4j.cypher.internal.result.ClosingExecutionResult$.wrapAndInitiate(ClosingExecutionResult.scala:183)
	at app//org.neo4j.cypher.internal.CypherCurrentCompiler$CypherExecutableQuery.innerExecute(CypherCurrentCompiler.scala:412)
	at app//org.neo4j.cypher.internal.CypherCurrentCompiler$CypherExecutableQuery.execute(CypherCurrentCompiler.scala:349)
	at app//org.neo4j.cypher.internal.ExecutionEngine.doExecute(ExecutionEngine.scala:189)
	at app//org.neo4j.cypher.internal.ExecutionEngine.$anonfun$executeSubquery$1(ExecutionEngine.scala:150)
	at app//org.neo4j.cypher.internal.ExecutionEngine.closing(ExecutionEngine.scala:155)
	at app//org.neo4j.cypher.internal.ExecutionEngine.executeSubquery(ExecutionEngine.scala:147)
	at app//org.neo4j.cypher.internal.ExecutionEngine.execute(ExecutionEngine.scala:97)
	at app//org.neo4j.cypher.internal.javacompat.ExecutionEngine.executeQuery(ExecutionEngine.java:124)
	at app//org.neo4j.cypher.internal.javacompat.ExecutionEngine.executeQuery(ExecutionEngine.java:112)
	at app//org.neo4j.kernel.impl.coreapi.TransactionImpl.execute(TransactionImpl.java:301)
	at app//org.neo4j.kernel.impl.coreapi.TransactionImpl.execute(TransactionImpl.java:290)
	at app//apoc.util.TestUtil.testResult(TestUtil.java:109)
	at app//apoc.util.TestUtil.testCall(TestUtil.java:39)
	at app//apoc.model.ModelTest.testLoadJdbcSchema(ModelTest.java:61)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:568)
	...

According to this StackOverflow answer the error could be cause newer JDK versions disallow less safe TLS protocols by default.

Open questions

  • At first glance from the stacktrace above it is unclear why we have these two lines mixing different Java versions?:
	at app//scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  • Why the differences between our internal builds and GH Actions if both are using jdk 17?

@ncordon ncordon added bug team-cypher-surface Cypher Surface team should review the PR labels Mar 14, 2022
@ncordon ncordon merged commit 1051406 into dev Mar 14, 2022
@ncordon ncordon deleted the dev-avoid-tls-problems branch March 14, 2022 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug team-cypher-surface Cypher Surface team should review the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants