Connection issue


(Cylae) #1

Hello !

My Discourse was working well but now…

[details=Error]root@PoweredCore - 11:38:06 - ~ # cd /var/discourse
root@PoweredCore - 11:38:57 - /var/discourse # git pull
Already up-to-date.
root@PoweredCore - 11:38:58 - /var/discourse # ./launcher rebuild app
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container

  • /usr/bin/docker stop -t 10 app
    app
    cd /pups && git pull && /pups/bin/pups --stdin
    Already up-to-date.
    I, [2016-07-24T09:39:21.913145 #17] INFO – : Loading --stdin
    I, [2016-07-24T09:39:21.937519 #17] INFO – : > mkdir -p /shared/postgres_run
    I, [2016-07-24T09:39:21.944021 #17] INFO – :
    I, [2016-07-24T09:39:21.944428 #17] INFO – : > chown postgres:postgres /shared/postgres_run
    I, [2016-07-24T09:39:21.948014 #17] INFO – :
    I, [2016-07-24T09:39:21.948367 #17] INFO – : > chmod 775 /shared/postgres_run
    I, [2016-07-24T09:39:21.952997 #17] INFO – :
    I, [2016-07-24T09:39:21.953193 #17] INFO – : > rm -fr /var/run/postgresql
    I, [2016-07-24T09:39:21.976758 #17] INFO – :
    I, [2016-07-24T09:39:21.976957 #17] INFO – : > ln -s /shared/postgres_run /var/run/postgresql
    I, [2016-07-24T09:39:21.978057 #17] INFO – :
    I, [2016-07-24T09:39:21.978217 #17] INFO – : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
    2016/07/24 09:39:22 socat[25] E connect(6, AF=1 β€œ/shared/postgres_run/.s.PGSQL.5432”, 36): No such file or directory
    I, [2016-07-24T09:39:22.013526 #17] INFO – :
    I, [2016-07-24T09:39:22.013872 #17] INFO – : > rm -fr /shared/postgres_run/.s*
    I, [2016-07-24T09:39:22.015636 #17] INFO – :
    I, [2016-07-24T09:39:22.015993 #17] INFO – : > rm -fr /shared/postgres_run/.pid
    I, [2016-07-24T09:39:22.017494 #17] INFO – :
    I, [2016-07-24T09:39:22.017667 #17] INFO – : > mkdir -p /shared/postgres_run/9.5-main.pg_stat_tmp
    I, [2016-07-24T09:39:22.018896 #17] INFO – :
    I, [2016-07-24T09:39:22.019150 #17] INFO – : > chown postgres:postgres /shared/postgres_run/9.5-main.pg_stat_tmp
    I, [2016-07-24T09:39:22.031635 #17] INFO – :
    I, [2016-07-24T09:39:22.036089 #17] INFO – : File > /etc/service/postgres/run chmod: +x
    I, [2016-07-24T09:39:22.042412 #17] INFO – : File > /etc/runit/3.d/99-postgres chmod: +x
    I, [2016-07-24T09:39:22.052435 #17] INFO – : File > /root/upgrade_postgres chmod: +x
    I, [2016-07-24T09:39:22.052927 #17] INFO – : > chown -R root /var/lib/postgresql/9.5/main
    I, [2016-07-24T09:39:22.157092 #17] INFO – :
    I, [2016-07-24T09:39:22.157350 #17] INFO – : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/9.5/bin/initdb -D /shared/postgres_data || exit 0
    I, [2016-07-24T09:39:22.158537 #17] INFO – :
    I, [2016-07-24T09:39:22.158620 #17] INFO – : > chown -R postgres:postgres /shared/postgres_data
    I, [2016-07-24T09:39:22.173780 #17] INFO – :
    I, [2016-07-24T09:39:22.174041 #17] INFO – : > chown -R postgres:postgres /var/run/postgresql
    I, [2016-07-24T09:39:22.175553 #17] INFO – :
    I, [2016-07-24T09:39:22.175846 #17] INFO – : > /root/upgrade_postgres
    I, [2016-07-24T09:39:22.178844 #17] INFO – :
    I, [2016-07-24T09:39:22.179136 #17] INFO – : > rm /root/upgrade_postgres
    I, [2016-07-24T09:39:22.180310 #17] INFO – :
    I, [2016-07-24T09:39:22.180628 #17] 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, [2016-07-24T09:39:22.181241 #17] INFO – : Replacing (?-mix:#?listen_addresses =.) with listen_addresses = '
    ’ in /etc/postgresql/9.5/main/postgresql.conf
    I, [2016-07-24T09:39:22.181590 #17] INFO – : Replacing (?-mix:#?synchronous_commit =.) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/9.5/main/postgresql.conf
    I, [2016-07-24T09:39:22.181918 #17] INFO – : Replacing (?-mix:#?shared_buffers =.) with shared_buffers = $db_shared_buffers in /etc/postgresql/9.5/main/postgresql.conf
    I, [2016-07-24T09:39:22.182273 #17] INFO – : Replacing (?-mix:#?work_mem =.) with work_mem = $db_work_mem in /etc/postgresql/9.5/main/postgresql.conf
    I, [2016-07-24T09:39:22.182629 #17] 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, [2016-07-24T09:39:22.188090 #17] INFO – : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
    I, [2016-07-24T09:39:22.190742 #17] INFO – :
    I, [2016-07-24T09:39:22.191106 #17] INFO – : Replacing (?-mix:#?max_wal_senders =.) with max_wal_senders = $db_max_wal_senders in /etc/postgresql/9.5/main/postgresql.conf
    I, [2016-07-24T09:39:22.191456 #17] INFO – : Replacing (?-mix:#?wal_level =.) with wal_level = $db_wal_level in /etc/postgresql/9.5/main/postgresql.conf
    I, [2016-07-24T09:39:22.191880 #17] INFO – : Replacing (?-mix:#?checkpoint_segments =.) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/9.5/main/postgresql.conf
    I, [2016-07-24T09:39:22.192212 #17] INFO – : Replacing (?-mix:#?logging_collector =.) with logging_collector = $db_logging_collector in /etc/postgresql/9.5/main/postgresql.conf
    I, [2016-07-24T09:39:22.193311 #17] 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, [2016-07-24T09:39:22.193696 #17] INFO – : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres peer in /etc/postgresql/9.5/main/pg_hba.conf
    I, [2016-07-24T09:39:22.194086 #17] 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, [2016-07-24T09:39:22.194392 #17] 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, [2016-07-24T09:39:22.195478 #17] INFO – : > sleep 5
    2016-07-24 09:39:22 UTC [46-1] FATAL: could not write lock file β€œpostmaster.pid”: No space left on device
    I, [2016-07-24T09:39:27.200481 #17] INFO – :
    I, [2016-07-24T09:39:27.200883 #17] 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, [2016-07-24T09:39:27.314237 #17] INFO – :
    I, [2016-07-24T09:39:27.314517 #17] 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, [2016-07-24T09:39:27.569309 #17] INFO – :
    I, [2016-07-24T09:39:27.569610 #17] 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, [2016-07-24T09:39:27.723875 #17] INFO – :
    I, [2016-07-24T09:39:27.724099 #17] 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, [2016-07-24T09:39:27.876665 #17] INFO – :
    I, [2016-07-24T09:39:27.876957 #17] 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 72 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;”’"
d28a17be1cd7ec41f22f917b3003e77ff6e98b140bdd317586c53e369921fd3b
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
root@PoweredCore - 11:39:28 - /var/discourse # cd /var/discourse[/details]

What to do ? :confused:
Thank you so much for your help !


(cpradio) #2

Have you tried this topic?


(Cylae) #3

Where can I find this setting ?

Edit : The setting is already in en-US