DDEV-Local is a local development environment for PHP projects, https://github.com/drud/ddev
ddev mysql
; More details at https://ddev.com/ddev-local/ddev-local-database-management/
Hi all. Been enjoying ddev a great deal on two different computers. Win 10 Pro, WSL2 Ubuntu 20.04. Suddenly my laptop (16GB Samsung NVMe) started running ddev launch very slowly (1 or 2 min). It never fails or gives an error. Every other aspect of ddev is running great. Sites reload fast after launch. I've tried to run all updates and network troubleshooting. I don't see any other ports listening. I've reset Docker to factory.
Maybe a coincidence but I first noticed it after I tried to import a local.sql into a wordpress project. I've tried everything I can figure out to delete all databases from all projects and reset all containers. It even happens on new basic php projects.
It's odd that it suddenly became a problem again after a month or more but I'm not too surprised given all the updates going on these days. I definitely remember running into this before during initial setup.
I'm happy to document or discuss findings if anyone can point me to the best location to mention this solution?
It actually occurred to me last night that the public/private Windows firewall issue I had previously was with X410 and not with DDEV. There is some aspect of WSL 2 networking that Windows treats as a public network. I have been burned a couple of times because my primary network connection was designated as a private network connection and I thought I only needed to disconnect the private firewall profile during troubleshooting because that had previously been sufficient.
It may be worth noting that Windows WSL 2 users should disable both their public and private firewalls during troubleshooting even if their current network connection is designated as private.
This issue got me pointed in the right direction. microsoft/WSL#4139
I am attempting to loosen the windows firewall rules for public networks to allow me to keep the firewall for public networks turned on. Currently ddev launch works fine while the windows private firewall is turned on. I am using wireshark and windows 10 firewall logs to try to figure out which apps and ports to allow.
Any idea about where I can learn more about how ddev launch uses the network to aid my troubleshooting?
I have gathered that ddev router must handle dns in place of the windows hosts file but I would love to wrap my head around the big picture of how ddev handles the required networking.
DDEV-Local completes every time without error, however it takes several minutes for ddev launch to complete when the Windows Firewall Public Profile is activated.
Nothing ever shows up as blocked in the firewall logs. It just seems to take a while for Windows Firewall to decide if it's OK or not.
Win Public Firewall on...
Wireshark shows... as BAD TCP being retransmitted
172.19.176.1 : (42074, 42084, 42086, 42096, 42098) (WSL)
->TCP
172.19.180.159 : 6000 (WSL Ubuntu inet)
ddev launch
is just a script in .ddev/commands/host - you can look at it. It just tries to use the Linux technique to open a browser, which happens to be implemented in WSL2. That's it. If the browser launches, it's working. It it takes a long time for the browser to get to the page, that's a different thing.
Try just going to the URL that ddev start
puts out. That's a better test.
Thanks for the nudge in the right direction. I noticed that the ddev launch script essentially calls xdg-open https://yoursite.ddev.site.
ddev start has worked fine the whole time and manually pasting the URL has worked the whole time. It seems the only problem was with xdg-open, wsl 2, and windows firewall public profile. Not sure why it popped up months later after everything was working great. I'm guessing Ubuntu apt upgrade or more likely Windows updates
I was able to fix the firewall issue by creating a Windows Firewall (Public profile) Inbound Allow Rule with the following criteria...
I suspect that IP address may change and I'll have to come up with a more global option but I wanted to see how narrow I could get the rule on my own for now.
I got x410 working a month ago with phpstorm. Luckily I just had to add the public network profile to the existing x410 firewall allow rules along with the private and domain profiles that were already there.
@rfay, by the way, I love using DDEV. It has really brought together all the technologies that I struggled to get working together in a beneficial manner. I credit your excellent documentation. Also coincidental I just heard your interview on the ostraining podcast, https://www.ostraining.com/blog/podcasting/randy-ddev/ , I'm looking forward to learning more about DDEV because using it has helped me learn so much about docker, wsl 2, phpstorm, composer, and git with wordpress leveraging bedrock. DDEV has really taken the struggle out of the local dev part, kept my os and wsl 2 distros clean, and given me great performance. Thank you!
hi, i have problem. my setup is windows + wsl2. have ddev in wsl2. and then one day (no idea what destroyed my setup) ddev stop forward ports to ssl.
so ddev describe give sth like that:
https://mysite.ddev.site https://127.0.0.1:49165
and https://127.0.0.1:49165 - works fine, https://mysite.ddev.site -not works at all, https://mysite.ddev.site:49165 - also works fine.
have no idea how to debug, CAROOT is set in my Linux (ubuntu) proper etc etc. What i should check? thx!
export DRUSH_ALLOW_XDEBUG=0 && /usr/local/bin/drush st
from inside the web container, PhpStorm will still start a debug session. How can I narrow down the possible causes?
nfs_mount_enabled: false
, and all's well
eecom.test
eeu.eecom.test
so I have the following defined root /var/www/html/eeu;
and server_name eeu.eecom.test;
and have simply called the conf file eeu.conf
. I've also defined additional_hostnames: [eeu.eecom]
in my projects config.yaml.sudo passwd [username]
. I had issues installing Linuxbrew because by default there is no password set, but it kept asking for a sudo password for some reason. Once I re-installing using a sudo password, I had no issues. This could be a just me type issue.