jfrog / charts

JFrog official Helm Charts
https://jfrog.com/integration/helm-repository/
Apache License 2.0
259 stars 448 forks source link

Metadata start up fail with external DB #1905

Closed yurymkomarov closed 4 months ago

yurymkomarov commented 4 months ago

metadata container can not start up with external DB


│ 2024-07-19T16:54:17.640Z [jfmd ] [INFO ] [                ] [database_bearer.go:143        ] [main                ] - Db connection driver::pgx and kerberosAuth::false [database]                                                                                                                                                                                                                                                                                                       │
│ 2024-07-19T16:54:17.640Z [jfmd ] [INFO ] [                ] [postgres_jdbc_url_converter.go] [main                ] - No ssl parameter found, falling back to sslmode=disable [database]                                                                                                                                                                                                                                                                                                 │
│ 2024-07-19T16:54:17.640Z [jfmd ] [INFO ] [                ] [database_bearer.go:158        ] [main                ] - Connecting to (db config: {postgresql jdbc:postgresql://azure.postgresql:5432/artifactory}) [database]                                                                                                                                                                                                                                                             │
│ 2024-07-19T16:54:17.655Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (1/120) [database]                                                       │
│ 2024-07-19T16:54:18.664Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (2/120) [database]                                                       │
│ 2024-07-19T16:54:19.665Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (3/120) [database]                                                       │
│ 2024-07-19T16:54:20.671Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (4/120) [database]                                                       │
│ 2024-07-19T16:54:21.666Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (5/120) [database]                                                       │
│ 2024-07-19T16:54:22.666Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (6/120) [database]                                                       │
│ 2024-07-19T16:54:23.664Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (7/120) [database]                                                       │
│ 2024-07-19T16:54:24.680Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (8/120) [database]                                                       │
│ 2024-07-19T16:54:25.670Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (9/120) [database]                                                       │
│ 2024-07-19T16:54:26.665Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (10/120) [database]                                                      │
│ 2024-07-19T16:54:27.667Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (11/120) [database]                                                      │
│ 2024-07-19T16:54:28.679Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (12/120) [database]                                                      │
│ 2024-07-19T16:54:29.666Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (13/120) [database]                                                      │
│ 2024-07-19T16:54:30.665Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (14/120) [database]                                                      │
│ 2024-07-19T16:54:31.670Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (15/120) [database]                                                      │
│ 2024-07-19T16:54:32.665Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (16/120) [database]                                                      │
│ 2024-07-19T16:54:33.667Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (17/120) [database]                                                      │
│ 2024-07-19T16:54:34.666Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (18/120) [database]                                                      │
│ 2024-07-19T16:54:35.667Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (19/120) [database]                                                      │
│ 2024-07-19T16:54:36.666Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (20/120) [database]                                                      │
│ 2024-07-19T16:54:37.665Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (21/120) [database]                                                      │
│ 2024-07-19T16:54:38.666Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (22/120) [database]                                                      │
│ 2024-07-19T16:54:39.666Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (23/120) [database]                                                      │
│ 2024-07-19T16:54:40.668Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (24/120) [database]                                                      │
│ 2024-07-19T16:54:41.665Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (25/120) [database]                                                      │
│ 2024-07-19T16:54:42.667Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (26/120) [database]                                                      │
│ 2024-07-19T16:54:43.668Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (27/120) [database]                                                      │
│ 2024-07-19T16:54:44.666Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (28/120) [database]                                                      │
│ 2024-07-19T16:54:45.664Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (29/120) [database]                                                      │
│ 2024-07-19T16:54:46.669Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (30/120) [database]                                                      │
│ 2024-07-19T16:54:47.664Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (31/120) [database]                                                      │
│ 2024-07-19T16:54:48.669Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (32/120) [database]                                                      │
│ 2024-07-19T16:54:49.690Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (33/120) [database]                                                      │
│ 2024-07-19T16:54:50.665Z [jfmd ] [WARN ] [                ] [jobs.go:98                    ] [main                ] -  [RETRY] Initiating database connection: failed to connect to `host=azure.postgresql user=artifactory database=artifactory`: server error (FATAL: no pg_hba.conf entry for host "10.239.64.82", user "artifactory", database "artifactory", SSL off (SQLSTATE 28000)). Retrying in 1s ... (34/120) [database]                                                      │

Meanwhile DB was inited without any issues

image

Which chart: artifactory@107.84.14

Which product license (Enterprise/Pro/oss): Pro

How to reproduce it (as minimally and precisely as possible): helm config:

postgresql:
  enabled: false

database:
  type: postgresql
  driver: org.postgresql.Driver
  url: 'jdbc:postgresql://azure.postgresql:5432/${postgresql_database}'
  user: ${postgresql_user}
  password: ${postgresql_password}
Alexhha commented 4 months ago

Postgres version ?

yurymkomarov commented 4 months ago

Postgres version ?

@Alexhha 13.15

amithins commented 4 months ago

SSL off error usually means, the client is not using ssl during connection and it is required to do so, can you try the following,

url: 'jdbc:postgresql://azure.postgresql:5432/${postgresql_database}'

to

url: 'jdbc:postgresql://azure.postgresql:5432/${postgresql_database}?sslmode=require'

Or you can try removing the SSL enforcement requirement in Azure postgres.

yurymkomarov commented 4 months ago

SSL off error usually means, the client is not using ssl during connection and it is required to do so, can you try the following,

@amithins it helps, thank you!