[Bug]: Cannot Start Self-Hosted When Postgres Uses Non-Default Port
j0sh3rs opened this issue · 2 comments
j0sh3rs commented
What did you expect to happen?
I would expect a valid postgres uri to be processed correctly, including being able to configure a custom port.
What happened?
When attempting to start Atuin with a db url that contains a non-default port for postgres, the server is completely unable to start:
$ k logs -f -n services atuin-7f8b7cf5-p592w
Error: failed to connect to db: PostgresSettings { db_uri: "postgres://atuin:atuin@10.1.0.20:35432/atuin" }
Caused by:
Other(error with configuration: invalid port number
Caused by:
invalid port number
Location:
/rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/convert/mod.rs:757:9)
Location:
/app/atuin-server/src/lib.rs:141:10
Atuin doctor output
Unable to run atuin doctor as the pod won't ever start up
Code of Conduct
- I agree to follow this project's Code of Conduct
j0sh3rs commented
Looks like this could be an encoding problem as referenced by blackbeam/rust-mysql-simple#78 -- Will validate and close the issue if I'm able to successfully test.
j0sh3rs commented
Confirmed! This is an encoding problem when the db uri is not urlencoded. For anyone else who stumbles on this, make sure that you properly urlencode your ATUIN_DB_URI or opt for credentials that are complex but do not contain special characters