I'm facing some new issues while I'm attempting to run my demo application on Google App Engine and Google Cloud SQL.
After updating the vaadin 14 spring boot initilizr application.properties file like this
server.port=${PORT:8080}
vaadin.compatibilityMode = false
logging.level.org.atmosphere = warn
spring.http.multipart.max-file-size=10MB
spring.http.multipart.max-request-size=10MB
spring.http.multipart.enabled=true
spring.servlet.multipart.location=/tmp
spring.cloud.gcp.sql.database-name=sneakerdb
spring.cloud.gcp.sql.instance-connection-name=[PROJECT_ID]:europe-west6:sneakerdb
spring.datasource.url=jdbc:postgresql:///sneakerdb?cloudSqlInstance=[PROJECT_ID]:europe-west6:sneakerdb&socketFactory=com.google.cloud.sql.postgres.SocketFactory&user=postgres&password=xxxxxxxxx
spring.datasource.username=postgres
spring.datasource.password=xxxxxxxx
spring.datasource.driverClassName=org.postgresql.Driver
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.datasource.initialization-mode=always
spring.datasource.initialize=true
spring.datasource.continue-on-error=true
spring.jpa.hibernate.ddl-auto=update
spring.datasource.hikari.auto-commit=false
spring.jpa.properties.hibernate.connection.provider_disables_autocommit=true
I configured the IAM settings to allow my project to use Google Cloud SQL Admin :
When I build locally using mvn -Pproduction I don't get any error message but when I deploy my application into the cloud I got this exception :
EDIT 1 :
As answered by Mabel A.I added Google Cloud Client to App Engine default service account and my account as the following screenshot
But I'm still facing an unauthorized exception :
If I look at my dashboard for my app engine instances I found the following informations :
And then we can found those exceptions :
I also updated my app.yaml file to fit the following beta settings info but I meet this error
Thx in advance !
EDIT 2 :
I just found this interesting line in the log file :
Where you can see the an attempt to the connection within sneaker-325911 I think it's an old configuration from another deployment but I'm really not sure that should be that name (the db name is sneakerdb and the App Engine project name is sneakerspringboot)
CodePudding user response:
Here is a screenshot of my previous test projects that I already deleted most of them.
If I search the project that I previously stoped (and normally deleted) sneaker-325911 I found this message :
Hmm very confused because in this screenshot we can see all pending deletion projects :