EasyEngine / EasyEngine/easyengine
The docker install doesn't roll back after cancelled install
- Dominant language
- PHP
- Stars
- 2.2k
- Forks
- 424
- PR merge metrics
- No merged PRs in 30d
Description
This is related to this thread:
https://community.easyengine.io/t/brand-new-ec2-instance-fails-installing-v4/12372
I thought there's a random problem but I replicated it and finally can report a bug.
Here's the use-case. When you copy and paste the command from the website it contains end of the line character and submits the command, which is user error but I'd say quite common one. So try this:
1) Create a brand new instance
2) Copy and paste the download comand from EE website:
`wget -qO ee rt.cx/ee4 && sudo bash ee
`
3) Copy and paste website creation command from EE homepage:
`sudo ee site create example.com --type=wp
`
Now at this stage, it will install example.com but you don't want that URL because you wanted to change URL but the end of the line at the end commits the command, so you quickly press CTRL+C and change the URL to your own one. However, from now on EE is broken and can't be used unless uninstalled completely because docker hasn't rolled back after ctrl+c.
From then on you get this:
`ubuntu@ip-172-31-11-87:/opt/easyengine$ sudo ee site create website.com --type=wp
Error: There was some error in starting services_global-nginx-proxy_1 container. Please check logs.
`
And the logs:
```[03-03-2019 20:26:12] ee.INFO: ::::::::::::::::::::::::ee invoked::::::::::::::::::::::::
[03-03-2019 20:26:12] ee.DEBUG: -----------------------
[03-03-2019 20:26:12] ee.DEBUG: COMMAND: docker ps > /dev/null
[03-03-2019 20:26:12] ee.DEBUG: RETURN CODE: 0
[03-03-2019 20:26:12] ee.DEBUG: -----------------------
[03-03-2019 20:26:12] ee.DEBUG: -----------------------
[03-03-2019 20:26:12] ee.DEBUG: COMMAND: command -v docker-compose > /dev/null
[03-03-2019 20:26:12] ee.DEBUG: RETURN CODE: 0
[03-03-2019 20:26:12] ee.DEBUG: -----------------------
[03-03-2019 20:26:12] ee.DEBUG: Using default global config: /opt/easyengine/config/config.yml
[03-03-2019 20:26:12] ee.DEBUG: No project config found
[03-03-2019 20:26:12] ee.DEBUG: argv: /usr/local/bin/ee site create website.com --type=wp
[03-03-2019 20:26:12] ee.DEBUG: Running command: site
[03-03-2019 20:26:12] ee.DEBUG: COMMAND: which docker
[03-03-2019 20:26:12] ee.DEBUG: RETURN CODE: 0
[03-03-2019 20:26:12] ee.DEBUG: -----------------------
[03-03-2019 20:26:12] ee.DEBUG: COMMAND: docker inspect -f '{{.State.Running}}' services_global-nginx-proxy_1
[03-03-2019 20:26:13] ee.DEBUG: STDOUT:
[03-03-2019 20:26:13] ee.DEBUG: STDERR: Error: No such object: services_global-nginx-proxy_1
[03-03-2019 20:26:13] ee.DEBUG: RETURN CODE: 1
[03-03-2019 20:26:13] ee.DEBUG: -----------------------
[03-03-2019 20:26:13] ee.DEBUG: -----------------------
[03-03-2019 20:26:13] ee.DEBUG: COMMAND: docker network inspect ee-global-backend-network
[03-03-2019 20:26:13] ee.DEBUG: STDOUT: [ { "Name": "ee-global-backend-network", "Id": "8d5d7e1b671d50889aa4a3dffe11118587d984bea3aeb89aced5035ca9d043eb", "Created": "2019-03-03T19:57:49.457591081Z", "Scope": "local", "Driver": "bridge", "EnableIPv6": false, "IPAM": { "Driver": "default", "Options": {}, "Config": [ { "Subnet": "172.18.0.0/16", "Gateway": "172.18.0.1" } ] }, "Internal": false, "Attachable": false, "Ingress": false, "ConfigFrom": { "Network": "" }, "ConfigOnly": false, "Containers": {}, "Options": {}, "Labels": { "org.label-schema.vendor": "EasyEngine" } } ]
[03-03-2019 20:26:13] ee.DEBUG: RETURN CODE: 0
[03-03-2019 20:26:13] ee.DEBUG: -----------------------
[03-03-2019 20:26:13] ee.DEBUG: -----------------------
[03-03-2019 20:26:13] ee.DEBUG: COMMAND: docker network inspect ee-global-frontend-network
[03-03-2019 20:26:13] ee.DEBUG: STDOUT: [ { "Name": "ee-global-frontend-network", "Id": "06619a56d91995c4b10c0542db5a32dd67fecf3ababd3874dfb95cec54f4d7cb", "Created": "2019-03-03T19:57:49.577470065Z", "Scope": "local", "Driver": "bridge", "EnableIPv6": false, "IPAM": { "Driver": "default", "Options": {}, "Config": [ { "Subnet": "172.19.0.0/16", "Gateway": "172.19.0.1" } ] }, "Internal": false, "Attachable": false, "Ingress": false, "ConfigFrom": { "Network": "" }, "ConfigOnly": false, "Containers": {}, "Options": {}, "Labels": { "org.label-schema.vendor": "EasyEngine" } } ]
[03-03-2019 20:26:13] ee.DEBUG: RETURN CODE: 0
[03-03-2019 20:26:13] ee.DEBUG: -----------------------
[03-03-2019 20:26:13] ee.DEBUG: -----------------------
[03-03-2019 20:26:13] ee.DEBUG: COMMAND: docker-compose up -d global-nginx-proxy
[03-03-2019 20:26:13] ee.DEBUG: STDERR: Volume global-nginx-proxy_vhostd declared as external, but could not be found. Please create the volume manually using `docker volume create --name=global-nginx-proxy_vhostd` and try again.
[03-03-2019 20:26:13] ee.DEBUG: RETURN CODE: 1
[03-03-2019 20:26:13] ee.DEBUG: -----------------------
[03-03-2019 20:26:13] ee.ERROR: There was some error in starting services_global-nginx-proxy_1 container. Please check logs.
```
The quick solution is to kill the instance and start again.
Contributor guide
Assessment
This issue has not been assessed yet.