question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot start docker services

See original GitHub issue

Hello.

I’m struggling with docker in AP 2.2.0. When I run docker-compose up -d, everythings seems to work.

docker-compose up -d --build

...

Successfully built d04505723c6d
Creating apiplatform220_admin_1       ... done
Creating apiplatform220_php_1         ... done
Creating apiplatform220_client_1      ... done
Creating apiplatform220_api_1         ... done
Creating apiplatform220_admin_1       ...
Creating apiplatform220_cache-proxy_1 ... done
Creating apiplatform220_cache-proxy_1 ...
Creating apiplatform220_h2-proxy_1    ... done

But when I try to open https://localhost I’m having an exception ERR_CONNECTION_REFUSED.

My logs :

docker-compose logs -f
Attaching to apiplatform220_h2-proxy_1, apiplatform220_cache-proxy_1, apiplatform220_api_1, apiplatform220_admin_1, apiplatform220_client_1, apiplatform220_php_1, apiplatform220_db_1
h2-proxy_1     | 2018/02/16 21:26:45 [emerg] 1#1: host not found in upstream "client" in /etc/nginx/conf.d/default.conf:9
api_1          | 2018/02/16 21:26:19 [emerg] 1#1: host not found in upstream "php" in /etc/nginx/conf.d/default.conf:11
h2-proxy_1     | nginx: [emerg] host not found in upstream "client" in /etc/nginx/conf.d/default.conf:9
api_1          | nginx: [emerg] host not found in upstream "php" in /etc/nginx/conf.d/default.conf:11
cache-proxy_1  | + varnishd -a :80 -f /etc/varnish/default.vcl -s malloc,256m
php_1          | Composer could not find a composer.json file in /srv/api
admin_1        | yarn run v1.3.2
client_1       | yarn run v1.3.2
cache-proxy_1  | Error: Cannot read -f file '/etc/varnish/default.vcl' (No such file or directory)
php_1          | To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
admin_1        | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
db_1           | LOG:  database system was shut down at 2018-02-16 21:07:03 UTC
client_1       | error Couldn't find a package.json file in "/usr/src/client"
cache-proxy_1  | (-? gives usage)
admin_1        | error Couldn't find a package.json file in "/usr/src/admin"
db_1           | LOG:  MultiXact member wraparound protections are now enabled
client_1       | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
db_1           | LOG:  database system is ready to accept connections
db_1           | LOG:  autovacuum launcher started
db_1           | LOG:  database system was interrupted; last known up at 2018-02-16 21:08:05 UTC
db_1           | LOG:  database system was not properly shut down; automatic recovery in progress
db_1           | LOG:  invalid record length at 0/14EE8E0: wanted 24, got 0
db_1           | LOG:  redo is not required
db_1           | LOG:  MultiXact member wraparound protections are now enabled
db_1           | LOG:  database system is ready to accept connections
db_1           | LOG:  autovacuum launcher started
apiplatform220_h2-proxy_1 exited with code 1
apiplatform220_api_1 exited with code 1
apiplatform220_client_1 exited with code 1
apiplatform220_php_1 exited with code 1
apiplatform220_cache-proxy_1 exited with code 255
apiplatform220_admin_1 exited with code 1

Anyone can help me ?

Additional notes

OS : Windows

docker -v
Docker version 17.12.0-ce, build c97c6d6
docker-compose ps
            Name                          Command               State             Ports
------------------------------------------------------------------------------------------------
apiplatform220_admin_1         /bin/sh -c yarn start           Exit 1
apiplatform220_api_1           nginx -g daemon off;            Up         0.0.0.0:8080->80/tcp
apiplatform220_cache-proxy_1   docker-app-start                Exit 255
apiplatform220_client_1        /bin/sh -c yarn start           Exit 1
apiplatform220_db_1            docker-entrypoint.sh postgres   Up         0.0.0.0:5433->5432/tcp
apiplatform220_h2-proxy_1      nginx -g daemon off;            Exit 1
apiplatform220_php_1           docker-entrypoint php-fpm       Exit 1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:37 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
LoicHacommented, Apr 24, 2019

I manage to solve my issue by doing this :

  1. On Command Line: “set COMPOSE_CONVERT_WINDOWS_PATHS=1”;
  2. Restart Docker for Windows;
  3. Go to Docker for Windows settings > Shared Drives > Reset credentials > select drive > Apply; image

If select a drive and apply doesn’t work (that was the case for me ), do a Reset to factory default… in Reset docker tab. image

  1. docker-compose up -d --build --force-recreate
2reactions
jon-htcommented, Apr 16, 2018

I’m using Docker for Windows and I’ve uninstalled/installed the latest version. I don’t understand what happend but I’ve finally succeeded to make it work with this : https://stackoverflow.com/questions/42203488/settings-to-windows-firewall-to-allow-docker-for-windows-to-share-drive/43904051#43904051

In PowerShell granted as admin Set-NetConnectionProfile -interfacealias "vEthernet (DockerNAT)" -NetworkCategory Private

But I’m not sure about that. I’ve rebooted my PC and it doesn’t work anymore

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't start docker service - General
HI, While i'm trying to use docker its shows Error response from daemon: 404 page not found Do you have any solution for...
Read more >
docker swarm how to find out why service can't start
I have trouble finding out why a container won't start. I found the command docker service ps {serviceName} which List the tasks of...
Read more >
What to Do if Docker Desktop for Windows Does Not Start
Remove Docker in “Add or remove programs”; Restart your computer; Install Docker as Administrator (and not by running the installer directly).
Read more >
Docker Desktop fails to start/run on Windows startup #10958
When trying to open the UI for Docker Desktop, it doesn't even open or loads infinitely. Restarting the Docker Desktop.exe and the com.docker....
Read more >
How to Resolve the “cannot connect to the Docker daemon ...
Resolving the “cannot connect to the Docker daemon” Error · 1. First, check if the Docker engine is running: sudo service docker status...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found