couldn't connect to INSTANCE : x509: certificate has expired or is not yet valid

瀏覽次數:1,500 次
跳到第一則未讀訊息

Mirror Mirage0

未讀,
2018年3月10日 下午1:03:162018/3/10
收件者:Google Cloud SQL discuss
Hi, I have been struggling with this error for past several hours. Any help would be appreciated.

Running on Lubuntu VM.
gcloud is installed, authenticated, lists the project, gives description of database. starts listening

q@q-VirtualBox:~/Desktop/q$ ./cloud_sql_proxy -instances="q:a:q2"=tcp:3306
2018/03/10 07:05:20 Listening on 127.0.0.1:3306 for q:a:q2
2018/03/10 07:05:20 Ready for new connections
2018/03/10 07:05:30 New connection for "q:a:q2"
2018/03/10 07:05:37 couldn't connect to "q:a:q2": x509: certificate has expired or is not yet valid

Please help

Dinesh (Google Platform Support)

未讀,
2018年3月10日 下午5:02:432018/3/10
收件者:google-cloud...@googlegroups.com
Hello,

It seems your SSL certificate is invalid. You may want to view expiration date of your SSL certificate (both server and client) under SSL configuration by Getting information about your server certificate.  You can create a new certificate if server certificate expires by following the same documentation. You should refresh your server certificate before it expires to ensure that your clients can connect to the instance securely.

Similarly, you can manage your client certificate as described in the same documentation.  

I hope it helps?

Regards,

Mirror Mirage0

未讀,
2018年3月11日 凌晨1:41:002018/3/11
收件者:Google Cloud SQL discuss
Hi,

I tried both.
1) Refreshed Server Certificate. Server certificate shows expiration date of 2020 , which is ample time.
2) Generated New Client Certificate. (I don't use the client 

Still gives me the same error x509 : certificate has expired or is not valid.
I am using Ubuntu Linux VM. I can connect to the database using mysql client, since I have whitelisted my IP.
Is there any other info which you need to troubleshoot this? Some kind of log file?

Thanks for your help

Dinesh (Google Platform Support)

未讀,
2018年3月11日 下午3:34:532018/3/11
收件者:Google Cloud SQL discuss
Can you please check date and time for your host machine is not out of sync? Please configure NTP for your host machine to get the clock in sync. If this does not resolve the issue, I will recommend to raising this issue on Google public issue tracker platform[1] which is meant for customer issues, bugs and feature request tracking purpose. Group platform is meant for general product discussions.


[1]: https://issuetracker.google.com

Mirror Mirage0

未讀,
2018年3月12日 凌晨12:05:402018/3/12
收件者:Google Cloud SQL discuss
Hi,

Date and Time is in sync. NTP is up and running 

      Local time: س 2018-03-10 10:47:13 +04
  Universal time: س 2018-03-10 06:47:13 UTC
        RTC time: س 2018-03-10 06:46:18
       Time zone: Asia/Dubai (+04, +0400)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no

I will report a bug in the link you provided.
回覆所有人
回覆作者
轉寄
0 則新訊息