Skip to main content

Common Errors

There are a few error messages that you might run across while setting up the development environment that seem cryptic, but generally have very straight forward solutions.

docker.sock Error

Error Message:

request returned Internal Server Error for API route and version 
http://%2FUsers%2Fexample%2F.docker%2Frun%2Fdocker.sock/v1.24/containers/json?all=1&filters=%7B%22label%22%3A%7B%22com.docker.compose.config-hash%22%3Atrue%2C%22com.docker.compose.project%3Dorganic-dev-core%22%3Atrue%7D%7D,
check if the server supports the requested API version

Solution: Restart the Docker daemon on your computer. Easiest route is by clicking on the Docker whale icon in your taskbar and clicking Restart.

mysql-dev.cnf Error

Error Message:

Error response from daemon: Mounts denied: 
The path /opt/homebrew/lib/python3.11/site-packages/organic_dev_core/config/mysql8/mysql-dev.cnf is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.

Solution:

This happens if you are trying to use a globally installed copy of the organic-cli.

To resolve it, make sure to run a venv copy of it by starting up the venv in the directory you are running it from:

python3 -m venv $HOME/organic-dev-venv && source $HOME/organic-dev-venv/bin/activate

mysqli_real_connect Error

Error Message:

Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in
/var/www/html/web/wp/wp-includes/class-wpdb.php on line 2022

Solution:

Make sure that you have the .env file created out of the .env.example file and uncommented the following line if you are on a Mac:

DOCKER_HOST=host.docker.internal

Once you've done this, restarting the app with organic-cli up should work.