Friday, June 28, 2019

[google-cloud-sql-discuss] Re: Instance operations stuck in pending

I noticed my instance and failover came back as running, but they aren't operational. Any command fails due to ongoing operations still even though it's showing memory and storage usage again. The primary is unable to show users/databases from the gcp portal. Restarts/failovers don't work and I can't change locations on it, delete the replica, or even connect to mysql via the google shell due to the ongoing operations error still.

I see how to list operations, but there's no way to cancel or kill them.



On Friday, June 28, 2019 at 7:02:26 PM UTC-5, Geoffrey Arnold wrote:
Hello,

Around 6:37PM CT today our primary (us-central-b) and and failover (us-central-a) databases are stuck with pending operations. The primary is lists the following operations:

Delete backup Operation is pending
Backup Operation is pending
Jun 28, 2019, 6:29:37 PM Failover Failover operation in progress

The failover lists the following operations:

Recreate replica Operation is pending

I am unable to connect either the primary or failover databases.

Any help would be greatly appreciated,

Geoff. 
 

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/b4b2bd96-0470-47ce-acb7-1b091cb5389d%40googlegroups.com.

[google-cloud-sql-discuss] Re: Instance operations stuck in pending

Yep, I'm in the same boat with a primary in central-b and failover in central-a. Operations show processes running the failover a few hours ago but it's completely hung, and I can't stop/restart/fail/clone/restore or do anything to get a service running again.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/81acfbae-ad8e-496a-8905-250d8ba5c1e5%40googlegroups.com.

[google-cloud-sql-discuss] Cannot restore database backups with replicas. GCP outage caused failover operation to get stuck, cannot delete or promote replica.

outage_status.png


GCP had an outage. Failover did not work, now both the master and the failover replica are stuck in a maintenance state. You cannot restore when you have replicas. I cannot delete the replica because it is stuck in maintenance mode. Restoring backups should not depend on any of the old nodes. That defeats the purpose of having backups a bit.


outage_restore_fail.png


What can we do here? a backup is only as good as the ability to restore.



--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/adac90ad-2270-4855-bd0a-03e91bbb4b33%40googlegroups.com.

[google-cloud-sql-discuss] Re: Instance operations stuck in pending

I too am having this issue. Best part is I cannot restore a backup to a new instance. Great design!

outage_restore_fail.png



master instance is in us-central1-b and has the below:


outage_master.png


Failover has this:
outage_failover.png



On Friday, June 28, 2019 at 6:08:16 PM UTC-7, Geoffrey Arnold wrote:
Looks like some trouble in us-central1-b:

screencapture-status-cloud-google-2019-06-28-19_58_33.png


Anyone else experiencing issues?



On Friday, June 28, 2019 at 7:02:26 PM UTC-5, Geoffrey Arnold wrote:
Hello,

Around 6:37PM CT today our primary (us-central-b) and and failover (us-central-a) databases are stuck with pending operations. The primary is lists the following operations:

Delete backup Operation is pending
Backup Operation is pending
Jun 28, 2019, 6:29:37 PM Failover Failover operation in progress

The failover lists the following operations:

Recreate replica Operation is pending

I am unable to connect either the primary or failover databases.

Any help would be greatly appreciated,

Geoff. 
 

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/d1f94f09-0b1d-4f6c-8199-8d8127f8983e%40googlegroups.com.

[google-cloud-sql-discuss] Re: Instance operations stuck in pending

Looks like some trouble in us-central1-b:

screencapture-status-cloud-google-2019-06-28-19_58_33.png


Anyone else experiencing issues?



On Friday, June 28, 2019 at 7:02:26 PM UTC-5, Geoffrey Arnold wrote:
Hello,

Around 6:37PM CT today our primary (us-central-b) and and failover (us-central-a) databases are stuck with pending operations. The primary is lists the following operations:

Delete backup Operation is pending
Backup Operation is pending
Jun 28, 2019, 6:29:37 PM Failover Failover operation in progress

The failover lists the following operations:

Recreate replica Operation is pending

I am unable to connect either the primary or failover databases.

Any help would be greatly appreciated,

Geoff. 
 

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/6824cb0f-5d82-4d8f-97cb-f99747411383%40googlegroups.com.

[google-cloud-sql-discuss] Instance operations stuck in pending

Hello,

Around 6:37PM CT today our primary (us-central-b) and and failover (us-central-a) databases are stuck with pending operations. The primary is lists the following operations:

Delete backup Operation is pending
Backup Operation is pending
Jun 28, 2019, 6:29:37 PM Failover Failover operation in progress

The failover lists the following operations:

Recreate replica Operation is pending

I am unable to connect either the primary or failover databases.

Any help would be greatly appreciated,

Geoff. 
 

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/e08781f8-9105-4c95-a254-501188490ade%40googlegroups.com.

[google-cloud-sql-discuss] Re: Django 2.x and Cloud SQL

Hello, 

Thank you for using Googler Groups!

I believe it would be worthwhile for you to check the "running Django on Google App Engine" documentation. Specifically the section of the doc that discusses how to step up the database portion of your app. For the standard environment, you may refer to the "Initializing your Cloud SQL instance" section here while the same guide for the flexible environment can be found here. Let me know if you still encounter any issues once you followed the steps on how to configure your Cloud SQL instance with Django. 

Hope this helps

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/8c5e35e0-0afa-469a-a7d4-83d43423bf30%40googlegroups.com.

[google-cloud-sql-discuss] Error exporting PostgreSQL to GCS

Hey all, 

I'm trying to export two fairly large databases from Cloud SQL to a bucket, but the UI job gets cancelled after a few minutes. The operations logs only shows this: 

Error while uploading file to gs://xxx/xxx_2019-06-28 (17:37:32)-1561736277136192705.partial: Unknown error

I had to have assigned ownership of the DBs to separate users, perhaps there is a permissions problem --do I need to transfer ownership of the DBs back to cloudsqladmin for export?

- Friedrich

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/3afbd80b-a832-4996-a3b4-cb501718711f%40googlegroups.com.

Thursday, June 27, 2019

[google-cloud-sql-discuss] Re: How to connect to Postgres Cloud SQL via SSH tunnel & SSL using GUI

Hi Phongthorn,

 

I'm glad you were able to connect using the Cloud Proxy and Public IP. To use SSL try to use the command given when creating your certificate. That being said if this doesn't work I would suggest you to post on StackOverflow where you have access to a large community of enthusiasts and experts to share ideas with and get support from. Please make sure to include all relevant details and error messages which would help the community troubleshoot.


On Thursday, June 27, 2019 at 9:09:24 AM UTC-4, Phongthorn Khamkankaew wrote:
Thanks for your help. I did follow steps from your link before. Everything is work. Cloud proxy, Public IP, etc.

Except connect with SSL through SSH tunnel. I using Compute Engine to connecting Cloud SQL and allow only connection from this instance's Public IP and then I can connect to Cloud SQL from my local machine.

So, I still got some struggling with SSL connection. First thing I remove SSH Tunnel and use Public IP include SSL. It still can't connect, too.

Maybe IDE tools the root cause of this problem, right? I may do not know how to configure correctly.

Anyway, your answer makes me sure about the SSL certificate files that I got from Cloud SQL. It can use without convert to other formats.

เมื่อ วันพฤหัสบดีที่ 27 มิถุนายน ค.ศ. 2019 2 นาฬิกา 51 นาที 52 วินาที UTC+7, Nicolas (Google Cloud Platform Support) เขียนว่า:

Hi Phongthorn, 

 

Thanks for posting here, there are two ways of connecting any external applications to Cloud SQL instances. First you can use the Cloud SQL proxy which can be set up following these steps . In a nutshell, you would need to enable the API, Install the proxy locally, authenticate the proxy, specify the instance and start the proxy then simply set the IP in Datagrip to 127.0.0.1.

 

The other way would be to configure the access via Public IP which is done by authorizing your application's IP to connect.

 

To answer your question, to connect with SSL yes you will need to use the three files : server-ca.pem, client-cert.pem and client-key.pem

 

I hope that helps you!



On Wednesday, June 26, 2019 at 10:58:35 AM UTC-4, Phongthorn Khamkankaew wrote:
Hi, I am a newbie for Postgresql SSL. I try to use SSL and SSH, but not working.
So I connect by DataGrip and other GUI still got the same error as below.

Connection to user@db-server failed.
[08006] Could not open SSL root certificate file /home/username/.postgresql/root.crt.

