GithubHelp home page GithubHelp logo

cannot fetch token: Post https://accounts.google.com/o/oauth2/token: x509: failed to load system roots and no roots provided about cloud-sql-proxy HOT 9 CLOSED

googlecloudplatform avatar googlecloudplatform commented on July 21, 2024
cannot fetch token: Post https://accounts.google.com/o/oauth2/token: x509: failed to load system roots and no roots provided

from cloud-sql-proxy.

Comments (9)

Carrotman42 avatar Carrotman42 commented on July 21, 2024 2

from cloud-sql-proxy.

norbert-yoimo avatar norbert-yoimo commented on July 21, 2024

That fixed it, thank you.

from cloud-sql-proxy.

duzy avatar duzy commented on July 21, 2024

Hi, I'm using the proxy lib (instead of cloud_sql_proxy) in my Go program. But I'm having exactly the same issue as this. All my guess is the cert files are missing, but not sure what to do for a fix!

2017-04-11T11:04:38.746339777Z 2017/04/11 11:04:38.746134 create table contributor: error: Post https://www.googleapis.com/sql/v1beta4/projects/xxxx/instances/yyyy/createEphemeral?alt=json: x509: failed to load system roots and no roots provided

from cloud-sql-proxy.

Carrotman42 avatar Carrotman42 commented on July 21, 2024

from cloud-sql-proxy.

duzy avatar duzy commented on July 21, 2024

Yes indeed, I'm doing so. Thanks, I'm trying to add the certs manually.

from cloud-sql-proxy.

jerairrest avatar jerairrest commented on July 21, 2024

Hello, I'm using 1.09 and trying to connect through a socket across containers on GCE and am receiving this error. I've tried using a msql client as well as receive the same message on stdout of my cloudsql container. Any thoughts on how to debug this?

from cloud-sql-proxy.

Carrotman42 avatar Carrotman42 commented on July 21, 2024

from cloud-sql-proxy.

jerairrest avatar jerairrest commented on July 21, 2024

I'm using the pre-compiled docker container gcr.io/cloudsql-docker/gce-proxy:1.06 and connecting to it through a Kubernetes deployment using a stock alpine:3.5 image as well I've tried debian:jessie

my deployment is as follows: (I took some env information out but this is similar)

{
  "apiVersion": "extensions/v1beta1",
  "kind": "Deployment",
  "metadata": {
    "name": "test-go",
    "namespace": "test",
    "labels": {
      "name": "test-go"
    }
  },
  "spec": {
    "replicas": 1,
    "revisionHistoryLimit": 3,
    "template": {
      "metadata": {
        "labels": {
          "name": "test-go"
        }
      },
      "spec": {
        "containers": [
          {
            "name": "test-go",
            "image": "alpine:3.5",
            "volumeMounts": [
              {
                "name": "cloudsql",
                "mountPath": "/cloudsql"
              }
            ],
            "command": ["ping", "localhost"]
            "imagePullPolicy": "Always",
            "resources": {
              "limits": {
                "cpu": "250m",
                "memory": "500Mi"
              }
            }
          },
            {
            "name": "cloud-sql-proxy",
            "image": "gcr.io/cloudsql-docker/gce-proxy:1.06",
            "volumeMounts": [
              {
                "name": "cloudsql",
                "mountPath": "/cloudsql"
              },
              {
                "name": "cloudsql-oauth-credentials",
                "mountPath": "/secrets/cloudsql",
                "readOnly": true
              }
            ],
            "command": ["/cloud_sql_proxy", "-dir=/cloudsql", "-credential_file=/secrets/cloudsql/cloud-sql-proxy-service-account.json", "-instances=MYCLOUDSQLINSTANCE"],
            "imagePullPolicy": "Always",
            "resources": {
              "limits": {
                "cpu": "250m",
                "memory": "500Mi"
              }
            }
          }
        ],
        "volumes": [
          {
            "name": "cloudsql-oauth-credentials",
            "secret": {
              "secretName": "cloudsql-oauth-credentials"
            }
          },
          {
            "name": "cloudsql",
            "emptyDir": {}
          }
        ]
      }
    }
  }
}

from cloud-sql-proxy.

jerairrest avatar jerairrest commented on July 21, 2024

wwwwoooowww..... 6 < 9. I'm sorry! Ignore me :)

from cloud-sql-proxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.