Error rebuilding - Cannot start container - connection reset by peer

Today I couldn’t update a discourse which was 13 commits behind. (The other three I manage upgraded just fine)

The relevant error seems to be:

uglifyjs ‘/var/www/discourse/public/assets/_application-1d81ebab3894f7cd324e3d95bb43a89d.js’ -p relative -c -m -o ‘/var/www/discourse/public/assets/application-1d81ebab3894f7cd324e3d95bb43a89d.js’ --source-map-root ‘/assets’ --source-map ‘/var/www/discourse/public/assets/application-1d81ebab3894f7cd324e3d95bb43a89d.js.map’ --source-map-url ‘/assets/application-1d81ebab3894f7cd324e3d95bb43a89d.js.map’
WARN: Side effects in initialization of unused variable $ [_application-1d81ebab3894f7cd324e3d95bb43a89d.js:1373,4]
WARN: Side effects in initialization of unused variable $ [_application-1d81ebab3894f7cd324e3d95bb43a89d.js:3021,4]
WARN: Side effects in initialization of unused variable $ [_application-1d81ebab3894f7cd324e3d95bb43a89d.js:10831,4]
< snip >
WARN: Side effects in initialization of unused variable $ [_application-1d81ebab3894f7cd324e3d95bb43a89d.js:24296,4]
WARN: Condition left of || always true [_application-1d81ebab3894f7cd324e3d95bb43a89d.js:94628,20]
WARN: Condition always true [_application-1d81ebab3894f7cd324e3d95bb43a89d.js:94628,20]
Killed

Anyone run into this before?

worse… rebuilding failed…

~# cd /var/discourse/
root@discuss:/var/discourse# git pull
remote: Counting objects: 20, done.
remote: Total 20 (delta 14), reused 14 (delta 14), pack-reused 6
Unpacking objects: 100% (20/20), done.
From https://github.com/discourse/discourse_docker
   ab7a956..8877f99  master     -> origin/master
Updating ab7a956..8877f99
Fast-forward
 README.md              |  4 ++--
 launcher               | 34 +++++++++++++++++++++++++++++++---
 samples/standalone.yml |  5 -----
 3 files changed, 33 insertions(+), 10 deletions(-)
root@discuss:/var/discourse# ./launcher rebuild app

WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed

Please be patient

Unable to find image 'discourse/discourse:1.0.15' locally
1.0.15: Pulling from discourse/discourse
Digest: sha256:1ac1b72f327c650456140aa12631305b9d1e1293035e57acce844b7efbd6a9df
Status: Downloaded newer image for discourse/discourse:1.0.15
Ensuring discourse docker is up to date
Fetching origin
Discourse Docker is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 10 app
app
cd /pups && git pull && /pups/bin/pups --stdin
Error response from daemon: Cannot start container 8038f41f41ed597541fa87bc4afe790859cc0a656f98615bb8a27cad42741f16: [8] System error: read parent: connection reset by peer
8038f41f41ed597541fa87bc4afe790859cc0a656f98615bb8a27cad42741f16
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
root@discuss:/var/discourse# 

trying a second time also failed

Rebooting the host resulted in the same error

# ./launcher rebuild app
Ensuring discourse docker is up to date
Fetching origin
Discourse Docker is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 10 app
app
cd /pups && git pull && /pups/bin/pups --stdin
Error response from daemon: Cannot start container 4d38c4879ae2156393daeb24b4db88628f15974feade567ab7e5a89c73928d27: [8] System error: read parent: connection reset by peer
4d38c4879ae2156393daeb24b4db88628f15974feade567ab7e5a89c73928d27
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
root@discuss:/var/discourse# 

Stats from the host:

docker --version
Docker version 1.9.1, build a34a1d5

# df -h
Filesystem                 Size  Used Avail Use% Mounted on
udev                       992M  8.0K  992M   1% /dev
tmpfs                      201M  352K  200M   1% /run
/dev/disk/by-label/DOROOT   30G  8.2G   20G  30% /
none                       4.0K     0  4.0K   0% /sys/fs/cgroup
none                       5.0M     0  5.0M   0% /run/lock
none                      1002M     0 1002M   0% /run/shm
none                       100M     0  100M   0% /run/user

A plugin? Try disabling all custom plugins.

If you’re in a hurry and have nothing else to try, try adding this to your Yaml file (note the empty space between single quotes:

DOCKER_FIX: '                                        '

Stolen from here.

5 Likes

Didn’t think to post that… there is only one enabled (there is a theme which has been disabled for a long time)

     - mkdir -p plugins
      - git clone https://github.com/discourse/docker_manager.git

Try @omfg’s recommendation in ENV, it may fix it … this is one crazy docker bug.

1 Like

@sam agreed… that’s one interesting bug.

I put that bit in the first line after ENV and @omfg that worked!

4 Likes