ddev / ddev

Docker-based local PHP+Node.js web development environments
https://ddev.com
Apache License 2.0
2.81k stars 612 forks source link

Web container does not start #5692

Closed apometto closed 10 months ago

apometto commented 10 months ago

Is there an existing issue for this?

Output of ddev debug test

Expand `ddev debug test` diagnostic information attilio@thinkpad-di-attilio:/var/www/optiflow$ ddev debug test Running bash [-c /tmp/test_ddev.sh] ======= Existing project config ========= These config files were loaded for project optiflow: [/var/www/optiflow/.ddev/config.yaml] name: optiflow type: php docroot: public php_version: 8.1 webserver_type: apache-fpm webimage: ddev/ddev-webserver:v1.22.6 additional_hostnames: [api.optiflow] additional_fqdns: [] database: {mariadb 10.6} project_tld: ddev.site use_dns_when_possible: true composer_version: 2 nodejs_version: 18 default_container_timeout: 120 ======= Creating dummy project named tryddevproject-9199 in ../tryddevproject-9199 ========= OS Information: Linux thinkpad-di-attilio 6.2.0-39-generic #40~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 16 10:53:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux User information: uid=1000(attilio) gid=1000(attilio) groups=1000(attilio),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),122(lpadmin),134(lxd),135(sambashare),999(docker) DDEV version: Downloading https://github.com/docker/compose/releases/download/v2.23.3/docker-compose-linux-x86_64 ... docker-compose 56.93 MiB / 56.93 MiB [=================================================================================================================================================================================================================================] 100.00% 5s Download complete. ITEM VALUE DDEV version v1.22.6 architecture amd64 db ddev/ddev-dbserver-mariadb-10.4:v1.22.6 ddev-ssh-agent ddev/ddev-ssh-agent:v1.22.6 docker 24.0.7 docker-compose v2.23.3 docker-platform linux-docker mutagen 0.17.2 os linux router ddev/ddev-traefik-router:v1.22.6 web ddev/ddev-webserver:v1.22.6 PROXY settings: HTTP_PROXY='' HTTPS_PROXY='' http_proxy='' NO_PROXY='' ======= DDEV global info ========= Global configuration: instrumentation-opt-in=false omit-containers=[] performance-mode=none router-bind-all-interfaces=false internet-detection-timeout-ms=3000 disable-http2=false use-letsencrypt=false letsencrypt-email= table-style=default simple-formatting=false use-hardened-images=false fail-on-hook-fail=false required-docker-compose-version=v2.23.3 use-docker-compose-from-path=false project-tld= xdebug-ide-location= no-bind-mounts=false router=traefik wsl2-no-windows-hosts-mgt=false router-http-port=80 router-https-port=443 mailpit-http-port=8025 mailpit-https-port=8026 traefik-monitor-port=10999 ======= DOCKER info ========= docker location: -rwxr-xr-x 1 root root 35939040 ott 26 11:07 /usr/bin/docker docker version: Client: Docker Engine - Community Version: 24.0.7 API version: 1.43 Go version: go1.20.10 Git commit: afdd53b Built: Thu Oct 26 09:07:41 2023 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 24.0.7 API version: 1.43 (minimum version 1.12) Go version: go1.20.10 Git commit: 311b9ff Built: Thu Oct 26 09:07:41 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.26 GitCommit: 3dd1e886e55dd695541fdcd67420c2888645a495 runc: Version: 1.1.10 GitCommit: v1.1.10-0-g18a0cb0 docker-init: Version: 0.19.0 GitCommit: de40ad0 DOCKER_DEFAULT_PLATFORM=notset ======= Mutagen Info ========= ======= Docker Info ========= Docker platform: linux-docker Using Docker context: default (unix:///var/run/docker.sock) docker-compose: v2.23.3 Using DOCKER_HOST=unix:///var/run/docker.sock Docker version: 24.0.7 v1.22.6: Pulling from ddev/ddev-webserver 3f16710d2bb2: Pull complete Digest: sha256:72f73a814364a0ecb41bc10632b99e32a61afe53379f7a2d9269ab599079e25d Status: Downloaded newer image for ddev/ddev-webserver:v1.22.6 docker.io/ddev/ddev-webserver:v1.22.6 Able to run simple container that mounts a volume. Able to use internet inside container. Docker disk space: Filesystem Size Used Available Use% Mounted on overlay 98.2G 18.2G 80.1G 18% / The ddev-ssh-agent container has been removed. When you start it again you will have to use 'ddev auth ssh' to provide key authentication again. Existing docker containers: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 79da3b1d02b3 hello-world "/hello" 14 minutes ago Exited (0) 14 minutes ago vibrant_carver Network ddev_default created TIP OF THE DAY Join the DDEV Discord to support others and get support: https://discord.gg/hCZFfAMc5k Starting tryddevproject-9199... Network ddev-tryddevproject-9199_default created v1.22.6: Pulling from ddev/ddev-traefik-router c926b61bad3b: Pull complete d9a399aa5355: Pull complete 3106c23e2970: Pull complete cc067951b11f: Pull complete 229a23ad3576: Pull complete 56038fe33d4e: Pull complete 1f7e56afb513: Pull complete 20374bd36958: Pull complete Digest: sha256:a69d135efed3c9e23534f3e446ca116afbea4210fc9ba39570301d6660375ee1 Status: Downloaded newer image for ddev/ddev-traefik-router:v1.22.6 docker.io/ddev/ddev-traefik-router:v1.22.6 v1.22.6: Pulling from ddev/ddev-ssh-agent b7f91549542c: Pull complete 5b95b783e176: Pull complete 86181c59da82: Pull complete 4f4fb700ef54: Pull complete decae2353f03: Pull complete 339140ba5d56: Pull complete Digest: sha256:043663118e8f0af8e6b44720f2d0696420a139895b7fd728e6139865d3ef2435 Status: Downloaded newer image for ddev/ddev-ssh-agent:v1.22.6 docker.io/ddev/ddev-ssh-agent:v1.22.6 Volume "ddev-ssh-agent_dot_ssh" Created Volume "ddev-ssh-agent_socket_dir" Created Container ddev-ssh-agent Created Container ddev-ssh-agent Started ssh-agent container is running: If you want to add authentication to the ssh-agent container, run 'ddev auth ssh' to enable your keys. v1.22.6: Pulling from ddev/ddev-dbserver-mariadb-10.4 30ecab32a3b6: Pull complete 1e2dae117ed4: Pull complete f547b9a3fcc9: Pull complete 02774723d90d: Pull complete cb0fb8594cec: Pull complete 038df083fc12: Pull complete b0923a54081a: Pull complete fd988541127f: Pull complete 20f7ad89b685: Pull complete 4f4fb700ef54: Pull complete a4f0cba49d74: Pull complete 7b2b2676bd16: Pull complete c01c5bfc0602: Pull complete 2ae1dd6b661a: Pull complete 7056525e6828: Pull complete 4125d2112f6e: Pull complete fc363150db24: Pull complete 497204727fe6: Pull complete cedc150ce961: Pull complete abfb4c334518: Pull complete 3af3a93a3ff4: Pull complete 605bd7e52fac: Pull complete 65da2090fa2c: Pull complete 71cea3256daa: Pull complete 72b1d98c8d55: Pull complete Digest: sha256:80d4b3633dcd43a0051214b6c09b25af119e84aed14638234501d9c6ad287875 Status: Downloaded newer image for ddev/ddev-dbserver-mariadb-10.4:v1.22.6 docker.io/ddev/ddev-dbserver-mariadb-10.4:v1.22.6 Building project images... .Project images built in 5s. Container ddev-tryddevproject-9199-web Created Container ddev-tryddevproject-9199-db Created Container ddev-tryddevproject-9199-web Started Container ddev-tryddevproject-9199-db Started Waiting for web/db containers to become ready: [web db] Failed waiting for web/db containers to become ready: web container failed: log=, err=health check timed out after 2m0s: labels map[com.ddev.site-name:tryddevproject-9199 com.docker.compose.service:web] timed out without becoming healthy, status= Starting ddev-router if necessary... Container ddev-router Created Container ddev-router Started Waiting for additional project containers to become ready... Failed to start tryddevproject-9199: container(s) failed to become healthy before their configured timeout or in 120 seconds. This might be a problem with the healthcheck and not a functional problem. (health check timed out: labels map[com.ddev.site-name:tryddevproject-9199] timed out without becoming healthy, status=, detail= ddev-tryddevproject-9199-web:starting - more info with `docker inspect --format "{{json .State.Health }}" ddev-tryddevproject-9199-web` ) ┌─────────────────────┬─────────────┬──────────────────────────────┬────────────────────────┬─────────┐ │ NAME │ STATUS │ LOCATION │ URL │ TYPE │ ├─────────────────────┼─────────────┼──────────────────────────────┼────────────────────────┼─────────┤ │ tryddevproject-9199 │ db: running │ /var/www/tryddevproject-9199 │ │ php │ │ │ │ │ │ │ ├─────────────────────┼─────────────┼──────────────────────────────┼────────────────────────┼─────────┤ │ Router │ healthy │ ~/.ddev │ http://127.0.0.1:10999 │ traefik │ └─────────────────────┴─────────────┴──────────────────────────────┴────────────────────────┴─────────┘ ┌──────────────────────────────────┐ │ Project: tryddevproject-9199 /va │ │ r/www/tryddevproject-9199 https: │ │ //tryddevproject-9199.ddev.site │ │ Docker platform: linux-docker │ │ Router: traefik │ ├─────────┬──────┬──────────┬──────┤ │ SERVICE │ STAT │ URL/PORT │ INFO │ ├─────────┼──────┼──────────┼──────┤ └─────────┴──────┴──────────┴──────┘ ============= ddev-tryddevproject-9199-web healtcheck run ========= + for f in /etc/bashrc/*.bashrc + source /etc/bashrc/commandline-addons.bashrc ++ export 'PATH=~/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/www/html/vendor/bin:/var/www/html/bin:/var/www/html/vendor/bin' ++ PATH='~/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/www/html/vendor/bin:/var/www/html/bin:/var/www/html/vendor/bin' ++ '[' -s /home/attilio/.nvm/nvm.sh ']' ++ source /home/attilio/.nvm/nvm.sh +++ NVM_SCRIPT_SOURCE=']' +++ '[' -z '' ']' +++ export NVM_CD_FLAGS= +++ NVM_CD_FLAGS= +++ nvm_is_zsh +++ '[' -n '' ']' +++ '[' -z /home/attilio/.nvm ']' +++ case $NVM_DIR in +++ unset NVM_SCRIPT_SOURCE +++ nvm_process_parameters +++ local NVM_AUTO_MODE +++ NVM_AUTO_MODE=use +++ '[' 0 -ne 0 ']' +++ nvm_auto use +++ local NVM_MODE +++ NVM_MODE=use +++ local VERSION +++ local NVM_CURRENT +++ '[' _use = _install ']' +++ '[' _use = _use ']' ++++ nvm_ls_current ++++ local NVM_LS_CURRENT_NODE_PATH +++++ command which node ++++ NVM_LS_CURRENT_NODE_PATH=/usr/bin/node +++++ nvm_version_dir iojs +++++ local NVM_WHICH_DIR +++++ NVM_WHICH_DIR=iojs +++++ '[' -z iojs ']' +++++ '[' iojs = new ']' +++++ '[' _iojs = _iojs ']' +++++ nvm_echo /home/attilio/.nvm/versions/io.js +++++ command printf '%s\n' /home/attilio/.nvm/versions/io.js ++++ nvm_tree_contains_path /home/attilio/.nvm/versions/io.js /usr/bin/node ++++ local tree ++++ tree=/home/attilio/.nvm/versions/io.js ++++ local node_path ++++ node_path=/usr/bin/node ++++ '[' @/home/attilio/.nvm/versions/io.js@ = @@ ']' ++++ '[' @/usr/bin/node@ = @@ ']' ++++ local previous_pathdir ++++ previous_pathdir=/usr/bin/node ++++ local pathdir +++++ dirname /usr/bin/node ++++ pathdir=/usr/bin ++++ '[' /usr/bin '!=' '' ']' ++++ '[' /usr/bin '!=' . ']' ++++ '[' /usr/bin '!=' / ']' ++++ '[' /usr/bin '!=' /home/attilio/.nvm/versions/io.js ']' ++++ '[' /usr/bin '!=' /usr/bin/node ']' ++++ previous_pathdir=/usr/bin +++++ dirname /usr/bin ++++ pathdir=/usr ++++ '[' /usr '!=' '' ']' ++++ '[' /usr '!=' . ']' ++++ '[' /usr '!=' / ']' ++++ '[' /usr '!=' /home/attilio/.nvm/versions/io.js ']' ++++ '[' /usr '!=' /usr/bin ']' ++++ previous_pathdir=/usr +++++ dirname /usr ++++ pathdir=/ ++++ '[' / '!=' '' ']' ++++ '[' / '!=' . ']' ++++ '[' / '!=' / ']' ++++ '[' / = /home/attilio/.nvm/versions/io.js ']' ++++ nvm_tree_contains_path /home/attilio/.nvm /usr/bin/node ++++ local tree ++++ tree=/home/attilio/.nvm ++++ local node_path ++++ node_path=/usr/bin/node ++++ '[' @/home/attilio/.nvm@ = @@ ']' ++++ '[' @/usr/bin/node@ = @@ ']' ++++ local previous_pathdir ++++ previous_pathdir=/usr/bin/node ++++ local pathdir +++++ dirname /usr/bin/node ++++ pathdir=/usr/bin ++++ '[' /usr/bin '!=' '' ']' ++++ '[' /usr/bin '!=' . ']' ++++ '[' /usr/bin '!=' / ']' ++++ '[' /usr/bin '!=' /home/attilio/.nvm ']' ++++ '[' /usr/bin '!=' /usr/bin/node ']' ++++ previous_pathdir=/usr/bin +++++ dirname /usr/bin ++++ pathdir=/usr ++++ '[' /usr '!=' '' ']' ++++ '[' /usr '!=' . ']' ++++ '[' /usr '!=' / ']' ++++ '[' /usr '!=' /home/attilio/.nvm ']' ++++ '[' /usr '!=' /usr/bin ']' ++++ previous_pathdir=/usr +++++ dirname /usr ++++ pathdir=/ ++++ '[' / '!=' '' ']' ++++ '[' / '!=' . ']' ++++ '[' / '!=' / ']' ++++ '[' / = /home/attilio/.nvm ']' ++++ nvm_echo system ++++ command printf '%s\n' system +++ NVM_CURRENT=system +++ '[' _system = _none ']' +++ '[' _system = _system ']' ++++ nvm_resolve_local_alias default ++++ nvm_echo ++++ command printf '%s\n' '' +++ VERSION= +++ '[' -n '' ']' +++ nvm_rc_version ++ '[' -s /home/attilio/.nvm/bash_completion ']' ++ source /home/attilio/.nvm/bash_completion +++ command -v nvm +++ [[ -n '' ]] +++ complete -o default -F __nvm nvm ++ '[' php = python ']' ++ '[' php = django4 ']' + unset f ++ ls '/home/attilio/.bashrc.d/*' + unset i bash: rm -f /tmp/healthy && /healthcheck.sh: No such file or directory ============= ddev logs ========= + logpipe=/var/tmp/logpipe + [[ ! -p /var/tmp/logpipe ]] + exec /usr/bin/supervisord -n -c /etc/supervisor/supervisord-nginx-fpm.conf 2024-01-10 14:47:40,399 INFO Included extra file "/etc/supervisor/php-fpm.conf" during parsing 2024-01-10 14:47:40,399 INFO Included extra file "/etc/supervisor/conf.d/mailhog.conf" during parsing 2024-01-10 14:47:40,399 INFO Included extra file "/etc/supervisor/conf.d/supervisor.conf" during parsing 2024-01-10 14:47:40,404 INFO RPC interface 'supervisor' initialized 2024-01-10 14:47:40,404 CRIT Server 'unix_http_server' running without any HTTP authentication checking 2024-01-10 14:47:40,404 INFO supervisord started with pid 31 2024-01-10 14:47:41,408 INFO spawned: 'child_exit_monitor' with pid 2541 2024-01-10 14:47:41,412 INFO spawned: 'php-fpm' with pid 2542 2024-01-10 14:47:41,416 INFO spawned: 'nginx' with pid 2543 2024-01-10 14:47:41,420 INFO spawned: 'mailpit' with pid 2544 [10-Jan-2024 14:47:41] NOTICE: fpm is running, pid 2542 [10-Jan-2024 14:47:41] NOTICE: ready to handle connections [10-Jan-2024 14:47:41] NOTICE: systemd monitor interval set to 10000ms 2024-01-10 14:47:42,731 INFO success: child_exit_monitor entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2024-01-10 14:47:42,732 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2024-01-10 14:47:42,733 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2024-01-10 14:47:42,733 INFO success: mailpit entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) ============= contents of /mnt/ddev_config ========= Error response from daemon: No such container: ddev-d9-db ======== Curl of site from inside container: Project is not currently running. Try 'ddev start'. ======== curl -I of http://tryddevproject-9199.ddev.site from outside: HTTP/1.1 502 Bad Gateway Date: Wed, 10 Jan 2024 14:50:53 GMT Content-Length: 11 Content-Type: text/plain; charset=utf-8 curl: (22) The requested URL returned error: 502 Unable to curl the requested project Please provide this output in a new gist at gist.github.com. Please run cleanup after debugging with 'ddev debug testcleanup' Failed running test_ddev.sh: exit status 1 . You can run it manually with `curl -sL -O https://raw.githubusercontent.com/ddev/ddev/master/cmd/ddev/cmd/scripts/test_ddev.sh && bash test_ddev.sh`

Expected Behavior

The web container starts and I can launch projects

Actual Behavior

The web container never becomes ready

Steps To Reproduce

On my Ubuntu 22.04.3 LTS, clean Docker and Ddev install.

This is the first time I try both Docker and Ddev.

The web container seems to fail load php, but by loggin on ssh all the services seems to be up and running.

Anything else?

attilio@thinkpad-di-attilio:/var/www/optiflow$ docker inspect --format "{{json .State.Health }}" ddev-tryddevproject-9199-web {"Status":"unhealthy","FailingStreak":506,"Log":[{"Start":"2024-01-10T15:58:22.144261879+01:00","End":"2024-01-10T15:58:22.249146831+01:00","ExitCode":1,"Output":"/var/www/html:OK mailpit:OK phpstatus:FAILED "},{"Start":"2024-01-10T15:58:23.262696729+01:00","End":"2024-01-10T15:58:23.371261636+01:00","ExitCode":1,"Output":"/var/www/html:OK mailpit:OK phpstatus:FAILED "},{"Start":"2024-01-10T15:58:24.385494799+01:00","End":"2024-01-10T15:58:24.486460882+01:00","ExitCode":1,"Output":"/var/www/html:OK mailpit:OK phpstatus:FAILED "},{"Start":"2024-01-10T15:58:25.500297952+01:00","End":"2024-01-10T15:58:25.613899606+01:00","ExitCode":1,"Output":"/var/www/html:OK mailpit:OK phpstatus:FAILED "},{"Start":"2024-01-10T15:58:26.627786871+01:00","End":"2024-01-10T15:58:26.735011749+01:00","ExitCode":1,"Output":"/var/www/html:OK mailpit:OK phpstatus:FAILED "}]}

rfay commented 10 months ago

I see that you had the same problem in ddev debug test that you describe.

I can only suggest that you go through the troubleshooting suggestions carefully at https://ddev.readthedocs.io/en/latest/users/usage/troubleshooting/ - please go through those carefully and then report back.

rfay commented 10 months ago

No response after a week. We're happy to help you here, but go through the troubleshooting suggestions carefully.