Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run site locally on macOS using Multipass and dotrun snap #43

Closed
barrymcgee opened this issue Sep 9, 2020 · 5 comments
Closed
Assignees

Comments

@barrymcgee
Copy link

  • I followed @hatched's instructions and have setup Multipass on my macOS machine.
  • I shell into my Multipass instance and clone this repo
  • I cd into the project root and run docker-compose up -d

I hit this error:

ERROR: Couldn't connect to Docker daemon - you might need to run docker-machine start default.

I then run that suggested command, and see this message;

Docker machine "default" does not exist. Use "docker-machine ls" to list machines. Use "docker-machine create" to add a new one.

I then run the suggested action docker-machine create default and I get this error:

Error with pre-create check: "VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path"

Now I be like ¯\_(ツ)_/¯

@carkod
Copy link

carkod commented Sep 9, 2020

@bethcollins92 I used this solution to work around it. It's not great, but it is a VM, so I think it should be fine

@barrymcgee
Copy link
Author

@carkod So I recreated my Multipass instance using 18.04 and ran through all the setup steps again, this time installing docker-machine using curl instead of via a snap - but still hit the same error when running dotrun in the root of ubuntu.com

Screenshot 2020-09-10 at 11 10 55

As a wider point, we seem to be now in a place having moved from ./run to dotrun where this repo can only be easily run locally by developers running Linux. The README does not even explicit state that in the Getting Started.

@carkod
Copy link

carkod commented Sep 10, 2020

@carkod So I recreated my Multipass instance using 18.04 and ran through all the setup steps again, this time installing docker-machine using curl instead of via a snap - but still hit the same error when running dotrun in the root of ubuntu.com

Screenshot 2020-09-10 at 11 10 55

As a wider point, we seem to be now in a place having moved from ./run to dotrun where this repo can only be easily run locally by developers running Linux. The README does not even explicit state that in the Getting Started.

Ok. But that is something else. Did you guys manage to install docker-compose with the workaround I provided? If docker-compose is installed, check with docker-compose --version. Then please do docker-compose up -d in the ubuntu.com project folder and after that, dotrun.

This issue with docker-compose is only going to happen with ubuntu.com project. Other projects don't need a database, so you don't even need docker-compose

@barrymcgee
Copy link
Author

barrymcgee commented Sep 10, 2020

Did you guys manage to install docker-compose with the workaround I provided?

No, your link was to install docker-machine, not docker-compose.

I setup a new multipass instance again, and installed docker-compose using cURL.

Running docker-compose up -d still throws an error.

docker-compose --version
docker-compose version 1.27.0, build 980ec85b
ubuntu@ubuntu:~/code/ubuntu.com$ docker-compose up -d
Traceback (most recent call last):
  File "urllib3/connectionpool.py", line 677, in urlopen
  File "urllib3/connectionpool.py", line 392, in _make_request
  File "http/client.py", line 1252, in request
  File "http/client.py", line 1298, in _send_request
  File "http/client.py", line 1247, in endheaders
  File "http/client.py", line 1026, in _send_output
  File "http/client.py", line 966, in send
  File "docker/transport/unixconn.py", line 43, in connect
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "requests/adapters.py", line 449, in send
  File "urllib3/connectionpool.py", line 727, in urlopen
  File "urllib3/util/retry.py", line 403, in increment
  File "urllib3/packages/six.py", line 734, in reraise
  File "urllib3/connectionpool.py", line 677, in urlopen
  File "urllib3/connectionpool.py", line 392, in _make_request
  File "http/client.py", line 1252, in request
  File "http/client.py", line 1298, in _send_request
  File "http/client.py", line 1247, in endheaders
  File "http/client.py", line 1026, in _send_output
  File "http/client.py", line 966, in send
  File "docker/transport/unixconn.py", line 43, in connect
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "docker/api/client.py", line 205, in _retrieve_server_version
  File "docker/api/daemon.py", line 181, in version
  File "docker/utils/decorators.py", line 46, in inner
  File "docker/api/client.py", line 228, in _get
  File "requests/sessions.py", line 543, in get
  File "requests/sessions.py", line 530, in request
  File "requests/sessions.py", line 643, in send
  File "requests/adapters.py", line 498, in send
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "bin/docker-compose", line 3, in <module>
  File "compose/cli/main.py", line 67, in main
  File "compose/cli/main.py", line 123, in perform_command
  File "compose/cli/command.py", line 69, in project_from_options
  File "compose/cli/command.py", line 132, in get_project
  File "compose/cli/docker_client.py", line 43, in get_client
  File "compose/cli/docker_client.py", line 170, in docker_client
  File "docker/api/client.py", line 188, in __init__
  File "docker/api/client.py", line 213, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
[4119] Failed to execute script docker-compose
ubuntu@ubuntu:~/code/ubuntu.com$ 

@nottrobin nottrobin transferred this issue from canonical/ubuntu.com Nov 9, 2020
@bethcollins92
Copy link

Fran fixed this for MacOS in the maintenance sprint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants