# I can't start discourse on CentOS

**URL:** <https://meta.discourse.org/t/i-cant-start-discourse-on-centos/62555>\
**Category:** Self-hosting\
**Created:** [May 12, 2017, 1:40am UTC](https://meta.discourse.org/t/i-cant-start-discourse-on-centos/62555 "2017-05-12T01:40:59Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![502647092](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/502647092/32/121018_2.png) [@502647092](https://meta.discourse.org/u/502647092)\
**Post date:** [May 12, 2017, 2:31am UTC](https://meta.discourse.org/t/i-cant-start-discourse-on-centos/62555/3 "2017-05-12T02:31:40Z")

</div>

Thank you  
I remount new partition  
`/dev/sda3 on /var/lib/docker type xfs (rw,relatime,attr2,inode64,noquota)`

then run `./launcher rebuild app`

have an another error

```plaintext
I, [2017-05-12T02:30:44.433734 #14] INFO -- : > /root/upgrade_postgres
I, [2017-05-12T02:30:44.438227 #14] INFO -- :
I, [2017-05-12T02:30:44.438392 #14] INFO -- : > rm /root/upgrade_postgres
I, [2017-05-12T02:30:44.441431 #14] INFO -- :
I, [2017-05-12T02:30:44.442042 #14] INFO -- : Replacing data_directory = '/var/lib/postgresql/9.5/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-05-12T02:30:44.442863 #14] INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-05-12T02:30:44.443175 #14] INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-05-12T02:30:44.443644 #14] INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-05-12T02:30:44.443991 #14] INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-05-12T02:30:44.444440 #14] INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-05-12T02:30:44.445620 #14] INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2017-05-12T02:30:44.448525 #14] INFO -- :
I, [2017-05-12T02:30:44.449546 #14] INFO -- : Replacing (?-mix:#?max_wal_senders *=.*) with max_wal_senders = $db_max_wal_senders in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-05-12T02:30:44.499680 #14] INFO -- : Replacing (?-mix:#?wal_level *=.*) with wal_level = $db_wal_level in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-05-12T02:30:44.500683 #14] INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-05-12T02:30:44.501851 #14] INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-05-12T02:30:44.502813 #14] INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-05-12T02:30:44.503941 #14] INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres peer in /etc/postgresql/9.5/main/pg_hba.conf
I, [2017-05-12T02:30:44.504781 #14] INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/9.5/main/pg_hba.conf
I, [2017-05-12T02:30:44.505135 #14] INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.5/bin/postmaster -D /etc/postgresql/9.5/main
I, [2017-05-12T02:30:44.508061 #14] INFO -- : > sleep 5
2017-05-12 02:30:44 UTC [43-1] LOG: could not open configuration file "/etc/postgresql/9.5/main/pg_hba.conf": Permission denied
2017-05-12 02:30:44 UTC [43-2] FATAL: could not load pg_hba.conf
I, [2017-05-12T02:30:49.514593 #14] INFO -- :
I, [2017-05-12T02:30:49.514885 #14] 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, [2017-05-12T02:30:49.584067 #14] INFO -- :
I, [2017-05-12T02:30:49.584354 #14] 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, [2017-05-12T02:30:49.645721 #14] INFO -- :
I, [2017-05-12T02:30:49.646604 #14] INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse todiscourse;"' || 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, [2017-05-12T02:30:49.700583 #14] INFO -- :
I, [2017-05-12T02:30:49.701330 #14] 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, [2017-05-12T02:30:49.756242 #14] INFO -- :
I, [2017-05-12T02:30:49.756928 #14] INFO -- : Terminating async processes

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

```

---

_[View the full topic](https://meta.discourse.org/t/i-cant-start-discourse-on-centos/62555)._
