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

Unable to start container symfony-docker container since a fresh build #743

Closed
Alexandre-T opened this issue Feb 19, 2025 · 5 comments
Closed

Comments

@Alexandre-T
Copy link

Alexandre-T commented Feb 19, 2025

Hi everyone,

I'm having trouble with my Docker container after after a fresh build.

My application was created from this template 5 days ago. It worked perfectly. Thanks!

Yesterday, I installed PANTHER to start test. I rebuild my image and start a fresh container. Build was ok, but container was unable to run. After a lot of tries, I used a previous version of my project and it failed too.

Desesperated 😉​, I cloned again this project and try again.
I got the same error.
I tried to "prune" my docker environment. I deleted all my containers, volumes, images, build. But, I still get this error.

Here is the end of the logs.

[...]
php-1  | Using version ^0.2.0 for runtime/frankenphp-symfony
php-1  | Symfony 7.2.3 (env: dev, debug: true)
php-1  | PHP app ready!
php-1  | frankenphp run --config /etc/caddy/Caddyfile --watch
php-1  | 2025/02/19 08:42:09.138	INFO	using config from file	{"file": "/etc/caddy/Caddyfile"}
php-1  | 2025/02/19 08:42:09.138	INFO	adapted config to JSON	{"adapter": "caddyfile"}
php-1  | 2025/02/19 08:42:09.138	WARN	Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies	{"adapter": "caddyfile", "file": "/etc/caddy/Caddyfile", "line": 9}
php-1  | 2025/02/19 08:42:09.139	INFO	admin	admin endpoint started	{"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}
php-1  | 2025/02/19 08:42:09.139	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}
php-1  | 2025/02/19 08:42:09.139	INFO	http.auto_https	enabling automatic HTTP->HTTPS redirects	{"server_name": "srv0"}
php-1  | 2025/02/19 08:42:09.139	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}
php-1  | 2025/02/19 08:42:09.139	INFO	tls.cache.maintenance	started background certificate maintenance	{"cache": "0x40005a4b00"}
php-1  | 2025/02/19 08:42:09.142	WARN	http.handlers.mercure	Setting the transport_url or the MERCURE_TRANSPORT_URL environment variable is deprecated, use the "transport" directive instead
php-1  | panic: duplicate metrics collector registration attempted
php-1  | 
php-1  | goroutine 1 [running]:
php-1  | github.com/prometheus/client_golang/prometheus.(*Registry).MustRegister(0x40002e4cd0, {0x4000882f10?, 0x0?, 0x0?})
php-1  | 	/root/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:406 +0x74
php-1  | github.com/dunglas/mercure.NewPrometheusMetrics({0x1fe55c0?, 0x40002e4cd0?})
php-1  | 	/root/go/pkg/mod/github.com/dunglas/[email protected]/metrics.go:65 +0x2f4
php-1  | github.com/dunglas/mercure/caddy.(*Mercure).Provision(0x4000894120, {{0x1fe9648, 0x40006fa570}, 0x40003b4930, 0x4000330c00, {0x40002f5200, 0x3, 0x4}, {0x0, 0x0, ...}, ...})
php-1  | 	/root/go/pkg/mod/github.com/dunglas/mercure/[email protected]/mercure.go:190 +0x6c
php-1  | github.com/caddyserver/caddy/v2.Context.LoadModuleByID({{0x1fe9648, 0x40006fa570}, 0x40003b4930, 0x4000330c00, {0x40002f5200, 0x3, 0x4}, {0x0, 0x0, 0x0}, ...}, ...)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/context.go:391 +0x5fc
php-1  | github.com/caddyserver/caddy/v2.Context.loadModuleInline({{0x1fe9648, 0x40006fa570}, 0x40003b4930, 0x4000330c00, {0x4000358f40, 0x2, 0x2}, {0x0, 0x0, 0x0}, ...}, ...)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/context.go:441 +0x138
php-1  | github.com/caddyserver/caddy/v2.Context.LoadModule({{0x1fe9648, 0x40006fa570}, 0x40003b4930, 0x4000330c00, {0x4000358f40, 0x2, 0x2}, {0x0, 0x0, 0x0}, ...}, ...)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/context.go:222 +0x614
php-1  | github.com/caddyserver/caddy/v2/modules/caddyhttp.(*Route).ProvisionHandlers(0x4000693528, {{0x1fe9648, 0x40006fa570}, 0x40003b4930, 0x4000330c00, {0x4000358f40, 0x2, 0x2}, {0x0, 0x0, ...}, ...}, ...)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/routes.go:154 +0xbc
php-1  | github.com/caddyserver/caddy/v2/modules/caddyhttp.RouteList.ProvisionHandlers({0x4000693408, 0x5, 0x4000805d98?}, {{0x1fe9648, 0x40006fa570}, 0x40003b4930, 0x4000330c00, {0x4000358f40, 0x2, 0x2}, ...}, ...)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/routes.go:212 +0x9c
php-1  | github.com/caddyserver/caddy/v2/modules/caddyhttp.RouteList.Provision({0x4000693408, 0x5, 0x8}, {{0x1fe9648, 0x40006fa570}, 0x40003b4930, 0x4000330c00, {0x4000358f40, 0x2, 0x2}, ...})
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/routes.go:189 +0x88
php-1  | github.com/caddyserver/caddy/v2/modules/caddyhttp.(*Subroute).Provision(0x4000358ee0, {{0x1fe9648, 0x40006fa570}, 0x40003b4930, 0x4000330c00, {0x4000358f40, 0x2, 0x2}, {0x0, 0x0, ...}, ...})
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/subroute.go:58 +0x8c
php-1  | github.com/caddyserver/caddy/v2.Context.LoadModuleByID({{0x1fe9648, 0x40006fa570}, 0x40003b4930, 0x4000330c00, {0x4000358f40, 0x2, 0x2}, {0x0, 0x0, 0x0}, ...}, ...)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/context.go:391 +0x5fc
php-1  | github.com/caddyserver/caddy/v2.Context.loadModuleInline({{0x1fe9648, 0x40006fa570}, 0x40003b4930, 0x4000330c00, {0x40003fbf70, 0x1, 0x1}, {0x0, 0x0, 0x0}, ...}, ...)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/context.go:441 +0x138
php-1  | github.com/caddyserver/caddy/v2.Context.LoadModule({{0x1fe9648, 0x40006fa570}, 0x40003b4930, 0x4000330c00, {0x40003fbf70, 0x1, 0x1}, {0x0, 0x0, 0x0}, ...}, ...)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/context.go:222 +0x614
php-1  | github.com/caddyserver/caddy/v2/modules/caddyhttp.(*Route).ProvisionHandlers(0x400052d908, {{0x1fe9648, 0x40006fa570}, 0x40003b4930, 0x4000330c00, {0x40003fbf70, 0x1, 0x1}, {0x0, 0x0, ...}, ...}, ...)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/routes.go:154 +0xbc
php-1  | github.com/caddyserver/caddy/v2/modules/caddyhttp.RouteList.ProvisionHandlers({0x400052d908, 0x3, 0x40002e4cd0?}, {{0x1fe9648, 0x40006fa570}, 0x40003b4930, 0x4000330c00, {0x40003fbf70, 0x1, 0x1}, ...}, ...)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/routes.go:212 +0x9c
php-1  | github.com/caddyserver/caddy/v2/modules/caddyhttp.(*App).Provision(0x40005ac680, {{0x1fe9648, 0x40006fa570}, 0x40003b4930, 0x4000330c00, {0x40003fbf70, 0x1, 0x1}, {0x0, 0x0, ...}, ...})
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/app.go:367 +0xcdc
php-1  | github.com/caddyserver/caddy/v2.Context.LoadModuleByID({{0x1fe9680, 0x40002e4d20}, 0x40003b4930, 0x4000330c00, {0x40003fbf70, 0x1, 0x1}, {0x0, 0x0, 0x0}, ...}, ...)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/context.go:391 +0x5fc
php-1  | github.com/caddyserver/caddy/v2.Context.App({{0x1fe9680, 0x40002e4d20}, 0x40003b4930, 0x4000330c00, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, ...}, ...)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/context.go:467 +0x14c
php-1  | github.com/caddyserver/caddy/v2.provisionContext.func3(...)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/caddy.go:545
php-1  | github.com/caddyserver/caddy/v2.provisionContext(0x0?, 0x1)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/caddy.go:550 +0x5d0
php-1  | github.com/caddyserver/caddy/v2.run(0x40005a6a80?, 0x1)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/caddy.go:400 +0x40
php-1  | github.com/caddyserver/caddy/v2.unsyncedDecodeAndRun({0x40005a6000, 0xa05, 0xa80}, 0x1)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/caddy.go:343 +0xe4
php-1  | github.com/caddyserver/caddy/v2.changeConfig({0x1abf6d2, 0x4}, {0x1ac6807, 0x7}, {0x4000223500, 0xa05, 0xa80}, {0x0, 0x0}, 0x1)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/caddy.go:234 +0x5b8
php-1  | github.com/caddyserver/caddy/v2.Load({0x4000223500, 0xa05, 0xa80}, 0x1)
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/caddy.go:133 +0x194
php-1  | github.com/caddyserver/caddy/v2/cmd.cmdRun({0x0?})
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/cmd/commandfuncs.go:235 +0x5f8
php-1  | github.com/caddyserver/caddy/v2/cmd.init.1.func2.WrapCommandFuncForCobra.1(0x4000149808, {0x1abf74a?, 0x4?, 0x1abf702?})
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/cmd/cobra.go:141 +0x34
php-1  | github.com/spf13/cobra.(*Command).execute(0x4000149808, {0x40002fdef0, 0x3, 0x3})
php-1  | 	/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:1015 +0x828
php-1  | github.com/spf13/cobra.(*Command).ExecuteC(0x4000149208)
php-1  | 	/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:1148 +0x350
php-1  | github.com/spf13/cobra.(*Command).Execute(...)
php-1  | 	/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:1071
php-1  | github.com/caddyserver/caddy/v2/cmd.Main()
php-1  | 	/root/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/cmd/main.go:75 +0x184
php-1  | main.main()
php-1  | 	/go/src/app/caddy/frankenphp/main.go:15 +0x1c
php-1 exited with code 0

I'm working on a MacBook Pro 16, Docker version 27.5.1.

@Zankierka
Copy link

It seems like yesterday Franken did realese update:
https://github.com/dunglas/frankenphp/releases/tag/v1.4.3

Probably using previous version will solve it. I'm checking that solution on my side as our projects also refuses to build :)

@Zankierka
Copy link

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

To:
FROM dunglas/frankenphp:1-php8.3.16 AS frankenphp_upstream

Inside of
https://github.com/dunglas/symfony-docker/blob/main/Dockerfile
On line 4 solves issue for me @Alexandre-T

Probably can be kept as temporary fix.

@Alexandre-T
Copy link
Author

It works on my project!
I tried and it's working on a fresh install of this repository, too.

You made my day, I was searching on the caddyfile. I was miles away from finding this solution.

@conradfr
Copy link

conradfr commented Feb 19, 2025

See here as well dunglas/frankenphp#1388

change dunglas/frankenphp:1-php to dunglas/frankenphp:1.4.2-php

@maxhelias
Copy link
Collaborator

Thanks for the report, it's fixed in : dunglas/frankenphp#1393. The next release of franken will fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants