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

Using DDEV offline may not work with multiple DDEV binaries installed #6499

Closed
4 tasks done
jenlampton opened this issue Aug 22, 2024 · 19 comments
Closed
4 tasks done

Comments

@jenlampton
Copy link
Contributor

jenlampton commented Aug 22, 2024

Preliminary checklist

Output of ddev debug test

I'll revisit this issue once I have a stable internet connection and add the results of ddev debug test, but I suspect they may not be necessary since this is a known feature request? (I did check the box for this... promise not to do that regularly!)

Expand `ddev debug test` diagnostic information


======== Please make sure that you have already looked at troubleshooting guide ========
Troubleshooting guide: https://ddev.readthedocs.io/en/stable/users/usage/troubleshooting/ 
Simple things to check:
* ddev poweroff
* Restart Docker Provider
* Reboot computer
* Temporarily disable VPN and firewall
Press any key to continue:


======== Output file will be in /var/folders/mw/_p1cl_rx69b3ll553w9cdvcc0000gn/T/ddev-debug-test.txt ========


======== Existing project config ========
ddev installation alternate locations:
/usr/local/bin/ddev
/usr/local/bin/ddev

These config files were loaded for project emerisa: [/Users/jlampton/Sites/emerisa/drupal/docroot/.ddev/config.yaml]
name: emerisa
type: drupal7
php_version: 7.4
webserver_type: nginx-fpm
webimage: ddev/ddev-webserver:v1.23.2
additional_hostnames: []
additional_fqdns: []
database: {mariadb 10.11}
project_tld: ddev.site
composer_version: 2
nodejs_version: 20
default_container_timeout: 120


======== existing project customizations ========


======== 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 /Users/jlampton/Sites/emerisa/drupal/docroot
#ddev-generated
unmodified #ddev-generated found in .ddev/mutagen/mutagen.yml


======== Creating dummy project named tryddevproject-14427 in ../tryddevproject-14427 ========
Creating a new DDEV project config in the current directory (/Users/jlampton/Sites/emerisa/drupal/tryddevproject-14427)
Once completed, your configuration will be written to /Users/jlampton/Sites/emerisa/drupal/tryddevproject-14427/.ddev/config.yaml

Configuring a 'php' project named 'tryddevproject-14427' with docroot 'web' at '/Users/jlampton/Sites/emerisa/drupal/tryddevproject-14427/web'.
For full details use 'ddev describe'.
Configuration complete. You may now run 'ddev start'.


======== OS Information ========
Darwin MacBook-Pro.lan 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6000 arm64
ProductName:		macOS
ProductVersion:		14.6.1
BuildVersion:		23G93


======== User information ========
uid=501(jlampton) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),701(com.apple.sharepoint.group.1),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae)


======== DDEV version ========
 ITEM             VALUE                                    
 DDEV version     v1.23.2                                  
 architecture     arm64                                    
 cgo_enabled      0                                        
 db               ddev/ddev-dbserver-mariadb-10.11:v1.23.2 
 ddev-ssh-agent   ddev/ddev-ssh-agent:v1.23.2              
 docker           27.0.3                                   
 docker-api       1.46                                     
 docker-compose   v2.27.0                                  
 docker-platform  docker-desktop                           
 global-ddev-dir  /Users/jlampton/.ddev                    
 mutagen          0.17.2                                   
 os               darwin                                   
 router           ddev/ddev-traefik-router:v1.23.2         
 web              ddev/ddev-webserver:v1.23.2              



======== 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.2
letsencrypt-email=
mailpit-http-port=8025
mailpit-https-port=8026
mkcert-caroot=/Users/jlampton/Library/Application Support/mkcert
no-bind-mounts=false
omit-containers=[]
performance-mode=mutagen
project-tld=ddev.site
required-docker-compose-version=v2.27.0
router=traefik
router-bind-all-interfaces=false
router-http-port=80
router-https-port=443
simple-formatting=false
table-style=bright
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: lrwxr-xr-x@ 1 root  wheel  54 Aug 21 18:52 /usr/local/bin/docker -> /Applications/Docker.app/Contents/Resources/bin/docker

docker client alternate locations:
/usr/local/bin/docker
/usr/local/bin/docker

Docker provider: docker-desktop
Docker Desktop Version: Docker Desktop for Mac 4.32.0 build 157355
docker version: 
Client:
 Version:           27.0.3
 API version:       1.46
 Go version:        go1.21.11
 Git commit:        7d4bcd8
 Built:             Fri Jun 28 23:59:41 2024
 OS/Arch:           darwin/arm64
 Context:           default

Server: Docker Desktop 4.32.0 (157355)
 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:44 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.7.18
  GitCommit:        ae71819c4f5e67bb4d5ae76a6b735f29cc25774e
 runc:
  Version:          1.7.18
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

DOCKER_DEFAULT_PLATFORM=notset
Docker platform: docker-desktop
Using Docker context: default (unix:///Users/jlampton/.docker/run/docker.sock)
docker-compose: v2.27.0
Using DOCKER_HOST=unix:///Users/jlampton/.docker/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                  58.4G     14.9G     40.5G  27% /


======== Existing docker containers ========
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES


======== mkcert information ========
/opt/homebrew/bin/mkcert
/opt/homebrew/bin/mkcert
/usr/local/bin/mkcert
/usr/local/bin/mkcert
/Users/jlampton/Library/Application Support/mkcert
total 16
-r--------  1 jlampton  staff  2484 Mar 11 19:42 rootCA-key.pem
-rw-r--r--  1 jlampton  staff  1826 Mar 11 19:42 rootCA.pem


======== ping attempt on ddev.site ========
PING dkdkd.ddev.site (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.075 ms

--- dkdkd.ddev.site ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.075/0.075/0.075/0.000 ms


======== ddev debug refresh ========
Rebuilding project images...
Rebuilding web image with `/Users/jlampton/.ddev/bin/docker-compose -f /Users/jlampton/Sites/emerisa/drupal/tryddevproject-14427/.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.26kB done
#1 DONE 0.0s

#2 [web internal] load metadata for docker.io/ddev/ddev-webserver:v1.23.2
#2 DONE 0.0s

#3 [web internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s

#4 [web 1/7] FROM docker.io/ddev/ddev-webserver:v1.23.2
#4 CACHED

#5 [web 2/7] RUN (groupadd --gid 20 "jlampton" || groupadd "jlampton" || true) && (useradd  -l -m -s "/bin/bash" --gid "jlampton" --comment '' --uid 501 "jlampton" || useradd  -l -m -s "/bin/bash" --gid "jlampton" --comment '' "jlampton" || useradd  -l -m -s "/bin/bash" --gid "20" --comment '' "jlampton" || useradd -l -m -s "/bin/bash" --comment '' jlampton )
#5 0.083 groupadd: GID '20' already exists
#5 0.092 useradd warning: jlampton's uid 501 outside of the UID_MIN 1000 and UID_MAX 60000 range.
#5 DONE 0.1s

#6 [web 3/7] RUN export XDEBUG_MODE=off; composer self-update --stable || composer self-update --stable || true; composer self-update --2 || composer self-update --2 || true
#6 0.219 Storing "stable" as default update channel for the next self-update run.
#6 0.865 Upgrading to version 2.7.8 (stable channel).
#6 0.963    
#6 1.670 Use composer self-update --rollback to return to version 2.7.7
#6 2.088 You are already using the latest available Composer version 2.7.8 (2.x channel).
#6 DONE 2.1s

#7 [web 4/7] RUN mkdir -p /home/jlampton && chown jlampton /home/jlampton && chmod 600 /home/jlampton/.pgpass
#7 DONE 0.1s

#8 [web 5/7] RUN apt-get update
#8 0.327 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
#8 0.382 Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
#8 0.402 Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
#8 0.425 Get:4 https://deb.nodesource.com/node_20.x nodistro InRelease [12.1 kB]
#8 0.431 Get:5 http://deb.debian.org/debian bookworm/main arm64 Packages [8688 kB]
#8 0.564 Get:6 https://deb.nodesource.com/node_20.x nodistro/main arm64 Packages [8942 B]
#8 0.819 Get:7 http://deb.debian.org/debian bookworm-updates/main arm64 Packages [13.7 kB]
#8 0.822 Get:8 http://deb.debian.org/debian-security bookworm-security/main arm64 Packages [173 kB]
#8 1.000 Get:9 https://packages.sury.org/php bookworm InRelease [7548 B]
#8 1.141 Get:11 http://nginx.org/packages/debian bookworm InRelease [2869 B]
#8 1.267 Get:10 https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/debian bookworm InRelease [4625 B]
#8 1.272 Get:13 https://dl.cloudsmith.io/public/platformsh/cli/deb/debian bookworm InRelease [3675 B]
#8 1.334 Get:14 http://nginx.org/packages/debian bookworm/nginx arm64 Packages [14.3 kB]
#8 1.336 Get:12 https://dlm.mariadb.com/repo/maxscale/latest/apt bookworm InRelease [9341 B]
#8 1.376 Get:15 https://dl.cloudsmith.io/public/platformsh/upsun-cli/deb/debian bookworm InRelease [3681 B]
#8 1.501 Get:16 https://dl.cloudsmith.io/public/symfony/stable/deb/debian bookworm InRelease [4422 B]
#8 1.607 Get:17 https://dl.cloudsmith.io/public/platformsh/cli/deb/debian bookworm/main arm64 Packages [3887 B]
#8 1.711 Get:18 https://dl.cloudsmith.io/public/platformsh/upsun-cli/deb/debian bookworm/main arm64 Packages [2878 B]
#8 1.826 Get:19 https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/debian bookworm/main arm64 Packages [34.4 kB]
#8 2.204 Get:21 https://packages.sury.org/php bookworm/main arm64 Packages [236 kB]
#8 2.248 Get:20 https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/debian bookworm/main amd64 Packages [40.9 kB]
#8 2.304 Get:22 https://dl.cloudsmith.io/public/symfony/stable/deb/debian bookworm/main arm64 Packages [7465 B]
#8 2.612 Get:23 https://dlm.mariadb.com/repo/maxscale/latest/apt bookworm/main arm64 Packages [554 B]
#8 2.996 Get:24 https://dlm.mariadb.com/repo/maxscale/latest/apt bookworm/main amd64 Packages [553 B]
#8 3.014 Fetched 9527 kB in 3s (3348 kB/s)
#8 3.014 Reading package lists...
#8 DONE 3.4s

#9 [web 6/7] RUN curl -I https://www.google.com
#9 0.108   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#9 0.108                                  Dload  Upload   Total   Spent    Left  Speed
#9 0.108 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
#9 0.196 HTTP/2 200 
#9 0.196 content-type: text/html; charset=ISO-8859-1
#9 0.196 content-security-policy-report-only: object-src 'none';base-uri 'self';script-src 'nonce-f1een6RTfIiYDNQ_5iOx-Q' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp
#9 0.196 p3p: CP="This is not a P3P policy! See g.co/p3phelp for more info."
#9 0.196 date: Thu, 22 Aug 2024 15:35:02 GMT
#9 0.196 server: gws
#9 0.196 x-xss-protection: 0
#9 0.196 x-frame-options: SAMEORIGIN
#9 0.196 expires: Thu, 22 Aug 2024 15:35:02 GMT
#9 0.196 cache-control: private
#9 0.196 set-cookie: AEC=AVYB7cqqduG3-gxqpPMnRygRi4AH67XFpUfnoSeF_gl9M2s7tSydEe3dwWw; expires=Tue, 18-Feb-2025 15:35:02 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax
#9 0.196 set-cookie: NID=516=qvJgZ-fe3j-kABhD0a0mHdzVdPnuYW7Bjk7isZkgFaRNj1ePwseKwXcd3AXNzNpGQoxb2C4D5_cprj-zcg2ume5pccHyDufWheOMmw0joHq5SH--YOkPEQ5oEij22H4_ZdGNzM_oGvt3dsq8GzZXuOl8lq5hy_ZuFixcQdI40i4v0WS5fgwc; expires=Fri, 21-Feb-2025 15:35:02 GMT; path=/; domain=.google.com; HttpOnly
#9 0.196 alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
#9 0.196 
#9 DONE 0.2s

#10 [web 7/7] RUN chmod 777 /run/php
#10 DONE 0.1s

#11 [web] exporting to image
#11 exporting layers 0.1s done
#11 writing image sha256:507620a7d36fa5591beabfb935f257db6a2f5b475fa8f406d9fb319ba7be7eba done
#11 naming to docker.io/ddev/ddev-webserver:v1.23.2-tryddevproject-14427-built done
#11 DONE 0.1s
Refreshed Docker cache for project tryddevproject-14427 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.
Building project images...
.Project images built in 1s.
 Network ddev-tryddevproject-14427_default  Created
 Container ddev-tryddevproject-14427-web  Created
 Container ddev-tryddevproject-14427-db  Created
 Container ddev-tryddevproject-14427-db  Started
 Container ddev-tryddevproject-14427-web  Started
Starting Mutagen sync process...
Mutagen sync flush completed in 1s.
For details on sync status 'ddev mutagen st tryddevproject-14427 -l'
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-14427...
2024-08-22T08:35:24.861 Pulled image for ddev/ddev-webserver:v1.23.2
2024-08-22T08:35:24.862 Pulled image for busybox:stable
2024-08-22T08:35:24.863 Pulled image for ddev/ddev-ssh-agent:v1.23.2
2024-08-22T08:35:24.864 Pulled image for ddev/ddev-traefik-router:v1.23.2
2024-08-22T08:35:25.138 GetDockerContext: contextInfo='default unix:///Users/jlampton/.docker/run/docker.sock'
2024-08-22T08:35:25.138 Using Docker context default (unix:///Users/jlampton/.docker/run/docker.sock)
2024-08-22T08:35:25.433 chowning /mnt/ddev-global-cache and /var/lib/mysql to 501
2024-08-22T08:35:25.702 done chowning /mnt/ddev-global-cache and /var/lib/mysql to 501
2024-08-22T08:35:25.709 host.docker.internal='' because no other case was discovered
2024-08-22T08:35:25.775 Pulled image for ddev/ddev-dbserver-mariadb-10.11:v1.23.2
2024-08-22T08:35:25.776 Pulled image for ddev/ddev-webserver:v1.23.2
2024-08-22T08:35:25.777 Pulled image for ddev/ddev-ssh-agent:v1.23.2
2024-08-22T08:35:25.778 Pulled image for ddev/ddev-traefik-router:v1.23.2
Building project images...
2024-08-22T08:35:25.787 Executing docker-compose -f /Users/jlampton/Sites/emerisa/drupal/tryddevproject-14427/.ddev/.ddev-docker-compose-full.yaml build --progress=plain
.Project images built in 1s.
2024-08-22T08:35:26.793 Executing docker-compose -f /Users/jlampton/Sites/emerisa/drupal/tryddevproject-14427/.ddev/.ddev-docker-compose-full.yaml up -d
 Container ddev-tryddevproject-14427-db  Recreate
 Container ddev-tryddevproject-14427-web  Recreate
 Container ddev-tryddevproject-14427-db  Recreated
 Container ddev-tryddevproject-14427-web  Recreated
 Container ddev-tryddevproject-14427-db  Started
 Container ddev-tryddevproject-14427-web  Started
2024-08-22T08:35:37.426 VIRTUAL_HOST=tryddevproject-14427.ddev.site for web
2024-08-22T08:35:37.426 HTTP_EXPOSE=80:80,8025:8025 for web
2024-08-22T08:35:37.426 HTTPS_EXPOSE=443:80,8026:8025 for web
2024-08-22T08:35:37.79 Copied /Users/jlampton/Sites/emerisa/drupal/tryddevproject-14427/.ddev/traefik:CopyIntoVolume_vhtcaudqsgkj into /mnt/v/traefik in 41.581166ms
2024-08-22T08:35:37.824 Exec chown -R 501 /mnt/v/traefik stdout=, stderr=, err=<nil>
2024-08-22T08:35:37.904 Copied Traefik certs in /Users/jlampton/Sites/emerisa/drupal/tryddevproject-14427/.ddev/traefik/certs to ddev-global-cache/traefik
Starting Mutagen sync process...
2024-08-22T08:35:38.006 Using Mutagen config file /Users/jlampton/Sites/emerisa/drupal/tryddevproject-14427/.ddev/mutagen/mutagen.yml
2024-08-22T08:35:38.998 Mutagen status after sync: ok
Mutagen sync flush completed in 1s.
For details on sync status 'ddev mutagen st tryddevproject-14427 -l'
2024-08-22T08:35:38.999 Running /start.sh in ddev-webserver
Waiting for containers to become ready: [web db]
2024-08-22T08:35:41.376 Copied /Users/jlampton/.ddev/commands:CopyIntoVolume_zsegwqysmuns into /mnt/v/global-commands in 45.233834ms
2024-08-22T08:35:41.406 Exec chown -R 501 /mnt/v/global-commands stdout=, stderr=, err=<nil>
2024-08-22T08:35:41.595 Testing to see if /mnt/ddev_config is properly mounted
Starting ddev-router if necessary...
2024-08-22T08:35:42.009 Copied /Users/jlampton/.ddev/traefik:CopyIntoVolume_nkuhjuamrhhi into /mnt/v/traefik in 34.854541ms
2024-08-22T08:35:42.044 Exec chown -R 501 /mnt/v/traefik stdout=, stderr=, err=<nil>
2024-08-22T08:35:42.131 Copied global Traefik config in /Users/jlampton/.ddev/traefik/certs to ddev-global-cache/traefik
 Container ddev-router  Running
2024-08-22T08:35:42.196 Waiting for ddev-router to become ready. docker inspect --format "{{json .State.Health }}" ddev-router
2024-08-22T08:35:42.702 ddev-router is ready
Waiting for additional project containers to become ready...
All project containers are now ready.
Successfully started tryddevproject-14427
Project can be reached at https://tryddevproject-14427.ddev.site https://127.0.0.1:49910


======== 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 --:--:-- --:--:-- --:--:--     0HTTP/1.1 200 OK
Server: nginx
Date: Thu, 22 Aug 2024 15:35:44 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding


  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0


======== curl -I of http://127.0.0.1:49911 (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: Thu, 22 Aug 2024 15:35:44 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding



======== curl -I of http://tryddevproject-14427.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: Thu, 22 Aug 2024 15:35:44 GMT
Server: nginx
Vary: Accept-Encoding



======== Full curl of http://tryddevproject-14427.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   286    0   286    0     0  57257      0 --:--:-- --:--:-- --:--:-- 71500
Success accessing database... db via TCP/IP<br />
ddev is working.<br />
The output file for Discord or issue queue is in
<b>/var/folders/mw/_p1cl_rx69b3ll553w9cdvcc0000gn/T/ddev-debug-test.txt</b><br />
file:///var/folders/mw/_p1cl_rx69b3ll553w9cdvcc0000gn/T/ddev-debug-test.txt<br />


======== Full curl of https://tryddevproject-14427.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   286    0   286    0     0   6378      0 --:--:-- --:--:-- --:--:--  6500
Success accessing database... db via TCP/IP<br />
ddev is working.<br />
The output file for Discord or issue queue is in
<b>/var/folders/mw/_p1cl_rx69b3ll553w9cdvcc0000gn/T/ddev-debug-test.txt</b><br />
file:///var/folders/mw/_p1cl_rx69b3ll553w9cdvcc0000gn/T/ddev-debug-test.txt<br />


======== 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-BSlDNTsA59_eaMbliTe1bw' '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: Thu, 22 Aug 2024 15:35:44 GMT
server: gws
x-xss-protection: 0
x-frame-options: SAMEORIGIN
expires: Thu, 22 Aug 2024 15:35:44 GMT
cache-control: private
set-cookie: AEC=AVYB7cq-AVycwecsDBik-6YYh0z70bRHpdn1u34iSD7pVKF2f0Xg4397_KE; expires=Tue, 18-Feb-2025 15:35:44 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax
set-cookie: NID=516=fFNv8DzdQXT2Ut7I7fUWxUOu_di5x_J0MR1dtGb28wMOG1tYWLZqvdz1LFFOnxEXCLmJdIkrYxdtCtC-mD61U-7CDRxgJnEwjNmw3SmzQiQW1otzeWOgeOSM5bpFTMSG-S9gf8Gt4sDxDc-2OahjXMfwpJFNTFNE8g_0d09OXUcgPQDlfDZS; expires=Fri, 21-Feb-2025 15:35:44 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 (192.168.65.254) 56(84) bytes of data.
64 bytes from 192.168.65.254 (192.168.65.254): icmp_seq=1 ttl=63 time=0.342 ms

--- host.docker.internal ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.342/0.342/0.342/0.000 ms


======== Project ownership on host ========
drwxr-xr-x  4 jlampton  staff  128 Aug 22 08:34 ../tryddevproject-14427


======== Project ownership in container ========
drwxr-xr-x 4 jlampton dialout 4096 Aug 22 15:35 //var/www/html


======== In-container filesystem ========
Filesystem     Type 1K-blocks     Used Available Use% Mounted on
/dev/vda1      ext4  61202244 15730580  42330340  28% /var/www


======== Thanks for running the diagnostic! ========
Running ddev launch in 3 seconds
Running ddev launch
Waiting for ddev launch to complete before deleting project


Cleanup: deleting test project tryddevproject-14427
 Container ddev-tryddevproject-14427-db  Stopped
 Container ddev-tryddevproject-14427-web  Stopped
 Container ddev-tryddevproject-14427-db  Stopped
 Container ddev-tryddevproject-14427-web  Stopped
 Container ddev-tryddevproject-14427-db  Removed
 Container ddev-tryddevproject-14427-web  Removed
 Network ddev-tryddevproject-14427_default  Removed
Volume tryddevproject-14427-mariadb for project tryddevproject-14427 was deleted
Volume tryddevproject-14427-postgres for project tryddevproject-14427 was deleted
Volume tryddevproject-14427_project_mutagen for project tryddevproject-14427 was deleted
Project tryddevproject-14427 was deleted. Your code and configuration are unchanged.

Please remove the files from this test with 'rm -r ../tryddevproject-14427'

While offline and attempting to run ddev debug test ddev attempted to download things from the internet :/

stable: Pulling from library/busybox.

Expected Behavior

ddev should start even when computer is offline, by ignoring any action that requires internet access, specifically downloading docker images

Actual Behavior

ddev refuses to start without internet access

Steps To Reproduce

  1. turn off wifi
  2. manually edit .ddev/conf.yaml and set use_dns_when_possible: false
  3. manually add your site's ddev hostname into /etc/hosts
  4. run ddev start

Anything else?

I found this in the documentation for running docker offline:

However, it does not (yet) attempt to prevent Docker pulls if a new Docker image is required, so you’ll want to make sure that you try a ddev start before going offline to make sure everything has been pulled.

Unfortunately, I did not expect that running a local development enviornment would require internet access, so I am already in the airport and about to get on the plane. Whoopsie!

It's been about 15 minutes and I still see 74.12MB/501MB via phone hotspot - so wile I'm waiting I thought I'd create this issue. I did search for an issue to prevent ddev from pulling docker images while offline, but didn't find one. (If one already exists, please close this and direct me there)

@stasadev
Copy link
Member

stasadev commented Aug 22, 2024

stable: Pulling from library/busybox

If it tried to pull this image during ddev debug test, it means that the image was not available locally at all.
This is quite strange, because if DDEV was run once before, this busybox image would be there.
I can only imagine the following situations where this could happen:

  1. I am using buildx docker-container driver https://github.com/ddev/ddev/pull/6479/files and go offline.
  2. DDEV is installed on the machine for the first time, and I go offline immediately, obviously it can't work in this situation.
  3. I manually delete all my images and go offline.
  4. I change my Docker provider, for example from Docker Desktop to OrbStack, do not pull any images and go offline.

It's been about 15 minutes and I still see 74.12MB/501MB via phone hotspot

And this makes me think that the DDEV was updated, but the images were not.

This can easily happen when you run some software updates, don't notice that the DDEV is updated, and go offline.

A faster way to workaround this problem is to temporarily downgrade the DDEV to a previous version (downloading ~15MB using a mobile hotspot is much easier) - in this case the new images will not be downloaded.

curl -fsSL https://ddev.com/install.sh | bash -s v1.23.3
# and when you have stable internet, delete /usr/local/bin/ddev
sudo rm -f /usr/local/bin/ddev
# and reinstall DDEV using the preferred method for your OS

Another recommendation is to remove the old DDEV images after each update and start all projects so that they are all available for offline use:

  1. Run cleanup.
  2. Download the main images ddev debug download-images
  3. Start all projects ddev start --all
  4. And stop them ddev poweroff

I assume that this is a request to use v1.23.3 images (or any other tag available locally) with DDEV v1.23.4 when you are offline and don't have v1.23.4 images. But I don't think we should do this, because there may be significant changes in DDEV and images that might make it impossible to mix them.

@jenlampton
Copy link
Contributor Author

jenlampton commented Aug 22, 2024

I've updated the issue with the output from ddev debug test, but now that I'm online it may not be relevant :/

If it tried to pull this image during ddev debug test, it means that the image was not available locally at all.

It's possible this was the first tie I ran ddev debug test from this particular site, but I have been using ddev on other sites for quite a while. Does each project track its ddev libraries separately?

I manually delete all my images and go offline.

I did quit and restart Docker desktop thinking there might have been a docker issue, but I don't think that deletes all the images when restarted. I did not uninstall/reinstall. All my ddev projects still up show in ddev list (though stopped) -- but maybe that doesn't talk to docker when listing. Everything reported as Ok from ddev status.

And this makes me think that the DDEV was updated, but the images were not.

After runing ddev start (both yesterday when offline, and today), I do still see Upgraded DDEV v1.23.4 is available!.

I just ran brew upgrade ddev now, and I see

==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
[...]
Warning: ddev/ddev/ddev 1.23.4 already installed`

I'm not sure what that warning means. Was it already half updated?

This can easily happen when you run some software updates, don't notice that the DDEV is updated, and go offline.

I did do an OS update, recently, I think maybe overnight the night before? But I've never had that do a brew upgrade before.

Another recommendation is to remove the old DDEV images after each update and start all projects so that they are all available for offline use:

Now that I've updated ddev to 1.23.4, I've run the cleanup.

I assume that this is a request to use v1.23.3 images (or any other tag available locally) with DDEV v1.23.4 when you are offline and don't have v1.23.4 images.

I agree, that doesn't sound like a good idea. I just wanted the same ddev project I'd run the day before with no issues (looks like that was last-started-version=v1.23.2), to be able to start again even when offline.

@rfay
Copy link
Member

rfay commented Aug 22, 2024

The fundamental thing for working offline:

Make sure you ddev start all projects you need to use before going offline. Then do a ddev restart on them when you're offline.

If ddev --version shows you v1.23.4 then you're OK and upgraded.

@stasadev
Copy link
Member

Does each project track its ddev libraries separately?

I guess you mean images. If we are talking about busybox:stable image, then it's shared, and each project can run a container based on this image. The same thing is with ddev/ddev-webserver, and other images.

looks like that was last-started-version=v1.23.2

Yes, we have this config, but it's used for a different purpose, I'm not sure we can use it here.

I'm not sure what that warning means. Was it already half updated?

Please see https://ddev.readthedocs.io/en/stable/users/usage/faq/#why-do-i-have-an-old-ddev.
There is a high chance that you have multiple DDEV binaries installed using different methods.

@rfay
Copy link
Member

rfay commented Aug 23, 2024

I just tested successfully, macOS, Docker Desktop.

The key is:

Make sure you ddev start all projects you need to use before going offline. Then do a ddev restart on them when you're offline.

I will do a docs PR to make that clearer. It's the fundamental thing. Closing for now, happy to continue the conversation here or elsewhere.

@rfay rfay closed this as completed Aug 23, 2024
@rfay rfay changed the title When offline: prevent Docker pulls if a new Docker image is required Using DDEV offline requires Docker images to already have been pulled Aug 23, 2024
@rfay
Copy link
Member

rfay commented Aug 23, 2024

@jenlampton I'd appreciate it if you could review the updated "offline" page at https://ddev--6502.org.readthedocs.build/en/6502/users/usage/offline/ (PR #6502)

@jenlampton
Copy link
Contributor Author

jenlampton commented Aug 23, 2024

Make sure you ddev start all projects you need to use before going offline. Then do a ddev restart on them when you're offline.

Ah! That's probably it. I always to ddev start to restart an existing project, and never ddev restart (unless the project is already running). I'll retrain myself!

If ddev --version shows you v1.23.4 then you're OK and upgraded.

yes, It does now. I just wonder how/why v1.23.2 tried to update when offline, both for start and debug test on a project that was working perfectly the day before.

There is a high chance that you have multiple DDEV binaries installed using different methods.

It doesn't look like it. But it does appear to be getting added to my $PATH twice.

> which -a ddev
/usr/local/bin/ddev
/usr/local/bin/ddev

I'd appreciate it if you could review the updated "offline" page at ddev--6502.org.readthedocs.build/en/6502/users/usage/offline (PR #6502)

Will do!

@rfay
Copy link
Member

rfay commented Aug 23, 2024

Ah! That's probably it. I always to ddev start to restart an existing project, and never ddev restart (unless the project is already running). I'll retrain myself!

No, restart is always fine and in a few cases better than start. It's nothing more or less than ddev stop and ddev start. The point is, start a project to make sure that all necessary images have been pulled before going offline.

@jenlampton
Copy link
Contributor Author

jenlampton commented Aug 23, 2024

The point is, start a project to make sure that all necessary images have been pulled before going offline.

Yes, that is painfully obvious :)

It's nothing more or less than ddev stop and ddev start

Are you saying that a restart does not skip the checks for updated images? If so, then perhaps this is not the solution I was hoping for.

@rfay
Copy link
Member

rfay commented Aug 23, 2024

ddev restart does nothing about checks for updated images. In all cases docker-compse build and docker-compose up are being run during the start phase. Nothing different about pulling images. If they are there, they are used. If not, they must be pulled.

@jenlampton
Copy link
Contributor Author

jenlampton commented Aug 23, 2024

There's no way to just run the same code today that was working yesterday? (since, I may be offline, for example). How does it even learn that images have been updated?

@rfay
Copy link
Member

rfay commented Aug 23, 2024

If you started the project yesterday, it will start today.

If you change your webimage_extra_packages or .ddev/web-build/Dockerfile.*, or your DDEV version, you likely won't be able to start when offline, because they require internet connectivity.

But none of that has to do with your code. Your code is not built into the docker images.

@rfay
Copy link
Member

rfay commented Aug 23, 2024

You can see the images that DDEV uses with ddev version - the only thing that isn't clear there is it shows only the default database server (mariadb:10.11).

If you change database servers, that will also mess you up, because if you don't have the image downloaded you need, it will need to be pulled.

The code that you were working with yesterday or last week has nothing to do with the Docker images. That PHP code is mounted into the container at start-time.

@jenlampton
Copy link
Contributor Author

jenlampton commented Aug 23, 2024

If you started the project yesterday, it will start today.

That was not my experience :(

If you change your webimage_extra_packages or .ddev/web-build/Dockerfile.*, or your DDEV version, you likely won't be able to start when offline, because they require internet connectivity. [or database servers]

This all makes sense.

But none of that has to do with your code. Your code is not built into the docker images.

Sorry, I was thinking of "Docker images" like composer packages, which contain code - this may be the wrong assumption. What I meant was "all the code ddev is using to operate" (perhaps this only relevant if ddev itself needs a version update) as well as "all the images I used yesterday". I don't know what is inside an image, I was assuming it was probably some kind of code. :)

As you mentioned, my own PHP code is irrelevant here.

@rfay
Copy link
Member

rfay commented Aug 23, 2024

If you were using the same DDEV version yesterday and you started the same project and you're using the same Docker provider, today's experience with no internet will be (likely) the same as yesterday's. There are many caveats... if your project requires internet access, if you change a build requirement like webimage_extra_packages, etc. Or change database server (which is a different image), or if you add a ddev add-on which requires an extra service (which requires an image). I think you understand all those caveats.

@jenlampton
Copy link
Contributor Author

I'm going to loop back around to this idea...

There is a high chance that you have multiple DDEV binaries installed

Because here's the output from ddev version for the project that wouldn't start:

ITEM             VALUE                                    
 DDEV version     v1.23.2                                  
 architecture     arm64                                    
 cgo_enabled      0                                        
 db               ddev/ddev-dbserver-mariadb-10.11:v1.23.2 
 ddev-ssh-agent   ddev/ddev-ssh-agent:v1.23.2              
 docker           27.0.3                                   
 docker-api       1.46                                     
 docker-compose   v2.27.0                                  
 docker-platform  docker-desktop                           
 global-ddev-dir  /Users/jlampton/.ddev                    
 mutagen          0.17.2                                   
 os               darwin                                   
 router           ddev/ddev-traefik-router:v1.23.2         
 web              ddev/ddev-webserver:v1.23.2 

But if I do brew info ddev it says 1.23.4

> brew info ddev
==> ddev/ddev/ddev: stable 1.23.4, HEAD
DDEV
https://github.com/ddev/ddev
Installed
/opt/homebrew/Cellar/ddev/1.23.4 (8 files, 19.7MB)
  Built from source on 2024-08-10 at 15:55:08
From: https://github.com/ddev/homebrew-ddev/blob/HEAD/Formula/ddev.rb
License: Apache 2
==> Dependencies
Build: go ✘, make ✔
Required: mkcert ✔
==> Options
--HEAD
	Install HEAD version
==> Caveats
Bash completion has been installed to:
  /opt/homebrew/etc/bash_completion.d

and it looks like I'm not using the homebrew verison here?

> which -a ddev
/usr/local/bin/ddev
/usr/local/bin/ddev

I think this is my problem. I need to find the other ddev and get rid of it...

@rfay
Copy link
Member

rfay commented Aug 23, 2024

You definitely have a problem.

Please show the output of ls -l /usr/local/bin/ddev && file /usr/local/bin/ddev

There should not be a ddev binary there. Your homebrew ddev binary on your Apple Silicon machine is in /opt/homebrew/bin/ddev

(After you show what's there, we'll end up deleting /usr/local/bin/ddev, but it's important to know what you have there)

As @stasadev suggested, the FAQ may help you, https://ddev.readthedocs.io/en/stable/users/usage/faq/#why-do-i-have-an-old-ddev

@rfay
Copy link
Member

rfay commented Aug 23, 2024

Bedtime for me in Ireland, but figure out what's in /usr/local/bin/ddev and document it and delete it.

Then it looks like perhaps your homebrew ddev is not linked. So brew link --force ddev to get it linked. Then which ddev should show /opt/homebrew/bin/ddev and ddev --version should show the right one.

@jenlampton
Copy link
Contributor Author

Please show the output of ls -l /usr/local/bin/ddev && file /usr/local/bin/ddev

> ls -l /usr/local/bin/ddev
-rwxr-xr-x  1 jlampton  wheel    20M Jun 13 19:13:32 2024 /usr/local/bin/ddev

> There should not be a ddev binary there. 

There was :( I have deleted it.

> As @stasadev suggested, the FAQ may help you

Yes! The recommended version checking in the FAQ is what lead me to [my previous comment](https://github.com/ddev/ddev/issues/6499#issuecomment-2307805770). 

> Then which ddev should show /opt/homebrew/bin/ddev and ddev --version should show the right one.

which -a ddev
/opt/homebrew/bin/ddev
/opt/homebrew/bin/ddev
ddev --version
ddev version v1.23.4


I feel much more confident that I understand the problem now. Thanks for your time @rfay. I will test ddev offline tomorrow!

@jenlampton jenlampton changed the title Using DDEV offline requires Docker images to already have been pulled Using DDEV offline may not work with multiple DDEV binaries installed Aug 24, 2024
rfay added a commit that referenced this issue Aug 25, 2024
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

3 participants