Docker error on Bootstrap


(Dan Rye) #1

I’ve tried an install a few times, double and triple checking things along the way, but I’m getting the following when I try to bootstrap. I assume I’m just missing something basic

./launcher bootstrap app
Warning: '-rm' is deprecated, it will be removed soon. See usage.
Warning: '-rm' is deprecated, it will be removed soon. See usage.
Calculated ENV: 
Warning: '-rm' is deprecated, it will be removed soon. See usage.
Warning: '-rm' is deprecated, it will be removed soon. See usage.
Warning: '-rm' is deprecated, it will be removed soon. See usage.

Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

Run a command in a new container

  -P, --publish-all=false: Publish all exposed ports to the host interfaces
  -a, --attach=[]: Attach to stdin, stdout or stderr.
  -c, --cpu-shares=0: CPU shares (relative weight)
  --cidfile="": Write the container ID to the file
  -d, --detach=false: Detached mode: Run container in the background, print new container id
  --dns=[]: Set custom dns servers
  -e, --env=[]: Set environment variables
  --entrypoint="": Overwrite the default entrypoint of the image
  --expose=[]: Expose a port from the container without publishing it to your host
  -h, --hostname="": Container host name
  -i, --interactive=false: Keep stdin open even if not attached
  --link=[]: Add link to another container (name:alias)
  --lxc-conf=[]: Add custom lxc options -lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
  -m, --memory="": Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
  -n, --networking=true: Enable networking for this container
  --name="": Assign a name to the container
  -p, --publish=[]: Publish a container's port to the host (format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort) (use 'docker port' to see the actual mapping)
  --privileged=false: Give extended privileges to this container
  --rm=false: Automatically remove the container when it exits (incompatible with -d)
  --sig-proxy=true: Proxify all received signal to the process (even in non-tty mode)
  -t, --tty=false: Allocate a pseudo-tty
  -u, --user="": Username or UID
  -v, --volume=[]: Bind mount a volume (e.g. from the host: -v /host:/container, from docker: -v /container)
  --volumes-from=[]: Mount volumes from the specified container(s)
  -w, --workdir="": Working directory inside the container
cat: cids/app_boostrap.cid: No such file or directory

Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...]

Remove one or more containers

  -f, --force=false: Force removal of running container
  -l, --link=false: Remove the specified link and not the underlying container
  -v, --volumes=false: Remove the volumes associated to the container
FAILED TO BOOTSTRAP

(nXqd) #2

what is your docker’s version ? post the output of docker --version here.


(Bobthedino) #3

I had the same problem. I think it may be because Docker was updated to version 0.9.0 a couple of days ago.


(Sam Saffron) #4

I just fixed the deprecations, you can pull latest for that. Works fine on 0.9.0

If you try to bootstrap the sample does it fail, I have a feeling something about the yml you have is bust.


(Dan Rye) #5

Still having issues,

docker -v
Docker version 0.9.0, build 2b3fdf2

Other environment information:

  • AWS m1.small (1.7GB of Ram)
  • Ubuntu 13.10
  • Ruby 2.0
  • Postgres 9.3
  • Redis 2.8.7

If I just copy sample/standalone.yml to containers/app.yml and then bootstrap with no changes I get this:

sudo ./launcher bootstrap app
Calculated ENV: 
cd /pups && git pull && /pups/bin/pups --stdin

Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

Run a command in a new container

  -P, --publish-all=false: Publish all exposed ports to the host interfaces
  -a, --attach=[]: Attach to stdin, stdout or stderr.
  -c, --cpu-shares=0: CPU shares (relative weight)
  --cidfile="": Write the container ID to the file
  -d, --detach=false: Detached mode: Run container in the background, print new container id
  --dns=[]: Set custom dns servers
  -e, --env=[]: Set environment variables
  --entrypoint="": Overwrite the default entrypoint of the image
  --expose=[]: Expose a port from the container without publishing it to your host
  -h, --hostname="": Container host name
  -i, --interactive=false: Keep stdin open even if not attached
  --link=[]: Add link to another container (name:alias)
  --lxc-conf=[]: Add custom lxc options -lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
  -m, --memory="": Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
  -n, --networking=true: Enable networking for this container
  --name="": Assign a name to the container
  -p, --publish=[]: Publish a container's port to the host (format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort) (use 'docker port' to see the actual mapping)
  --privileged=false: Give extended privileges to this container
  --rm=false: Automatically remove the container when it exits (incompatible with -d)
  --sig-proxy=true: Proxify all received signal to the process (even in non-tty mode)
  -t, --tty=false: Allocate a pseudo-tty
  -u, --user="": Username or UID
  -v, --volume=[]: Bind mount a volume (e.g. from the host: -v /host:/container, from docker: -v /container)
  --volumes-from=[]: Mount volumes from the specified container(s)
  -w, --workdir="": Working directory inside the container
