planetscale / sql-proxy

SQL Proxy for PlanetScale DB
Apache License 2.0
54 stars 6 forks source link

couldn't retrieve certs from cert source: Not Found #121

Closed voigt closed 3 years ago

voigt commented 3 years ago

Hi,

trying to follow the instructions to get the pscale-proxy running. It exits with a couldn't retrieve certs from cert source: Not Found error.

$ docker run -p 127.0.0.1:3306:3306 planetscale/pscale-proxy \
  --host 0.0.0.0 \
  --org "$PLANETSCALE_ORG" \
  --database "$PLANETSCALE_DATABASE" \
  --branch "$PLANETSCALE_BRANCH" \
  --service-token "$PLANETSCALE_SERVICE_TOKEN" \
  --service-token-name "$PLANETSCALE_SERVICE_TOKEN_NAME"
couldn't retrieve certs from cert source: Not Found

I'm pretty sure envvars are set correctly...

export | grep PLANET
PLANETSCALE_BRANCH=main
PLANETSCALE_DATABASE=nativeclouddev
PLANETSCALE_ORG=nativeclouddev
PLANETSCALE_SERVICE_TOKEN=<redacted>
PLANETSCALE_SERVICE_TOKEN_NAME=<redacted>

I'm a new Planetscale user. What I did so far:

Possible I missed something crucial?

voigt commented 3 years ago

As somehow expected, I missed the following:

$ pscale service-token add-access $PLANETSCALE_SERVICE_TOKEN_NAME connect_production_branch connect_branch --database $PLANETSCALE_DATABASE
  DATABASE         ACCESSES
 ---------------- -------------------------------------------
  nativeclouddev   connect_branch, connect_production_branch

Closing ticket again...