PostGres error

I have my Pg in my VM. Can U check if right config
No description
28 Replies
Codercord
Codercord7mo ago
<#1248903970362101791>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Trung™
Trung™OP7mo ago
No description
Trung™
Trung™OP7mo ago
No description
Trung™
Trung™OP7mo ago
changed the config, didnt work
Atif
Atif7mo ago
Try quoting the variable values. Specifically the postgrss URL
Trung™
Trung™OP7mo ago
like?
Trung™
Trung™OP7mo ago
this one?
No description
Atif
Atif7mo ago
Like CODER_PG_CONNECTION_URL="Some value" For all values
Trung™
Trung™OP7mo ago
oh sir ok
Atif
Atif7mo 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™OP7mo ago
No description
Trung™
Trung™OP7mo ago
No description
Trung™
Trung™OP7mo ago
also have ^@
Trung™
Trung™OP7mo ago
No description
Trung™
Trung™OP7mo ago
a lot yeah it works i copied my env file to new vm idk why it occurs that
Trung™
Trung™OP7mo ago
the systemctl sucks for a while
No description
Trung™
Trung™OP7mo ago
@Atif
No description
Atif
Atif7mo ago
Please check your .env file for any typos
Trung™
Trung™OP7mo ago
already checked see the logs that no db named coder
Atif
Atif7mo ago
Copy and paste your .env file No screenshots
Trung™
Trung™OP7mo 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
Atif
Atif7mo 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™OP7mo 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™OP7mo ago
No description
Trung™
Trung™OP7mo ago
was like this
Atif
Atif7mo 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™OP7mo ago
BROOOOOOOOOOOOOOOOO 💀 i am dying fixed it
Codercord
Codercord7mo ago
@Trung™ closed the thread.

Did you find this page helpful?