Moved instance from AWS to DO: Websocket problems

Hi!

So i moved my Mastodon instance from AWS to Digital Ocean today, following these instructions.

Everything worked fine, the instance is back up on DO.

There’s one issue though: the Websocket won’t connect, i keep getting these errors in the browser console, on all feeds:

index.js:64 WebSocket connection to 'wss://example.com/api/v1/streaming/?stream=public' failed: HTTP Authentication failed; no valid credentials available

Anyone here has any idea what could have gone wrong? Apart from this, everything works just fine.
Thanks in advance!
Cheers,
Claus.

This is probably related. In the logs i keep getting errors:

node[8078]: ERR! error: no pg_hba.conf entry for host "10.132.9.46", user "mastodon", database "mastodon_production", SSL off

10.132.9.46 is the main machine where the rails app runs.
The database is a separate host.

I believe i solved it. I defined DB_HOST, DB_PORT, DB_NAME, DB_USER and DB_PASS in .env.production. Seems this doesn’t work.

Now in addition to the above, i defined DATABASE_URL=DATABASE_URL=postgresql://mastodon:PASSWORD@HOST:PORT/mastodon_production?sslmode=require&ssl=true, and that seems to work. No more Websocket errors, no more errors in the log.

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