0

I am going through the exact same process as the answered question found here (Connect a Google CloudSQL Postgres database to Data Studio), but I am not as advanced a user as most. I am encountering a similar problem to what was mentioned in the above question, and then some:

  1. I have created a client certificate and downloaded the client-cert.pem, client-key.pem and the server-ca.pem files to my local machine.
  2. I received the same error when attempting to link Data Studio to our Google Cloud SQL Postgres Database as a data source. " Can't reach the host. Please double check your connection parameters. Learn more about database connectors here. "

  3. I tried running the following command " openssl pkcs8 -topk8 -inform PEM -outform DER -in client-key.pem -out client-key.pkcs8 -nocrypt " to change the format of the client key in our Cloud Shell Project, but I received this error " pkcs8: Cannot open input file client-key.pem, No such file or directory ".

I would assume that I should not be running this command from the Cloud Shell Project terminal then. Would anybody know where I should be running this command instead? I can provide any extra material if needed. Thank you in advance - much appreciated.

1 Answer 1

0

It sounds like the file doesn't exist location where you are running the command. Did you upload the client-key.pem into Cloud Shell?

Sign up to request clarification or add additional context in comments.

5 Comments

Hi kurtisvg, thank you for taking an interest here. Yes, I uploaded the client-key.pem file into our main Storage Bucket. However, when I run this command " openssl pkcs8 -topk8 -inform PEM -outform PEM -in client-key.pem -out client-key.key -nocrypt " I still get the same error stating that there is no such file or directory. Perhaps there is a way to point the terminal to the storage bucket I am using?
Cloud Shell is a linux environment, so you need to upload the file into it to be able to use it with commands. From the shell, you can click the 3 dots menu and use "Upload file" to upload it into your working directory.
Thank you kurtisvg, I uploaded the relevant files using the 3 dots menu you mentioned. I proceeded to download the formatted client-key.key file after running the command and selected that when uploading the configuration files when configuring the data studio data source. I am now receiving a different error notification: "Can't reach the host. Please double check your connection parameters. Learn more about database connectors here". I have double checked the details several times now and these exact details are being used in our of our other applications so they are correct. Any ideas?
The command in your question is openssl pkcs8 -topk8 -inform PEM -outform DER -in client-key.pem -out client-key.pkcs8 -nocrypt. The question you linked to mentioned that this was the incorrect command, and they had to use openssl pkcs8 -topk8 -inform PEM -outform PEM -in client-key.pem -out client-key.key -nocrypt instead. Can you try the second command and see what that gets you?
Hi Kurtisvg, thank you for your ongoing assistance here. I managed to come right, one of the Google Cloud Support Personnel responded to my contact request. There was something they needed to reset on their side. Appreciate your help, wishing you a pleasant day further

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.