Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error when updating FrankenPHP to version 1.4.3 #1388

Closed
zpi12lmm opened this issue Feb 18, 2025 · 4 comments · Fixed by dunglas/mercure#1013, #1392 or #1393
Closed

Error when updating FrankenPHP to version 1.4.3 #1388

zpi12lmm opened this issue Feb 18, 2025 · 4 comments · Fixed by dunglas/mercure#1013, #1392 or #1393

Comments

@zpi12lmm
Copy link

Maybe it's a bug in FrankenPHP, but I don't use FrankenPHP outside of Symfony, but I tested it on the FrankenPHP version 1.4.2 in symfony-docker and it works without any problems.

Here are the problems in the log when trying to run Symfony based on this repository:

2025/02/18 18:50:25.113	INFO	using config from file	{"file": "/etc/caddy/Caddyfile"}
2025-02-18T18:50:25.113876261Z 2025/02/18 18:50:25.113	INFO	adapted config to JSON	{"adapter": "caddyfile"}
2025-02-18T18:50:25.113884011Z 2025/02/18 18:50:25.113	WARN	Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies	{"adapter": "caddyfile", "file": "/etc/caddy/Caddyfile", "line": 9}
2025-02-18T18:50:25.114437303Z 2025/02/18 18:50:25.114	INFO	admin	admin endpoint started	{"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}
2025-02-18T18:50:25.115737595Z 2025/02/18 18:50:25.114	INFO	http.auto_https	server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS	{"server_name": "srv0", "https_port": 443}
2025-02-18T18:50:25.115742303Z 2025/02/18 18:50:25.114	INFO	http.auto_https	enabling automatic HTTP->HTTPS redirects	{"server_name": "srv0"}
2025-02-18T18:50:25.115743595Z 2025/02/18 18:50:25.114	WARN	http.auto_https	server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server	{"server_name": "srv1", "http_port": 80}
2025-02-18T18:50:25.115744720Z 2025/02/18 18:50:25.114	WARN	http.handlers.mercure	Setting the transport_url or the MERCURE_TRANSPORT_URL environment variable is deprecated, use the "transport" directive instead
2025-02-18T18:50:25.115820845Z 2025/02/18 18:50:25.115	INFO	tls.cache.maintenance	started background certificate maintenance	{"cache": "0x40006d2200"}
2025-02-18T18:50:25.118772595Z panic: duplicate metrics collector registration attempted
2025-02-18T18:50:25.118775636Z 
2025-02-18T18:50:25.118776386Z goroutine 1 [running]:
2025-02-18T18:50:25.118777053Z github.com/prometheus/client_golang/prometheus.(*Registry).MustRegister(0x40006066e0, {0x4000785920?, 0x0?, 0x0?})
2025-02-18T18:50:25.118777845Z 	/root/go/pkg/mod/github.com/prometheus/client_golang@v1.20.5/prometheus/registry.go:406 +0x74
2025-02-18T18:50:25.118778636Z github.com/dunglas/mercure.NewPrometheusMetrics({0x1fe55c0?, 0x40006066e0?})
2025-02-18T18:50:25.118779386Z 	/root/go/pkg/mod/github.com/dunglas/mercure@v0.18.3/metrics.go:65 +0x2f4
2025-02-18T18:50:25.118780095Z github.com/dunglas/mercure/caddy.(*Mercure).Provision(0x40007a2d80, {{0x1fe9648, 0x4000783200}, 0x40003816b0, 0x4000229c20, {0x40002ecfc0, 0x3, 0x4}, {0x0, 0x0, ...}, ...})
2025-02-18T18:50:25.118780970Z 	/root/go/pkg/mod/github.com/dunglas/mercure/caddy@v0.18.3/mercure.go:190 +0x6c
2025-02-18T18:50:25.118828720Z github.com/caddyserver/caddy/v2.Context.LoadModuleByID({{0x1fe9648, 0x4000783200}, 0x40003816b0, 0x4000229c20, {0x40002ecfc0, 0x3, 0x4}, {0x0, 0x0, 0x0}, ...}, ...)
2025-02-18T18:50:25.118843220Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/context.go:391 +0x5fc
2025-02-18T18:50:25.118844470Z github.com/caddyserver/caddy/v2.Context.loadModuleInline({{0x1fe9648, 0x4000783200}, 0x40003816b0, 0x4000229c20, {0x40002e4000, 0x2, 0x2}, {0x0, 0x0, 0x0}, ...}, ...)
2025-02-18T18:50:25.118845345Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/context.go:441 +0x138
2025-02-18T18:50:25.118846053Z github.com/caddyserver/caddy/v2.Context.LoadModule({{0x1fe9648, 0x4000783200}, 0x40003816b0, 0x4000229c20, {0x40002e4000, 0x2, 0x2}, {0x0, 0x0, 0x0}, ...}, ...)
2025-02-18T18:50:25.118846886Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/context.go:222 +0x614
2025-02-18T18:50:25.118911511Z github.com/caddyserver/caddy/v2/modules/caddyhttp.(*Route).ProvisionHandlers(0x4000675a28, {{0x1fe9648, 0x4000783200}, 0x40003816b0, 0x4000229c20, {0x40002e4000, 0x2, 0x2}, {0x0, 0x0, ...}, ...}, ...)
2025-02-18T18:50:25.118914053Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/modules/caddyhttp/routes.go:154 +0xbc
2025-02-18T18:50:25.118914928Z github.com/caddyserver/caddy/v2/modules/caddyhttp.RouteList.ProvisionHandlers({0x4000675908, 0x5, 0x4000805d98?}, {{0x1fe9648, 0x4000783200}, 0x40003816b0, 0x4000229c20, {0x40002e4000, 0x2, 0x2}, ...}, ...)
2025-02-18T18:50:25.118915845Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/modules/caddyhttp/routes.go:212 +0x9c
2025-02-18T18:50:25.118988845Z github.com/caddyserver/caddy/v2/modules/caddyhttp.RouteList.Provision({0x4000675908, 0x5, 0x8}, {{0x1fe9648, 0x4000783200}, 0x40003816b0, 0x4000229c20, {0x40002e4000, 0x2, 0x2}, ...})
2025-02-18T18:50:25.118998345Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/modules/caddyhttp/routes.go:189 +0x88
2025-02-18T18:50:25.119154595Z github.com/caddyserver/caddy/v2/modules/caddyhttp.(*Subroute).Provision(0x40002c5f40, {{0x1fe9648, 0x4000783200}, 0x40003816b0, 0x4000229c20, {0x40002e4000, 0x2, 0x2}, {0x0, 0x0, ...}, ...})
2025-02-18T18:50:25.119159970Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/modules/caddyhttp/subroute.go:58 +0x8c
2025-02-18T18:50:25.119161386Z github.com/caddyserver/caddy/v2.Context.LoadModuleByID({{0x1fe9648, 0x4000783200}, 0x40003816b0, 0x4000229c20, {0x40002e4000, 0x2, 0x2}, {0x0, 0x0, 0x0}, ...}, ...)
2025-02-18T18:50:25.119162386Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/context.go:391 +0x5fc
2025-02-18T18:50:25.119163386Z github.com/caddyserver/caddy/v2.Context.loadModuleInline({{0x1fe9648, 0x4000783200}, 0x40003816b0, 0x4000229c20, {0x40004131c0, 0x1, 0x1}, {0x0, 0x0, 0x0}, ...}, ...)
2025-02-18T18:50:25.119164428Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/context.go:441 +0x138
2025-02-18T18:50:25.119165303Z github.com/caddyserver/caddy/v2.Context.LoadModule({{0x1fe9648, 0x4000783200}, 0x40003816b0, 0x4000229c20, {0x40004131c0, 0x1, 0x1}, {0x0, 0x0, 0x0}, ...}, ...)
2025-02-18T18:50:25.119166303Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/context.go:222 +0x614
2025-02-18T18:50:25.119241178Z github.com/caddyserver/caddy/v2/modules/caddyhttp.(*Route).ProvisionHandlers(0x4000678288, {{0x1fe9648, 0x4000783200}, 0x40003816b0, 0x4000229c20, {0x40004131c0, 0x1, 0x1}, {0x0, 0x0, ...}, ...}, ...)
2025-02-18T18:50:25.119246136Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/modules/caddyhttp/routes.go:154 +0xbc
2025-02-18T18:50:25.119449220Z github.com/caddyserver/caddy/v2/modules/caddyhttp.RouteList.ProvisionHandlers({0x4000678288, 0x3, 0x40006066e0?}, {{0x1fe9648, 0x4000783200}, 0x40003816b0, 0x4000229c20, {0x40004131c0, 0x1, 0x1}, ...}, ...)
2025-02-18T18:50:25.119453678Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/modules/caddyhttp/routes.go:212 +0x9c
2025-02-18T18:50:25.119519261Z github.com/caddyserver/caddy/v2/modules/caddyhttp.(*App).Provision(0x40006a0680, {{0x1fe9648, 0x4000783200}, 0x40003816b0, 0x4000229c20, {0x40004131c0, 0x1, 0x1}, {0x0, 0x0, ...}, ...})
2025-02-18T18:50:25.119522220Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/modules/caddyhttp/app.go:367 +0xcdc
2025-02-18T18:50:25.119523261Z github.com/caddyserver/caddy/v2.Context.LoadModuleByID({{0x1fe9680, 0x4000606730}, 0x40003816b0, 0x4000229c20, {0x40004131c0, 0x1, 0x1}, {0x0, 0x0, 0x0}, ...}, ...)
2025-02-18T18:50:25.119524303Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/context.go:391 +0x5fc
2025-02-18T18:50:25.119648470Z github.com/caddyserver/caddy/v2.Context.App({{0x1fe9680, 0x4000606730}, 0x40003816b0, 0x4000229c20, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, ...}, ...)
2025-02-18T18:50:25.120594011Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/context.go:467 +0x14c
2025-02-18T18:50:25.120599261Z github.com/caddyserver/caddy/v2.provisionContext.func3(...)
2025-02-18T18:50:25.120600303Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/caddy.go:545
2025-02-18T18:50:25.120601220Z github.com/caddyserver/caddy/v2.provisionContext(0x0?, 0x1)
2025-02-18T18:50:25.120602095Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/caddy.go:550 +0x5d0
2025-02-18T18:50:25.120602970Z github.com/caddyserver/caddy/v2.run(0x4000698a80?, 0x1)
2025-02-18T18:50:25.120603845Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/caddy.go:400 +0x40
2025-02-18T18:50:25.120604720Z github.com/caddyserver/caddy/v2.unsyncedDecodeAndRun({0x4000698000, 0xa05, 0xa80}, 0x1)
2025-02-18T18:50:25.120605636Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/caddy.go:343 +0xe4
2025-02-18T18:50:25.120606553Z github.com/caddyserver/caddy/v2.changeConfig({0x1abf6d2, 0x4}, {0x1ac6807, 0x7}, {0x4000223500, 0xa05, 0xa80}, {0x0, 0x0}, 0x1)
2025-02-18T18:50:25.120607553Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/caddy.go:234 +0x5b8
2025-02-18T18:50:25.120608428Z github.com/caddyserver/caddy/v2.Load({0x4000223500, 0xa05, 0xa80}, 0x1)
2025-02-18T18:50:25.120609261Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/caddy.go:133 +0x194
2025-02-18T18:50:25.120610136Z github.com/caddyserver/caddy/v2/cmd.cmdRun({0x0?})
2025-02-18T18:50:25.120610928Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/cmd/commandfuncs.go:235 +0x5f8
2025-02-18T18:50:25.120611970Z github.com/caddyserver/caddy/v2/cmd.init.1.func2.WrapCommandFuncForCobra.1(0x400030b808, {0x1abf74a?, 0x4?, 0x1abf702?})
2025-02-18T18:50:25.120615845Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/cmd/cobra.go:141 +0x34
2025-02-18T18:50:25.120616720Z github.com/spf13/cobra.(*Command).execute(0x400030b808, {0x4000307e90, 0x3, 0x3})
2025-02-18T18:50:25.120617553Z 	/root/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1015 +0x828
2025-02-18T18:50:25.120618303Z github.com/spf13/cobra.(*Command).ExecuteC(0x400030b208)
2025-02-18T18:50:25.120619053Z 	/root/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1148 +0x350
2025-02-18T18:50:25.120619803Z github.com/spf13/cobra.(*Command).Execute(...)
2025-02-18T18:50:25.120620553Z 	/root/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1071
2025-02-18T18:50:25.120621345Z github.com/caddyserver/caddy/v2/cmd.Main()
2025-02-18T18:50:25.120622095Z 	/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.9.1/cmd/main.go:75 +0x184
2025-02-18T18:50:25.120622928Z main.main()
2025-02-18T18:50:25.120623595Z 	/go/src/app/caddy/frankenphp/main.go:15 +0x1c
@dunglas dunglas transferred this issue from dunglas/symfony-docker Feb 18, 2025
@dunglas
Copy link
Owner

dunglas commented Feb 18, 2025

This looks similar to dunglas/mercure#1012 and has likely been introduced by #1366.

I'll try to investigate tomorrow. In the meantime, you should downgrade to 1.4.2.

@IndraGunawan, do you have an idea of what's going on?

@conradfr
Copy link

conradfr commented Feb 19, 2025

How do you downgrade when using dunglas/symfony-docker ?

edit for people it might help:
In Dockerfile, change:
FROM dunglas/frankenphp:1-php8.4 AS frankenphp_upstream
to
FROM dunglas/frankenphp:1.4.2-php8.4 AS frankenphp_upstream

@zpi12lmm
Copy link
Author

@conradfr that's right, in the Dockerfile I replaced this

FROM dunglas/frankenphp:1-php8.3 AS frankenphp_upstream

with this

FROM dunglas/frankenphp:1.4.2-php8.3 AS frankenphp_upstream

@sainple
Copy link

sainple commented Feb 19, 2025

I also had to update the Mercure container in my stack within my docker-compose file:

I replaced this

mercure:
  image: dunglas/mercure

with this

mercure:
  image: dunglas/mercure:v0.14.2

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
4 participants