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

Apparmor "no such file or directory" #403

Closed
dsyer opened this issue Aug 12, 2014 · 19 comments
Closed

Apparmor "no such file or directory" #403

dsyer opened this issue Aug 12, 2014 · 19 comments

Comments

@dsyer
Copy link

dsyer commented Aug 12, 2014

$ fig up
Recreating <xxx>...
Cannot start container a3e4fd060d01a12ab7f810a91a341a44a5f9414fb814a3d29d8229bbb4dd3004: set apparmor profile docker-default: no such file or directory

This change to docker claims to have fixed the problem: moby/moby#6180, but it's still failing for me.

$ docker -v
Docker version 1.1.2, build d84a070
$ fig --version
fig 0.5.2
@aanand
Copy link

aanand commented Aug 12, 2014

Does the same thing happen if you try to docker start the relevant container?

@dsyer
Copy link
Author

dsyer commented Aug 12, 2014

No, I can start the container normally with docker just fine.

@dsyer
Copy link
Author

dsyer commented Aug 13, 2014

Actually, scratch that last reply. I can use docker to start the same base image, but I can't start the image created by fig:

$ docker start ec0865c555f472166af4ad0a7a934ca4a983b4ac5a7a85601fa02ffd30efc590
Error response from daemon: Cannot start container ec0865c555f472166af4ad0a7a934ca4a983b4ac5a7a85601fa02ffd30efc590: set apparmor profile docker-default: no such file or directory
2014/08/13 08:41:38 Error: failed to start one or more containers

@dnephin
Copy link

dnephin commented Aug 13, 2014

I notice that the original example says it's recreating. What happens if you fig rm --force -v (this will remove volumes), and then do a fig up. If that works, it maybe be related to #328

@dsyer
Copy link
Author

dsyer commented Aug 13, 2014

Thanks. But no change.

$ fig rm --force -v
No stopped containers
$ fig up
Creating scripts_eureka_1...
Cannot start container 37cd353733ead3a7e89ca1c74200e30152beed171f51995b25f9f629ef919893: set apparmor profile docker-default: no such file or directory

Docker was in a bit of a mess when I started this (confusion about versions and Ubuntu packages). Is there something else I can do to create a clean slate?

@dsyer
Copy link
Author

dsyer commented Aug 13, 2014

More digging here reveals that it breaks in this way if I declare volumes, and not if I don't. I see this in the fig.yml docs: "Mapping local volumes is currently unsupported on boot2docker." But I have no idea what that means. The workaround suggested is to "use docker-osx", but I'm on an Ubuntu host, so that doesn't help. If I can't declare local volumes it's kind of bust.

@dnephin
Copy link

dnephin commented Aug 13, 2014

Volumes should work from a linux host, that warning is just for osx users I think (might need some clarification, it seems to assume that most people are on osx).

It may be related to the base image you're using? Can you reproduce with ubuntu:14.04 and a volume?

@dsyer
Copy link
Author

dsyer commented Aug 13, 2014

Yes, that is still broken. Here's the fig.yml:

test:
  image: ubuntu:14.04
  volumes:
    /root:.
  command: echo "Hello World"

@dsyer
Copy link
Author

dsyer commented Aug 13, 2014

Aha. User error: the volumes are an array (even if single valued). That fig.yml is still illegal for some reason when I fix it (I can't bind to "."), but it's a different error at least. Why can't I bind to "."?

@dnephin
Copy link

dnephin commented Aug 13, 2014

I believe they need to be absolute paths (https://docs.docker.com/userguide/dockervolumes/)

@dsyer
Copy link
Author

dsyer commented Aug 13, 2014

OK, I guess I get work around that using "${PWD}". IMO part of the value of fig should be to avoid that kind of limitation invisibly. Now let's see if I can do something really useful with it...

As far as the original issue goes, maybe fig should validate its YAML better to avoid cryptic errors from a different layer?

@dnephin
Copy link

dnephin commented Aug 13, 2014

Definitely #129 is the issue for that.

@aanand
Copy link

aanand commented Aug 13, 2014

Mounting to a relative path inside the container feels really weird to me. What were you trying to do?

@dsyer
Copy link
Author

dsyer commented Aug 13, 2014

The opposite (duh!). Off by one error means you mount in the wrong direction. Sorry for the noise (it was unrelated to the original problem anyway).

@dsyer
Copy link
Author

dsyer commented Aug 13, 2014

#129 seems like the right place to discuss the validation issue

@dsyer dsyer closed this as completed Aug 13, 2014
@k2xl
Copy link

k2xl commented Jan 22, 2015

Note that I had this same issue and it turned out to be that fig will complain with that message if volumes are not listed as an array. Might be a good idea if fig explained that it was an error in the fig syntax.

volumes: blah

bad.

volumes:
  - blah

good

@kidphys
Copy link

kidphys commented Feb 28, 2015

I have the save issue on a very simple yml:

redis:
  image: redis

on

docker-compose 1.1.0
Docker version 1.4.1, build 5bc2ff8

Error message:

Recreating <xxx>...
Cannot start container d924a8cab330fde589a63a5982bf9bd099ff464b1999640dc48ee4e0e289b926: set apparmor profile docker-default: no such file or directory

My host is Ubuntu precise inside a Vagrant box:

Distributor ID: Ubuntu
Description:    Ubuntu 12.04 LTS
Release:        12.04
Codename:       precise

Any idea?

@groteck
Copy link

groteck commented Apr 7, 2015

Same here:

cfg2:
  build: .
  ports:
    - "3000:3000"
    - "2222:22"

In ubuntu 14.04

@groteck
Copy link

groteck commented Apr 7, 2015

My problem was solved with the next steps:

  1. Update docker from 1.4 to 1.5.
  2. Add my user to docker user group for run docker without sudo.
  3. Destroy all the images.
  4. Rebuild.

I think the problem was than I used a image generated with docker 1.4.

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

No branches or pull requests

6 participants