nice-planet-17111
10/21/2021, 8:26 AMdatahub-gms
and datahub-upgrade-job
deployment, and when i helm update, upgrade job fails and i get Error creating bean with name 'upgradeCli': Unsatisfied dependency expressed through field 'noCodeUpgrade'
error π Is there something i can do? (error log and helm chart is in the thread because it's too long)nice-planet-17111
10/21/2021, 8:28 AMERROR SpringApplication Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'upgradeCli': Unsatisfied dependency expressed through field 'noCodeUpgrade'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ebeanAspectDao' defined in class path resource [com/linkedin/gms/factory/entity/EbeanAspectDaoFactory.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.linkedin.metadata.entity.ebean.EbeanAspectDao]: Factory method 'createInstance' threw exception; nested exception is java.lang.NullPointerException
nice-planet-17111
10/21/2021, 8:30 AMenv:
- name: ENTITY_REGISTRY_CONFIG_PATH
value: /datahub/datahub-gms/resources/entity-registry.yml
- name: DATAHUB_GMS_HOST
value: {{ printf "%s-%s" .Release.Name "datahub-gms" }}
- name: DATAHUB_GMS_PORT
value: "{{ .Values.global.datahub.gms.port }}"
- name: DATAHUB_MAE_CONSUMER_HOST
value: {{ printf "%s-%s" .Release.Name "datahub-mae-consumer" }}
- name: DATAHUB_MAE_CONSUMER_PORT
value: "{{ .Values.global.datahub.mae_consumer.port }}"
- name: EBEAN_DATASOURCE_USERNAME
valueFrom:
secretKeyRef:
name: cloudsql-secrets
key: username
- name: EBEAN_DATASOURCE_PASSWORD
valueFrom:
secretKeyRef:
name: cloudsql-secrets
key: password
- name: EBEAN_DATASOURCE_HOST
value: <INSTANCE_CONNECTION_NAME>
- name: EBEAN_DATASOURCE_URL
value: <INSTANCE_CONNECTION_NAME>
- name: EBEAN_DATASOURCE_DRIVER
value: "{{ .Values.global.sql.datasource.driver }}"
nice-planet-17111
10/21/2021, 9:51 AMred-waitress-53338
01/13/2023, 2:22 AMnice-planet-17111
01/13/2023, 3:20 AMsql.datasource.host
(In the real chart, it references secret that is deployed separately, but I simplified the chart to help understading.
# charts/datahub/values.yaml
sql:
datasource:
host: <cloudsql_host_address>:<port>
url: "jdbc:mysql://<cloudsql_host_address>:<port>/<cloudsql_db_name>?verifyServerCertificate=false&useSSL=true&useUnicode=yes&characterEncoding=UTF-8&enabledTLSProtocols=TLSv1.2"
hostForMysqlClient: <cloudsql_host_address>
port: <port>
driver: "com.mysql.jdbc.Driver"
username: <username>
password:
secretRef: <secret-name>
secretKey: <secret-key>
# charts/datahub/subcharts/datahub-gms/values.yaml
sql:
datasource:
host: <cloudsql_host_address>:<port>
url: "jdbc:mysql://<cloudsql_host_address>:<port>/datahub?verifyServerCertificate=false&useSSL=true"
driver: "com.mysql.jdbc.Driver"
username: <username>
password:
secretRef: <secret-name>
secretKey: <secret-key
You can refer the blog post i wrote on deploying datahub on GKE with CloudSQL. (Itβs in Korean, but i think you can still check the code blocks π ) - Hope this helps!red-waitress-53338
01/13/2023, 5:50 PMEBEAN_DATASOURCE_USERNAME=datahub
EBEAN_DATASOURCE_PASSWORD=datahub
EBEAN_DATASOURCE_HOST=mysql:3306
EBEAN_DATASOURCE_URL=jdbc:<mysql://mysql:3306/datahub?verifyServerCertificate=false&useSSL=true&useUnicode=yes&characterEncoding=UTF-8>
EBEAN_DATASOURCE_DRIVER=com.mysql.jdbc.Driver
nice-planet-17111
01/17/2023, 7:40 AMmysql
to private IP address in EBEAN_DATASOURCE_HOST / EBEAN_DATASOURCE_URL?
Maybe it should be something like this.
EBEAN_DATASOURCE_USERNAME=<username>
EBEAN_DATASOURCE_PASSWORD=<password>
EBEAN_DATASOURCE_HOST=<private ip>:3306
EBEAN_DATASOURCE_URL=jdbc:mysql://<private ip>:3306/datahub?verifyServerCertificate=false&useSSL=true&useUnicode=yes&characterEncoding=UTF-8
EBEAN_DATASOURCE_DRIVER=com.mysql.jdbc.Driver
red-waitress-53338
01/22/2023, 2:12 AM