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

Failed to connect to and migrate the database #452

Closed
yonas opened this issue Dec 13, 2023 · 4 comments
Closed

Failed to connect to and migrate the database #452

yonas opened this issue Dec 13, 2023 · 4 comments

Comments

@yonas
Copy link

yonas commented Dec 13, 2023

$ kitsune --config kitsune.toml
Error:   × Failed to connect to and migrate the database                                                                                                                                                             
  help: Your connection string has the correct syntax. Is the host up?    

Basic sanity check:

$ sudo -u postgres psql -d "postgresql://kitsune@localhost/kitsune" -c "select now()"
              now              
-------------------------------
 2023-12-13 15:37:48.283756-05
(1 row)

config: unmodified config.example.toml

OS: FreeBSD 14
database: PostgreSQL 15.5

@aumetra
Copy link
Member

aumetra commented Dec 13, 2023

Okay, hang on, I gotta improve the damn error messages first 😭
What was I thinking when I only output the Display impl instead of the backtrace?

@aumetra
Copy link
Member

aumetra commented Dec 16, 2023

Sorry for the delay. As soon as #454 is merged on main (it's in the merge queue right now, so it should be there soon), you could attempt to rebuild and run it again.
This time you should see the full error backtrace.

@aumetra
Copy link
Member

aumetra commented Dec 16, 2023

And it's merged. Feel free to try it again with the latest revision.

@yonas
Copy link
Author

yonas commented Dec 17, 2023

Thanks! It turned out to be an issue with connection permissions. After following https://wiki.freebsd.org/PostgreSQL/Setup , the error is resolved.

On second start, all I see is an info log:

tokio_postgres::connection: NOTICE: relation "__diesel_schema_migrations" already exists, skipping

@yonas yonas closed this as completed Dec 17, 2023
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