ddev / ddev

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

Detect errors in ddev-router/traefik dynamic configuration (duplicate `web_extra_exposed_ports` values breaks all routing) #6417

Open quicksketch opened 2 months ago

quicksketch commented 2 months ago

Preliminary checklist

Output of ddev debug test

Expand `ddev debug test` diagnostic information ``` ======== Output file will be in /tmp/ddev-debug-test.txt ======== ======== Existing project config ======== ddev installation alternate locations: /usr/bin/ddev /bin/ddev These config files were loaded for project appstate-drupal: [/home/nate/Sites/appstate-drupal/.ddev/config.yaml /home/nate/Sites/appstate-drupal/.ddev/config.db.yaml /home/nate/Sites/appstate-drupal/.ddev/config.multisite.yaml /home/nate/Sites/appstate-drupal/.ddev/config.storybook.yaml] name: appstate-drupal type: drupal docroot: web php_version: 8.3 webserver_type: nginx-fpm webimage: ddev/ddev-webserver:v1.23.3 additional_hostnames: [aaup-appstate-edu aca-appstate-edu] database: {mariadb 10.6} hooks: map[post-start:[map[exec:echo '================================================================================='] map[exec:echo ' NOTICE'] map[exec:echo '================================================================================='] map[exec:echo 'You can start storybook by typing:'] map[exec:echo 'ddev task storybook'] map[exec:echo] map[exec:echo 'By default it will be available at https://appstate-drupal.ddev.site:6006'] map[exec:echo "Use ddev describe to confirm if this doesn't work."] map[exec:echo 'Check the status of startup by running "ddev logs --follow --time"'] map[exec:echo '================================================================================='] map[exec:mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS aaup_appstate_edu; GRANT ALL ON aaup_appstate_edu.* to 'db'@'%';" service:db] map[exec:mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS aca_appstate_edu; GRANT ALL ON aca_appstate_edu.* to 'db'@'%';" service:db] map[exec:echo '================================================================================='] map[exec:echo ' NOTICE'] map[exec:echo '================================================================================='] map[exec:echo 'The node.js container is ready. You can start storybook by typing:'] map[exec:echo 'ddev task storybook'] map[exec:echo] map[exec:echo 'By default it will be available at https://appstate-drupal.ddev.site:6006'] map[exec:echo "Use ddev describe to confirm if this doesn't work."] map[exec:echo 'Check the status of startup by running "ddev logs --follow --time"'] map[exec:echo '=================================================================================']]] project_tld: ddev.site use_dns_when_possible: true composer_version: 2 nodejs_version: 20 default_container_timeout: 120 web_extra_exposed_ports: [{example1 6006 6007 6006} {example2 6006 6007 6006} {storybook 6006 6007 6006}] ddev_version_constraint: >=v1.23 ======== existing project customizations ======== .ddev/web-build/Dockerfile.storybook ======== installed DDEV add-ons ======== No registered add-ons were found. Add-ons installed before DDEV v1.22.0 will not be listed. Update them with `ddev get` so they'll be shown. ======== mutagen situation ======== looking for #ddev-generated in mutagen.yml in project /home/nate/Sites/appstate-drupal .ddev/mutagen/mutagen.yml not found ======== Creating dummy project named tryddevproject-1341 in ../tryddevproject-1341 ======== Creating a new DDEV project config in the current directory (/home/nate/Sites/tryddevproject-1341) Once completed, your configuration will be written to /home/nate/Sites/tryddevproject-1341/.ddev/config.yaml Configuring a 'php' project named 'tryddevproject-1341' with docroot 'web' at '/home/nate/Sites/tryddevproject-1341/web'. For full details use 'ddev describe'. Configuration complete. You may now run 'ddev start'. ======== OS Information ======== Linux natex1 6.5.0-1025-oem #26-Ubuntu SMP PREEMPT_DYNAMIC Tue Jun 18 12:35:22 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux ======== User information ======== uid=1001(nate) gid=1001(nate) groups=1001(nate),4(adm),20(dialout),24(cdrom),27(sudo),30(dip),44(video),46(plugdev),107(input),110(render),122(lpadmin),135(sambashare),998(docker),999(ollama) ======== DDEV version ======== ITEM VALUE DDEV version v1.23.3 architecture amd64 cgo_enabled 0 db ddev/ddev-dbserver-mariadb-10.11:v1.23.3 ddev-ssh-agent ddev/ddev-ssh-agent:v1.23.3 docker 27.0.3 docker-api 1.46 docker-compose v2.28.1 docker-platform linux-docker global-ddev-dir /home/nate/.ddev mutagen 0.17.2 os linux router ddev/ddev-traefik-router:v1.23.3 web ddev/ddev-webserver:v1.23.3 ======== proxy settings ======== HTTP_PROXY='' HTTPS_PROXY='' http_proxy='' NO_PROXY='' ======== DDEV global info ======== developer-mode=false disable-http2=false fail-on-hook-fail=false instrumentation-opt-in=true instrumentation-queue-size=0 instrumentation-reporting-interval=0s instrumentation-user= internet-detection-timeout-ms=3000 last-started-version=v1.23.3 letsencrypt-email= mailpit-http-port=8025 mailpit-https-port=8026 mkcert-caroot=/home/nate/.local/share/mkcert no-bind-mounts=false omit-containers=[] performance-mode=none project-tld=ddev.site required-docker-compose-version=v2.28.1 router=traefik router-bind-all-interfaces=false router-http-port=80 router-https-port=443 simple-formatting=false table-style=default traefik-monitor-port=10999 use-docker-compose-from-path=false use-hardened-images=false use-letsencrypt=false wsl2-no-windows-hosts-mgt=false xdebug-ide-location= ======== DOCKER provider info ======== docker client location: -rwxr-xr-x 1 root root 39779112 Jun 28 17:02 /usr/bin/docker docker client alternate locations: /usr/bin/docker /bin/docker Docker provider: linux-docker docker version: Client: Docker Engine - Community Version: 27.0.3 API version: 1.46 Go version: go1.21.11 Git commit: 7d4bcd8 Built: Sat Jun 29 00:02:33 2024 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 27.0.3 API version: 1.46 (minimum version 1.24) Go version: go1.21.11 Git commit: 662f78c Built: Sat Jun 29 00:02:33 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.19 GitCommit: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41 runc: Version: 1.7.19 GitCommit: v1.1.13-0-g58aa920 docker-init: Version: 0.19.0 GitCommit: de40ad0 DOCKER_DEFAULT_PLATFORM=notset Docker platform: linux-docker Using Docker context: default (unix:///var/run/docker.sock) docker-compose: v2.28.1 Using DOCKER_HOST=unix:///var/run/docker.sock Docker version: 27.0.3 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 933.3G 833.6G 52.2G 94% / ======== Existing docker containers ======== CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c905abff6a2f catthehacker/ubuntu:act-20.04 "tail -f /dev/null" 3 months ago Exited (137) 3 months ago act-Functional-tests-Simpletest-batches-9-31a0e7b427babf70ef811e90dfa27f7654980436ca91bcdacb5a5fcc3ffcc07c fc200b2d6029 catthehacker/ubuntu:act-20.04 "tail -f /dev/null" 3 months ago Exited (137) 3 months ago act-Functional-tests-Simpletest-batches-8-1905f7608fdc84838fb8127d2e532fedc3e709913bbed1efde563aa90c6ce21d d6f44f1d8b39 catthehacker/ubuntu:act-20.04 "tail -f /dev/null" 3 months ago Exited (137) 3 months ago act-Functional-tests-Simpletest-batches-7-2cdaa41fc0c3f63e545be67d2148d4229300668a0a32c16175f4d534513a9360 f9ad1edd2d0a catthehacker/ubuntu:act-20.04 "tail -f /dev/null" 3 months ago Exited (137) 3 months ago act-Functional-tests-Simpletest-batches-5-4d75845622ca17c6f5a59218fc839c59f20aae8f8534cffe85dd89e01d9f6b94 435a0610ff20 catthehacker/ubuntu:act-20.04 "tail -f /dev/null" 3 months ago Exited (137) 3 months ago act-Functional-tests-Simpletest-batches-6-0b6226bbf0003414e30adad5dae0b57b7ee2b3f17c6bccd22676b893d37f6b0b 4e12c9b7cc29 catthehacker/ubuntu:act-20.04 "tail -f /dev/null" 3 months ago Exited (137) 3 months ago act-Coding-standards-Run-phpcs-ef5b3952a95a9e9f3dafa4959e85e07b2a6ed38aa2382e8a61a82940a8edeed7 0a09df48f2fc catthehacker/ubuntu:act-20.04 "tail -f /dev/null" 3 months ago Exited (137) 3 months ago act-Functional-tests-Simpletest-batches-3-012f1b303e086453d64a8d7457e9387f42876b58d6c32aa5c7f8c80465e48504 e76e6df94056 catthehacker/ubuntu:act-latest "tail -f /dev/null" 3 months ago Exited (137) 3 months ago act-Coding-standards-Check-spelling-c02ed77b19ba5d80dd175a5c0948ec776da58565292b83d332b701a51424e23e 4e7ed65d060d catthehacker/ubuntu:act-20.04 "tail -f /dev/null" 3 months ago Exited (137) 3 months ago act-Functional-tests-Simpletest-batches-1-65fa472a6ac7484832cad502900c30904ad8c5b7f4eb69964a753e2ba536a57a 3395b1c028d2 catthehacker/ubuntu:act-20.04 "tail -f /dev/null" 3 months ago Exited (137) 3 months ago act-Functional-tests-Simpletest-batches-4-7a59490ed764c705c94180ef7b7e02b1dd088290b6c7ff8a78395ba7f6f31ca3 ce382bd8cf76 catthehacker/ubuntu:act-20.04 "tail -f /dev/null" 3 months ago Exited (137) 3 months ago act-Functional-tests-Simpletest-batches-2-25aff719884b8e909bf39d1fa9485fad1633268fe55df1b00de435183568250b d3ac849ad943 ghcr.io/open-webui/open-webui:main "bash start.sh" 5 months ago Up 2 weeks open-webui 18dd14bc5b92 hello-world "/hello" 5 months ago Exited (0) 5 months ago angry_mirzakhani ======== mkcert information ======== /usr/bin/mkcert /bin/mkcert /home/nate/.local/share/mkcert total 8 -r-------- 1 nate nate 2484 Jun 16 2020 rootCA-key.pem -rw-r--r-- 1 nate nate 1744 Jun 16 2020 rootCA.pem ======== ping attempt on ddev.site ======== PING dkdkd.ddev.site (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.015 ms --- dkdkd.ddev.site ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.015/0.015/0.015/0.000 ms ======== ddev debug refresh ======== Rebuilding project images... Rebuilding web image with `/home/nate/.ddev/bin/docker-compose -f /home/nate/Sites/tryddevproject-1341/.ddev/.ddev-docker-compose-full.yaml build web --no-cache` #0 building with "default" instance using docker driver #1 [web internal] load build definition from Dockerfile #1 transferring dockerfile: 1.28kB done #1 DONE 0.0s #2 [web internal] load metadata for docker.io/ddev/ddev-webserver:v1.23.3 #2 DONE 0.0s #3 [web internal] load .dockerignore #3 transferring context: 2B done #3 DONE 0.0s #4 [web 1/8] FROM docker.io/ddev/ddev-webserver:v1.23.3 #4 CACHED #5 [web 2/8] RUN (groupadd --gid 1001 "nate" || groupadd "nate" || true) && (useradd -l -m -s "/bin/bash" --gid "nate" --comment '' --uid 1001 "nate" || useradd -l -m -s "/bin/bash" --gid "nate" --comment '' "nate" || useradd -l -m -s "/bin/bash" --gid "1001" --comment '' "nate" || useradd -l -m -s "/bin/bash" --comment '' nate ) #5 DONE 0.3s #6 [web 3/8] RUN mkdir -p /home/nate && chown nate /home/nate && chmod 600 /home/nate/.pgpass #6 DONE 0.4s #7 [web 4/8] RUN mariadb-client-install.sh || true #7 0.505 This script is not intended to run with mariadb:10.11 #7 DONE 0.5s #8 [web 5/8] RUN export XDEBUG_MODE=off; composer self-update --stable || composer self-update --stable || true; composer self-update --2 || composer self-update --2 || true #8 0.539 Storing "stable" as default update channel for the next self-update run. #8 0.782 You are already using the latest available Composer version 2.7.7 (stable channel). #8 1.147 You are already using the latest available Composer version 2.7.7 (2.x channel). #8 DONE 1.2s #9 [web 6/8] RUN apt-get update #9 0.500 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB] #9 0.524 Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB] #9 0.526 Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB] #9 0.574 Get:4 https://packages.sury.org/php bookworm InRelease [7548 B] #9 0.578 Get:5 https://deb.nodesource.com/node_20.x nodistro InRelease [12.1 kB] #9 0.596 Get:6 http://deb.debian.org/debian bookworm/main amd64 Packages [8788 kB] #9 0.689 Get:7 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [13.8 kB] #9 0.698 Get:8 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [169 kB] #9 0.728 Get:9 https://packages.sury.org/php bookworm/main amd64 Packages [242 kB] #9 0.731 Get:10 https://dl.cloudsmith.io/public/platformsh/cli/deb/debian bookworm InRelease [3675 B] #9 0.768 Get:11 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages [8456 B] #9 0.843 Get:12 http://nginx.org/packages/debian bookworm InRelease [2866 B] #9 0.856 Get:14 https://dl.cloudsmith.io/public/platformsh/upsun-cli/deb/debian bookworm InRelease [3681 B] #9 0.988 Get:16 https://dl.cloudsmith.io/public/symfony/stable/deb/debian bookworm InRelease [4422 B] #9 1.037 Get:17 http://nginx.org/packages/debian bookworm/nginx amd64 Packages [12.1 kB] #9 1.045 Get:15 https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/debian bookworm InRelease [4625 B] #9 1.096 Get:18 https://dl.cloudsmith.io/public/platformsh/cli/deb/debian bookworm/main amd64 Packages [3683 B] #9 1.204 Get:20 https://dl.cloudsmith.io/public/platformsh/upsun-cli/deb/debian bookworm/main amd64 Packages [2548 B] #9 1.212 Get:19 https://dlm.mariadb.com/repo/maxscale/latest/apt bookworm InRelease [9341 B] #9 1.307 Get:21 https://dl.cloudsmith.io/public/symfony/stable/deb/debian bookworm/main amd64 Packages [7535 B] #9 1.453 Get:22 https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/debian bookworm/main amd64 Packages [41.5 kB] #9 1.549 Get:13 https://downloads.mariadb.com/Tools/debian bookworm InRelease [2869 B] #9 1.688 Get:24 https://downloads.mariadb.com/Tools/debian bookworm/main amd64 Packages [947 B] #9 1.712 Get:23 https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/debian bookworm/main arm64 Packages [34.9 kB] #9 2.059 Get:25 https://dlm.mariadb.com/repo/maxscale/latest/apt bookworm/main amd64 Packages [553 B] #9 2.218 Get:26 https://dlm.mariadb.com/repo/maxscale/latest/apt bookworm/main arm64 Packages [554 B] #9 2.239 Fetched 9631 kB in 2s (5369 kB/s) #9 2.239 Reading package lists... #9 DONE 2.6s #10 [web 7/8] RUN curl -I https://www.google.com #10 0.308 % Total % Received % Xferd Average Speed Time Time Time Current #10 0.308 Dload Upload Total Spent Left Speed #10 0.308 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 #10 0.475 HTTP/2 200 #10 0.475 content-type: text/html; charset=ISO-8859-1 #10 0.475 content-security-policy-report-only: object-src 'none';base-uri 'self';script-src 'nonce-FZ2TQMgh2UBt9kXBBjVvgA' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp #10 0.475 p3p: CP="This is not a P3P policy! See g.co/p3phelp for more info." #10 0.475 date: Mon, 22 Jul 2024 19:20:39 GMT #10 0.475 server: gws #10 0.475 x-xss-protection: 0 #10 0.475 x-frame-options: SAMEORIGIN #10 0.475 expires: Mon, 22 Jul 2024 19:20:39 GMT #10 0.475 cache-control: private #10 0.475 set-cookie: AEC=AVYB7coiBk7rWe9dMzOZ2fAkT-86ftAzOuSHvkwVzIF_ZQTMiQrz9VLsLCM; expires=Sat, 18-Jan-2025 19:20:39 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax #10 0.475 set-cookie: NID=516=rzYpIAh2aX40acu1bOEu8ZJ819r7Y6dX35dsdzXf33tFcq4fJ8YddGwue_AWoBQzxaIXSYfShx0RnEC-Tec64Jt8w7Ove-FchzkMLQobwK3kLybKt9cv4AJ0tkUhvp8FVU2bfu4J32ZO2Qa95_nJLtRHl0lfozLpF4sPEGN98p8; expires=Tue, 21-Jan-2025 19:20:39 GMT; path=/; domain=.google.com; HttpOnly #10 0.475 alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 #10 0.475 #10 DONE 0.5s #11 [web 8/8] RUN chmod 777 /run/php /var/log #11 DONE 0.4s #12 [web] exporting to image #12 exporting layers 0.0s done #12 writing image sha256:a00eac5c75ddf3863634a607d11a82acea30273b749e68c86651f9453fcbad1d done #12 naming to docker.io/ddev/ddev-webserver:v1.23.3-tryddevproject-1341-built done #12 DONE 0.1s Refreshed Docker cache for project tryddevproject-1341 in 6s Network ddev_default 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.23.3: Pulling from ddev/ddev-dbserver-mariadb-10.11 3713021b0277: Pulling fs layer b7ed4502c671: Pulling fs layer ccee233ae035: Pulling fs layer 0c8d32e87829: Pulling fs layer 257a4184da5c: Pulling fs layer 079eb852aa15: Pulling fs layer c6b6414a516a: Pulling fs layer 96faa6efb673: Pulling fs layer 4f4fb700ef54: Pulling fs layer fe666009c34d: Pulling fs layer 32ab4d95e76b: Pulling fs layer f77bcedf86ae: Pulling fs layer 90eef1c5531f: Pulling fs layer 620dcb654f5a: Pulling fs layer 390a4d0145fb: Pulling fs layer a3c52a91bcf1: Pulling fs layer 247611fc72c3: Pulling fs layer f35abe5d0dc8: Pulling fs layer 2bcf2c3c59ad: Pulling fs layer 009da9d86a1e: Pulling fs layer 5e89f7131303: Pulling fs layer a6b24ed8f2a4: Pulling fs layer 18d129ba6b15: Pulling fs layer a77f1a680474: Pulling fs layer 96faa6efb673: Waiting f35abe5d0dc8: Waiting 4f4fb700ef54: Waiting 2bcf2c3c59ad: Waiting 0c8d32e87829: Waiting 009da9d86a1e: Waiting f77bcedf86ae: Waiting fe666009c34d: Waiting 90eef1c5531f: Waiting 32ab4d95e76b: Waiting 5e89f7131303: Waiting a3c52a91bcf1: Waiting 620dcb654f5a: Waiting 247611fc72c3: Waiting a6b24ed8f2a4: Waiting 390a4d0145fb: Waiting 257a4184da5c: Waiting 18d129ba6b15: Waiting a77f1a680474: Waiting c6b6414a516a: Waiting 079eb852aa15: Waiting b7ed4502c671: Verifying Checksum b7ed4502c671: Download complete ccee233ae035: Verifying Checksum ccee233ae035: Download complete 0c8d32e87829: Verifying Checksum 0c8d32e87829: Download complete 3713021b0277: Download complete 257a4184da5c: Verifying Checksum 257a4184da5c: Download complete c6b6414a516a: Verifying Checksum c6b6414a516a: Download complete 96faa6efb673: Verifying Checksum 96faa6efb673: Download complete 3713021b0277: Pull complete b7ed4502c671: Pull complete 4f4fb700ef54: Verifying Checksum 4f4fb700ef54: Download complete fe666009c34d: Download complete ccee233ae035: Pull complete 0c8d32e87829: Pull complete 257a4184da5c: Pull complete f77bcedf86ae: Verifying Checksum f77bcedf86ae: Download complete 90eef1c5531f: Download complete 079eb852aa15: Verifying Checksum 079eb852aa15: Download complete 620dcb654f5a: Verifying Checksum 620dcb654f5a: Download complete 32ab4d95e76b: Verifying Checksum 32ab4d95e76b: Download complete 390a4d0145fb: Verifying Checksum 390a4d0145fb: Download complete a3c52a91bcf1: Verifying Checksum a3c52a91bcf1: Download complete f35abe5d0dc8: Download complete 247611fc72c3: Verifying Checksum 247611fc72c3: Download complete 2bcf2c3c59ad: Verifying Checksum 2bcf2c3c59ad: Download complete 009da9d86a1e: Verifying Checksum 009da9d86a1e: Download complete 5e89f7131303: Verifying Checksum 5e89f7131303: Download complete a6b24ed8f2a4: Verifying Checksum a6b24ed8f2a4: Download complete 18d129ba6b15: Verifying Checksum 18d129ba6b15: Download complete 079eb852aa15: Pull complete c6b6414a516a: Pull complete 96faa6efb673: Pull complete 4f4fb700ef54: Pull complete a77f1a680474: Verifying Checksum a77f1a680474: Download complete fe666009c34d: Pull complete 32ab4d95e76b: Pull complete f77bcedf86ae: Pull complete 90eef1c5531f: Pull complete 620dcb654f5a: Pull complete 390a4d0145fb: Pull complete a3c52a91bcf1: Pull complete 247611fc72c3: Pull complete f35abe5d0dc8: Pull complete 2bcf2c3c59ad: Pull complete 009da9d86a1e: Pull complete 5e89f7131303: Pull complete a6b24ed8f2a4: Pull complete 18d129ba6b15: Pull complete a77f1a680474: Pull complete Digest: sha256:fda0ef7449dd451786e1183c6f87441ec704d076669d923602da055d570ce43c Status: Downloaded newer image for ddev/ddev-dbserver-mariadb-10.11:v1.23.3 docker.io/ddev/ddev-dbserver-mariadb-10.11:v1.23.3 Building project images... .Project images built in 1s. Network ddev-tryddevproject-1341_default Created Container ddev-tryddevproject-1341-db Created Container ddev-tryddevproject-1341-web Created Container ddev-tryddevproject-1341-web Started Container ddev-tryddevproject-1341-db Started Waiting for containers to become ready: [web db] Starting ddev-router if necessary... Container ddev-router Created Container ddev-router Started Waiting for additional project containers to become ready... All project containers are now ready. ======== Project startup ======== Starting tryddevproject-1341... 2024-07-22T12:21:10.006 Pulled image for ddev/ddev-webserver:v1.23.3 2024-07-22T12:21:10.007 Pulled image for busybox:stable 2024-07-22T12:21:10.007 Pulled image for ddev/ddev-traefik-router:v1.23.3 2024-07-22T12:21:10.008 Pulled image for ddev/ddev-ssh-agent:v1.23.3 2024-07-22T12:21:11.102 chowning /mnt/ddev-global-cache and /var/lib/mysql to 1001 2024-07-22T12:21:11.632 done chowning /mnt/ddev-global-cache and /var/lib/mysql to 1001 2024-07-22T12:21:11.637 host.docker.internal='' runtime.GOOS==linux and docker 20.10+ 2024-07-22T12:21:11.689 Pulled image for ddev/ddev-dbserver-mariadb-10.11:v1.23.3 2024-07-22T12:21:11.69 Pulled image for ddev/ddev-webserver:v1.23.3 2024-07-22T12:21:11.691 Pulled image for ddev/ddev-ssh-agent:v1.23.3 2024-07-22T12:21:11.692 Pulled image for ddev/ddev-traefik-router:v1.23.3 Building project images... 2024-07-22T12:21:11.694 Executing docker-compose -f /home/nate/Sites/tryddevproject-1341/.ddev/.ddev-docker-compose-full.yaml build --progress=plain .Project images built in 1s. 2024-07-22T12:21:12.695 Executing docker-compose -f /home/nate/Sites/tryddevproject-1341/.ddev/.ddev-docker-compose-full.yaml up -d Container ddev-tryddevproject-1341-db Recreate Container ddev-tryddevproject-1341-web Recreate Container ddev-tryddevproject-1341-db Recreated Container ddev-tryddevproject-1341-web Recreated Container ddev-tryddevproject-1341-db Started Container ddev-tryddevproject-1341-web Started 2024-07-22T12:21:24.349 VIRTUAL_HOST=tryddevproject-1341.ddev.site for web 2024-07-22T12:21:24.349 HTTP_EXPOSE=80:80,8025:8025 for web 2024-07-22T12:21:24.349 HTTPS_EXPOSE=443:80,8026:8025 for web 2024-07-22T12:21:24.75 Copied /home/nate/Sites/tryddevproject-1341/.ddev/traefik:CopyIntoVolume_ghsrnarlgbmj into /mnt/v/traefik in 65.904991ms 2024-07-22T12:21:24.772 Exec chown -R 1001 /mnt/v/traefik stdout=, stderr=, err= 2024-07-22T12:21:24.991 Copied Traefik certs in /home/nate/Sites/tryddevproject-1341/.ddev/traefik/certs to ddev-global-cache/traefik 2024-07-22T12:21:24.991 Running /start.sh in ddev-webserver Waiting for containers to become ready: [web db] 2024-07-22T12:21:29.56 Copied /home/nate/.ddev/commands:CopyIntoVolume_ybfybrtwhvgf into /mnt/v/global-commands in 82.028158ms 2024-07-22T12:21:29.596 Exec chown -R 1001 /mnt/v/global-commands stdout=, stderr=, err= 2024-07-22T12:21:29.891 Testing to see if /mnt/ddev_config is properly mounted Starting ddev-router if necessary... 2024-07-22T12:21:30.545 Copied /home/nate/.ddev/traefik:CopyIntoVolume_zvzrzrsydeld into /mnt/v/traefik in 68.342911ms 2024-07-22T12:21:30.571 Exec chown -R 1001 /mnt/v/traefik stdout=, stderr=, err= 2024-07-22T12:21:30.796 Copied global Traefik config in /home/nate/.ddev/traefik/certs to ddev-global-cache/traefik Container ddev-router Running 2024-07-22T12:21:30.837 Waiting for ddev-router to become ready. docker inspect --format "{{json .State.Health }}" ddev-router 2024-07-22T12:21:31.342 ddev-router is ready Waiting for additional project containers to become ready... All project containers are now ready. Successfully started tryddevproject-1341 Project can be reached at https://tryddevproject-1341.ddev.site https://127.0.0.1:32958 ======== Curl of site from inside container ======== % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 HTTP/1.1 200 OK Server: nginx Date: Mon, 22 Jul 2024 19:21:33 GMT Content-Type: text/html; charset=UTF-8 Connection: keep-alive Vary: Accept-Encoding ======== curl -I of http://127.0.0.1:32956 (web container http docker bind port) from outside ======== % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 HTTP/1.1 200 OK Server: nginx Date: Mon, 22 Jul 2024 19:21:33 GMT Content-Type: text/html; charset=UTF-8 Connection: keep-alive Vary: Accept-Encoding ======== curl -I of http://tryddevproject-1341.ddev.site (router http URL) from outside ======== % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 HTTP/1.1 200 OK Content-Type: text/html; charset=UTF-8 Date: Mon, 22 Jul 2024 19:21:33 GMT Server: nginx Vary: Accept-Encoding ======== Full curl of http://tryddevproject-1341.ddev.site (router http URL) from outside ======== % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 198 0 198 0 0 70138 0 --:--:-- --:--:-- --:--:-- 99000 Success accessing database... db via TCP/IP
ddev is working.
The output file for Discord or issue queue is in /tmp/ddev-debug-test.txt
file:///tmp/ddev-debug-test.txt
======== Full curl of https://tryddevproject-1341.ddev.site (router https URL) from outside ======== % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 198 0 198 0 0 4313 0 --:--:-- --:--:-- --:--:-- 4400 Success accessing database... db via TCP/IP
ddev is working.
The output file for Discord or issue queue is in /tmp/ddev-debug-test.txt
file:///tmp/ddev-debug-test.txt
======== Curl google.com to check internet access and VPN ======== % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 HTTP/2 200 content-type: text/html; charset=ISO-8859-1 content-security-policy-report-only: object-src 'none';base-uri 'self';script-src 'nonce-YX3Fc6c3clPAyUwzUwHXkg' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp p3p: CP="This is not a P3P policy! See g.co/p3phelp for more info." date: Mon, 22 Jul 2024 19:21:33 GMT server: gws x-xss-protection: 0 x-frame-options: SAMEORIGIN expires: Mon, 22 Jul 2024 19:21:33 GMT cache-control: private set-cookie: AEC=AVYB7cr695NVXQRUvU9NyJm42feMYt-u2_ppp4-JftXUHon4cjcCWm0f2A; expires=Sat, 18-Jan-2025 19:21:33 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax set-cookie: NID=516=C13i3wjhl71lESIfymUOK1KmhlgcI6FYV1w47l2MNutD0PDdXwX1x50Ftyf8kjGnHCcOsn0JlMLnh7dFSif3vU6acGGrVQ7UiNDdayxd5ryeHmV7A31uyDZ3Qc8fJajFEwo72Y-x3bHwZthC9iOQGLpNsQdFZc6yZTrfHf2ygrw; expires=Tue, 21-Jan-2025 19:21:33 GMT; path=/; domain=.google.com; HttpOnly alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 ======== host.docker.internal status ======== PING host.docker.internal (172.17.0.1) 56(84) bytes of data. 64 bytes from host.docker.internal (172.17.0.1): icmp_seq=1 ttl=64 time=0.042 ms --- host.docker.internal ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.042/0.042/0.042/0.000 ms ======== Project ownership on host ======== drwxrwxr-x 4 nate nate 4096 Jul 22 12:20 ../tryddevproject-1341 ======== Project ownership in container ======== drwxrwxr-x 4 nate nate 4096 Jul 22 19:20 //var/www/html ======== In-container filesystem ======== Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/nvme0n1p3 ext4 978644348 874894904 53963316 95% /var/www/html ======== Thanks for running the diagnostic! ======== Running ddev launch in 3 seconds Running ddev launch Waiting for ddev launch to complete before deleting project Gtk-Message: 12:21:37.674: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it. [3985732, Main Thread] WARNING: GTK+ module /snap/firefox/4483/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded. GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.: 'glib warning', file /build/firefox/parts/firefox/build/toolkit/xre/nsSigHandlers.cpp:187 (firefox:3985732): Gtk-WARNING **: 12:21:37.723: GTK+ module /snap/firefox/4483/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded. GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported. Gtk-Message: 12:21:37.723: Failed to load module "canberra-gtk-module" [3985732, Main Thread] WARNING: GTK+ module /snap/firefox/4483/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded. GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.: 'glib warning', file /build/firefox/parts/firefox/build/toolkit/xre/nsSigHandlers.cpp:187 (firefox:3985732): Gtk-WARNING **: 12:21:37.724: GTK+ module /snap/firefox/4483/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded. GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported. Gtk-Message: 12:21:37.724: Failed to load module "canberra-gtk-module" Cleanup: deleting test project tryddevproject-1341 Container ddev-tryddevproject-1341-db Stopped ```

