Comments (8)
The PgSQL driver is baked in the acme-dns itself, so there's no need to install your own. Your issue seems to be that the database engine option in the config file seems to be empty (or commented out):
It should be:
...
[database]
# Database engine to use, sqlite3 or postgres
engine = "postgres"
...
from acme-dns.
Thank you for pointing out that the driver is embedded in the binary. I forgot to check under the vendor folder.
Regarding my config.cfg file I do have engine="postgres" specified. The file is in /etc/acme-dns and owned by acme-dns:acme-dns as per service file.
I get the same error if I run acme-dns directly
INFO[0000] Using config file file=/etc/acme-dns/config.cfg
ERRO[0000] Could not open database [sql: unknown driver "" (forgotten import?)]
Actually it does not matter what string I use in the config file, even
engine = "nonsense"
I get the same error unknown driver "" (i.e. empty string).
Completely confused ...
from acme-dns.
The error message implies that the engine
value within [database]
block couldn't be read for some reason. I wonder if you might have commented the [database]
block out or something? Anyway acme-dns is unable to read the value of engine
configuration variable for reason or another.
from acme-dns.
After learning how to get around in GOLANG, I tracked down the issue. I had left out the quotes around the ip parameters. Since util.go does not check for errors in toml.DecodeFile, because it "Practically never errors" 8-), the error was not caught and no parameters was returned in Config then resulting in the "" driver error. So I would suggest not to assume that users will not make an error while editing the config file.
Also, if the permissions are not set properly on the config file, the os.Stat check in fileExists will not flag a file that exists but cannot be read. Using os.Open and checking for an error is more reliable (then closing the file is there is no error). There might be a more GOLANG way of doing the same.
from acme-dns.
Ah, most awesome that you got it to work!
Since util.go does not check for errors in toml.DecodeFile, because it "Practically never errors" 8-),
Burn! I'm very sorry that the sloppy error handling did bite you :/
This definitely is a bug, and should get fixed. As you dug into the code already, would you like to submit a PR to fix the issue? If not, I'll do it.
from acme-dns.
Finally got around submitting a PR. Just did a bit more testing not to introduce new features. I think that the documentation should direct the user to always place the configuration file in /etc/acme-dns/ if running as a service and non-privileged user acme-dns. I am not sure what the "current" directory is for a service.
Also regarding the configuration file, I would suggest including the ip:port option and not only the :port option for listen, e.g.
Edit the following line to the ip address that acme-dns is listening to
#listen = "198.51.100.1:53"
If acme-dns is listening to all addresses on the server, use
listen = ":53"
Since I am running acme-dns along the "main" DNS server, I needed to specify separate IP addresses to listen to. Rather obvious in retrospect but a note in the configuration file would be useful.
from acme-dns.
This is my conf referent to database
[database]
Database engine to use, sqlite3 or postgres
engine = "sqlite3"
Connection string, filename for sqlite3 and postgres://$username:$password@$host/$db_name for postgres
connection = "/var/lib/acme-dns/acme-dns.db"
The problem is persistent
from acme-dns.
The error messages should be a lot better now when #99 and #101 have landed to reveal the underlying issue.
from acme-dns.
Related Issues (20)
- error message every 10 minutes about managing the server certificate HOT 9
- Register endpoint with configurable subdomain HOT 3
- CAA issues when higher level domain has a CAA HOT 2
- Add `server_url` to JSON storage file HOT 1
- nxdomain responses include huge timeouts HOT 2
- Is it possible to add support for Dynamic DNS subdomains
- Add support for PROXY protocol
- Please accept the PR for making registration endpoint configurable HOT 4
- Not able to generate cert for itself, no TXT record created
- Issue with Certificate Renewal from Let's Encrypt
- Build failed, error in sqlite3 dependency
- Is this project still active? HOT 4
- Acme-Dns Server Failing HOT 1
- TXT record returns two values - doesn't seem that should be possible HOT 4
- How do you bootstrap when you have a split-DNS? HOT 5
- Should /health return a result? HOT 1
- Unable to obtain the corresponding TXT record through _acme-challenge.example.tld HOT 3
- Unable to use on ARM64
- [Question] What is the `https://github.com/acme-dns/acme-dns` repo for? HOT 1
- acme-dns.io timing out for some of the sub domains HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acme-dns.