More ddev fixes

Submitted by Nicolabell on Fri, 05/24/2019 - 17:06

 

ddev rm -a is my hero

If in doubt, ddev rm, ddev rm -a, ddev poweroff, ddev config, ddev restart are all your friends!!!

 

Phantom projects in list

If a project container is still appearing in ddev list with a status of 'app directory missing' is there any way to delete the container?

Answer: Ddev rm -a or ddev rm project or docker rmOrigina

----

Duplicate mount point

msql

From Nigel:

This morning I had a docker issue similar to yours of yesterday. I got

```Failed to start edibles: Failed to run docker-compose [-f /home/qpc/docker-sites/ddev/projects/edibles/.ddev/docker-compose.yaml up --build -d], err='exit status 1', stdout='', stderr='Recreating ddev-edibRecreating ddev-edibles-db ... error
ERROR: for ddev-edibles-db  Cannot create container for service db: Duplicate mount point: /var/lib/mysql```

I found a Randy Fay quote "Names of projects must definitely be unique." so I renamed my project (in .ddev/config.yaml) from 'edibles' to 'edibles-quick' and ddev start worked fine. Although I no longer have a folder called 'edibles' it seems that docker was remembering some long-ago 'edibles' container. $ docker ps showed me that there was no such container actually running. I used $ docker image ls to list all images, but there are loads and I couldn't tell which was the old 'edibles' one.

Other ports:

From documentation: https://ddev.readthedocs.io/en/latest/users/troubleshooting/

"To configure a project to use non-conflicting ports, edit the project's .ddev/config.yaml to add entries like router_http_port: 8000 and router_https_port: 8443 depending on your needs. Then use ddev start again."

---

Port already in use

Failed to start lpn: Unable to listen on required ports, port 8025 is already in use,
Troubleshooting suggestions at https://ddev.readthedocs.io/en/stable/users/troubleshooting/#unable-listen

Use this to see what's listening on which port:

sudo lsof -i :80 -sTCP:LISTEN

You probably want to do a ls -a to see your .ddev directory and have a look in the config.yaml to see which port ddev is trying to use. You could change it to something else and see if that'll fix it.

If there isn't anything obvious, restarting the machine seems fingers crossed to do the trick (make sure to ddev stop / ddev rm first, or the very exciting ddev poweroff which I think is new.)

----

Permissions error - cphpstatus FAILED

Cannot kill container when trying to stop or rm a project - this happened so frequently at the start of 2019 that I had to add an issue to stack overflow: https://stackoverflow.com/questions/56415685/ddev-permissions-issue-cannot-stop-rm-or-kill-project

https://stackoverflow.com/questions/54279514/how-to-stop-running-container-if-error-response-from-daemon-is-cannot-kill-con - I thought this had helped in the past but it actually meant I completely broke the Docker daemon and took ages fixing that. But in fact this meant I got up to the latest version of Docker so I suppose that's a good thin in a way...

I've found that using 'ddev rm' and specifying the project name sometimes helps.

----

Mkcert certificate stuff:

https://stackoverflow.com/questions/56296905/how-do-i-get-web-browsers-in-third-party-containers-in-ddev-to-accept-my-mkcert/56296906#56296906

Reply form ddev channel on drupal slack:

Would rather you posted ddev questions to Stack Overflow, where we get immediate notification.You say you've updated docker, but you quote docker 18.06, which is a year old... Not that it would matter.Do you use `ddev stop -a` to stop things? It's the PhpMyAdmin container that seems to be hanging for you.If you could give me the whole context it would help. Do a `docker stop` (v1.8.0) and show the results.If this is just a one-time affair, you can fix it by restarting docker and then `ddev stop -a`

 

-----

phpstatus FAILED

Failed to start lpn-lpn: web container failed: log=phpstatus FAILED, err=container /ddev-lpn-lpn-web unhealthy: phpstatus FAILED

For this I did a simple ddev rm and then ddev start seemed to fix the issue.

 

-----

 

Add to useful block
On