PostGres error

I have my Pg in my VM. Can U check if right config
No description
28 Replies
Codercord
Codercord2y ago
<#1248903970362101791>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Trung™
Trung™OP2y ago
No description
Trung™
Trung™OP2y ago
No description
Trung™
Trung™OP2y ago
changed the config, didnt work
matifali
matifali2y ago
Try quoting the variable values. Specifically the postgrss URL
Trung™
Trung™OP2y ago
like?
Trung™
Trung™OP2y ago
this one?
No description
matifali
matifali2y ago
Like CODER_PG_CONNECTION_URL="Some value" For all values
Trung™
Trung™OP2y ago
oh sir ok
matifali
matifali2y ago
Your errors message says that's .env file is not valid so quoting could help fix it. Also look for any mistyped characters
Trung™
Trung™OP2y ago
No description
Trung™
Trung™OP2y ago
No description
Trung™
Trung™OP2y ago
also have ^@
Trung™
Trung™OP2y ago
No description
Trung™
Trung™OP2y ago
a lot yeah it works i copied my env file to new vm idk why it occurs that
Trung™
Trung™OP2y ago
the systemctl sucks for a while
No description
Trung™
Trung™OP2y ago
@Atif
No description
matifali
matifali2y ago
Please check your .env file for any typos
Trung™
Trung™OP2y ago
already checked see the logs that no db named coder
matifali
matifali2y ago
Copy and paste your .env file No screenshots
Trung™
Trung™OP2y ago
so i have to sudo -u postgres psql Jun 09 10:26:52 ubuntu coder[75383]: Started HTTP listener at http://0.0.0.0:3000 Jun 09 10:26:52 ubuntu coder[75383]: View the Web UI: https://workspace.trung.is-a.dev Jun 09 10:26:52 ubuntu coder[75383]: 2024-06-09 10:26:52.732 [warn] ping postgres: retrying error="pq: database \"coder\" does not exist" try=1 Jun 09 10:26:54 ubuntu coder[75383]: 2024-06-09 10:26:54.355 [warn] ping postgres: retrying error="pq: database \"coder\" does not exist" try=2 Jun 09 10:26:56 ubuntu coder[75383]: 2024-06-09 10:26:56.978 [warn] ping postgres: retrying error="pq: database \"coder\" does not exist" try=3 Jun 09 10:26:59 ubuntu coder[75383]: 2024-06-09 10:26:59.983 [warn] ping postgres: retrying error="pq: database \"coder\" does not exist" try=4 Jun 09 10:27:02 ubuntu coder[75383]: 2024-06-09 10:27:02.987 [warn] ping postgres: retrying error="pq: database \"coder\" does not exist" try=5 Jun 09 10:27:05 ubuntu coder[75383]: 2024-06-09 10:27:05.992 [warn] ping postgres: retrying error="pq: database \"coder\" does not exist" try=6 Jun 09 10:27:08 ubuntu coder[75383]: 2024-06-09 10:27:08.996 [warn] ping postgres: retrying error="pq: database \"coder\" does not exist" try=7
matifali
matifali2y ago
Follow this instructions here https://coder.com/docs/install/database
External database - Coder Docs
Use external PostgreSQL database
From An unknown user
From An unknown user
From An unknown user
Trung™
Trung™OP2y ago
postgres=# CREATE ROLE coder LOGIN SUPERUSER PASSWORD 'secret42';
CREATE ROLE
postgres=# exit
root@ubuntu:/etc/coder.d# psql -U coder
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: Peer authentication failed for user "coder"
postgres=# CREATE ROLE coder LOGIN SUPERUSER PASSWORD 'secret42';
CREATE ROLE
postgres=# exit
root@ubuntu:/etc/coder.d# psql -U coder
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: Peer authentication failed for user "coder"
@Atif root@ubuntu:/etc/coder.d# psql psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "root" does not exist
Trung™
Trung™OP2y ago
No description
Trung™
Trung™OP2y ago
was like this
matifali
matifali2y ago
This isn't a Coder issue. You should probably look for help on how to set up a postgrss database Maybe someone else can help better here. Good luck
Trung™
Trung™OP2y ago
BROOOOOOOOOOOOOOOOO 💀 i am dying fixed it
Codercord
Codercord2y ago
@Trung™ closed the thread.

Did you find this page helpful?