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

Got "hostname appears in more than one automation policy, making certificate management ambiguous" after updating to v2.3.0-beta.1 #3906

Closed
Lycreal opened this issue Dec 7, 2020 · 3 comments
Assignees
Labels
bug 🐞 Something isn't working
Milestone

Comments

@Lycreal
Copy link

Lycreal commented Dec 7, 2020

1. Caddy version

v2.3.0-beta.1 h1:AcPy8kAnN6LsxBVtW6aeYBFdiRW8Sz4aMwc3tUKyefc=

2. Description

2a. What happens

I want handle certificates with caddy but I dont want 80->8443 redirects. caddy adapt fails for Caddyfile below

a.a {
  tls internal
  respond 403
}

http://b.b https://b.b:8443 {
  tls internal
  respond 404
}

But same Caddyfile works fine for caddy v2.2.1. I see similar issue #3618, but this should have been fix in v2.2.0.
So it's strange to see this happen again in v2.3.0-beta.1. I guess this is a bug introduced in v2.3.0-beta.1.

2b. Log output

$ caddy adapt
2020/12/07 10:54:13.670 INFO    using adjacent Caddyfile
adapt: hostname appears in more than one automation policy, making certificate management ambiguous: b.b

2c. Workaround(s)

a.a {
  tls internal
  respond 403
}

http://b.b {
  respond 404
}

https://b.b:8443 {
  tls internal
  respond 404
}

Below Caddyfile works for v2.3.0-beta.1 too. it's obviously abnormal because there's no large differences between the Caddyfile below and the Caddyfile on the top.

http://b.b https://b.b:8443 {
  tls internal
  respond 404
}
@Lycreal Lycreal changed the title Got "hostname appears in more than one automation policy, making certificate management ambiguous" after updated to v2.3.0-beta.1 Got "hostname appears in more than one automation policy, making certificate management ambiguous" after updating to v2.3.0-beta.1 Dec 7, 2020
@mholt
Copy link
Member

mholt commented Dec 7, 2020

Thank you for the great bug report! I appreciate that it was simplified down to the minimal required reproduce case. I was able to experience the behavior you described quite easily and have a fix coming in a bit.

@mholt mholt added this to the v2.3.0 milestone Dec 7, 2020
@mholt mholt added the bug 🐞 Something isn't working label Dec 7, 2020
@mholt mholt self-assigned this Dec 7, 2020
@mholt mholt closed this as completed in 7e71915 Dec 7, 2020
@mholt
Copy link
Member

mholt commented Dec 7, 2020

Fixed in 7e71915 - again, I really appreciate the great report and for you testing the beta!

@Lycreal
Copy link
Author

Lycreal commented Dec 8, 2020

Glad to be of help 😀

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

No branches or pull requests

2 participants