0
votes

Background: devops artifactory is deployed as a statefulset pod on AWS eks cluster through Helm chart. And the PV is pointing to EFS. The below is the snippet from values.yaml postgresql: enabled: false

database: type: "postgresql" host: "xxxxxxx.rds.amazonaws.com" port: 5432 user: "xxxxxx" password: "xxxxx"

It was working fine. But when the pod got restarted the status is 3/4 and Running mode. When we tried to access JFrogArtifactory URL, its showing "no healthy upstream".

Error: Here is the details: NAMESPACE NAME READY STATUS devops-artifactory dfdp-devops-euc1-artifactory-artifactory-0 3/4 Running

When described the pod below error: Type Reason Age From Message ---- ------ ---- ---- ------- Warning Unhealthy 4m27s (x4736 over 13h) kubelet, ip-10-80-114-124.eu-central-1.compute.internal Readiness probe failed: Connecting to 127.0.0.1:8081 (127.0.0.1:8081) HTTP/1.1 302 Found Location: /artifactory/ HTTP/1.1 500 Internal Server Error wget: server returned error: HTTP/1.1 500 Internal Server Error

Here is the logs of pod: 2020-04-21T18:04:19.018Z [jfac ] [ERROR] [1f656079c9208e40] [GenericDBPrivilegesVerifier:43] [ocalhost-startStop-1] - Could not determine sufficient privileges java.sql.SQLException: Table/View 'T1ACCESS' already exists in Schema 'APP'

2020-04-21T18:04:19.019Z [jfac ] [ERROR] [1f656079c9208e40] [.s.d.u.AccessJdbcHelperImpl:66] [ocalhost-startStop-1] - Could not initialize database: java.lang.RuntimeException: java.sql.SQLException: Table/View 'T1ACCESS' already exists in Schema 'APP'. at org.jfrog.storage.priviledges.GenericDBPrivilegesVerifier.isSufficientPrivileges(GenericDBPrivilegesVerifier.java:44)

2020-04-21T18:04:19.051Z [jfac ] [ERROR] [1f656079c9208e40] [o.s.b.SpringApplication:822 ] [ocalhost-startStop-1] - Application run failed org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration':

Options tried 1)Logged into the pod. Provided the db properties in $Artifactory_Home/var/etc/system.yaml related to Postegresql details 2)Manually restarted the artifactoryctl from $Artifactory_Home/app/bin Now we are getting the below error **Error ** 2020-04-21T17:33:55.091Z [jfmd ] [INFO ] [73cdd58a85c6c861] [database_bearer.go:71 ] [main ] - Connecting to (db config: {postgresql user='xxxxxxxxxxxx' password='xxxxxxxxxx' dbname=artifactory host=xxxxxxxxxxxxxxx.rds.amazonaws.com port=5432 sslmode=disable}) [database] Tomcat started. artifactory@xxxxxxxxxxxxxxxx:/opt/jfrog/artifactory/app/bin$ 2020-04-21T17:33:55.141Z [jfmd ] [INFO ] [73cdd58a85c6c861] [migrator.go:62 ] [main ] - Applying 36 migrations files [database] 2020-04-21T17:33:55.143Z [jfmd ] [INFO ] [73cdd58a85c6c861] [application.go:73 ] [main ] - Metadata (jfmd) service initialization started. Version: 2.4.3 Revision: 20403900 PID: 9619 Home: /opt/jfrog/artifactory/var [app_initializer] 2020-04-21T17:33:55.145Z [jfmd ] [INFO ] [73cdd58a85c6c861] [server_bearer.go:153 ] [main ] - Got service_id from datastore: xxxxxxxxxxxxxxxxxxxxxxxxxxxx [ServerInit] 2020-04-21T17:33:55.336Z [jffe ] [INFO ] [ ] [ ] [main ] - frontend (jffe) service initialization started. Version: 1.4.1 Revision: 0.0.0 PID: 9425 Home: /opt/jfrog/artifactory 2020-04-21T17:33:56.900Z [jfrou] [INFO ] [3155325b3a2e8c70] [config_holder.go:107 ] [main ] - configuration update detected 2020-04-21T17:33:59.087Z [jfrou] [INFO ] [3155325b3a2e8c70] [join_executor.go:148 ] [main ] - Cluster join: Retry 5: Service registry ping failed, will retry. Error: Could not parse error from service registry, status code: 404, raw body: HTTP Status 404 – Not Foundh1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}

1

1 Answers

0
votes

Assuming you are using latest helm (7.x Appversion ) charts , Artifactory uses internal postgresql (postgresql.enabled=true),which is enabled by default (for non production purposes)

For production deployments,

  1. Use an external postgresql,(use --set postgresql.enabled=false) and
  2. Please set these values

Note: For faster responses for your issues , Feel free to raise issues directly here