First question, Can I use all of the certificate files generated from Cloud SQL?
  • server-ca.pem
  • client-key.pem
  • client-key.pem
Do I need to do something before using it?

So anyone can help me, please?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/39455fdb-a72b-415d-8b61-53d2a8f44f07%40googlegroups.com.

[google-cloud-sql-discuss] Re: Postgres extension request: postgres_fdw

Any updates for this feature? It's been quite a long time. Distributed database is a common feature since 90s, Google needs to work hard to keep catch the status.

On Monday, January 7, 2019 at 11:34:21 AM UTC-8, amit...@google.com wrote:

Hi André,


You can follow this feature request to get the latest updates. If you are interested about the same feature, you can just press the 'Me, too!' button on upper side to let Cloud SQL engineering team know about it. I hope it helps.   


On Friday, January 4, 2019 at 9:37:07 AM UTC-5, André Vincent Boivin wrote:
Thanks a lot for giving feedback that this is in the works.

My organization also would like to see this feature come live. 
Our continued usage of cloudsql will highly depend on extensions support so thanks for being clear about what's being worked on.

Le mardi 7 août 2018 09:54:50 UTC-4, George (Cloud Platform Support) a écrit :
Confirming hereby that work is actually being done, and your proposed implementation of the postgres_fdw extension is currently being considered. There is no time to completion decided upon at the moment. Software development takes time, and this is difficult to estimate in the beginning stages of development. 

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/3edc027a-c64f-4cc9-a91d-a82eb9daefe5%40googlegroups.com.

[google-cloud-sql-discuss] Django 2.x and Cloud SQL

Hi,

am new to CloudSQL but i'd like to try connect this with my Django project so how do i do it. 
please refer to the picture i sent

thanks.

Alain Christian 

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/a14c369c-b05a-4487-996a-24ac40cfd7ed%40googlegroups.com.

Wednesday, June 26, 2019

[google-cloud-sql-discuss] Re: How to connect to Postgres Cloud SQL via SSH tunnel & SSL using GUI

Thanks for your help. I did follow steps from your link before. Everything is work. Cloud proxy, Public IP, etc.

Except connect with SSL through SSH tunnel. I using Compute Engine to connecting Cloud SQL and allow only connection from this instance's Public IP and then I can connect to Cloud SQL from my local machine.

So, I still got some struggling with SSL connection. First thing I remove SSH Tunnel and use Public IP include SSL. It still can't connect, too.

Maybe IDE tools the root cause of this problem, right? I may do not know how to configure correctly.

Anyway, your answer makes me sure about the SSL certificate files that I got from Cloud SQL. It can use without convert to other formats.

เมื่อ วันพฤหัสบดีที่ 27 มิถุนายน ค.ศ. 2019 2 นาฬิกา 51 นาที 52 วินาที UTC+7, Nicolas (Google Cloud Platform Support) เขียนว่า:

Hi Phongthorn, 

 

Thanks for posting here, there are two ways of connecting any external applications to Cloud SQL instances. First you can use the Cloud SQL proxy which can be set up following these steps . In a nutshell, you would need to enable the API, Install the proxy locally, authenticate the proxy, specify the instance and start the proxy then simply set the IP in Datagrip to 127.0.0.1.

 

The other way would be to configure the access via Public IP which is done by authorizing your application's IP to connect.

 

To answer your question, to connect with SSL yes you will need to use the three files : server-ca.pem, client-cert.pem and client-key.pem

 

I hope that helps you!



On Wednesday, June 26, 2019 at 10:58:35 AM UTC-4, Phongthorn Khamkankaew wrote:
Hi, I am a newbie for Postgresql SSL. I try to use SSL and SSH, but not working.
So I connect by DataGrip and other GUI still got the same error as below.

Connection to user@db-server failed.
[08006] Could not open SSL root certificate file /home/username/.postgresql/root.crt.

First question, Can I use all of the certificate files generated from Cloud SQL?
  • server-ca.pem
  • client-key.pem
  • client-key.pem
Do I need to do something before using it?

So anyone can help me, please?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/554e272b-968e-4b5d-b8a5-8a8953cd74c4%40googlegroups.com.

[google-cloud-sql-discuss] Re: How to connect to Postgres Cloud SQL via SSH tunnel & SSL using GUI

Hi Phongthorn, 

 

Thanks for posting here, there are two ways of connecting any external applications to Cloud SQL instances. First you can use the Cloud SQL proxy which can be set up following these steps . In a nutshell, you would need to enable the API, Install the proxy locally, authenticate the proxy, specify the instance and start the proxy then simply set the IP in Datagrip to 127.0.0.1.

 

The other way would be to configure the access via Public IP which is done by authorizing your application's IP to connect.

 

To answer your question, to connect with SSL yes you will need to use the three files : server-ca.pem, client-cert.pem and client-key.pem

 

I hope that helps you!



On Wednesday, June 26, 2019 at 10:58:35 AM UTC-4, Phongthorn Khamkankaew wrote:
Hi, I am a newbie for Postgresql SSL. I try to use SSL and SSH, but not working.
So I connect by DataGrip and other GUI still got the same error as below.

Connection to user@db-server failed.
[08006] Could not open SSL root certificate file /home/username/.postgresql/root.crt.

First question, Can I use all of the certificate files generated from Cloud SQL?
  • server-ca.pem
  • client-key.pem
  • client-key.pem
Do I need to do something before using it?

So anyone can help me, please?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/38b8388b-d528-4ef9-a240-8f89792d9258%40googlegroups.com.

[google-cloud-sql-discuss] How to connect to Postgres Cloud SQL via SSH tunnel & SSL using GUI

Hi, I am a newbie for Postgresql SSL. I try to use SSL and SSH, but not working.
So I connect by DataGrip and other GUI still got the same error as below.

Connection to user@db-server failed.
[08006] Could not open SSL root certificate file /home/username/.postgresql/root.crt.

First question, Can I use all of the certificate files generated from Cloud SQL?
  • server-ca.pem
  • client-key.pem
  • client-key.pem
Do I need to do something before using it?

So anyone can help me, please?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/41f06761-e520-48a2-a221-ae0ca9164317%40googlegroups.com.

Tuesday, June 25, 2019

[google-cloud-sql-discuss] Re: Unable to connect App Engine Standard version to Cloud SQL Private IP.

The Serverless VPC Connector is Beta, and I believe it works with App Engine Standard. More info on how it works here

On Tuesday, June 25, 2019 at 5:42:01 AM UTC-7, Sam (Google Cloud Support) wrote:
Hi Rahul, you might want to opt for App Engine Flex instead as presently App Engine Standard doesn't support Private IP connection for reasons that pertain to a "sandboxed execution environment". As stated in our official documentation [1]: "you cannot use private IP to connect from standard environment."

In the standard environment the underlying compute, storage or network resources are not surfaced to the user as these are managed by GCP for a wide variety of customers, so this sandbox restricts what your application can do. For example, your application cannot write to disk or use non-whitelisted binary libraries. To allow access to other GCP resources your application typically accesses services like Cloud SQL via the built-in google.appengine APIs [2]. 

That being said, there are other execution environments that are more flexible. Read more about the differences and limitations between each execution environments here [3].

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/62509e12-3c2f-4014-a564-bf2eb9d4ee9e%40googlegroups.com.

[google-cloud-sql-discuss] Re: Unable to connect App Engine Standard version to Cloud SQL Private IP.

Hi Rahul, you might want to opt for App Engine Flex instead as presently App Engine Standard doesn't support Private IP connection for reasons that pertain to a "sandboxed execution environment". As stated in our official documentation [1]: "you cannot use private IP to connect from standard environment."

In the standard environment, this sandbox restricts what your application can do. For example, your application cannot write to disk or use non-whitelisted binary libraries. Your application typically accesses services like Cloud SQL via the built-in google.appengine APIs [2]. 

Read more about the differences and limitations between each execution environments here [3].

[1] Private IP Requirements: https://cloud.google.com/sql/docs/mysql/private-ip#application_environment_requirements
[2] App Engine Standard Restrictions: https://cloud.google.com/appengine/docs/flexible/go/flexible-for-standard-users#accessing_external_services
[3] Comparing GAE Standard and Flexible: https://cloud.google.com/appengine/docs/the-appengine-environments

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/59718fa4-527a-4e7c-a9ae-2241cea71630%40googlegroups.com.

Monday, June 24, 2019

[google-cloud-sql-discuss] Re: Unable to connect App Engine Standard version to Cloud SQL Private IP.

Thanks for your reply.

My Cloud SQL instance is running on Private IP only. Yes, I tried to connect using INSTANCE_CONNECTION_NAME, but it's failed to connect.


On Monday, June 24, 2019 at 10:39:35 PM UTC+5:30, Emerson Moraes wrote:
Hi,

Why do you are using private IP to connect? Have you tried to connect using INSTANCE_CONNECTION_NAME, that is the most common way to connect with Cloud SQL from App Engine? (https://cloud.google.com/sql/docs/mysql/connect-app-engine?hl=en-US)

If you are using Spring Boot, you can connect with Cloud SQL using instance name through the Spring Cloud GCP:

Att.,

Emerson Leite de Moraes

segunda-feira, 24 de Junho de 2019 às 13:39:35 UTC-3, Rahul escreveu:
Hello,

I have created one instance of Cloud SQL Private IP. I have deployed one service(Java Service) on App Engine Standard Version to connect Cloud SQL Private IP with the help of Serverless VPC connector. All services reside in the same region.
But I am not able to connect to private IP Cloud SQL instance from AppEngine and It's throwing me an error as below.

Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.


CloudSQL.JPG


--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/fec37d0d-ef44-4bbf-ac21-f4997ed9ccb4%40googlegroups.com.

[google-cloud-sql-discuss] Re: Unable to connect App Engine Standard version to Cloud SQL Private IP.

Thanks for your reply.

My Cloud SQL instance is running on Private IP only. Yes, I tried to connect using INSTANCE_CONNECTION_NAME.


On Monday, June 24, 2019 at 10:39:35 PM UTC+5:30, Emerson Moraes wrote:
Hi,

Why do you are using private IP to connect? Have you tried to connect using INSTANCE_CONNECTION_NAME, that is the most common way to connect with Cloud SQL from App Engine? (https://cloud.google.com/sql/docs/mysql/connect-app-engine?hl=en-US)

If you are using Spring Boot, you can connect with Cloud SQL using instance name through the Spring Cloud GCP:

Att.,

Emerson Leite de Moraes

segunda-feira, 24 de Junho de 2019 às 13:39:35 UTC-3, Rahul escreveu:
Hello,

I have created one instance of Cloud SQL Private IP. I have deployed one service(Java Service) on App Engine Standard Version to connect Cloud SQL Private IP with the help of Serverless VPC connector. All services reside in the same region.
But I am not able to connect to private IP Cloud SQL instance from AppEngine and It's throwing me an error as below.

Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.


CloudSQL.JPG


--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/e1d18555-f3f1-40be-99cd-6f71300f85ad%40googlegroups.com.

[google-cloud-sql-discuss] Re: Unable to connect App Engine Standard version to Cloud SQL Private IP.

Hi,

Why do you are using private IP to connect? Have you tried to connect using INSTANCE_CONNECTION_NAME, that is the most common way to connect with Cloud SQL from App Engine? (https://cloud.google.com/sql/docs/mysql/connect-app-engine?hl=en-US)

If you are using Spring Boot, you can connect with Cloud SQL using instance name through the Spring Cloud GCP:

Att.,

Emerson Leite de Moraes

segunda-feira, 24 de Junho de 2019 às 13:39:35 UTC-3, Rahul escreveu:
Hello,

I have created one instance of Cloud SQL Private IP. I have deployed one service(Java Service) on App Engine Standard Version to connect Cloud SQL Private IP with the help of Serverless VPC connector. All services reside in the same region.
But I am not able to connect to private IP Cloud SQL instance from AppEngine and It's throwing me an error as below.

Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.


CloudSQL.JPG


--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/10ead86a-0df7-49d6-9fde-4ae76563ccde%40googlegroups.com.

[google-cloud-sql-discuss] Unable to connect App Engine Standard version to Cloud SQL Private IP.

Hello,

I have created one instance of Cloud SQL Private IP. I have deployed one service(Java Service) on App Engine Standard Version to connect Cloud SQL Private IP with the help of Serverless VPC connector. All services reside in the same region.
But I am not able to connect to private IP Cloud SQL instance from AppEngine and It's throwing me an error as below.

Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.


CloudSQL.JPG


--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/dbeb427b-d6e7-4cf1-abe4-594a1d411fc2%40googlegroups.com.

Friday, June 21, 2019

Re: [google-cloud-sql-discuss] Re: Cloud Functions -> Cloud SQL via Socket Factory too slow

Hi Hans,

I was just able to confirm this was an oversight on my part that only effects the postgres module. I've opened a PR to address it (#146).

Thanks,
Kurtis


On Monday, June 17, 2019 at 3:45:43 PM UTC-7, Hans Ravnaas wrote:
Hi, Kurtis

Thanks for the fix. I just tested it. It now automatically uses the unix socket as expected but I'm still seeing it log "INFO: First Cloud SQL connection, generating RSA key pair". During my run, generating the key pair took ~3 seconds, so still slow. I was under the impression that that step would be skipped? But I certainly don't know enough about what goes on behind the scenes there to claim that it should be skipped.

Another minor thing, the readme at https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory could probably be updated to include a mention for Functions, so something like...

"The library will automatically detect when it is running on GAE Standard and Cloud Functions, and will connect via the provided unix socket for reduced latency."

Hans

On Monday, June 17, 2019 at 10:15:59 AM UTC-7, Kurtis Van Gent wrote:
Hi Hans,

We released v1.0.14 of the Cloud SQL JDBC Socket Factory today. It contains several performance improvements, including some improvements for functions. Please give it a try and let me know how it goes.

Thanks,
Kurtis

On Wednesday, May 29, 2019 at 9:56:28 AM UTC-7, Tiago (Google Cloud Platform Support) wrote:
Hello Hans,

It seems that Kurtis has submitted an open issue on your behalf for this in the 'cloud-sql-jdbc-socket-factory' GitHub repository. I'd suggest to add any relevant information and findings you might have gathered from your specific use cases in that thread as well.

On Monday, May 27, 2019 at 11:37:25 PM UTC-4, Hans Ravnaas wrote:
Hi, Kurtis

Thanks for the suggestion. I did try that on Friday, and even though the log showed the setting took effect, it didn't change things for the better.

Sent from my iPhone

On May 27, 2019, at 4:51 PM, 'Kurtis Van Gent' via Google Cloud SQL discuss <google-cloud...@googlegroups.com> wrote:

Hey Hans,

That is much higher latency than I would expect to see with the socket factory. 

In the meantime, you can try setting the env var `CLOUD_SQL_FORCE_UNIX_SOCKET=true` to see if that improves the situation. This takes advantage of the `/clousql` unix socket that is provided to functions environments. 

Please let me know if that works for you.

Thanks,
Kurtis

On Sunday, May 26, 2019 at 11:37:18 AM UTC-7, Hans Ravnaas wrote:
    So I'm connecting from Cloud Functions for Java in us-central1 to Cloud SQL (postgres 11) in us-west1 using the socket factory approach ('com.google.cloud.sql:postgres-socket-factory:1.0.13'). Everything works, but it takes around ~10 seconds to first obtain the connection, which is the problem. I am spanning two locations, but I didn't think it'd make that much of a difference. Here are the key log entries and the amount of time each one takes. Is this inline with what everyone else is seeing too? I haven't tried creating my own client cert yet but was hoping to avoid managing that.
    • 6 ms:  INFO: Connecting to Cloud SQL instance [projectid:us-west1:instancename] via SSL socket.
    • 7 sec: INFO: First Cloud SQL connection, generating RSA key pair
    • 3 sec: INFO: Obtaining ephemeral certificate for Cloud SQL instance [projectid:us-west1:instancename]...
    • 1 sec: INFO: Connecting to Cloud SQL instance [projectid:us-west1:instancename] on IP [public ip].
    Any insight appreciated.
    Hans

    --
    You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/85386faa-3a78-4d0a-905c-6019145f55cf%40googlegroups.com.

    --
    You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/5d937308-aded-4118-a4dd-041c8283c4bd%40googlegroups.com.

    Thursday, June 20, 2019

    [google-cloud-sql-discuss] Re: error to grant file permission in root.

    Hello, 

    The Cloud SQL product is a fully Google managed database service. Due to this, the privileges such as SUPER and FILE are not available for the root user account. You may find further details of the root user account for Cloud SQL here

    However, as Dan mentioned, if you would like these privileges you may consider using a SQL instance on a Compute Engine VM. You may find the steps to on how to do this here.

    I hope this helps!  

    --
    You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/259e8aac-634c-4a8a-9e02-49c8db17f602%40googlegroups.com.

    Tuesday, June 18, 2019

    Re: [google-cloud-sql-discuss] error to grant file permission in root.

    Granting the FILE privilege would give access to the local file system to read and write data. Though you can do this with MySQL on a virtual machine in Compute Engine, for example, Cloud SQL only gives access to SQL itself, not the underlying instance.

    I don't have a definitive Google reference doc to cite, but I suspect that is why you can't grant FILE privileges on a Google Cloud SQL instance.

    Dan

    > On 2019-Jun-18, at 5:06 PM, MeuSped Solução em processamento de dados <contato@meusped.com.br> wrote:
    >
    > Error while grant privileges to user root.
    > I need to use outfile to create a archive. but the user root does not have this permission.
    > I entered like a root and run the following commands
    >
    > mysql> grant file on cnpj.cnpj to 'root'@'%';
    > ERROR 1045 (28000): Access denied for user 'root'@'%' (using password: YES)
    >
    > mysql> grant all on cnpj.* to 'root'@'%';
    > Query OK, 0 rows affected (0.01 sec)
    >
    > mysql> grant update on cnpj.* to 'root'@'%';
    > Query OK, 0 rows affected (0.01 sec)
    >
    > mysql> grant file on cnpj.* to 'root'@'%';
    > ERROR 1045 (28000): Access denied for user 'root'@'%' (using password: YES)
    >
    > Have success to grant all privileges less FILE...
    >
    >
    > Please I would like receive help to fix my doubts
    >
    >
    > --
    > You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
    > To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
    > To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/34552f7a-d4f1-4a94-9e7a-67bd0a26e459%40googlegroups.com.

    --
    You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/3AAB7E0E-90A7-4244-A622-2ACC1863AEE8%40gmail.com.

    [google-cloud-sql-discuss] error to grant file permission in root.

    Error while grant privileges to user root.
    I need to use outfile to create a archive. but the user root does not have this permission.
    I entered like a root and run the following commands

    mysql> grant file on cnpj.cnpj to 'root'@'%';
    ERROR 1045 (28000): Access denied for user 'root'@'%' (using password: YES)

    mysql> grant all on cnpj.* to 'root'@'%';
    Query OK, 0 rows affected (0.01 sec)

    mysql> grant update on cnpj.* to 'root'@'%';
    Query OK, 0 rows affected (0.01 sec)

    mysql> grant file on cnpj.* to 'root'@'%';
    ERROR 1045 (28000): Access denied for user 'root'@'%' (using password: YES)

    Have success to grant all privileges less FILE... 


    Please I would like receive help to fix my doubts

    --
    You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/34552f7a-d4f1-4a94-9e7a-67bd0a26e459%40googlegroups.com.

    Monday, June 17, 2019

    [google-cloud-sql-discuss] Re: MySQL upgrade to second generation fails

    Hello, 

    After some research, I was not able to find anything that would cause the issues you have mentioned during the migration process. Given that the deadline for this action is looming, I believe the appropriate action at this point would be to have support take a look at the affected instance. 

    You may feel free to create a private issue with us on our Public Issue Tracker here. Creating a private issue will ensure that your specific instance details will not be shared with the public. 

    I look forward to hearing from you there!

    --
    You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/3471760c-590c-49b7-93a9-4c2cd4626061%40googlegroups.com.

    Re: [google-cloud-sql-discuss] Re: Cloud Functions -> Cloud SQL via Socket Factory too slow

    Hi, Kurtis

    Thanks for the fix. I just tested it. It now automatically uses the unix socket as expected but I'm still seeing it log "INFO: First Cloud SQL connection, generating RSA key pair". During my run, generating the key pair took ~3 seconds, so still slow. I was under the impression that that step would be skipped? But I certainly don't know enough about what goes on behind the scenes there to claim that it should be skipped.

    Another minor thing, the readme at https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory could probably be updated to include a mention for Functions, so something like...

    "The library will automatically detect when it is running on GAE Standard and Cloud Functions, and will connect via the provided unix socket for reduced latency."

    Hans

    On Monday, June 17, 2019 at 10:15:59 AM UTC-7, Kurtis Van Gent wrote:
    Hi Hans,

    We released v1.0.14 of the Cloud SQL JDBC Socket Factory today. It contains several performance improvements, including some improvements for functions. Please give it a try and let me know how it goes.

    Thanks,
    Kurtis

    On Wednesday, May 29, 2019 at 9:56:28 AM UTC-7, Tiago (Google Cloud Platform Support) wrote:
    Hello Hans,

    It seems that Kurtis has submitted an open issue on your behalf for this in the 'cloud-sql-jdbc-socket-factory' GitHub repository. I'd suggest to add any relevant information and findings you might have gathered from your specific use cases in that thread as well.

    On Monday, May 27, 2019 at 11:37:25 PM UTC-4, Hans Ravnaas wrote:
    Hi, Kurtis

    Thanks for the suggestion. I did try that on Friday, and even though the log showed the setting took effect, it didn't change things for the better.

    Sent from my iPhone

    On May 27, 2019, at 4:51 PM, 'Kurtis Van Gent' via Google Cloud SQL discuss <google-cloud...@googlegroups.com> wrote:

    Hey Hans,

    That is much higher latency than I would expect to see with the socket factory. 

    In the meantime, you can try setting the env var `CLOUD_SQL_FORCE_UNIX_SOCKET=true` to see if that improves the situation. This takes advantage of the `/clousql` unix socket that is provided to functions environments. 

    Please let me know if that works for you.

    Thanks,
    Kurtis

    On Sunday, May 26, 2019 at 11:37:18 AM UTC-7, Hans Ravnaas wrote:
      So I'm connecting from Cloud Functions for Java in us-central1 to Cloud SQL (postgres 11) in us-west1 using the socket factory approach ('com.google.cloud.sql:postgres-socket-factory:1.0.13'). Everything works, but it takes around ~10 seconds to first obtain the connection, which is the problem. I am spanning two locations, but I didn't think it'd make that much of a difference. Here are the key log entries and the amount of time each one takes. Is this inline with what everyone else is seeing too? I haven't tried creating my own client cert yet but was hoping to avoid managing that.
      • 6 ms:  INFO: Connecting to Cloud SQL instance [projectid:us-west1:instancename] via SSL socket.
      • 7 sec: INFO: First Cloud SQL connection, generating RSA key pair
      • 3 sec: INFO: Obtaining ephemeral certificate for Cloud SQL instance [projectid:us-west1:instancename]...
      • 1 sec: INFO: Connecting to Cloud SQL instance [projectid:us-west1:instancename] on IP [public ip].
      Any insight appreciated.
      Hans

      --
      You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
      To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/85386faa-3a78-4d0a-905c-6019145f55cf%40googlegroups.com.

      --
      You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
      To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/90723d64-c626-496c-a70a-3e940468e874%40googlegroups.com.

      Re: [google-cloud-sql-discuss] Re: I just can't migrate my external DB because unable to skip replication errors

      I looked quite a bit and could not find a workaround to skip these errors in Cloud SQL. Unfortunately, these errors have to be addressed in the initial DB. Another option is to use MySQL on a Compute Engine instance as mentioned in this thread [1].

      I also suggest posting this issue on StackOverflow but with MySQL tags, to see if anyone in the community has any other suggestions.

      [1] https://issuetracker.google.com/issues/128603238#comment4

      --
      You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
      To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/f06985eb-3f80-4d94-b9ee-6ad8c39519fa%40googlegroups.com.

      [google-cloud-sql-discuss] MySQL upgrade to second generation fails

      We are trying to upgrade our MySQL 1st Generation instances to the 2nd Generation ahead of the forced upgrade next year. We created a clone of the original to test the process out.

      The database is about 121GB on a D4 instance with all preconditions met.
      After the upgrade runs for about 8 hours, it fails with an error

      Timed out while running mysql upgrade. Please try increasing instance to a larger tier and retry.

      It then lists a number of our tables, indicating "Failed to ALTER TABLE" and that it "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)".

      It concludes with the message

      Failed to run mysql_upgrade, please refer to the documentation.

      As it suggested, we increased it to a D8 instance, and tried it again, to the same result. We then increased it to a D32 instance, with the same result.
      There is nothing we can find in the documentation about upgrading to the 2nd generation or mysql_upgrade to suggest how we should proceed.

      Does anyone have any suggestions about how we can go about debugging and correcting this problem so we can upgrade?

      --
      You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
      To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/f91b9ce5-20c4-45c4-b9da-c626520cf5b2%40googlegroups.com.