'module not registered: dns.providers.route53' - even though the module is listed in 'list-modules'

I’m trying to upgrade our setup from Caddy 1 to 2. It seems that now route53 is a separate module, so I tried building from source with the route53 module - but I still get a ‘not registered’ error when calling it from the Caddyfile:


1. Caddy version (caddy version):

2.2.1

Built with:
sudo ./xcaddy build v2.2.1 --with github.com/caddy-dns/route53

2. How I run Caddy:

Built from source with xcaddy.

Then run with:
./caddy run -config /etc/caddy/Caddyfile

a. System environment:

Fedora 32
go version: go1.14.9 linux/amd64

b. Command:

./caddy run -config /etc/caddy/Caddyfile

d. My complete Caddyfile or JSON config:

Redacted the domain. It works with Caddy v1 and route53
{
admin off
}
xxx.xxx.com {
file_server /var/www
tls xxx.xxx@xxx.com {
dns route53{
max_retries 10
}
}

3. The problem I’m having:

Even though I built Caddy with the route53 module, there is an error claiming the module is not registered:

using provided configuration {“config_file”: “/etc/caddy/Caddyfile”, “config_adapter”: “”}
run: adapting config using caddyfile: parsing caddyfile tokens for ‘tls’: /etc/caddy/Caddyfile:7 - Error during parsing: getting DNS provider module named ‘route53{’: module not registered: dns.providers.route53{

4. Error messages and/or full log output:

using provided configuration {“config_file”: “/etc/caddy/Caddyfile”, “config_adapter”: “”}
run: adapting config using caddyfile: parsing caddyfile tokens for ‘tls’: /etc/caddy/Caddyfile:7 - Error during parsing: getting DNS provider module named ‘route53{’: module not registered: dns.providers.route53{

5. What I already tried:

./caddy list-modules
admin.api.load
admin.api.metrics
caddy.adapters.caddyfile
caddy.listeners.tls
caddy.logging.encoders.console
caddy.logging.encoders.filter
caddy.logging.encoders.filter.delete
caddy.logging.encoders.filter.ip_mask
caddy.logging.encoders.json
caddy.logging.encoders.logfmt
caddy.logging.encoders.single_field
caddy.logging.writers.discard
caddy.logging.writers.file
caddy.logging.writers.net
caddy.logging.writers.stderr
caddy.logging.writers.stdout
caddy.storage.file_system
dns.providers.route53

It seems to have been typo, the curly braces should have a space before them.

1 Like

Yep, spaces are significant in the Caddyfile.

Glad you figured it out!

For next time, please use ``` on the lines before and after your code/console output to use code formatting, it preseves whitespace and makes it much easier to read.

This topic was automatically closed after 30 days. New replies are no longer allowed.