# Failed to install Discourse in Ubuntu14.04: docker problems

**URL:** https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399
**Category:** Self-hosting
**Tags:** docker
**Created:** [9월 24, 2014, 12:59오후 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399 "2014-09-24T12:59:20Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![craft37](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/craft37/32/35505_2.png) [@craft37](https://meta.discourse.org/u/craft37)
#### Post date: [9월 24, 2014, 12:59오후 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/1 "2014-09-24T12:59:20Z")

</div>

Tried to install Discourses through Docker with this article [http://www.howtoinstalldiscourse.com/how-to-install-discourse-on-ubuntu/:](http://www.howtoinstalldiscourse.com/how-to-install-discourse-on-ubuntu/:)  
Have an error on Launch Discourse step (./launcher bootstrap app , ./launcher start app)

Please help!

OS: Ubuntu Studio 14.04  
docker --version: Docker version 1.2.0, build fa7b24f

```
  cosy@cosy-HP-EliteBook-8540w:/var/docker$ ./launcher bootstrap app
    2014/09/24 15:50:59 Get http:///var/run/docker.sock/v1.14/info: dial unix /var/run/docker.sock: permission denied
    Cannot connect to the docker daemon - verify it is running and you have access
    cosy@cosy-HP-EliteBook-8540w:/var/docker$ sudo ./launcher bootstrap app
    WARNING: No swap limit support
    Calculated ENV: -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=3 -e UNICORN_SIDEKIQS=1 -e RUBY_GC_MALLOC_LIMIT=40000000 -e RUBY_HEAP_MIN_SLOTS=800000 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e HOME=/root -e DISCOURSE_DEVELOPER_EMAILS=me@example.com -e DISCOURSE_HOSTNAME=discourse.example.com -e DISCOURSE_SMTP_ADDRESS=smtp.example.com
    cd /pups && git pull && /pups/bin/pups --stdin
    From https://github.com/SamSaffron/pups
       f7a125b..ac9bdf8 master -> origin/master
    Updating f7a125b..ac9bdf8
    Fast-forward
     README.md | 2 +-
     lib/pups/config.rb | 14 +++++++++++++-
     2 files changed, 14 insertions(+), 2 deletions(-)
    I, [2014-09-24T12:51:14.130187 #43] INFO -- : Loading --stdin
    I, [2014-09-24T12:51:14.134607 #43] INFO -- : > mkdir -p /shared/postgres_run
    I, [2014-09-24T12:51:14.139001 #43] INFO -- : 
    I, [2014-09-24T12:51:14.139448 #43] INFO -- : > chown postgres:postgres /shared/postgres_run
    I, [2014-09-24T12:51:14.143742 #43] INFO -- : 
    I, [2014-09-24T12:51:14.144293 #43] INFO -- : > chmod 775 /shared/postgres_run
    I, [2014-09-24T12:51:14.148718 #43] INFO -- : 
    I, [2014-09-24T12:51:14.149481 #43] INFO -- : > rm -fr /var/run/postgresql
    I, [2014-09-24T12:51:14.154116 #43] INFO -- : 
    I, [2014-09-24T12:51:14.154822 #43] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
    I, [2014-09-24T12:51:14.159223 #43] INFO -- : 
    I, [2014-09-24T12:51:14.160482 #43] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
    2014/09/24 12:51:14 **socat[51] E connect(4, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory**
    I, [2014-09-24T12:51:14.176709 #43] INFO -- : 
    I, [2014-09-24T12:51:14.177194 #43] INFO -- : > rm -fr /shared/postgres_run/.s*
    I, [2014-09-24T12:51:14.182002 #43] INFO -- : 
    I, [2014-09-24T12:51:14.182793 #43] INFO -- : > rm -fr /shared/postgres_run/*.pid
    I, [2014-09-24T12:51:14.186791 #43] INFO -- : 
    I, [2014-09-24T12:51:14.195268 #43] INFO -- : File > /etc/service/postgres/run chmod: +x
    I, [2014-09-24T12:51:14.203983 #43] INFO -- : File > /root/upgrade_postgres chmod: +x
    I, [2014-09-24T12:51:14.205687 #43] INFO -- : > chown -R root /var/lib/postgresql/9.3/main
    I, [2014-09-24T12:51:14.674964 #43] INFO -- : 
    I, [2014-09-24T12:51:14.675210 #43] INFO -- : > [! -e /shared/postgres_data] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/9.3/bin/initdb -D /shared/postgres_data || exit 0
    I, [2014-09-24T12:51:14.678337 #43] INFO -- : 
    I, [2014-09-24T12:51:14.678486 #43] INFO -- : > chown -R postgres:postgres /shared/postgres_data
    I, [2014-09-24T12:51:14.683034 #43] INFO -- : 
    I, [2014-09-24T12:51:14.683239 #43] INFO -- : > chown -R postgres:postgres /var/run/postgresql
    I, [2014-09-24T12:51:14.687146 #43] INFO -- : 
    I, [2014-09-24T12:51:14.688147 #43] **INFO -- : > /root/upgrade_postgres
    cat: /shared/postgres_data/PG_VERSION: No such file or directory
    /root/upgrade_postgres: line 2: [: 9.2: unary operator expected**
    I, [2014-09-24T12:51:14.698314 #43] INFO -- : 
    I, [2014-09-24T12:51:14.698705 #43] INFO -- : > rm /root/upgrade_postgres
    I, [2014-09-24T12:51:14.701577 #43] INFO -- : 
    I, [2014-09-24T12:51:14.703295 #43] 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, [2014-09-24T12:51:14.704076 #43] INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/9.3/main/postgresql.conf
    I, [2014-09-24T12:51:14.704511 #43] INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/9.3/main/postgresql.conf
    I, [2014-09-24T12:51:14.704993 #43] INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/9.3/main/postgresql.conf
    I, [2014-09-24T12:51:14.705517 #43] INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/9.3/main/postgresql.conf
    I, [2014-09-24T12:51:14.706063 #43] INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/9.3/main/postgresql.conf
    I, [2014-09-24T12:51:14.706683 #43] 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, [2014-09-24T12:51:14.707527 #43] INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
    I, [2014-09-24T12:51:14.712618 #43] INFO -- : 
    I, [2014-09-24T12:51:14.712992 #43] INFO -- : Replacing (?-mix:#?max_wal_senders *=.*) with max_wal_senders = 4 in /etc/postgresql/9.3/main/postgresql.conf
    I, [2014-09-24T12:51:14.713641 #43] INFO -- : Replacing (?-mix:#?wal_level *=.*) with wal_level = hot_standby in /etc/postgresql/9.3/main/postgresql.conf
    I, [2014-09-24T12:51:14.714491 #43] INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres peer in /etc/postgresql/9.3/main/pg_hba.conf
    I, [2014-09-24T12:51:14.715105 #43] 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, [2014-09-24T12:51:14.715668 #43] INFO -- : > su - postgres -c '/usr/lib/postgresql/9.3/bin/postmaster -D /etc/postgresql/9.3/main'
    I, [2014-09-24T12:51:14.717909 #43] INFO -- : > sleep 5
    2014-09-24 12:51:14 UTC FATAL: "/shared/postgres_data" is not a valid data directory
    2014-09-24 12:51:14 UTC DETAIL: File "/shared/postgres_data/PG_VERSION" is missing.
    I, [2014-09-24T12:51:19.721574 #43] INFO -- : 
    I, [2014-09-24T12:51:19.722366 #43] 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, [2014-09-24T12:51:19.808929 #43] INFO -- : 
    I, [2014-09-24T12:51:19.809564 #43] 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, [2014-09-24T12:51:19.894773 #43] INFO -- : 
    I, [2014-09-24T12:51:19.895610 #43] 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, [2014-09-24T12:51:19.963502 #43] INFO -- : 
    I, [2014-09-24T12:51:19.974952 #43] 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, [2014-09-24T12:51:20.045469 #43] INFO -- : 
    
    
    FAILED
    --------------------
    RuntimeError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 96 exit 2>
    Location of failure: /pups/lib/pups/exec_command.rb:85:in `spawn'
    exec failed with the params "su postgres -c 'psql discourse -c \"alter schema public owner to discourse;\"'"
    b0ce6def79bdcdb9bf418f54fb8f2c77ada62b7cc6d2ca99688ae83c7cf992a4
    FAILED TO BOOTSTRAP

```

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [9월 24, 2014, 6:35오후 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/2 "2014-09-24T18:35:41Z")

</div>

Please post the contents of your `app.yml` file (but don’t forget to remove / censor any private information, e.g. the username and password for your mail service).

---

<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: [9월 24, 2014, 10:28오후 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/3 "2014-09-24T22:28:53Z")

</div>

I would not follow that document.. follow our [official install](https://meta.discourse.org/t/142537?silent=true) guide.

[https://github.com/discourse/discourse/blob/master/docs/INSTALL-digital-ocean.md](https://github.com/discourse/discourse/blob/master/docs/INSTALL-digital-ocean.md)

Or the one on Digital Ocean

[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)

---

<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: [9월 24, 2014, 11:23오후 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/4 "2014-09-24T23:23:03Z")

</div>

> [@craft37](#):
>
> /var/docker

Its meant to be `/var/discourse` the base templates all expect that.

---

<div class="post-metadata">

### Author: ![craft37](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/craft37/32/35505_2.png) [@craft37](https://meta.discourse.org/u/craft37)
#### Post date: [9월 25, 2014, 12:18오후 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/5 "2014-09-25T12:18:20Z")

</div>

Guys, thanks for answers.

1. I switched to official installation doc on [digitalocean.com](http://digitalocean.com)

2. It’s really meant to be /var/discourse directory, and I cd it now

3. I filled app.yml to this condition:

4. launched bootrstrap comes with:

5. I runed a command to start docker but it freezed:

6. If I try to run “launcher bootstrap app” in another terminal window it failed with:

What I can do else?

---

<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: [9월 25, 2014, 8:11오후 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/6 "2014-09-25T20:11:32Z")

</div>

What does `docker info` return?

---

<div class="post-metadata">

### Author: ![craft37](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/craft37/32/35505_2.png) [@craft37](https://meta.discourse.org/u/craft37)
#### Post date: [9월 26, 2014, 5:15오전 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/7 "2014-09-26T05:15:37Z")

</div>

```
2014/09/26 08:15:13 Get http:///var/run/docker.sock/v1.14/info: dial unix /var/run/docker.sock: no such file or directory

```

---

<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: [9월 26, 2014, 5:20오전 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/8 "2014-09-26T05:20:52Z")

</div>

Docker is not installing on your system, for some reason.

You are installing it via this, yes, as a privileged account?

`wget -qO- https://get.docker.io/ | sh`

Does that report any errors?

---

<div class="post-metadata">

### Author: ![axil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/axil/32/81682_2.png) [@axil](https://meta.discourse.org/u/axil)
#### Post date: [9월 26, 2014, 6:01오후 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/9 "2014-09-26T18:01:41Z")

</div>

Had the same problem and a restart of the docker service did it. Now I’m facing this [https://meta.discourse.org/t/stuck-on-updating/20407/3](https://meta.discourse.org/t/stuck-on-updating/20407/3)

---

<div class="post-metadata">

### Author: ![axil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/axil/32/81682_2.png) [@axil](https://meta.discourse.org/u/axil)
#### Post date: [9월 26, 2014, 6:08오후 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/10 "2014-09-26T18:08:49Z")

</div>

There is another command for 14.04 in docker’s [site](https://docs.docker.com/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit), does the same as yours but is simpler and more straighforward:

```plaintext
curl -sSL https://get.docker.io/ubuntu/ | sudo sh

```

---

<div class="post-metadata">

### Author: ![craft37](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/craft37/32/35505_2.png) [@craft37](https://meta.discourse.org/u/craft37)
#### Post date: [9월 29, 2014, 11:24오후 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/11 "2014-09-29T23:24:51Z")

</div>

1. Installing with **curl -sSL [https://get.docker.io/ubuntu/](https://get.docker.io/ubuntu/) | sudo sh** comes with **lxc-docker is already the newest version.**
2. docker info says 2014/09/30 02:22:05 **Get http:///var/run/docker.sock/v1.14/info: dial unix /var/run/docker.sock: no such file or directory**

---

<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: [9월 29, 2014, 11:29오후 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/12 "2014-09-29T23:29:07Z")

</div>

I suggest removing docker, via `apt-get remove lxc-docker`, then trying again to install it.

---

<div class="post-metadata">

### Author: ![craft37](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/craft37/32/35505_2.png) [@craft37](https://meta.discourse.org/u/craft37)
#### Post date: [9월 29, 2014, 11:39오후 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/13 "2014-09-29T23:39:51Z")

</div>

I reinstalled docker.  
Now docker info actually have some info:

```
cosy@cosy-HP-EliteBook-8540w:/var/discourse$ sudo docker info
Containers: 3
Images: 21
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Dirs: 28
Execution Driver: native-0.2
Kernel Version: 3.13.0-35-lowlatency
Operating System: Ubuntu 14.04.1 LTS
WARNING: No swap limit support

```

But the error on launcher bootstrap app still same as below.  
Even after " sudo service docker restart".

---

<div class="post-metadata">

### Author: ![craft37](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/craft37/32/35505_2.png) [@craft37](https://meta.discourse.org/u/craft37)
#### Post date: [10월 9, 2014, 1:02오전 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/15 "2014-10-09T01:02:00Z")

</div>

@sam @codinghorror ? Any ideas, guys?

1. I stopped with same error as in 1st topic message after “./launcher bootstrap app” and have no idea how to start discource.

Figured out that troubles due log starting with this lines:

```
INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2014/10/09 01:18:25 socat[54] E connect(4, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory

INFO -- : > /root/upgrade_postgres
cat: /shared/postgres_data/PG_VERSION: No such file or directory
/root/upgrade_postgres: line 2: [: 9.2: unary operator expected

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, [2014-10-09T01:18:30.996811 #46] INFO -- : 
I, [2014-10-09T01:18:31.008665 #46] 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, [2014-10-09T01:18:31.072893 #46] INFO -- : 
I, [2014-10-09T01:18:31.073980 #46] 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, [2014-10-09T01:18:31.138713 #46] INFO -- : 
I, [2014-10-09T01:18:31.139386 #46] 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, [2014-10-09T01:18:31.200614 #46] INFO -- : 

```

1. Main hook now that “/shared/postgres\_data” is not a valid data directory" and "postgres PG\_VERSION is missing ". googling..

2.1) According this case: [Solved: Postgresql 8.4 on Ubuntu - PG\_VERSION is missing | Experts Exchange](http://www.experts-exchange.com/OS/Linux/Q_26967327.html)

sudo sysv-rc-conf postgresql on  
service postgresql start

– without result.

2.2) As I figure out, PostgreSQL’s data directory missing. [http://dba.stackexchange.com/a/1354](http://dba.stackexchange.com/a/1354)  
On Debian/Ubuntu:

```
pg_lsclusters
Ver Cluster Port Status Owner Data directory Log file
9.3 main 5432 online postgres /var/lib/postgresql/9.3/main /var/log/postgresql/postgresql-9.3-main.log

```

But how I can use this info? Is there is any ways to link it with docker?

1. Seems like I not alone with this.  
Guy in [this topic](https://meta.discourse.org/t/admin-docker-url-went-away-on-my-site) had same error 2 days ago during update: “socat[51] E connect(4, AF=1 “/shared/postgres\_run/.s.PGSQL.5432”, 36): No such file or directory”.

2. launcher start app comes with:

---

<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: [10월 9, 2014, 5:02오전 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/17 "2014-10-09T05:02:02Z")

</div>

If you failed to install on a new install, why does it matter if your db is corrupt? Blow everything away and start over from scratch, following the [official install](https://meta.discourse.org/t/142537?silent=true) guide closely.

---

<div class="post-metadata">

### Author: ![craft37](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/craft37/32/35505_2.png) [@craft37](https://meta.discourse.org/u/craft37)
#### Post date: [10월 9, 2014, 6:29오전 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/18 "2014-10-09T06:29:01Z")

</div>

I started from scratch with removing docker as I reported earlier.

Will try it now on another distributive or virtual machine.

---

<div class="post-metadata">

### Author: ![tooom](https://avatars.discourse-cdn.com/v4/letter/t/9de0a6/32.png) [@tooom](https://meta.discourse.org/u/tooom)
#### Post date: [1월 12, 2015, 7:06오후 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/19 "2015-01-12T19:06:45Z")

</div>

Hi there,

Let me know if I should start a separate topic for this, but:

Running into the exact same error while bootstrapping on a Debian GCE instance:

```
FAILED
--------------------
RuntimeError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 97 exit 2>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
exec failed with the params "su postgres -c 'psql discourse -c \"alter schema public owner to discourse;\"'"

```

Currently trying to bootstrap a separate data container for a multisite Discourse setup, so I can’t throw my database away, if it is corrupt. Although I don’t know if that’s the case because my first site works perfectly fine.

The first discourse site was set up with the instructions here: [https://github.com/discourse/discourse/blob/master/docs/INSTALL-digital-ocean.md](https://github.com/discourse/discourse/blob/master/docs/INSTALL-digital-ocean.md) although the Digital Ocean stuff was skipped in favour of GCE.

@craft37, did you make any progress with this issue?

@sam, is this actually a sign that the database is corrupt? The first discourse site is working fine and I’d prefer not to nuke the database and start over.

---

<div class="post-metadata">

### Author: ![tooom](https://avatars.discourse-cdn.com/v4/letter/t/9de0a6/32.png) [@tooom](https://meta.discourse.org/u/tooom)
#### Post date: [1월 12, 2015, 7:22오후 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/20 "2015-01-12T19:22:19Z")

</div>

Also, I was following this post on how to set up multisite Discourse: [https://meta.discourse.org/t/beginners-guide-to-setting-up-discourse-multisite-with-docker/17972](https://meta.discourse.org/t/beginners-guide-to-setting-up-discourse-multisite-with-docker/17972)

So my data.yml file looks almost exactly the same as the one there, but here’s mine just in case (with SOME\_SECRET subbed in for my password):

```
# A container for all things Data, be sure to set a secret password for
# discourse account, SOME_SECRET is just an example 
#

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/sshd.template.yml"

expose:
  - "5431:5431"
  - "6379:6379"
  - "2221:22"

params:
  db_default_text_search_config: "pg_catalog.english"
  ## Set db_shared_buffers to 1/3 of the memory you wish to allocate to postgres
  ## on 1GB install set to 128MB on a 4GB instance you may raise to 1GB
  #db_shared_buffers: "256MB" 

env:
  # ensure locale exists in container, you may need to install it
  LANG: en_US.UTF-8

volumes:
  - volume: 
        host: /var/discourse/shared/data
        guest: /shared 
  - volume: 
        host: /var/discourse/shared/data/log/var-log
        guest: /var/log

# TODO: SOME_SECRET to a password for the discourse user
hooks:
  after_postgres:
    - exec: 
        stdin: |
          alter user discourse with password 'SOME_SECRET';
        cmd: sudo - postgres -c 'psql discourse'

        raise_on_fail: false
#create second database 
hooks:
  after_postgres:
     - exec: sudo -u postgres createdb discourse_b || exit 0 # designate name of 2nd db
     - exec: 
          stdin: |
            grant all privileges on database discourse_b to discourse;
          cmd: sudo -u postgres psql discourse_b 
          raise_on_fail: false

     - exec: /bin/bash -c 'sudo -u postgres psql discourse_b <<< "alter schema public owner to discourse;"'

     - exec: /bin/bash -c 'sudo -u postgres psql discourse_b <<< "create extension if not exists hstore;"' 

     - exec: /bin/bash -c 'sudo -u postgres psql discourse_b <<< "create extension if not exists pg_trgm;"'

```

---

<div class="post-metadata">

### Author: ![tooom](https://avatars.discourse-cdn.com/v4/letter/t/9de0a6/32.png) [@tooom](https://meta.discourse.org/u/tooom)
#### Post date: [1월 12, 2015, 8:46오후 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/21 "2015-01-12T20:46:07Z")

</div>

Hm, so based on this topic: [https://meta.discourse.org/t/can-not-bootstrap-discourse/20906/17](https://meta.discourse.org/t/can-not-bootstrap-discourse/20906/17) it looks like my problem might be the presence of the old database.

Is it not possible to add multisite-ness to Discourse once you’ve already set up a standalone Discourse?

---

<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: [1월 25, 2015, 11:44오전 UTC](https://meta.discourse.org/t/failed-to-install-discourse-in-ubuntu14-04-docker-problems/20399/22 "2015-01-25T11:44:45Z")

</div>

It is possible, but when it comes to multisite you are dealing with a highly technical feature, you need to be comfortable spawning a container to snoop around and understand the templates real well.
