# Failed to bootstrap on DO/Docker Fresh install

**URL:** https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864
**Category:** Self-hosting
**Tags:** server-resources
**Created:** [August 7, 2015, 8:32am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864 "2015-08-07T08:32:27Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![cyborg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cyborg/32/116226_2.png) [@cyborg](https://meta.discourse.org/u/cyborg)
#### Post date: [August 7, 2015, 8:32am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864/1 "2015-08-07T08:32:28Z")

</div>

I’ve just started a new server following DO instructions step by step and once did “./launcher bootstrap app” I got the following

```
./launcher bootstrap app
cd /pups && git pull && /pups/bin/pups --stdin
Already up-to-date.
I, [2015-08-07T08:28:55.099744 #36] INFO -- : Loading --stdin
/pups/lib/pups/cli.rb:15:in `split': invalid byte sequence in US-ASCII (ArgumentError)
	from /pups/lib/pups/cli.rb:15:in `run'
	from /pups/bin/pups:8:in `<main>'
0863bc0343acd6434412d672772acd2b69b6b565fce7aa9848fd12fc83a554ae
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one

```

Any hint on why and how to solve it?

---

<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: [August 7, 2015, 8:41am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864/2 "2015-08-07T08:41:41Z")

</div>

- Did you follow the guide exactly, or did you deviate from any of the steps in any way or add anything else?

- Is this a default english installation?

- Does the YAML pass an online YAML validator?

---

<div class="post-metadata">

### Author: ![cyborg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cyborg/32/116226_2.png) [@cyborg](https://meta.discourse.org/u/cyborg)
#### Post date: [August 7, 2015, 8:42am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864/3 "2015-08-07T08:42:36Z")

</div>

I followed this guide exactly. Not even one step out of it: [https://www.digitalocean.com/community/tutorials/how-to-install-discourse-on-ubuntu-14-04](https://www.digitalocean.com/community/tutorials/how-to-install-discourse-on-ubuntu-14-04)

```
history
    1 sudo apt-get update
    2 sudo apt-get upgrade
    3 apt-get install git
    4 sudo install -o root -g root -m 0600 /dev/null /swapfile
    5 dd if=/dev/zero of=/swapfile bs=1k count=2048k
    6 mkswap /swapfile
    7 swapon /swapfile
    8 echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab
    9 sudo sysctl -w vm.swappiness=10
   10 echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
   11 free -m
   12 wget -qO- https://get.docker.io/ | sh
   13 mkdir /var/discourse
   14 git clone https://github.com/discourse/discourse_docker.git /var/discourse
   15 cd /var/discourse
   16 cp samples/standalone.yml containers/app.yml
   17 nano containers/app.yml
   18 nano /etc/default/docker 
   19 service docker restart
   20 ./launcher bootstrap app
   21 history

```

Default english installation

I don’t know how to check the YAML online validator

Instance type 1GB / Frankfurt zone / Ubuntu 14.04

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [August 7, 2015, 8:46am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864/4 "2015-08-07T08:46:23Z")

</div>

> [@cyborg](#):
>
> I don’t know how to check the YAML online validator

Just copy and paste the content of you `app.yml` file into [http://www.yamllint.com/](http://www.yamllint.com/).

---

<div class="post-metadata">

### Author: ![cyborg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cyborg/32/116226_2.png) [@cyborg](https://meta.discourse.org/u/cyborg)
#### Post date: [August 7, 2015, 8:48am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864/5 "2015-08-07T08:48:36Z")

</div>

Thanks @zogstrip, the validator said:

## Valid YAML!

---

<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: [August 7, 2015, 9:00am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864/6 "2015-08-07T09:00:21Z")

</div>

I would start over from scratch (reset droplet) and [follow our official guide instead](http://blog.discourse.org/2014/04/install-discourse-in-under-30-minutes/).

The DO one is also semi-official, but.. ours is best 😉

---

<div class="post-metadata">

### Author: ![cyborg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cyborg/32/116226_2.png) [@cyborg](https://meta.discourse.org/u/cyborg)
#### Post date: [August 7, 2015, 9:01am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864/7 "2015-08-07T09:01:01Z")

</div>

> [@codinghorror](#):
>
> follow our official guide instead

Will do and revert shortly.

---

<div class="post-metadata">

### Author: ![cyborg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cyborg/32/116226_2.png) [@cyborg](https://meta.discourse.org/u/cyborg)
#### Post date: [August 7, 2015, 9:14am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864/8 "2015-08-07T09:14:34Z")

</div>

Exactly the same issue. (well, not exactly the same but fails anyways)

```
    Success. You can now start the database server using:

    /usr/lib/postgresql/9.3/bin/postgres -D /shared/postgres_data
or
    /usr/lib/postgresql/9.3/bin/pg_ctl -D /shared/postgres_data -l logfile start

I, [2015-08-07T09:13:52.554231 #40] INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2015-08-07T09:13:52.561658 #40] INFO -- : 
I, [2015-08-07T09:13:52.562149 #40] INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2015-08-07T09:13:52.565338 #40] INFO -- : 
I, [2015-08-07T09:13:52.566234 #40] INFO -- : > /root/upgrade_postgres
I, [2015-08-07T09:13:52.574080 #40] INFO -- : 
I, [2015-08-07T09:13:52.576076 #40] INFO -- : > rm /root/upgrade_postgres
I, [2015-08-07T09:13:52.577873 #40] INFO -- : 
I, [2015-08-07T09:13:52.578767 #40] INFO -- : Replacing data_directory = '/var/lib/postgresql/9.3/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-08-07T09:13:52.579961 #40] INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-08-07T09:13:52.581886 #40] INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-08-07T09:13:52.583446 #40] INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-08-07T09:13:52.585126 #40] INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-08-07T09:13:52.587949 #40] INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-08-07T09:13:52.589979 #40] INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2015-08-07T09:13:52.595172 #40] INFO -- : 
I, [2015-08-07T09:13:52.596220 #40] INFO -- : Replacing (?-mix:#?max_wal_senders *=.*) with max_wal_senders = $db_max_wal_senders in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-08-07T09:13:52.597622 #40] INFO -- : Replacing (?-mix:#?wal_level *=.*) with wal_level = $db_wal_level in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-08-07T09:13:52.600259 #40] INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-08-07T09:13:52.601921 #40] INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-08-07T09:13:52.603712 #40] INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-08-07T09:13:52.605656 #40] INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres peer in /etc/postgresql/9.3/main/pg_hba.conf
I, [2015-08-07T09:13:52.607642 #40] INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/9.3/main/pg_hba.conf
I, [2015-08-07T09:13:52.609477 #40] INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.3/bin/postmaster -D /etc/postgresql/9.3/main
LOG: invalid value for parameter "shared_buffers": "MB"
2015-08-07 09:13:52 UTC [110-2] FATAL: configuration file "/etc/postgresql/9.3/main/postgresql.conf" contains errors
I, [2015-08-07T09:13:52.645170 #40] INFO -- : > sleep 5
I, [2015-08-07T09:13:57.649656 #40] INFO -- : 
I, [2015-08-07T09:13:57.653807 #40] INFO -- : > su postgres -c 'createdb discourse' || true
createdb: could not connect to database template1: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2015-08-07T09:13:57.763683 #40] INFO -- : 
I, [2015-08-07T09:13:57.765645 #40] INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2015-08-07T09:13:57.848521 #40] INFO -- : 
I, [2015-08-07T09:13:57.850881 #40] INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2015-08-07T09:13:57.924048 #40] INFO -- : 
I, [2015-08-07T09:13:57.925495 #40] INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2015-08-07T09:13:57.995779 #40] INFO -- : 
I, [2015-08-07T09:13:57.996709 #40] INFO -- : Terminating async processes

FAILED
--------------------
RuntimeError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 136 exit 2>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
exec failed with the params "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
10049654150ec47827e12132b1ebc9ab5fe2e8dfc4ededdda2bd15ee492afac4
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one
root@clubmr2:/var/discourse#

```

History of commands from fresh install following the official instructions:

```
history
    1 sudo install -o root -g root -m 0600 /dev/null /swapfile
    2 dd if=/dev/zero of=/swapfile bs=1k count=1024k
    3 dd if=/dev/zero of=/swapfile bs=1k count=2048k
    4 mkswap /swapfile
    5 swapon /swapfile
    6 echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab
    7 sudo sysctl -w vm.swappiness=10
    8 echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
    9 wget -qO- https://get.docker.com/ | sh
   10 mkdir /var/discourse
   11 git clone https://github.com/discourse/discourse_docker.git /var/discourse
   12 cd /var/discourse
   13 cp samples/standalone.yml containers/app.yml
   14 nano containers/app.yml
   15 ./launcher bootstrap app
   16 history

```

---

<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: [August 7, 2015, 9:42am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864/9 "2015-08-07T09:42:26Z")

</div>

what editor did you use to edit your app.yml, it looks like you saved it in a weird format.

---

<div class="post-metadata">

### Author: ![cyborg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cyborg/32/116226_2.png) [@cyborg](https://meta.discourse.org/u/cyborg)
#### Post date: [August 7, 2015, 9:50am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864/10 "2015-08-07T09:50:54Z")

</div>

Used nano, but it passes YAML tests. Above is a copy paste from your web to the command line.

---

<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: [August 7, 2015, 9:57am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864/11 "2015-08-07T09:57:28Z")

</div>

> [@cyborg](#):
>
> /9.3/main/postgresql.conf" contains errors

Something in your app.yml is messed up and passing invalid data into postgres conf. what did you change.

---

<div class="post-metadata">

### Author: ![cyborg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cyborg/32/116226_2.png) [@cyborg](https://meta.discourse.org/u/cyborg)
#### Post date: [August 7, 2015, 9:59am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864/12 "2015-08-07T09:59:40Z")

</div>

> **[Ubuntu Pastebin](https://pastebin.ubuntu.com/12019770/)**

This is a pastebin directly from command line.

Only changed what is strictly mentioned on the tutorial. SMTP settings and unicorn workers / 128MB

---

<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: [August 7, 2015, 10:07am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864/13 "2015-08-07T10:07:47Z")

</div>

`I, [2015-08-07T09:13:52.609477 #40] INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.3/bin/postmaster -D /etc/postgresql/9.3/main LOG: invalid value for parameter "shared_buffers": "MB"`

This is your error. Whatever you are using to edit this file, or the contents of it, you’re entering something invalid.

---

<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: [August 7, 2015, 10:09am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864/14 "2015-08-07T10:09:47Z")

</div>

> [@codinghorror](#):
>
> “shared\_buffers”: “MB”

that is likely it, it wants to know how many MB… a number to denote that would be helpful

---

<div class="post-metadata">

### Author: ![cyborg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cyborg/32/116226_2.png) [@cyborg](https://meta.discourse.org/u/cyborg)
#### Post date: [August 7, 2015, 10:23am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864/15 "2015-08-07T10:23:47Z")

</div>

Exactly @sam That was the issue there. Thanks for your help. 😊

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [August 7, 2015, 10:27am UTC](https://meta.discourse.org/t/failed-to-bootstrap-on-do-docker-fresh-install/31864/16 "2015-08-07T10:27:00Z")

</div>


