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

Spring Boot 3.2.4 Java 22 fails to connect to MysSQL using Docker #40346

Closed
mail4csm opened this issue Apr 15, 2024 · 3 comments
Closed

Spring Boot 3.2.4 Java 22 fails to connect to MysSQL using Docker #40346

mail4csm opened this issue Apr 15, 2024 · 3 comments

Comments

@mail4csm
Copy link

mail4csm commented Apr 15, 2024

Purpose: get MySQL 8.3.0 connection from Spring Boot 3.2.4 application using plain java.sql.DriverManager.getConnection(url, username, password).

Issue: during connection acquire - MySQL for few seconds shows "unauthenticated user". Java application just stales on this action without any log messages. I tried to debug DriverManager - stales on socket acquiring.

Setup:

  • Docker: 26.0.0
  • Spring Boot: 3.2.4
  • com.mysql:mysql-connector-j:8.3.0

Successful scenario:

  • image: eclipse-temurin:21-jre-alpine

Failing scenario:

  • image: eclipse-temurin:22-jre-alpine (tried other images too - openjdk, amazon correto - issue is the same)

If I run Spring Boot: 3.2.4 application directly from IntelliJ using Java 22 (without docker) - no issues
If I run java.sql.DriverManager.getConnection from Java 22 container using jshell - no issues. It seems that connections stops working after Spring Boot 3.2.4 loads up.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 15, 2024
@wilkinsona
Copy link
Member

Thanks for the report. Unfortunately, there isn't enough information for us to be able to diagnose the problem. Spring Boot isn't directly involved with connection to MySQL. If it's stalling when trying to open a socket, that sounds like a networking problem. It could be that the wrong network address is being used – this could be a Spring Boot problem – or it could be something at a lower level which could be a JDK or Docker networking problem.

If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Apr 15, 2024
@spring-projects-issues
Copy link
Collaborator

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label Apr 22, 2024
@spring-projects-issues
Copy link
Collaborator

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

@spring-projects-issues spring-projects-issues closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2024
@spring-projects-issues spring-projects-issues removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants