Skip to content
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

Error: ambiguous config file format; please specify adapter (use --adapter) since 2.8.2 #6363

Closed
foux opened this issue Jun 2, 2024 · 10 comments · Fixed by #6362
Closed
Labels
bug 🐞 Something isn't working
Milestone

Comments

@foux
Copy link

foux commented Jun 2, 2024

Hello,
Since 2.8.2 my Caddy doesn't starts with the error Error: ambiguous config file format; please specify adapter (use --adapter)

I get the meaning of the error and why I get it (Caddy couldn't detect the language without ambiguities). What I'm not getting is how I can pass the Adapter option.
I'm running Caddy on debian through systemd, and is there a way to pass this adatper without having to override the systemd unit file (for exemple an entry in the Caddyfile itself) ?

Thanks for your help. Here is my current very simple Caddyfile :

my.fdn.site {
        reverse_proxy 127.0.0.1:8080
}
@encbladexp
Copy link

encbladexp commented Jun 2, 2024

I have the same issue, but creating a system override file "fixed" it as a workaround for now:

# /etc/systemd/system/caddy.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/bin/caddy run --adapter caddyfile --environ --config /etc/caddy/Caddyfile
ExecReload=
ExecReload=/usr/bin/caddy reload --adapter caddyfile --config /etc/caddy/Caddyfile --force

@foux
Copy link
Author

foux commented Jun 2, 2024

I though about it, but I would prefer not creating an override, because it would also override any future way of starting Caddy. I'll go that way if there's no alternative, but I'd like to be sure there isn't one before ;)

@francislavoie
Copy link
Member

This will be fixed by #6362

@foux
Copy link
Author

foux commented Jun 2, 2024

This will be fixed by #6362

Thanks! I'll do the override in the meantime. Keeping the issue open for others till it's fixed

@33b5e5
Copy link

33b5e5 commented Jun 2, 2024

This just hit me on Ubuntu 24.04 LTS. I noticed Caddy was no longer running after the (automated) update of the pkg.

@crazyuploader
Copy link

Affected here as well, Caddy stopped starting suddenly after package updates

@TillW99
Copy link

TillW99 commented Jun 2, 2024

Same Problem here, dont want to override so ich will stay at 2.7.6 - hope it get fixed as soon as possible

@xxf185
Copy link

xxf185 commented Jun 2, 2024

2.8.2 Same startup failure

@mohammed90
Copy link
Member

Those of you experiencing it, you can test the fix by downloading the CI artifacts from here: https://github.com/caddyserver/caddy/actions/runs/9337830397

@mholt mholt added the bug 🐞 Something isn't working label Jun 2, 2024
@mholt mholt added this to the v2.8.3 milestone Jun 2, 2024
@bsinou
Copy link

bsinou commented Jun 3, 2024

I observed the same yesterday on Debian 12, after simple apt update / upgrade.
I could workaround using the tip from @encbladexp (thx!)

This morning,"apt upgrade" brought the 2.8.4:

  • could remove the workaround
  • everything is working flawlessly again.

Thanks for the quick fix (and the overall nice work)!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants