Skip to content

[Issue] K8s Pod (Java App) ไม่พร้อมใช้งาน: Cannot connect to DB #7

@nopponcha

Description

@nopponcha

แอปพลิเคชัน Java (Spring Boot) ใน Pod ของ Deployment 'scbconnect-api' ไม่สามารถสตาร์ทขึ้นได้ (CrashLoopBackOff)

  1. ทำการ Deploy Image ใหม่ของ 'scbconnect-api'
  2. สถานะของ Pod เปลี่ยนเป็น 'CrashLoopBackOff'
  3. ตรวจสอบ Log พบ Error เกี่ยวกับการเชื่อมต่อ Database (PostgreSQL)

Relevant Log Snippet:

2025-10-09 09:30:15.545 ERROR 1 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Failed to initialize pool: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
2025-10-09 09:30:15.548 ERROR 1 --- [ main] o.s.b.d.LoggingFailureAnalysisReporters : 

***************************
APPLICATION FAILED TO START
***************************

Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Reason:
Database connection refused.

### Project/Application ที่ได้รับผลกระทบ (เช่น scbconnect, j4u, system-wide,meamanee)

meamanee

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions