Thursday, January 31, 2019

[google-cloud-sql-discuss] Re: How can a private GKE cluster communicate with a Cloud SQL instance within the project.

I'm facing a similar issue. According to this blog post from GCP it seems like I should be able to connect to the Private IP of a Cloud SQL instance simply by creating a service and endpoint  however I am not able to connect to the service via the Kubernetes Service Name <svc-name>.<namespace>.svc.cluster.local. With `dig` in a container on my cluster that DNS resolves to the correct private IP but I cannot connect. I have one deployment in my cluster which uses `hostNetwork: true` and I can connect with no problem from inside that container, but I need to be able to connect from a container that does not use the host network.

I understand that enabling Alias IPs may be what is needed, but do not currently have a cluster with that enabled and I would rather not recreate the whole cluster if I can help it. Does the blog post assume that Alias IPs is enabled already or am I missing something? So far I have not tried using a NAT gateway or proxy. Thanks

On Friday, June 22, 2018 at 4:58:07 AM UTC+12, Larbi (Google Cloud Support) wrote:
Hello Shubhanan,

For public cluster i did use this documentation [1] to use the NAT Gateway with Kubernetes Engine and i was able to Verify the NAT gateway routing with the kubctl command:
 
kubectl run example -i -t --rm --restart=Never --image centos:7 -- curl -s http://ipinfo.io/ip
 
I displayed the external IP address of the NAT gateway.

For private cluster you have to enable the Alias IPs [2] as it allow Pods to directly access hosted services without using a NAT gateway.
Cluster IPs for internal Services remain only available from within the cluster. If you want to access a Kubernetes Service from within the VPC, but from outside of the cluster (for example, from a Compute Engine instance), use an internal load balancer [3].

Did you enable Alias IPs?

--
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/6dd2e506-660f-4a69-91b7-196d01c1cb7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Monday, January 28, 2019

[google-cloud-sql-discuss] Re: Kubernetes pods can't connect to MySQL

Hello Christophe,


If you get a 'SQLException: Connection refused' then it seems like DB isn't reachable at all. Could you please check if you can reach out to the IP from your pods? Also please provide the screenshot of the error attached with this post removing all sensitive information.


I have found this documentation which explains how to connect to Cloud SQL from External Applications. I would recommend to check this and try to establish a connection from your java application using the instructions.


[1] https://cloud.google.com/sql/docs/mysql/connect-external-app#languages



On Friday, January 18, 2019 at 12:11:49 PM UTC-5, Christophe Deschervois wrote:
HI all,

I am new to  google cloud ( coming from AWS) and I am trying to get my Kubernetes pods(a java app) to  connect  to a mysql instance I have created using a private IP  as it seems to be the easiest/recommended way...  (I was able to connect directly to the DB using the web-console) . but the java app keeps getting connection refused.


I looked at https://cloud.google.com/sql/docs/mysql/private-ip but I was not able to make anything of it. I must say the process is not very clear nor well documented. 

I believe this is a very basic requirement, are there clear steps anywhere on how to accomplish this?

Thanks,
Christophe.

--
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/e1312d28-31ab-473a-9ac7-be08c350eb4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Saturday, January 26, 2019

[google-cloud-sql-discuss] Private IP address range for GCP Cloud SQL is ignored

I found here https://cloud.google.com/sql/docs/mysql/private-ip that this seems to be the correct behaviour:

After you have established a private services access connection, and created a Cloud SQL instance with private IP configured for that connection, the corresponding (internal) subnet and range used by the Cloud SQL service cannot be modified or deleted. This is true even if you delete the peering and your IP range. After the internal configuration is established, any Cloud SQL instance created in that same region and configured for private IP uses the original internal configuration.

--
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/57847753-8cc6-41fb-859c-9c68d77cd32c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Friday, January 25, 2019

[google-cloud-sql-discuss] Private IP address range for GCP Cloud SQL is ignored

I've been trying to set up Google Cloud SQL with a private IP connection, where the IP range it's bound to is manually allocated, and have not succeeded. 


I don't know if this is a bug in the implementation because it's still in beta, if there's something missing from the docs, or if I'm just doing something wrong. 


Initially, I set it up to automatically allocate the IP range. It all worked just fine, except that it chose 192.168.0.0/24, which is one of the networks managed in my VPN connected to the VPC. 

So then I tried going down the manual allocation route.


First, I tore down all the associated network objects that had been created on my behalf and the SQL instance as well. There were two VPC Peerings, cloudsql-postgres-googleapis-com and servicenetworking-googleapis-com, which I deleted, and then I confirmed that the routing entry associated with them disappeared as well.


Then, I followed the directions at https://cloud.google.com/vpc/docs/configure-private-services-access#allocating-range, creating 192.168.80.0/20, because I wanted it in my default network.

At that point, I went back to the Cloud SQL instance creation page, since it should be doing the rest for me. I checked the "Private IP" box, and chose the default network.


Below the dropdown which let me choose the network, it said "This instance will use the existing managed service connection". I assumed that meant it would use the address range I'd created, and went forward with the instance creation, but the instance landed on the 192.168.0.0/20 network again.


I tried this several times and always my new SQL instances get an ip address  on the 192.168.0.0/20 network


So now I'm not sure what else to try. Is there some state I didn't think to clear? How is the route supposed to be connected to the address range? Why is it creating two peerings when I only asked for one? 


As an experiment: I tried connecting it to a VPC other than default, and it worked: I got the network I wanted.

Creating a new address range for the other VPC, vpc-peerings connect ended up connecting it to the first address range, despite my explicitly telling it to use the new one. So it looks like it just uses the first one created, regardless of what it's told.


I have a feeling that's a bug.

--
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/2f2ad831-3b4b-4d4d-bf6e-20d3d8f19f9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Unable to connect to cloud sql instance. Cloud Console errors when clicking on Users-Databases. Need access to instance.

Hi All, After over a week of not being able to connect to the instance something happened at around 9 am (perhaps through one of the Google staff that I raised the ticket/private issue with) I'm not exactly sure but whoever made the change Thank You it is now working. 

On Tuesday, January 22, 2019 at 1:58:27 AM UTC+11, Robert Lister wrote:

Hi All, I have a cloud sql instance that is no longer responsive. Unable to connect, restart, backup. I have stopped/started the instance, upgraded the instance, restarted the instance. Even connecting from Cloud Shell does not work.

Primarily I need to connect to this instance to get a dump of the the table structures, functions, procedures and triggers. From there I can create a new instance from scratch. What can I do?



Client Connection Error

Capture7.JPG

There was a massive unknown spike in storage and it is constantly increasing. 

Capture8.JPG

Read write operations


Capture9.JPG

 


Users not accessible.

Capture2.JPG

All instances are Runnable - See below

Capture3.JPG


Configuration


Capture4.JPG

Capture6.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/3f2a3e01-89da-4f73-8e81-2ec0f14a6d6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thursday, January 24, 2019

[google-cloud-sql-discuss] Re: running mysqlcheck: can't connect

I have created a cloud SQL instance, and am trying to migrate data to it from a mysql dump that isn't accepted. To narrow the problem I've tried removing most of the .sql file contents, but it won't load and doesn't even have the Application/x-sql bucket type. So my next step was to run the mysqlcheck. 

The find command you recommend yields 11 files with .sock extension and the ps command shows one mysqld process. No idea which one to put in the my.conf file, which I can't find as it's not in /etc. And there's no /var/run/mysqld directory. 

I do see a mysqld from the Cloud shell, but if sql dump integrity checking isn't something that's reasonable to do in that environment, that would be good to know. I'd like to avoiding setting up mysql on another server for testing if the cloud shell will do, but could if necessary.

If this sort of problem is more appropriate for stackoverflow I don't mind taking it there. On the other hand, there's no programming involved in what I'm trying to do here. Coding is all on the php side, which I can't test until I have the db imported.

Thanks for your reply.

On Thursday, January 24, 2019 at 1:29:31 PM UTC-5, George (Cloud Platform Support) wrote:
Hello Chris, 

In which way is this question related to Cloud SQL, which is a fully managed MySQL Community Edition databases in the cloud? You seem to refer to a local MySQL instance. Do you have a MySQL instance running in Compute Engine? 

You may first try to find all socket files on your system with the "sudo find / -type s" command, and once path to the socket file is known, you may edit /etc/my.cnf file with the path, something similar to socket=/var/lib/mysql/mysql.sock. As a next step, you may try to stop the mysqld process with service mysqld stop, or other commands with the same effect, then delete the pid file in /var/run/mysqld/ . You should also run ps -aux | grep mysqld to see if other MySQL processes are running. 

This discussion group is oriented more towards general opinions, trends, and issues of general nature touching App Engine and Cloud SQL. For coding and programming architecture, as well as setting up MySQL instances, you may be better served in dedicated forums such as stackoverflow, where experienced programmers are within reach and ready to help. 

--
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/1909117c-0d25-450f-ad5b-659e20e4609e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: running mysqlcheck: can't connect

Hello Chris, 

In which way is this question related to Cloud SQL, which is a fully managed MySQL Community Edition databases in the cloud? You seem to refer to a local MySQL instance. Do you have a MySQL instance running in Compute Engine? 

You may first try to find all socket files on your system with the "sudo find / -type s" command, and once path to the socket file is known, you may edit /etc/my.cnf file with the path, something similar to socket=/var/lib/mysql/mysql.sock. As a next step, you may try to stop the mysqld process with service mysqld stop, or other commands with the same effect, then delete the pid file in /var/run/mysqld/ . You should also run ps -aux | grep mysqld to see if other MySQL processes are running. 

This discussion group is oriented more towards general opinions, trends, and issues of general nature touching App Engine and Cloud SQL. For coding and programming architecture, as well as setting up MySQL instances, you may be better served in dedicated forums such as stackoverflow, where experienced programmers are within reach and ready to help. 

--
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/2ac8c88a-75fa-42cc-9a16-e41a764db791%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Download an exported backup of PG database

Hi, it seems to be working now. Earlier I just clicked the filename in the console and it would start downloading but now I did right-click, save link as and it seems to work. Has been downloading for over an hour already. Thanks for your help. 

Op vrijdag 18 januari 2019 18:11:49 UTC+1 schreef diogoa...@google.com:
Please try other methods to download the file from the bucket, like using gsutil, REST API, or the code sample provided here.

A strategy to find out if the issue is with the file or the bucket is this: try downloading the file into a Compute Engine instance, using gsutil for example. If it works properly, it means that the issue is your network.


On Saturday, January 12, 2019 at 9:39:29 AM UTC-5, Marcel wrote:
Hi Community,

I am trying to download a postgres database in Google Cloud (size over 5GB) and dowload it to my PC so I can do some research locally.

I can export and save it to a storage bucket. But, when I then go to the bucket and click the file it starts downloading terribly slow. Way slower then my internet connection speed. I tried several storage classes / regions. So I thought, whatever I will just let it run for a few hours, but after like 30 minutes or so the download fails (probably a timeout or something like that).

Any way around this? I need an export of this database locally but I cannot find any way to get this done.

Ps. I could connect to the database from localhost, export it with PG admin, but the database is on internal networking, so it's not publicly accesible. And this seems like a very unlogical way to do it.

What to do? 

Thanks!

--
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/71804e0f-4a70-4d92-873c-f595600f488b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wednesday, January 23, 2019

[google-cloud-sql-discuss] Re: Unable to connect to cloud sql instance. Cloud Console errors when clicking on Users-Databases. Need access to instance.

Hi Robert,


You can certainly create a SQL dump file which can then be used to import your data into Cloud SQL, however, it is important to keep in mind that the instructions provided exclude all triggers,stored procedures, views, and functions from the export.


In your case, I would suggest to create a private issue on Google Issue Tracker and provide us with the Project Id and the Instance Id so that we can investigate the issue further.


--
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/8064b38c-08ef-46b5-9006-2a05df17478a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] running mysqlcheck: can't connect

With an sql instance running, in the shell when I run mysqlcheck db.sql I get
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") when trying to connect

I'm running this to find why my db won't import by process of elimination. My simplified version of it isn't even Application/x-sql type.

--
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/950b3d66-edd4-46f6-b188-70643ce1af71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Unable to connect with psql: SSL error: invalid padding

Hi Matthias, 

The usual procedure starts with Cloud SQL creating a server certificate automatically when you create your instance. In your situation, simply creating a new client certificate using the Developers' Console rather than command line might prove most effective, and time-saving. The detailed procedure can be accessed in sub-chapter Creating a new client certificate. A real problem would present itself if you follow the procedure ad litteram and the error is still 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/e479e078-5c56-44ca-8192-136d88342edb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Monday, January 21, 2019

[google-cloud-sql-discuss] Re: Unable to connect with psql: SSL error: invalid padding

Hi George,

Many thanks for your reply. I did this and everything is still valid and looks alright.
As extra information I'd want to add that this is working fine on my windows machine, but establishing a connection using the certificates using psql on Windows Subsystem for Linux or from a Docker container is what is causing issues.

Hope you can help shed a light on this!
-M

On Friday, 18 January 2019 20:10:44 UTC, George (Cloud Platform Support) wrote:
Hello Matthias, 

If your instance is configured to use SSL, go to the Cloud SQL Instances page in the GCP Console and open the instance. Open its Connections page and make sure that your server certificate is valid. If it has expired, you must add a new certificate and rotate to it. You may gather more detail from the "Configuring SSL/TLS" documentation page

--
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/2964c11c-0a12-4dd9-9188-5df251e673b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sunday, January 20, 2019

[google-cloud-sql-discuss] Unable to connect to cloud sql instance. Cloud Console errors when clicking on Users-Databases. Need access to instance.


Hi All, I have a cloud sql instance that is no longer responsive. Unable to connect, restart, backup. I have stopped/started the instance, upgraded the instance, restarted the instance. Even connecting from Cloud Shell does not work.

Primarily I need to connect to this instance to get a dump of the the table structures, functions, procedures and triggers. From there I can create a new instance from scratch. What can I do?

Capture.JPG



Client Connection Error

Capture7.JPG

There was a massive unknown spike in storage and it is constantly increasing. 

Capture8.JPG

Read write operations


Capture9.JPG

 


Users not accessible.

Capture2.JPG

All instances are Runnable - See below

Capture3.JPG


Configuration


Capture4.JPG

Capture6.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/82fbf21d-8aec-40f4-85c1-f8fcdf7d2b04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Saturday, January 19, 2019

[google-cloud-sql-discuss] Re: "An unknown error occured" when trying to create a MySQL instace.

Hello,

I tried creating an instance in that zone and it worked. This is a transient issue on the network. I suggest trying again and it should work.

--
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/f5214895-97c7-4b3c-b7a9-fd2acdbf6acf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Friday, January 18, 2019

[google-cloud-sql-discuss] Re: Unable to connect with psql: SSL error: invalid padding

Hello Matthias, 

If your instance is configured to use SSL, go to the Cloud SQL Instances page in the GCP Console and open the instance. Open its Connections page and make sure that your server certificate is valid. If it has expired, you must add a new certificate and rotate to it. You may gather more detail from the "Configuring SSL/TLS" documentation page

--
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/d0e04a07-f9d9-4999-bd9b-d1267b159ee1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Hot to copy Database which is hosted on GCP by the customer.

Hello Dipak, 

Depending on what you want to do exactly, you may consider exporting data to Google Cloud Storage, and from there download data locally. You can find related detail on the "Exporting Data from Cloud SQL" documentation page. This assumes that you are able to connect and authenticate to GCP. 

If you describe your use-case in more detail, we'll be happy to help further. 

--
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/5c4b63af-aff5-42fe-a7c3-8c2f527dcd19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thursday, January 17, 2019

[google-cloud-sql-discuss] Hot to copy Database which is hosted on GCP by the customer.

HI,

I need help in following scenario-

Customer created a service account on his Google Cloud Project with permissions to connect to relational databases. He also has shared all the credentials required to connect to it using proxy settings.Now, we have to download the DB shared by the customer but we are not much aware about GCP how to download the DB from GCP. Can any one help in solving this issue.

 
Thanks,
Dipak

--
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/49c1d519-6b5e-4eee-ac09-e0da146d1d6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Kubernetes pods can't connect to MySQL

HI all,

I am new to  google cloud ( coming from AWS) and I am trying to get my Kubernetes pods(a java app) to  connect  to a mysql instance I have created using a private IP  as it seems to be the easiest/recommended way...  (I was able to connect directly to the DB using the web-console) . but the java app keeps getting connection refused.


I looked at https://cloud.google.com/sql/docs/mysql/private-ip but I was not able to make anything of it. I must say the process is not very clear nor well documented. 

I believe this is a very basic requirement, are there clear steps anywhere on how to accomplish this?

Thanks,
Christophe.

--
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/0947bdb2-2c19-4760-baf1-0fee873bbada%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: [google-cloud-sql-discuss] Re: Cloud SQL postgresql by Private IP not working

Hi Wendel, 

Glad to read you have succeeded in setting up a connection by private IP. For the benefit of people trying to accomplish the same task, sharing more details here would prove of great help. 

--
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/d20d9e70-c06f-4590-87a1-7d19e04d9e28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Unable to connect with psql: SSL error: invalid padding

I am trying to connect to a Postgres instance running on Google Cloud Platform using psql.


I got the certificate using:

gcloud beta sql ssl server-ca-certs list --instance=[instance-name] --format='value(cert)' > server-ca.pem

and then tried connecting using psql to the instance using:

psql "host=[ip] port=[port] user=[user] dbname=[db] sslmode=verify-ca sslrootcert=server-ca.pem"


This returns the error: SSL error: invalid padding


I have checked the certificate for valid unix endlines, changed the wrapping (making sure the whole certificate fits on one line, etc.)

Any pointers into what might be going wrong here or how to debug this are very welcome!

--
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/e7b39b68-0ed2-47f5-a059-21bec8704341%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wednesday, January 16, 2019

[google-cloud-sql-discuss] Re: Download an exported backup of PG database

Please try other methods to download the file from the bucket, like using gsutil, REST API, or the code sample provided here.

A strategy to find out if the issue is with the file or the bucket is this: try downloading the file into a Compute Engine instance, using gsutil for example. If it works properly, it means that the issue is your network.


On Saturday, January 12, 2019 at 9:39:29 AM UTC-5, Marcel wrote:
Hi Community,

I am trying to download a postgres database in Google Cloud (size over 5GB) and dowload it to my PC so I can do some research locally.

I can export and save it to a storage bucket. But, when I then go to the bucket and click the file it starts downloading terribly slow. Way slower then my internet connection speed. I tried several storage classes / regions. So I thought, whatever I will just let it run for a few hours, but after like 30 minutes or so the download fails (probably a timeout or something like that).

Any way around this? I need an export of this database locally but I cannot find any way to get this done.

Ps. I could connect to the database from localhost, export it with PG admin, but the database is on internal networking, so it's not publicly accesible. And this seems like a very unlogical way to do it.

What to do? 

Thanks!

--
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/3d7dd173-5475-43e9-b518-daeb42c59119%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Unable to connect with psql: SSL error: invalid padding

I am trying to connect to a Postgres instance running on Google Cloud Platform using psql.


I got the certificate using:

gcloud beta sql ssl server-ca-certs list --instance=[instance-name] --format='value(cert)' > server-ca.pem

and then tried connecting using psql to the instance using:

psql "host=[ip] port=[port] user=[user] dbname=[db] sslmode=verify-ca sslrootcert=server-ca.pem"


This returns the error: SSL error: invalid padding.


I have checked the certificate for valid unix endlines, changed the wrapping (making sure the whole certificate fits on one line, etc.)


Any pointers into what might be going wrong here or how to debug this are very welcome!

--
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/ffecc8a2-37de-4b7c-8bf9-795f9f20b453%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tuesday, January 15, 2019

Re: [google-cloud-sql-discuss] Re: Cloud SQL postgresql by Private IP not working

Hello

Thanks for the reply. I got it working fine on a Compute Engine using the default VPC. Kubernetes Engine required a custom VPC with a subnet, which is now also working as expected.

On Mon, Jan 14, 2019 at 11:37 PM 'George (Cloud Platform Support)' via Google Cloud SQL discuss <google-cloud-sql-discuss@googlegroups.com> wrote:
Hello Wendel, 

Before configuring a Cloud SQL instance to use private IP, you must have a VPC network at least one subnet in the same region as your Cloud SQL instances in place. From your 6 points list, it is not apparent how you configured this VPC network. You may refer to the "Configuring Private IP Connectivity" documentation page for related detail. The page you refer to also states that private services access is implemented as a VPC peering connection between your VPC network and the Google services VPC network where your Cloud SQL instance resides.

--
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/e93becb3-6c65-4dd6-b1ff-383d0b78e692%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
With kind regards, Met vriendelijke groeten,

Wendel de Witte

Xinox Software | Google Cloud Architect | www.xinox-apps.com
Email: wendel.de.witte@xinox-apps.com | Mob.: +31 6 15595297

--
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/CA%2BB5CG_VYUjx2fCrCLrjM9ZBs5rpjFacjbazNecO6PYwMeNVVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Monday, January 14, 2019

[google-cloud-sql-discuss] Re: Cloud SQL postgresql by Private IP not working

Hello Wendel, 

Before configuring a Cloud SQL instance to use private IP, you must have a VPC network at least one subnet in the same region as your Cloud SQL instances in place. From your 6 points list, it is not apparent how you configured this VPC network. You may refer to the "Configuring Private IP Connectivity" documentation page for related detail. The page you refer to also states that private services access is implemented as a VPC peering connection between your VPC network and the Google services VPC network where your Cloud SQL instance resides.

--
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/e93becb3-6c65-4dd6-b1ff-383d0b78e692%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Saturday, January 12, 2019

[google-cloud-sql-discuss] Download an exported backup of PG database

Hi Community,

I am trying to download a postgres database in Google Cloud (size over 5GB) and dowload it to my PC so I can do some research locally.

I can export and save it to a storage bucket. But, when I then go to the bucket and click the file it starts downloading terribly slow. Way slower then my internet connection speed. I tried several storage classes / regions. So I thought, whatever I will just let it run for a few hours, but after like 30 minutes or so the download fails (probably a timeout or something like that).

Any way around this? I need an export of this database locally but I cannot find any way to get this done.

Ps. I could connect to the database from localhost, export it with PG admin, but the database is on internal networking, so it's not publicly accesible. And this seems like a very unlogical way to do it.

What to do? 

Thanks!

--
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/c177ff7b-e450-4ce7-9183-dd2b69af4b2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Friday, January 11, 2019

[google-cloud-sql-discuss] "An unknown error occured" when trying to create a MySQL instace.

In a project called "nth-baton-226021" in my account rodyce@gmail.com I am unable to start instance due this "unknown error".

I can retry the operation in the notifications dialog, but the failure is persistent. It shows "The server has encountered a problem. Please try again."

I am appending the logs below. They do not seem to provide conclusive information.


Thanks,
Rodimiro


{
insertId: "nlhnpzc5ne" 
logName: "projects/nth-baton-226021/logs/cloudaudit.googleapis.com%2Factivity" 
operation: {
id: "289451045299570041" 
last: true 
producer: "cloudsql.googleapis.com" 
}
protoPayload: {
@type: "type.googleapis.com/google.cloud.audit.AuditLog" 
authenticationInfo: {
principalEmail: "rodyce@gmail.com" 
}
authorizationInfo: [
0: {
granted: true 
permission: "cloudsql.instances.create" 
resource: "instances/nth-baton-226021:dashboard0" 
resourceAttributes: {
}
}
]
methodName: "cloudsql.instances.create" 
requestMetadata: {
callerIp: "190.241.207.39" 
destinationAttributes: {
}
requestAttributes: {
auth: {
}
time: "2019-01-12T00:11:04.695Z" 
}
}
resourceName: "instances/nth-baton-226021:dashboard0" 
response: {
@type: "type.googleapis.com/cloudsql.admin.InstancesInsertResponse" 
operation: {
insertTime: "1547251864822" 
operationName: {
instanceName: {
fullProjectId: "nth-baton-226021" 
instanceId: "dashboard0" 
}
operationId: "d9381960-aa03-49c2-a3c3-be0a2b07cb4c" 
}
operationType: "CREATE" 
state: "PENDING" 
userEmailAddress: "rodyce@gmail.com" 
}
operationId: "d9381960-aa03-49c2-a3c3-be0a2b07cb4c" 
}
serviceName: "cloudsql.googleapis.com" 
status: {
}
}
receiveTimestamp: "2019-01-12T00:11:05.835541910Z" 
resource: {
labels: {
database_id: "nth-baton-226021:dashboard0" 
project_id: "nth-baton-226021" 
region: "us-central" 
}
type: "cloudsql_database" 
}
severity: "NOTICE" 
timestamp: "2019-01-12T00:11:04.686Z" 
}

--
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/d6bdad92-e5ba-4a22-a094-ac00964c363a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.