-
Notifications
You must be signed in to change notification settings - Fork 357
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
Database hostnames with underscores are not supported #1602
Comments
Hello @David-COUDRAY, thanks for contributing to the Password Pusher community! We will respond as soon as possible. |
Wow that's an unfortunate bug. Thanks for identifying this @David-COUDRAY. I'll add a note to the README as suggested to hopefully save others from the headache. |
I created the Guide to DATABASE_URL with notes on this issue and underscores. It's linked in the README and I'll start linking it around more as time goes on. |
Thank you for this @pglombardo ;-) |
Hi @David-COUDRAY - this was a very helpful report. Since this is now well documented in the project I'll close the issue out. Thanks for reporting! |
🐛 Bug Report
DataBase server name (hostname) with underscore refused into DATABASE_URI.
Error message with Postgres :
URI::InvalidURIError: the scheme postgres does not accept registry part: user:pass@dbhost (or bad hostname?)
Error message with MySQL/MariaDB :
URI::InvalidURIError: the scheme mysql2 does not accept registry part: user:pass@dbhost (or bad hostname?)
I use Docker Swarm for HA and fail-over.
By default, docker swarm (like docker compose) assigns the hostname on docker container with the stack name and service name, like this: stack-name_service-name
On Ruby, hostname with underscore is rejected.
See this answer: https://stackoverflow.com/a/64344976/18188311
RFC3986_Parser Ruby class: https://github.com/ruby/ruby/blob/master/lib/uri/rfc3986_parser.rb#L5
Environment
Where are you running/using Password Pusher?
If applicable, what version of Password Pusher? Latest
📈 Expected behavior
I spent over 4 hours trying to figure out why it wasn't working.
I think it would be nice to add a note on the Github redme, as well as in the docker-compose file.
The text was updated successfully, but these errors were encountered: