Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peertube won't connect to database on startup #2540

Closed
OceanTechie opened this issue Mar 6, 2020 · 1 comment
Closed

Peertube won't connect to database on startup #2540

OceanTechie opened this issue Mar 6, 2020 · 1 comment

Comments

@OceanTechie
Copy link

What happened?

I am getting password authentication failed for user peertube on startup when viewing sudo journalctl -feu peertube as per below.

I do have a unix account called peertube and a postgresql user named peertube and I can connect to the peertube_prod database using that account (in its own command shell) (there are no tables btw).

I've matched the password for the "peertube" user for both ubuntu account of "peertube" and postgresq user "peertube". I've also set postgresql pg_hba.conf to md5 per below below

Mar 06 00:44:59 ip-172-31-31-175 peertube[14818]: [www.sharevrpeerdv.com:443] 2020-03-06 00:44:59.008 warn: Emailer is disabled so the contact form will not work.
Mar 06 00:44:59 ip-172-31-31-175 peertube[14818]: [www.sharevrpeerdv.com:443] 2020-03-06 00:44:59.527 error: Cannot start application. {
Mar 06 00:44:59 ip-172-31-31-175 peertube[14818]: "err": {
Mar 06 00:44:59 ip-172-31-31-175 peertube[14818]: "stack": "SequelizeConnectionError: password authentication failed for user "peertube"\n at connection.connect.err (/var/www/peertube/versions/peertube-v2.1.1/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24)\n at Connection.connectingErrorHandler (/var/www/peertube/versions/peertube-v2.1.1/node_modules/pg/lib/client.js:194:14)\n at Connection.emit (events.js:198:13)\n at Socket. (/var/www/peertube/versions/peertube-v2.1.1/node_m

Here is pg_hba.conf (i removed the "#" comment symbols as it messed up formatting)

Database administrative login by Unix domain socket
local all postgres md5
local all peertube md5

TYPE DATABASE USER ADDRESS METHOD
"local" is for Unix domain socket connections only
local all all md5
IPv4 local connections:
host all all 127.0.0.1/32 md5
IPv6 local connections:
host all all ::1/128 md5
Allow replication connections from localhost, by a user with the
replication privilege. local replication all md5
host replication all 127.0.0.1/32 md5
host replication all ::1/128 md5
What do you expect to happen instead?
normal startup of peertube

Additional information

  • PeerTube version or URL:
    v2.1.1

  • Browser name/version:

  • NodeJS version:
    10.19

  • Link to browser console log if useful:

  • Link to server log if useful (journalctl or /var/www/peertube/storage/logs/):

@Chocobozzz
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants