This document contains solutions to the most common issues related to the Docker SDK.
This section describes common issues related to installation.
when
Running the docker/sdk up
console command returns a similar error:
Error response from daemon: Bad response from Docker engine
then
- Make sure Docker daemon is running.
- Run
docker/sdk up
again.
when
Running docker-sync clean
returns an error similar to the following:
docker: Error response from daemon: Conflict. The container name "/data-sync" is already in use by container "47dd708a7a7f9550390432289bd85fe0e4491b080748fcbba7ddb3331de2c7e7". You have to remove (or rename) that container to be able to reuse that name.
then
- Run
docker-sync clean
. - Run
docker/sdk up
again.
when You get an error similar to the following:
Unable to find image "eugenmayer/unison:[email protected]' Locally
docker: Error response from daemon: manifest for eugenmayer/unison:[email protected] not found: manifest unknown: manifest unknown.
then Update docker-sync:
gem install docker-sync
when
Running the command setup-search-create-sources [vendor/bin/console search:setup:sources]
returns the exception:
Elastica\Exception\Connection\HttpException - Exception: Couldn't resolve host
in /data/vendor/ruflin/elastica/lib/Elastica/Transport/Http.php (190)
then Increase RAM for Docker usage.
when
You get an error similar to vendor/bin/console: not found
.
then Re-build basic images, assets, and codebase:
docker/sdk up --build --assets
when
The frontend:project:install-dependencies
command returns an error similar to the following:
--> DEVELOPMENT MODE
Store: US | Environment: docker
Install Project dependencies
[info] npm
[info] WARN prepare
[info] removing existing node_modules/ before installation
[info]
> [email protected] install /data/node_modules/fsevents
> node-gyp rebuild
[info] gyp
[info] ERR! find Python
gyp ERR! find Python
[info] Python is not set from command line or npm configuration
gyp ERR!
[info] find Python Python is not set from environment variable PYTHON
gyp ERR!
[info] find Python checking if "python" can be used
gyp ERR!
then
- In
deploy.*.yaml
, change the base PHP image:
image:
tag: spryker/php:7.3-alpine3.10
- Fetch the changes and start the instance:
docker/sdk boot && docker/sdk up
when Demo data was imported incorrectly.
then Re-load demo data:
docker/sdk clean-data && docker/sdk up --data && docker/sdk console q:w:s -v -s
This section describes common issues related to running applications.
when
Running the docker/sdk up
console command returns an error similar to the following:
ERROR: for nginx_frontend Cannot start service nginx_frontend: driver failed programming external connectivity on endpoint spryker_nginx_frontend_1 (e4fdb360f6c9a3243c0a88fa74f8d377325f65b8cd2340b2dacb51377519c1cf): Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error (Failure EADDRINUSE)
then
- Check what process occupies the port:
sudo lsof -nPi:80 | grep LISTEN
- Stop the process or make it use a different port.
- Run
docker/sdk up
again.
when
You get the 413 Request Entity Too Large
error.
then
- Increase the maximum request body size for the related application. See Deploy File Reference - 1.0 to learn how to do that.
- Fetch the update:
docker/sdk bootstrap
- Re-build applications:
docker/sdk up
when You get the Nginx welcome page by opening an application in the browser.
then
- Update the nginx:alpine image:
docker pull nginx:alpine
- Re-build applications:
docker/sdk up
when An application like Yves, BackOffice(Zed), GlueStorefront(Glue), GlueBackend or MerchantPortal is not reachable after installation.
then
In deploy.*.yml
, ensure that SSL encryption is disabled:
docker:
ssl:
enabled: false
when You get the error:
unable to reconcile Mutagen sessions: unable to create synchronization session (spryker-dev-codebase): unable to connect to beta: unable to connect to endpoint: unable to dial agent endpoint: unable to create agent command: unable to probe container: container probing failed under POSIX hypothesis (signal: killed) and Windows hypothesis (signal: killed)
then
- Restart your OS.
- If the error persists: Check Mutagen documentation.
when There is a synchronization issue.
then
- Restart your OS.
- Run the commands:
docker/sdk trouble
mutagen sync list
mutagen sync terminate <all sessions in the list>
docker/sdk up
when Revert on specific Mutagen version. E.G you are using Docker Compose V1 and you don't have the possibility to update to the docker compose v2 (mandatory requirement).
then
- Get commit hash from https://github.com/mutagen-io/homebrew-mutagen/commits/master
- Remove prev mutagen version:
brew uninstall --ignore-dependencies {{ mutagen || mutagen-beta }}
- Run the commands:
cd "$(brew --repo mutagen-io/homebrew-mutagen)" && \
git checkout {{ HASH COMMIT FROM mutagen-io/homebrew-mutagen }} && \
HOMEBREW_NO_AUTO_UPDATE=1 brew install mutagen-io/mutagen/{{ mutagen || mutagen-beta }} && \
mutagen daemon stop && \
mutagen daemon start && \
cd -
when Error:
unable to bring up Mutagen Compose sidecar service: unable to reconcile Mutagen sessions: unable to connect to Mutagen daemon: client/daemon version mismatch (daemon restart recommended)
then
- Run the commands:
mutagen daemon stop
docker/sdk prune
This section describes common issues related to debugging.
when Xdebug does not work.
then
- Ensure that Xdebug is enabled in
deploy.*.yml
:
```yaml
docker:
...
debug:
xdebug:
enabled: true
- Ensure that IDE is listening to the port 9000.
- Check if the host is accessible from the container:
docker/sdk cli -x bash -c 'nc -zv ${SPRYKER_XDEBUG_HOST_IP} 9000'
when
nc
command does not give any output.
then Contact us.
when
nc
command tells that the port is opened.
then
- Check what process occupies the port 9000 by running the command on the host:
sudo lsof -nPi:9000 | grep LISTEN
- If it's not your IDE, free up the port to be used by the IDE.
when
PHP xdebug
extension is not active in CLI.
then
Exit the CLI session and enter it with the -x
argument:
docker/sdk cli -x
docker/sdk testing -x
when
PHP xdebug
extension is not active when accessing the website via a browser or curl.
then
Try the following:
- Set the
XDEBUG_SESSION=spryker
cookie for the request. You can use a browser extension like Xdebug helper. - Run the following command to switch all applications to debug mode:
docker/sdk run -x
when It's not possible to establish the database connection from the host machine.
then
- Check that the deploy yml file is used and make sure the port is exposed.
- Check that port is not occupied by the local process by running
sudo lsof -nP -i4TCP:3306 | grep LISTEN
(with port declared in the deploy.yml file). - Check if the proper credentials and database name are used. You can find all the required information in the deploy yml file.
when
You get an error after running docker/sdk cli {ARGUMENT_1}
.
then
Wrap the command arguments into single quotes. For example, docker/sdk cli 'composer require spryker/*'
when
Node Sass does not yet support your current environment: Linux Unsupported architecture (arm64) with Node.js
then
- remove
node-sass
dependencies inpackage.json
- add
sass
andsass-loader
...
"sass": "~1.32.13",
"sass-loader": "~10.2.0",
...
- update
@spryker/oryx-for-zed
...
"@spryker/oryx-for-zed": "~2.11.5",
...
- add option to sass-loader (
frontend/configs/development.js
)
loader: 'sass-loader',
options: {
implementation: require('sass'),
}
- run
docker/sdk cli
- run
npm install
to updatepackage-lock.json
and install dependencies - (if yarn usage) run
yarn install
to updatepackage-lock.json
and install dependencies - run
npm run yves
to rebuild yves - run
npm run zed
to rebuild zed
when Error 403 No valid crumb was included in the request
then Check your project configuration. Jenkins CSRF protection should be enabled.
...
$config[SchedulerJenkinsConstants::JENKINS_CONFIGURATION] = [
SchedulerConfig::SCHEDULER_JENKINS => [
SchedulerJenkinsConfig::SCHEDULER_JENKINS_CSRF_ENABLED => true,
],
];
...
You can use SPRYKER_JENKINS_CSRF_PROTECTION_ENABLED
env variable. This variable depends on deploy file parameter from scheduler
services:
scheduler:
csrf-protection-enabled: { true | false }
...
$config[SchedulerJenkinsConstants::JENKINS_CONFIGURATION] = [
SchedulerConfig::SCHEDULER_JENKINS => [
SchedulerJenkinsConfig::SCHEDULER_JENKINS_CSRF_ENABLED => (bool)getenv('SPRYKER_JENKINS_CSRF_PROTECTION_ENABLED'),
],
];
...
when Assets install error
line 1: run-s: not found
then
- ensure you are using latest docker-sdk and spryker/php image.
- run
docker/sdk pull
- run
docker/sdk boot {{your deploy file}} && docker/sdk up --build
when Installation error with Mutagen v0.18.*
unable to bring up Mutagen Compose sidecar service: Error response from daemon: network is ambiguous (5 matches found based on ID prefix)
then brew unlink mutagen && brew unlink mutagen-compose && brew install mutagen-io/mutagen/[email protected] mutagen-io/mutagen/[email protected]