Expected Behavior

During ddev start, an error should be thrown (or some other indication) when the same port numbers are defined.

Actual Behavior

If two services are registered that have overlapping port numbers, ddev starts up just fine, but gives no indication that duplicate port numbers are in conflict with each other. Instead, it seems like all routing to the web container is simply broken. Visiting the web project returns a basic 404 page not found error page (not from the application, but from the web server):

image

Steps To Reproduce

  1. Start with an out of box recipe like ddev config --project-type=drupal --php-version=8.3 --docroot=web.
  2. Create two config files, like .ddev/config.example1.yaml and ddev/config/config.example2.yaml.
  3. In the first config file put the following:
    web_extra_exposed_ports:
    - name: example1
    container_port: 6006
    http_port: 6007
    https_port: 6006
  4. And in the second config file, put the following:
    web_extra_exposed_ports:
    - name: example2
    container_port: 6006
    http_port: 6007
    https_port: 6006
  5. Now run ddev start (or restart)
  6. Visit the example project web url (i.e. https://ddevtest.ddev.site). You should get a 404 Page not found error.

Anything else?

Clearly this is misconfiguration of DDEV, but we ran into this problem by having two developers work to add a new ddev service in two separate branches of work. Then they both got merged at about the same time, and we didn't notice that we had the same ddev configuration in two different files. This was a bit of a time drain for us trying to figure out what broke the routing. Ideally, DDEV would have identified that the same ports were used for two different services and would have thrown an error.

rfay commented 2 months ago

Great to see you @quicksketch ! Thanks so much for the details repro.

The result of this in the rendered docker-compose is clearly an error (6007:6006 is there twice in HTTP_EXPOSE, and 6006:6006 is there twice in HTTPS_EXPOSE.

    - HTTP_EXPOSE=${DDEV_ROUTER_HTTP_PORT}:80,${DDEV_MAILPIT_PORT}:8025,6007:6006,6007:6006
    - HTTPS_EXPOSE=${DDEV_ROUTER_HTTPS_PORT}:80,${DDEV_MAILPIT_HTTPS_PORT}:8025,6006:6006,6006:6006

I do think this is probably a team process failure, without adequate attention paid to a PR, but I agree that it would be nice to catch and report misconfigurations like this.

The resulting duplicated traefik config is something like this:

    d10-web-6006-http:

      rule: HostRegexp(`d10.ddev.site`)

      middlewares:
        - autodetect
      service: "d10-web-6006-http"
      tls: false
      entrypoints:
        - http-6007

    d10-web-6006-http:

      rule: HostRegexp(`d10.ddev.site`)

      middlewares:
        - autodetect
      service: "d10-web-6006-http"
      tls: false
      entrypoints:
        - http-6007

The resulting error from ddev-router (traefik) is time="2024-07-22T19:50:51Z" level=error msg="Error while building configuration (for the first time): /mnt/ddev-global-cache/traefik/config/d10.yaml: yaml: unmarshal errors:\n line 43: mapping key \"d10-web-6006-http\" already defined at line 31\n line 105: mapping key \"d10-web-6006-https\" already defined at line 91\n line 143: mapping key \"d10-web-6006-http\" already defined at line 138\n line 166: mapping key \"d10-web-6006-https\" already defined at line 160" providerName=file

What I'd most like to see is to be able to capture the situation on ddev-router and know that it failed. This is dynamic configuration that Traefik picks up on the fly, which is why it doesn't get caught by ddev start.

I think the best-case scenario would be to ask traefik whether configuration is valid after a ddev start. I'm not sure how to do that, but I'll bet we can.

I don't see a built-in option to traefik, but

rfay commented 2 months ago

Just a note for the future, docker logs -f ddev-router would have shown this happening. But I know it wouldn't have been obvious to look there.

quicksketch commented 2 months ago

I think the best-case scenario would be to ask traefik whether configuration is valid after a ddev start. I'm not sure how to do that, but I'll bet we can.

Another completely acceptable solution (though not as ideal) is to have some kind of better reporting when visiting the site, rather than returning a 404 Page not found. Maybe just something as simple as an error page that relays exactly the information you just provided:

DDEV encountered an error while routing. Check the router error log:

docker logs -f ddev-router

See the DDEV router documentation for more information.

quicksketch commented 2 months ago

While trying to resume work today I accidentally discovered that this kind of misconfiguration actually breaks all DDEV web environments, even across different projects. I had switched projects and couldn't figure out why I was getting a 404 again, but the docker logs -f ddev-router command quickly identified that the test project I had set up for reporting this issue was affecting my other projects. I used ddev stop on the test project, and my other DDEV web environments started getting routed properly again.