1 year ago

#361983

test-img

nooka sumanth sai

level=fatal msg="x509: cannot validate certificate for <PostgreSQL host ip> because it doesn't contain any IP SANs"

I'm getting the error in docker logs as "level=fatal msg="x509: cannot validate certificate for because it doesn't contain any IP SANs"

and the docker compose file is given below

    ...
    services:
    test:
    restart: unless-stopped
    ports:
    - '127.0.0.1:8080:8080'
    image: gcr.io/test/test.2.0.7
    environment:
    - ENV_TYPE=dev
    - AUTH0_AUD=abcdfgrthwjsjxsjxsx
    - AUTH0_ISS=https://testus.auth0.com/
    - PG_HOSTNAME=<ip address of Postgresql>
    - PG_PORT=5432
    - PG_USER=Test
    - PG_PASSWORD=test123
    - PG_DB_NAME=test_db
    - VAULT_ID=hello
    - APP_BUFFER_SIZE_DB_READ=25000
    - APP_BUFFER_SIZE_DB_WRITE=25000
    - APP_SSL_MODE=True
    - NODE_ADDR=wss://test.example.net/rpc
    - SECRET_SEED=0x9089009fcb34b31da88c69aca70836d4c17c4d0e827fa1864
    - ACTIVATION_DEST_BUCKET=test-bucket

and the postgressql configuration using terraform is

    resource "google_sql_database_instance" "pg_instance" {
        name = "test-pg-${random_id.postfix.hex}"
        database_version = "POSTGRES_13"
        region = var.gcp_region
        project = var.gcp_project
        deletion_protection = false
        settings {
        tier = var.db_tier
         availability_type = var.db_avialability_type  
         disk_autoresize = true
         disk_autoresize_limit = var.db_autoresize_limit
          disk_type = "PD_SSD"
         disk_size = var.db_disk_size
         maintenance_window {
          day  = "7"  # sunday
          hour = "3" # 3am
          }

             backup_configuration {
               backup_retention_settings {
                retained_backups = var.retained_backups
                retention_unit = "COUNT"
             }
          }

              ip_configuration {
              ipv4_enabled = true
              require_ssl = false
              #allocated_ip_range = "10.0.0.0/24"
              authorized_networks {
              value = "0.0.0.0/0"
           }

          and manually tried with client ssl keys but not worked and same error came 

...

postgresql

google-cloud-platform

google-cloud-sql

terraform-provider-gcp

0 Answers

Your Answer

Accepted video resources