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.