0

I have a Java application running on GAE Flex but it's falling to connect on my private mysql instance with the error:

at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:115) at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) at com.googlecode.flyway.core.util.jdbc.JdbcUtils.openConnection(JdbcUtils.java:50) ... 33 common frames omitted Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 2020-08-04 03:16:54 core-api[20200803t145941] The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

I've tried the following by Google recommendation:

https://cloud.google.com/appengine/docs/flexible/java/using-shared-vpc#setting_up_permissions

and also a lot of other ways without any luck:

Here are my app.yaml config:

service: core-api
runtime: java
env: flex
runtime_config:
  jdk: openjdk8
env_variables:
  DB_URL: jdbc:mysql://10.115.0.33:3306/database?useSSL=false&requireSSL=false&autoReconnect=true
  DB_USER: user
  DB_PASSWORD: password
network:
  instance_tag: java-app
  name: projects/java-app/global/networks/java-app-network
  subnetwork_name: java-app-subnet1
beta_settings:
  cloud_sql_instances: "java-app:southamerica-east1:java-app-mysql-database"
manual_scaling:
  instances: 3
resources:
  cpu: 4
  memory_gb: 8
  disk_size_gb: 100

I'm currently with no clue at all what may be causing suck headache and any help will be much appreciated, Thanks.

1 Answer 1

0

It could be related to this. Maybe the solution is posted here 7.1

Quote: "The Google Cloud SQL API must be enabled in your GCP project. To do that, go to the API library page of the Google Cloud Console, search for "Cloud SQL API", click the first result and enable the API. "

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .