[SQLNonTransientConnectionException] Could not create connection to database server. Attempted reconnect 3 times. Giving up.

2023. 11. 7. 09:40·개발중/Troubleshooting
728x90
반응형

 

다중 db 를 연결하는 스프링 부트 프로젝트인데 db 정보를 3 개까지 연결할 때는 아무런 이상 없이 잘 도착했습니다.

근데 네번째 db 를 연결하는 순간 아래와 같은 에러가 발생했습니다.

 

 


java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

 

...


The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

 

...


org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection

 

...

 

Caused by: java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

 

...

 

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

 

...


Caused by: javax.net.ssl.SSLException: Unsupported record version Unknown-0.0

 


 

뭐든지 다 (?) 잘 알고있는 chatGPT 에게 물어보니 아래와 같은 답변이 왔습니다.

 

 

 

구글링을 이것저것 해보니 결국은 Connection 문제와 db ssl 문제가 가장 많이 의심되고 있습니다.


 

테스트 성공

- 기존에 추가되어있던 db 에서 데이터 조회 성공

 

 

테스트 실패

- 추가한 db 에서 데이터 조회 실패 ( 특정 db 만 실패 )

 


 

java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

이 글 써주신분 너무 감사합니다 .... (っ °Д °;)っ

 

아무튼 저는 useSSL=false 를 명시함으로써 해결했습니다. !!!

 


 

728x90
반응형
저작자표시 (새창열림)

'개발중 > Troubleshooting' 카테고리의 다른 글

[Error] swagger Failed to load remote configuration. (시큐리티 설정한 후 에러발생)  (0) 2024.01.20
java.lang.IllegalArgumentException: Attempting to write a row[2] in the range [0,3] that is already written to disk.  (0) 2023.11.08
Try to run Maven import with -U flag (force update snapshots) 에러  (0) 2023.04.04
[@Transactional] Connection is read-only. Queries leading to data modification are not allowed  (0) 2023.03.20
[Retrofit 에러] com.fasterxml.jackson.databind.exc.InvalidDefinitionException  (0) 2023.01.26
'개발중/Troubleshooting' 카테고리의 다른 글
  • [Error] swagger Failed to load remote configuration. (시큐리티 설정한 후 에러발생)
  • java.lang.IllegalArgumentException: Attempting to write a row[2] in the range [0,3] that is already written to disk.
  • Try to run Maven import with -U flag (force update snapshots) 에러
  • [@Transactional] Connection is read-only. Queries leading to data modification are not allowed
Binsoo
Binsoo
내 트러블 슈팅
  • Binsoo
    정수빈 기술블로그임.
    Binsoo
  • 전체
    오늘
    어제
    • 빈수 개발자 개발 일기 (932)
      • 개발중 (634)
        • Spring Boot (95)
        • Spring Security (2)
        • Spring Batch (6)
        • Spring Boot & Redis (13)
        • Java Persistence API (JPA) (28)
        • Web (42)
        • Rest Api (7)
        • Spring Concurrency Control (3)
        • Redis (8)
        • Kubernetes (k8s) (4)
        • MYSQL (35)
        • AirFlow (15)
        • Docker (2)
        • Git (22)
        • Linux (9)
        • JSON Web Tokens (JWT) (4)
        • Troubleshooting (87)
        • Swagger (0)
        • Vue.js (52)
        • Java (74)
        • html (12)
        • C (5)
        • jQuery (15)
        • JavaServer Pages (JSP) (17)
        • Arduino (1)
        • JavaScript (35)
        • Amazon Web Services (AWS) (11)
        • Algorithm (9)
        • 참고 기능 (18)
        • mongo (2)
      • PROJECT (27)
        • 스프링부트+JPA+몽고 API 개발 (3)
        • MINI (2)
        • 게시판 (3)
        • vue 프로젝트 (1)
        • JPA 사이드 프로젝트 기록 (17)
      • TEAM STUDY (156)
        • 가상 면접 사례로 배우는 대규모 시스템 설계 기초 (8)
        • 한 권으로 읽는 컴퓨터 구조와 프로그래밍 (12)
        • NAVER DEVELOPER (4)
        • LINUX (23)
        • PYTHON (19)
        • SERVER (8)
        • 알고리즘 코딩 테스트 스터디 (31)
        • 쿠버네티스 (40)
        • 대세는 쿠버네티스 [초급~중급] (11)
      • BOOK (0)
      • 자격증 (61)
        • 리눅스 1급 - 필기 기록 (19)
        • 네트워크 관리사 (2)
        • 네트워크 관리사 2급 - 실기 기록 (21)
        • 네트워크 관리사 2급 - 필기 기록 (16)
        • 정보처리 (2)
      • 직장인 대학원 (17)
        • 기록 (1)
        • 캐글 스터디 (3)
        • R (12)
  • 블로그 메뉴

    • 홈
    • 태그
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    리눅스 마스터 1급 요약
    리눅스 마스터
    BackendDevelopment
    네트워크 관리사
    네트워크 관리사 요약
    git
    네트워크 관리사 2급
    파이썬
    네트워크 관리사 학점
    리눅스 1급 요약
    REST API
    리눅스 마스터 요약
    java
    쿠버네티스 스터디
    springboot
    docker
    네트워크 관리사 실기
    리눅스 마스터 1급
    Git 저장소
    알고리즘
    쿠버네티스
    redis
    파이썬 알고리즘
    jpa
    스프링
    네트워크 관리사 2급 실기
    VUE
    리눅스 마스터 1급 정리
    네트워크 관리사 자격증
    Spring
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.4
Binsoo
[SQLNonTransientConnectionException] Could not create connection to database server. Attempted reconnect 3 times. Giving up.
상단으로

티스토리툴바