Unable to fulfill download request when try to run caddy upgrade or caddy add-package

1. The problem I’m having:

Whenever I try to run caddy upgrade or caddy add-package github.com/mholt/caddy-dynamicdns I got a error message saying download failed: HTTP 400: unable to fulfill download request. A few days ago I was able install caddy add-package github.com/caddy-dns/cloudflare with no error

2. Error messages and/or full log output:

caddy upgrade
2025/03/20 12:06:27.550 INFO    this executable will be replaced        {"path": "/usr/bin/caddy"}
2025/03/20 12:06:27.551 INFO    requesting build        {"os": "linux", "arch": "arm", "packages": ["github.com/caddy-dns/cloudflare@v0.0.0-20250228175314-1fb64108d4de"]}
Error: download failed: download failed: HTTP 400: unable to fulfill download request (id=3d1a79f5-bcb9-42b1-bda9-240de3cd2652)

and

caddy add-package github.com/mholt/caddy-dynamicdns
2025/03/20 11:40:59.481 INFO    this executable will be replaced        {"path": "/usr/bin/caddy"}
2025/03/20 11:40:59.487 INFO    requesting build        {"os": "linux", "arch": "arm", "packages": ["github.com/caddy-dns/cloudflare@v0.0.0-20250228175314-1fb64108d4de", "github.com/mholt/caddy-dynamicdns"]}
Error: download failed: download failed: HTTP 400: unable to fulfill download request (id=187aa2da-2d4b-4b47-8d75-0696d7eebed4)

3. Caddy version:

caddy --version
v2.9.1 h1:OEYiZ7DbCzAWVb6TNEkjRcSCRGHVoZsJinoDR/n9oaY=

4. How I installed and ran Caddy:

a. System environment:

cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

b. Command:

caddy upgrade

and

caddy add-package github.com/mholt/caddy-dynamicdns

d. My complete Caddy config:

{
        log caddy-log {
                output file /var/log/caddy/caddy.log
                format console {
                        time_format wall
                }
        }
}

https://centro.stream {
        log {
                output file /var/log/caddy/centro-stream.log
                format console {
                        time_format wall
                }
        }
        
        tls {
                dns cloudflare {env.CF_API_TOKEN}
        }

        respond "Hello Safe World"
}

5. Links to relevant resources:

By the way, even after running xcaddy build --with github.com/mholt/caddy-dynamicdns --output xcaddybuild.log and successful building Caddy, it only shows dns.providers.cloudflare under Non-standard modules after I execute caddy list-modules

Thanks

Does the error still happen?

That seems like something else is going on, there’s no way (?) it should show a module that you didn’t build. What are the minimal steps to reproduce this behavior including the command that lists the modules?

Hey Matt

Thanks for the quick reply

Yes, error still happening.

Follow list of commands to reproduce. After I install Caddy following Install — Caddy Documentation

> caddy add-package github.com/caddy-dns/cloudflare
> caddy list-modules
admin.api.load
admin.api.metrics
admin.api.pki
admin.api.reverse_proxy
caddy.adapters.caddyfile
caddy.config_loaders.http
caddy.filesystems
caddy.listeners.http_redirect
caddy.listeners.proxy_protocol
caddy.listeners.tls
caddy.logging.cores.mock
caddy.logging.encoders.append
caddy.logging.encoders.console
caddy.logging.encoders.filter
caddy.logging.encoders.filter.cookie
caddy.logging.encoders.filter.delete
caddy.logging.encoders.filter.hash
caddy.logging.encoders.filter.ip_mask
caddy.logging.encoders.filter.query
caddy.logging.encoders.filter.regexp
caddy.logging.encoders.filter.rename
caddy.logging.encoders.filter.replace
caddy.logging.encoders.json
caddy.logging.writers.discard
caddy.logging.writers.file
caddy.logging.writers.net
caddy.logging.writers.stderr
caddy.logging.writers.stdout
caddy.storage.file_system
events
http
http.authentication.hashes.bcrypt
http.authentication.providers.http_basic
http.encoders.gzip
http.encoders.zstd
http.handlers.acme_server
http.handlers.authentication
http.handlers.copy_response
http.handlers.copy_response_headers
http.handlers.encode
http.handlers.error
http.handlers.file_server
http.handlers.headers
http.handlers.intercept
http.handlers.invoke
http.handlers.log_append
http.handlers.map
http.handlers.metrics
http.handlers.push
http.handlers.request_body
http.handlers.reverse_proxy
http.handlers.rewrite
http.handlers.static_response
http.handlers.subroute
http.handlers.templates
http.handlers.tracing
http.handlers.vars
http.ip_sources.static
http.matchers.client_ip
http.matchers.expression
http.matchers.file
http.matchers.header
http.matchers.header_regexp
http.matchers.host
http.matchers.method
http.matchers.not
http.matchers.path
http.matchers.path_regexp
http.matchers.protocol
http.matchers.query
http.matchers.remote_ip
http.matchers.tls
http.matchers.vars
http.matchers.vars_regexp
http.precompressed.br
http.precompressed.gzip
http.precompressed.zstd
http.reverse_proxy.selection_policies.client_ip_hash
http.reverse_proxy.selection_policies.cookie
http.reverse_proxy.selection_policies.first
http.reverse_proxy.selection_policies.header
http.reverse_proxy.selection_policies.ip_hash
http.reverse_proxy.selection_policies.least_conn
http.reverse_proxy.selection_policies.query
http.reverse_proxy.selection_policies.random
http.reverse_proxy.selection_policies.random_choose
http.reverse_proxy.selection_policies.round_robin
http.reverse_proxy.selection_policies.uri_hash
http.reverse_proxy.selection_policies.weighted_round_robin
http.reverse_proxy.transport.fastcgi
http.reverse_proxy.transport.http
http.reverse_proxy.upstreams.a
http.reverse_proxy.upstreams.multi
http.reverse_proxy.upstreams.srv
pki
tls
tls.ca_pool.source.file
tls.ca_pool.source.http
tls.ca_pool.source.inline
tls.ca_pool.source.pki_intermediate
tls.ca_pool.source.pki_root
tls.ca_pool.source.storage
tls.certificates.automate
tls.certificates.load_files
tls.certificates.load_folders
tls.certificates.load_pem
tls.certificates.load_storage
tls.client_auth.verifier.leaf
tls.get_certificate.http
tls.get_certificate.tailscale
tls.handshake_match.local_ip
tls.handshake_match.remote_ip
tls.handshake_match.sni
tls.handshake_match.sni_regexp
tls.issuance.acme
tls.issuance.internal
tls.issuance.zerossl
tls.leaf_cert_loader.file
tls.leaf_cert_loader.folder
tls.leaf_cert_loader.pem
tls.leaf_cert_loader.storage
tls.permission.http
tls.stek.distributed
tls.stek.standard

  Standard modules: 124

dns.providers.cloudflare

  Non-standard modules: 1

  Unknown modules: 0
> caddy add-package github.com/mholt/caddy-dynamicdns
2025/03/20 19:01:32.867 INFO    this executable will be replaced        {"path": "/usr/bin/caddy"}
2025/03/20 19:01:32.867 INFO    requesting build        {"os": "linux", "arch": "arm", "packages": ["github.com/caddy-dns/cloudflare@v0.0.0-20250228175314-1fb64108d4de", "github.com/mholt/caddy-dynamicdns"]}
Error: download failed: download failed: HTTP 400: unable to fulfill download request (id=c30bea2b-1fc8-470e-87fb-ced71a04dc59)

After this I installed xcaddy following xcaddy/README.md at master · caddyserver/xcaddy · GitHub

> sudo xcaddy build --with github.com/mholt/caddy-dynamicdns --with github.com/caddy-dns/cloudflare --output xcaddybuild.log
2025/03/20 16:50:01 [INFO] absolute output file path: /home/pi/Projects/caddy/xcaddybuild.log
2025/03/20 16:50:01 [INFO] Temporary folder: /tmp/buildenv_2025-03-20-1650.1571723371
2025/03/20 16:50:01 [INFO] Writing main module: /tmp/buildenv_2025-03-20-1650.1571723371/main.go
package main

import (
        caddycmd "github.com/caddyserver/caddy/v2/cmd"

        // plug in Caddy modules here
        _ "github.com/caddyserver/caddy/v2/modules/standard"
        _ "github.com/mholt/caddy-dynamicdns"
        _ "github.com/caddy-dns/cloudflare"
)

func main() {
        caddycmd.Main()
}
2025/03/20 16:50:01 [INFO] Initializing Go module
2025/03/20 16:50:01 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod init caddy
go: creating new go.mod: module caddy
go: to add module requirements and sums:
        go mod tidy
2025/03/20 16:50:01 [INFO] Pinning versions
2025/03/20 16:50:01 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -v github.com/caddyserver/caddy/v2
go: added github.com/beorn7/perks v1.0.1
go: added github.com/caddyserver/caddy/v2 v2.9.1
go: added github.com/caddyserver/certmagic v0.21.6
go: added github.com/caddyserver/zerossl v0.1.3
go: added github.com/cespare/xxhash/v2 v2.3.0
go: added github.com/francoispqt/gojay v1.2.13
go: added github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572
go: added github.com/google/pprof v0.0.0-20231212022811-ec68065c825e
go: added github.com/google/uuid v1.6.0
go: added github.com/klauspost/cpuid/v2 v2.2.9
go: added github.com/libdns/libdns v0.2.2
go: added github.com/mholt/acmez/v3 v3.0.0
go: added github.com/miekg/dns v1.1.62
go: added github.com/onsi/ginkgo/v2 v2.13.2
go: added github.com/prometheus/client_golang v1.19.1
go: added github.com/prometheus/client_model v0.5.0
go: added github.com/prometheus/common v0.48.0
go: added github.com/prometheus/procfs v0.12.0
go: added github.com/quic-go/qpack v0.5.1
go: added github.com/quic-go/quic-go v0.48.2
go: added github.com/zeebo/blake3 v0.2.4
go: added go.uber.org/mock v0.4.0
go: added go.uber.org/multierr v1.11.0
go: added go.uber.org/zap v1.27.0
go: added go.uber.org/zap/exp v0.3.0
go: added golang.org/x/crypto v0.31.0
go: added golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
go: added golang.org/x/mod v0.18.0
go: added golang.org/x/net v0.33.0
go: added golang.org/x/sync v0.10.0
go: added golang.org/x/sys v0.28.0
go: added golang.org/x/term v0.27.0
go: added golang.org/x/text v0.21.0
go: added golang.org/x/time v0.7.0
go: added golang.org/x/tools v0.22.0
go: added google.golang.org/protobuf v1.35.1
2025/03/20 16:50:10 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -v github.com/mholt/caddy-dynamicdns github.com/caddyserver/caddy/v2
go: added github.com/mholt/caddy-dynamicdns v0.0.0-20241025234131-7c818ab3fc34
go: added gitlab.com/NebulousLabs/fastrand v0.0.0-20181126182046-603482d69e40
go: added gitlab.com/NebulousLabs/go-upnp v0.0.0-20211002182029-11da932010b6
2025/03/20 16:50:26 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -v github.com/caddy-dns/cloudflare github.com/caddyserver/caddy/v2
go: accepting indirect upgrade from github.com/libdns/libdns@v0.2.2 to v0.2.3
go: added github.com/caddy-dns/cloudflare v0.0.0-20250228175314-1fb64108d4de
go: added github.com/libdns/cloudflare v0.1.3
go: upgraded github.com/libdns/libdns v0.2.2 => v0.2.3
2025/03/20 16:50:29 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -v
2025/03/20 16:50:36 [INFO] Build environment ready
2025/03/20 16:50:36 [INFO] Building Caddy
2025/03/20 16:50:36 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy -e
2025/03/20 16:50:39 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /home/pi/Projects/caddy/xcaddybuild.log -ldflags -w -s -trimpath -tags nobadger,nomysql,nopgx
2025/03/20 16:51:28 [INFO] Build complete: xcaddybuild.log
2025/03/20 16:51:28 [INFO] Cleaning up temporary folder: /tmp/buildenv_2025-03-20-1650.1571723371

./xcaddybuild.log version
v2.9.1 h1:OEYiZ7DbCzAWVb6TNEkjRcSCRGHVoZsJinoDR/n9oaY=

> caddy list-modules
admin.api.load
admin.api.metrics
admin.api.pki
admin.api.reverse_proxy
caddy.adapters.caddyfile
caddy.config_loaders.http
caddy.filesystems
caddy.listeners.http_redirect
caddy.listeners.proxy_protocol
caddy.listeners.tls
caddy.logging.cores.mock
caddy.logging.encoders.append
caddy.logging.encoders.console
caddy.logging.encoders.filter
caddy.logging.encoders.filter.cookie
caddy.logging.encoders.filter.delete
caddy.logging.encoders.filter.hash
caddy.logging.encoders.filter.ip_mask
caddy.logging.encoders.filter.query
caddy.logging.encoders.filter.regexp
caddy.logging.encoders.filter.rename
caddy.logging.encoders.filter.replace
caddy.logging.encoders.json
caddy.logging.writers.discard
caddy.logging.writers.file
caddy.logging.writers.net
caddy.logging.writers.stderr
caddy.logging.writers.stdout
caddy.storage.file_system
events
http
http.authentication.hashes.bcrypt
http.authentication.providers.http_basic
http.encoders.gzip
http.encoders.zstd
http.handlers.acme_server
http.handlers.authentication
http.handlers.copy_response
http.handlers.copy_response_headers
http.handlers.encode
http.handlers.error
http.handlers.file_server
http.handlers.headers
http.handlers.intercept
http.handlers.invoke
http.handlers.log_append
http.handlers.map
http.handlers.metrics
http.handlers.push
http.handlers.request_body
http.handlers.reverse_proxy
http.handlers.rewrite
http.handlers.static_response
http.handlers.subroute
http.handlers.templates
http.handlers.tracing
http.handlers.vars
http.ip_sources.static
http.matchers.client_ip
http.matchers.expression
http.matchers.file
http.matchers.header
http.matchers.header_regexp
http.matchers.host
http.matchers.method
http.matchers.not
http.matchers.path
http.matchers.path_regexp
http.matchers.protocol
http.matchers.query
http.matchers.remote_ip
http.matchers.tls
http.matchers.vars
http.matchers.vars_regexp
http.precompressed.br
http.precompressed.gzip
http.precompressed.zstd
http.reverse_proxy.selection_policies.client_ip_hash
http.reverse_proxy.selection_policies.cookie
http.reverse_proxy.selection_policies.first
http.reverse_proxy.selection_policies.header
http.reverse_proxy.selection_policies.ip_hash
http.reverse_proxy.selection_policies.least_conn
http.reverse_proxy.selection_policies.query
http.reverse_proxy.selection_policies.random
http.reverse_proxy.selection_policies.random_choose
http.reverse_proxy.selection_policies.round_robin
http.reverse_proxy.selection_policies.uri_hash
http.reverse_proxy.selection_policies.weighted_round_robin
http.reverse_proxy.transport.fastcgi
http.reverse_proxy.transport.http
http.reverse_proxy.upstreams.a
http.reverse_proxy.upstreams.multi
http.reverse_proxy.upstreams.srv
pki
tls
tls.ca_pool.source.file
tls.ca_pool.source.http
tls.ca_pool.source.inline
tls.ca_pool.source.pki_intermediate
tls.ca_pool.source.pki_root
tls.ca_pool.source.storage
tls.certificates.automate
tls.certificates.load_files
tls.certificates.load_folders
tls.certificates.load_pem
tls.certificates.load_storage
tls.client_auth.verifier.leaf
tls.get_certificate.http
tls.get_certificate.tailscale
tls.handshake_match.local_ip
tls.handshake_match.remote_ip
tls.handshake_match.sni
tls.handshake_match.sni_regexp
tls.issuance.acme
tls.issuance.internal
tls.issuance.zerossl
tls.leaf_cert_loader.file
tls.leaf_cert_loader.folder
tls.leaf_cert_loader.pem
tls.leaf_cert_loader.storage
tls.permission.http
tls.stek.distributed
tls.stek.standard

  Standard modules: 124

dns.providers.cloudflare

  Non-standard modules: 1

  Unknown modules: 0

I hope this help

Thanks

Ah, well:

caddy list-modules

is going to run the caddy in your PATH (run which caddy to see it), not the one built by xcaddy. To run that one, use ./caddy.

1 Like

Silly me :face_with_peeking_eye::face_with_peeking_eye::face_with_peeking_eye:

I run ./caddy and it worked fine

Thanks so very much :heart::heart::heart:

Any idea why Error: download failed: download failed: HTTP 400: unable to fulfill download request???

2 Likes

Not sure yet… I’d have to look at the server logs in detail, but I haven’t had a chance yet.

1 Like

No problem. Thanks so much for the help :heart: :heart: :heart:

I think we can close this one.

Our build server seems to have died due to OOM. We’re double-checking our service config.

4 Likes

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