Docker error on Bootstrap

(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


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

(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.

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
Errno::ENOSPC: No space left on device
Failure when trying to manually upgrade on CentOS 6.7
Container fails to (re)start after system update
Failure when trying to manually upgrade on CentOS 6.7
502 Bad Gateway, suddenly
I get error response from daemon: when rebuild Discourse
Your Docker installation is not working correctly :(
Error installing discourse
Urgent: 504 Gateway Time-out
(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!

(Sam Saffron) #21

FYI I added tests to launcher to avoid this issue in future


(D Iff) #23

When I run the below command:
root@MyUbuntu:/var/docker# ./launcher bootstrap app

it starts _pulling fs layer _:

WARNING: No swap limit support
Unable to find image 'samsaffron/discourse:0.1.2' locally
Pulling repository samsaffron/discourse
9dfbb44c55ff: Error pulling image (0.1.2) from samsaffron/discourse, read tcp connection reset by peer 
8dbd9e392a96: Download complete 
21a54dd8e905: Download complete 
535e9f84ec37: Downloading [=>               ] 4.227 MB/184.3 MB 1h24m20s

But it is cut:

535e9f84ec37: Error downloading dependent layers 
2014/03/24 18:59:28 Could not find repository on any of the indexed registries.
Your Docker installation is not working correctly

And cgroup-lite is installed:

diff@MyUbuntu:~$ sudo apt-get install cgroup-lite

cgroup-lite is already the newest version.
cgroup-lite set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

My machine: Ubuntu 64bit 13.10 Sausy

root@MyUbuntu:/var/docker# docker -v

Docker version 0.9.0, build 2b3fdf2

(Kane York) #24

When you get a downloading error, walk over to your kitchen, and look at the microwave, and set a timer for one hour. When it goes off, try to bootstrap again.

The solution is literally to try again later.