ERR! Error: self signed certificate in certificate chain

Hi all,
i recently upgraded my instance to 3.4.0 and since get a ERR! Error: self signed certificate in certificate chain in mastodon-streaming, and the WebSocket won’t connect. Everything else works fine.
Any of you know what that is and how to fix it?

After some debugging, turns out that error is produced by pgPool.connect in streaming/index.js, function accountFromToken. Weird because all params are correct, i can otherwise connect to the db fine with those params, and everything worked just fine prior to upgrade to 3.4.0. I also did an apt upgrade, maybe some upgraded package causes this? (My instance runs on Ubuntu 18)

Solved. Apparently, i have to give pgPool.connect a cert.

In streaming/index.js, function dbUrlToConfig:

  if (ssl && ssl === 'true' || ssl === '1') {
    config.ssl = {
      rejectUnauthorized: true,
      ca: fs.readFileSync("/path/to/ca-certificate.crt").toString()
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.