cat: cids/app_boostrap.cid: No such file or directory

Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...]

Remove one or more containers

  -f, --force=false: Force removal of running container
  -l, --link=false: Remove the specified link and not the underlying container
  -v, --volumes=false: Remove the volumes associated to the container
FAILED TO BOOTSTRAP

(Bobthedino) #6

Many thanks @sam, it’s working fine for me now!


(Dan Rye) #7

@bobthedino when you had the failure before did you have the Usage information? If so any idea how you fixed that issue?


(Sam Saffron) #8

Can you PM me your container yml file ?


(Bobthedino) #9

No, I didn’t see the usage information, to fix it all I did was repeat the setup procedure from scratch, though I did customise the app.yml file. But I’m a total beginner at all this, so hopefully @sam can help you out!


(Michael) #10

Has there been any updates to this? I’m getting the same exact error as @drye. I’ve started from scratch and still getting the same issue.


(Sam Saffron) #11

what is docker info

are you running aufs or device mapper ?


(Michael) #12

I’ve been following this guide here: Beginners Guide to Deploy Discourse on Digital Ocean using Docker


(Dan Rye) #13

Here is my docker info output:

docker info
Containers: 2
Images: 18
Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Dirs: 22
WARNING: No memory limit support
WARNING: No swap limit support

(Michael) #14

Here’s mine

Containers: 5
Images: 19
Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Dirs: 29
WARNING: No memory limit support
WARNING: No swap limit support

(Dan Rye) #15

I’ve tried all this again with a fresh AWS instance. I’m still ending up in the same place. All these same details:
AWS m1.small (1.7GB of Ram)
Ubuntu 13.10
Ruby 2.0
Postgres 9.3
Redis 2.8.7

Is there something I should change there?

Definition of insanity, trying the same thing and expecting a different result :slight_smile: But I thought maybe I skipped a step somewhere.


(Jeff Atwood) #16

I would switch to Ubuntu 12.04 LTS as in the install doc.


(Sam Saffron) #17

@MichaelT @drye

do an ssh-import-id sam-saffron as root an PM me your IP address I will try to have a look. Curious to see why, have you triple checked your yaml is valid?


(Sam Saffron) #18

@MichaelT @drye , there is a reason the guide recommend running everything from root.

https://github.com/dotcloud/docker/issues/4792

Everyone, if you are not running as root and the following happens:

% docker run --rm -i -a stdin -a stdout ubuntu echo 1
%

You have problematic security settings, either run as root or figure out why stdin or stdout are not attaching.

I am going to work on adding sanity checks in launcher to catch this earlier.

Also see: v0.9.0 Error getting size: bad file descriptor · Issue #4568 · moby/moby · GitHub


Getting Discourse installed on OVH VPS
Docker install fails to return after power outage, lxc-network does not start
Errno::ENOSPC: No space left on device
Container fails to (re)start after system update
Your Docker installation is not working correctly :(
Failure when trying to manually upgrade on CentOS 6.7
Error installing discourse
How to troubleshoot sidekiq?
502 Bad Gateway, suddenly
Failure when trying to manually upgrade on CentOS 6.7
(Michael) #19

I did try to run as root but removed some privileges and started under the new username. I reviewed the github issue you mentioned and went back as root and ran the following

sudo apt-get install cgroup-lite
sudo reboot

which worked! Thank you @sam again for taking the time to helping me.


(Dan Rye) #20

That was the trick! Thanks @sam and @MichaelT!