Can not rebuild my app


(Vu Hoang) #1

Hi guys!

I’m trying to add SSL to my website, after everything about the config was done. I try to rebuild my app, but i got the error here:

Anyone can help me about this issue or pls give me a suggest to fix this.

Thanks!


(Andrew Waugh) #2

You’ve run out of space. That’s what “no space left on device” is telling you.

What does df -h tell you?
How many old backups have you got on disk?
Have you done ./launcher cleanup ?


(Vu Hoang) #3

Hi @JagWaugh
df -h tell me.

i cleaned all backup. :slight_smile:
Could you pls tell me the advise for this?

Best.


(Andrew Waugh) #4

Bingo! you’ve only got 677M free, but the new container that launcher needs to download is a LOT larger than that.

Your disk is only 7.7 G, which is probably too small.

try docker images if it lists more than 3 images then do a ./launcher cleanup and hit return when it asks if you are sure. That might regain enough space, but I think you need more space.

What is your instance hosted on?


(Vu Hoang) #5

Many thanks @JagWaugh
This is the result after run docker images:

I’m using AWS to hosted my site. So, should i do now?

Best.


(Andrew Waugh) #6

I only see the top two lines there, please post a bigger screenshot.

I see 1.3.10 there… that’s pretty old.

When you created your AWS instance did you take a plain Ubuntu 16.04, or did you use a pre built Ami from someone else?

See the image tagged “latest”? Your update will need that much space plus some more to complete.

I await another screenshot.


(Vu Hoang) #7

Thanks @JagWaugh

another screenshot here:

it mean i just have 2 images.
and take a plain Ubuntu 16.04. Not from Ami. :slight_smile:

Can i ask Aws support to up my disk space?

Thanks!


(Andrew Waugh) #8

You can do it yourself in the console.

From memory, Volumes, select your volume, modify, change size, type your new size (I would say 16 G), confirm the changes, then watch the progress until it reaches 100%/ complete.

iirc you need to do a shutdown -r, but when the box comes back up the disk is automatically adjusted (at least on my sandboxes).

The process to increase the volume takes between 10-20 minutes, depending on what else is going on on AWS. I’ve tried it with the instance running and also with the instance shut down, this doesn’t seem to affect the time it takes to increase the volume.

While the volume expand is running you might as well do apt-get update and apt-get upgrade - you might have enough space. If not, do them after the shutdown, and if the login screen indicates a restart is required when it comes back up, then do another shutdown.

So in about 30 min you should have an up to date Ubuntu box, with enough space for the Discourse update. Do a ./launcher rebuild app and when it’s done, ./launcher cleanup and you’re good to go.

I’m not sure about how the 16G volume will affect your costs on AWS, but without enough headroom you won’t be able to update your discourse, so you’re kind of stuck with the cost.


(Vu Hoang) #9

Hi @JagWaugh

After up my instant to 16GB and run sudo ./laucher rebuilt app. I got a Failed message here:

More info of Docker:

I also using a vagrant to test but i had same error. So, pls can you give me an advise for this.

Best regards.


(Andrew Waugh) #10

“fd8” is your old docker container, I’m not sure what “Exited about an hour ago” is telling us.

What does the output of docker version show?

Please use copy/paste to post output. Posting an image means it’s a bit more bother to read, and also that anyone who is searching for the same error as you are having wouldn’t get a hit on this topic.

Right… some questions:

  1. Did you reboot your instance (shutdown -r) after the disk size was increased?
  2. Have you actually got a larger disk now (df -h)?
  3. Does the Discourse site come up, just the old version?
  4. Did you run apt-get update, and apt-get upgrade yet?
  5. What does docker info show us?

(Vu Hoang) #11

Ok i got it.

This is the output of docker version:
Client:
Version: 17.05.0-ce
API version: 1.29
Go version: go1.7.5
Git commit: 89658be
Built: Thu May 4 22:10:54 2017
OS/Arch: linux/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:10:54 2017
 OS/Arch:      linux/amd64
 Experimental: false

1/ yes, i did.
2/ yes i see my instant is 16GB after run df -h
3/ the Discourse site is does not com up.
4/ yes i did.
5/ This is the info after run docker info:
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 3
Server Version: 17.05.0-ce
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 11
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9048e5e50717ea4497b757314bad98ea3763c145
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.4.0-1017-aws
Operating System: Ubuntu 16.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 990.7MiB
Name: ip-172-31-30-26
ID: TQMB:HGC6:FFDO:FV6B:7A7B:6LOU:EB6V:4LTX:OG5S:P2WR:JOQY:VYBM
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

Best,


(Robby O'Connor) #12

Can you try to do: docker run hello-world please?


(Vu Hoang) #13

The permission denied for this and i must use sudo for this command. :slight_smile:
the output is:

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
78445dd45222: Pull complete
Digest: sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://cloud.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/

(Robby O'Connor) #14

Well yes, unless your user is in the docker group – you have to be root.

Now try: cd /var/discourse ; sudo ./launcher rebuild app


(Andrew Waugh) #15

@robbyoconnor, good test, thanks for that!

@Vu_Hoang, when this started you were trying to add SSL to your site. As I understand it, SSL hasn’t worked yet. I would try rolling those changes to app.yml back.


(Vu Hoang) #16

Thanks @robbyoconnor
But i think i will get the same error.
:frowning:


(Robby O'Connor) #17

it’s one of the first things you should do when you install docker, or make a major change

SSL works fine for me…not sure what kind of permissions you have going there…


(Robby O'Connor) #18

Well try it – are you using Let’s Encrypt?


(Vu Hoang) #19

@JagWaugh
Yes i started to add SSL to my site and i follow to the tutorial from @sam here:

But what should i do now?

Thanks!


(Vu Hoang) #20

Yes i stared to add SSL, but it’s not work now. :frowning: