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

Constant reloading of configfile in 2.7.6 #6129

Closed
mzzsfy opened this issue Feb 27, 2024 · 14 comments
Closed

Constant reloading of configfile in 2.7.6 #6129

mzzsfy opened this issue Feb 27, 2024 · 14 comments
Labels
duplicate 🖇️ This issue or pull request already exists

Comments

@mzzsfy
Copy link

mzzsfy commented Feb 27, 2024

see #5789 (comment) #5860

use caddyfile,I observed that the raw skip_hosts field was not sorted causing the configuration file to be reloaded

@francislavoie
Copy link
Member

I'm not sure which field you mean. Please share example config.

PRs welcome if you know what must be changed.

@mholt
Copy link
Member

mholt commented Feb 27, 2024

When I'm at my computer I'll look to see if we're sorting that field before serializing

@mzzsfy
Copy link
Author

mzzsfy commented Feb 27, 2024

I saw this #5989 #5990 and I don’t know why I still have this problem.
I am using the self-compiled version https://github.com/mzzsfy/Dockerfile/blob/main/caddy/Dockerfile. The compilation command is as follows

xcaddy build   --with github.com/caddy-dns/alidns

image

@mzzsfy
Copy link
Author

mzzsfy commented Feb 27, 2024

The disordered string is

"skip_hosts": [
"aaaa.dev.xxx.com",
"aaaa.uat.xxx.com",
"null.xxx.com"
],

change into

"skip_hosts": [
"aaaa.uat.xxx.com",
"aaaa.dev.xxx.com",
"null.xxx.com"
],

@francislavoie
Copy link
Member

Ah, #5990 fixes this and no, isn't in 2.7.6. You can build from master (change your command to xcaddy build master --with ...) to test it out.

@francislavoie francislavoie closed this as not planned Won't fix, can't repro, duplicate, stale Feb 27, 2024
@francislavoie francislavoie added the duplicate 🖇️ This issue or pull request already exists label Feb 27, 2024
@mholt
Copy link
Member

mholt commented Feb 27, 2024

Thanks, you beat me to it 😂

@mzzsfy
Copy link
Author

mzzsfy commented Feb 27, 2024

I'm sorry, I only saw #5789.

@mholt
Copy link
Member

mholt commented Feb 27, 2024

Kinda my bad -- we'll try to cut a new release in March :)

@Lizzardd
Copy link

Lizzardd commented Mar 22, 2024

Is this issue merged into the latest build? v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=
I'm having the same issue, without changing any config its generating 3 different json files as can be seen from the md5
223131b43ff4f2fa2cf76163fd4ef879 05-41-1711086118.json
3ab44d8339e812917253e52be0ed25d2 05-42-1711086123.json
1af5f131ed39931ed0831691119f2bb4 05-42-1711086124.json

A diff shows it seems to be switching the order of our many domains, one file will have www first and the other 2nd, the 3rd file is a different domain that changes
I get 4 different md5s for the json file

@francislavoie
Copy link
Member

francislavoie commented Mar 22, 2024

Please try from the master branch. 2.7.6 is many months behind. We plan to release 2.8.0 soon.

@Lizzardd
Copy link

I downloaded directly from caddy website, I assume that is from master?

@Lizzardd
Copy link

I've just tested a build off master and its still doing the same

@francislavoie
Copy link
Member

I downloaded directly from caddy website, I assume that is from master?

No, that gets you the latest release, i.e. v2.7.6. You can build from master with xcaddy build master (see https://caddyserver.com/docs/build) or by downloading a recent CI artifact https://github.com/caddyserver/caddy/actions/runs/8384573027 (Artifacts at the botttom).

If you're still having a problem, please open a new issue and share your full config and the diff of the JSON that differs between runs.

@Lizzardd
Copy link

Tested off a master build and it seems ok now, will wait for a new 2.7.7 cut before deploying to our prod server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate 🖇️ This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants