mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-02 22:57:18 -05:00
Database connection fails because of failed name resolution #1460
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#1460
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MasinAD on GitHub (Dec 27, 2022).
Subject of the issue
I configured the MariaDB connection in the environment file.
On startup I get
Deployment environment
The db nspawn container has a similar config. This setup works.
Steps to reproduce
Setup two systemd-nspawn containers by bootstrapping Debian Bullseye. Name one
dband the othervaultwarden. Install MariaDB in the first and the vaultwarden binary in the second (together with the web-vault).Create a systemd service unit file:
Create a system user and a system group, both named
vaultwardenExpected behaviour
Vaultwarden connects to the database by simply resolving the database name using system standards
Actual behaviour
Vaultwarden fails to connect because Diesel seems to not resolve the name correctly.
Troubleshooting data
@MasinAD commented on GitHub (Dec 27, 2022):
For the record, my workaround is providing the db host's IP address. But I'd like to resolve names in case of rebooting everything and the host then getting a different IP address. DHCP and DNS are cool if they work and are properly applied ;-).
@BlackDex commented on GitHub (Dec 27, 2022):
Not sure that we can help here. Resolving normally goes via the resolving provided by system it self. If this is a diesel issue, then a issue report there would be better.
What happens if you use
getentto try and resolve the host within your nspawn container? Or any other resolving tool?@MasinAD commented on GitHub (Dec 28, 2022):
I agree I should report this to Diesel. Done here: https://github.com/diesel-rs/diesel/issues/3463
I already posted the output of
getent ahosts dbandhost dbbut I paste it here:Resolving actually works. But Diesel does not like it.