# Error rebuilding - Cannot start container - connection reset by peer

**URL:** https://meta.discourse.org/t/error-rebuilding-cannot-start-container-connection-reset-by-peer/38487
**Category:** Support
**Created:** [January 26, 2016, 2:30am UTC](https://meta.discourse.org/t/error-rebuilding-cannot-start-container-connection-reset-by-peer/38487 "2016-01-26T02:30:17Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [January 26, 2016, 2:30am UTC](https://meta.discourse.org/t/error-rebuilding-cannot-start-container-connection-reset-by-peer/38487/1 "2016-01-26T02:30:17Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [January 26, 2016, 2:37am UTC](https://meta.discourse.org/t/error-rebuilding-cannot-start-container-connection-reset-by-peer/38487/2 "2016-01-26T02:37:39Z")

</div>

worse.. rebuilding failed..

```plaintext
~# 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

```plaintext
# ./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

```plaintext
# 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

```

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 26, 2016, 3:02am UTC](https://meta.discourse.org/t/error-rebuilding-cannot-start-container-connection-reset-by-peer/38487/3 "2016-01-26T03:02:37Z")

</div>

A plugin? Try disabling all custom plugins.

---

<div class="post-metadata">

### Author: ![omfg](https://avatars.discourse-cdn.com/v4/letter/o/5e9695/32.png) [@omfg](https://meta.discourse.org/u/omfg)
#### Post date: [January 26, 2016, 3:05am UTC](https://meta.discourse.org/t/error-rebuilding-cannot-start-container-connection-reset-by-peer/38487/4 "2016-01-26T03:05:34Z")

</div>

> [@watchmanmonitor](#):
>
> System error: read parent: connection reset by peer

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:

```plaintext
DOCKER_FIX: ' '

```

Stolen from [here](https://github.com/docker/docker/issues/14203).

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [January 26, 2016, 3:05am UTC](https://meta.discourse.org/t/error-rebuilding-cannot-start-container-connection-reset-by-peer/38487/5 "2016-01-26T03:05:41Z")

</div>

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

```

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 26, 2016, 3:17am UTC](https://meta.discourse.org/t/error-rebuilding-cannot-start-container-connection-reset-by-peer/38487/6 "2016-01-26T03:17:37Z")

</div>

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

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [January 26, 2016, 3:37am UTC](https://meta.discourse.org/t/error-rebuilding-cannot-start-container-connection-reset-by-peer/38487/7 "2016-01-26T03:37:17Z")

</div>

@sam agreed.. that’s one interesting bug.

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

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 26, 2016, 5:57am UTC](https://meta.discourse.org/t/error-rebuilding-cannot-start-container-connection-reset-by-peer/38487/8 "2016-01-26T05:57:34Z")

</div>


