hi team, my deployment keeps failing at `datahub-d...
# troubleshoot
r
hi team, my deployment keeps failing at
datahub-datahub-upgrade-job
( I ran
helm upgrade --install --namespace datahub -f values.yaml datahub datahub/datahub --debug
). I appreciate any help here
Here’s my datahub-upgrade-job pod logs
o
Your upgrade job is unable to connect to your database:
Copy code
Exception: Error creating bean with name 'ebeanServer' defined in class path resource [com/linkedin/gms/factory/entity/EbeanServerFactory.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.ebean.EbeanServer]: Factory method 'createServer' threw exception; nested exception is java.lang.NullPointerException
Although I would expect other pods to fail as well if this pod is unable to connect since they use the same connection config in the helm charts.
r
Thanks Ryan. Exactly, I thought the same thing. I went back and double checked my postgressql-setup job and it finished with no errors 🤔
Copy code
INSERT INTO metadata_aspect_v2
SELECT * FROM temp_metadata_aspect_v2
WHERE NOT EXISTS (SELECT * from metadata_aspect_v2);
DROP TABLE temp_metadata_aspect_v2;
NOTICE:  relation "metadata_aspect_v2" already exists, skipping
CREATE TABLE
SELECT 99
INSERT 0 2
INSERT 0 0
DROP TABLE
2022/08/16 19:46:57 Command finished successfully.
Here’s my values.yaml
Copy code
sql:
  datasource:
    host: "<http://datahub.cluster.us-west-2.rds.amazonaws.com:5432|datahub.cluster.us-west-2.rds.amazonaws.com:5432>"
    hostForpostgresqlClient: "<http://datahub.cluster.us-west-2.rds.amazonaws.com|datahub.cluster.us-west-2.rds.amazonaws.com>"
    port: "5432"
    url: "jdbc:<postgresql://datahub.cluster.us-west-2.rds.amazonaws.com:5432/datahub?verifyServerCertificate=false&useSSL=true&useUnicode=yes&characterEncoding=UTF-8&enabledTLSProtocols=TLSv1.2>"
    driver: "org.postgresql.Driver"
    username: "datahub"
    password:
      secretRef: mysql-secrets
      secretKey: mysql-root-password

mysql:
  enabled: false

mysqlSetupJob:
  enabled: false

postgresqlSetupJob:
  enabled: true
  extraEnvs:
    - name: POSTGRES_USERNAME
      value: "x"
    - name: POSTGRES_PASSWORD
      value: "x"
    - name: POSTGRES_HOST
      value: "<http://datahub.cluster.us-west-2.rds.amazonaws.com|datahub.cluster.us-west-2.rds.amazonaws.com>"
    - name: POSTGRES_PORT
      value: "5432"

datahubUpgrade:
  enabled: true
  image:
    repository: acryldata/datahub-upgrade
    tag: "head"
  noCodeDataMigration:
    sqlDbType: "POSTGRES"
I ended up disabling the datahub upgrade by setting enabled to false. Not sure if that’s the correct solution but I did get me to the next error with GMS? 🤷
Copy code
22:03:44.822 [main] ERROR o.s.web.context.ContextLoader:313 - Context initialization failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'graphQLEngineFactory': Unsatisfied dependency expressed through field '_entityClient'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'javaEntityClientFactory': Unsatisfied dependency expressed through field '_entityService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ebeanAspectDao' defined in com.linkedin.gms.factory.entity.EbeanAspectDaoFactory: Unsatisfied dependency expressed through method 'createInstance' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ebeanServer' defined in com.linkedin.gms.factory.entity.EbeanServerFactory: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.ebean.EbeanServer]: Factory method 'createServer' threw exception; nested exception is java.lang.NullPointerException
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:659)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
^ resolved the issues by adding a secret for the DB password, we’re good here!