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

Scope fails to launch on Docker for Mac #3064

Closed
pidster opened this issue Feb 8, 2018 · 15 comments · Fixed by #3140
Closed

Scope fails to launch on Docker for Mac #3064

pidster opened this issue Feb 8, 2018 · 15 comments · Fixed by #3140
Labels
bug Broken end user or developer functionality; not working as the developers intended it

Comments

@pidster
Copy link
Contributor

pidster commented Feb 8, 2018

Using Docker for Mac: Version 18.02.0-ce-mac52 (22582)

On running scope launch the result is the following:

docker: Error response from daemon: Mounts denied: 
The path /var/run/scope/plugins
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
.
ERRO[0007] error waiting for container: context canceled```

@pidster pidster added the bug Broken end user or developer functionality; not working as the developers intended it label Feb 8, 2018
@dglaubman
Copy link

I have same issue, after installing Docker for Mac.

Docker version 18.03.0-ce, build 0520e24
macOS Sierra Version 10.12.6

Trying to run https://www.weave.works/docs/tutorials/core/part-1-setup-troubleshooting/#if-youre-on-a-mac

@rade
Copy link
Member

rade commented Apr 10, 2018

@errordeveloper any idea what is causing this?

@dglaubman
Copy link

dglaubman commented Apr 11, 2018

I think the check for mac in the scope script may be incorrect. This check protects a call to create_plugins_dir which appears to address the problem docker complains about.

check_docker_for_mac() {
    [ "$(uname)" = "Darwin" ] \
        && [ -S /var/run/docker.sock ] \
        && [ ! "${DOCKER_HOST+x}" = x ] \
        && [ "${HOME+x}" = x ] \
        && [ -d "${HOME}/Library/Containers/com.docker.docker/Data/database" ]
}

On my machine, $HOME is set and "${HOME}/Library/Containers/com.docker.docker/Data/database" does not exist.

@dglaubman
Copy link

by the way, to get thru the tutorial, I took the Docker command that scope launch creates and edited it to point the Mac plugins directory to one inside /Users. This worked.

@dholbach
Copy link
Contributor

It looks like the actual path was ${HOME}/Library/Containers/com.docker.docker/Data for @dglaubman.

The path is referred to from recent release notes of Docker for Mac as well.

@rade
Copy link
Member

rade commented Apr 12, 2018

It looks like the actual path was ${HOME}/Library/Containers/com.docker.docker/Data for @dglaubman.

What makes you say that?

@foot
Copy link
Contributor

foot commented Apr 12, 2018

It worked for me doing with d4m ce:

Version 18.03.0-ce-mac60 (23751)
Channel: stable
6ddfc0f1d3

El Capitan:

10.11.6 (15G18013)

Downloaded and launched with

curl --silent --location https://git.io/scope --output /usr/local/bin/scope
sudo chmod +x /usr/local/bin/scope
scope launch --service-token=<cloud-token>

Maybe something was fixed in the very latest d4m? =/

@dholbach
Copy link
Contributor

dholbach commented Apr 12, 2018

It looks like the actual path was ${HOME}/Library/Containers/com.docker.docker/Data for @dglaubman.

What makes you say that?

@dglaubman brought this up in an email conversation:

After considerable fumbling around, I was able to fix this by modifying check_docker_for_mac in the scope script
to check for
${HOME}/Library/Containers/com.docker.docker/Data/
Rather than
${HOME}/Library/Containers/com.docker.docker/Data/database

@rade
Copy link
Member

rade commented Apr 12, 2018

@foot how exactly did you obtain&install d4m?

I am curious why @dglaubman's docker version makes no mention of -macXX.

@foot
Copy link
Contributor

foot commented Apr 12, 2018

ahh, the about screen is a bit confused, there are opportunities to grab versions from diff places.

screen shot 2018-04-12 at 16 03 16

@rade
Copy link
Member

rade commented Apr 12, 2018

@foot is it possible that you had the ${HOME}/Library/Containers/com.docker.docker/Data/database left over from a previous DfM installation?

@foot
Copy link
Contributor

foot commented Apr 12, 2018

Possibly, will wipe it out re-install and test.

@foot
Copy link
Contributor

foot commented Apr 12, 2018

Repro! Yes, wiping, re-installing, and reseting to factory defaults. My database was missing.

Changing line 127 to remove /database fixed it 👌. ⭐️ @rade .

@dholbach
Copy link
Contributor

dholbach commented Apr 12, 2018

@errordeveloper https://pastebin.com/6v5y297A would be the minimal fix for this. Do we need something more sophisticated to cater to older Docker for Mac installs?

@errordeveloper
Copy link
Contributor

Do we need something more sophisticated to cater to older Docker for Mac installs?

No.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken end user or developer functionality; not working as the developers intended it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants