Grafana pdc binary "failed to generate new certificate" error

Grafana pdc agent (private data source connect) stops working after running for a while.
It also sometimes happens after server restart.

When this error happens the pdc agent cannot launch again with the same login token.
It gets the error:

ensuring certificate exists: failed to generate new certificate: key signing request failed: invalid credentials

This error does not go away whatever i do, however if i try to use a different pdc login token, it will fix the problem and work again, both with the new token, and the original token.

I am unsure what i am doing wrong. Any input is appreciated.

Obvious question: do you have valid credentials/token? That token can expire eventually - it depends how it was configured. Do you have correct time?

It was indeed invalid credentials.

What tricked me was the fact that the pdc agent doesn’t always generate a new certificate on startup, but rather reuses an old one if it is still valid.

This meant, that if i first used a valid token, and then tried an invalid one, the invalid token would seem to work until the moment it had to generate a new token.

1 Like