1

I am finding myself in a weird situation. A server which has been running for years (ubuntu, ruby 1.8, rails, nginx, and postgresql) is now giving me errors (it stopped working, so i rebooted, and it worked for a a few hours. Then it stopped again, so I rebooted again, and I now get a passenger error).

So, right now psql won't start

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"?

If I try to start the service I get:

service postgresql start
* Starting PostgreSQL 8.4 database server
* The PostgreSQL server failed to start. Please check the log output.

The output log is empty.

Any idea what the cause could be?

I was able to run: pg_config

What's weird is that I cannot find a data dir - is it normal?

and i got:

    BINDIR = /usr/lib/postgresql/8.4/bin
    DOCDIR = /usr/share/doc/postgresql
    HTMLDIR = /usr/share/doc/postgresql
    INCLUDEDIR = /usr/include/postgresql
    PKGINCLUDEDIR = /usr/include/postgresql
    INCLUDEDIR-SERVER = /usr/include/postgresql/8.4/server
    LIBDIR = /usr/lib
    PKGLIBDIR = /usr/lib/postgresql/8.4/lib
    LOCALEDIR = /usr/share/locale
    MANDIR = /usr/share/postgresql/8.4/man
    SHAREDIR = /usr/share/postgresql/8.4
    SYSCONFDIR = /etc/postgresql-common
    PGXS = /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk
    CONFIGURE = '--build=i686-linux-gnu' '--prefix=/usr' '--includedir=/usr/include' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=/usr/lib/postgresql-8.4' '--srcdir=.' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-silent-rules' '--mandir=/usr/share/postgresql/8.4/man' '--with-docdir=/usr/share/doc/postgresql-doc-8.4' '--sysconfdir=/etc/postgresql-common' '--datadir=/usr/share/postgresql/8.4' '--bindir=/usr/lib/postgresql/8.4/bin' '--includedir=/usr/include/postgresql/' '--enable-nls' '--enable-integer-datetimes' '--enable-thread-safety' '--enable-debug' '--disable-rpath' '--with-tcl' '--with-perl' '--with-python' '--with-pam' '--with-krb5' '--with-gssapi' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-ldap' '--with-ossp-uuid' '--with-gnu-ld' '--with-tclconfig=/usr/lib/tcl8.5' '--with-tkconfig=/usr/lib/tk8.5' '--with-includes=/usr/include/tcl8.5' '--with-system-tzdata=/usr/share/zoneinfo' '--with-pgport=5432' 'CFLAGS=-g -O2 -g -O2 -fPIC' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,--as-needed' 'build_alias=i686-linux-gnu' 'CPPFLAGS='
    CC = gcc                                                                                                                                                                               
4
  • Have you run out of disk space? Commented Feb 10, 2014 at 13:01
  • Unfortunately no, I have lots of space Commented Feb 10, 2014 at 13:46
  • If you launch PostgreSQL by hand, what's the result? sudo -u postgres postgres -D /path/to/data/dir ? (This will run a server that doesn't detach from the console, use control-C to terminate it). Add -d5 for detailed debug output if desired. Commented Feb 10, 2014 at 23:40
  • It seems like I don't have a data folder. I will update my question with this newfound information Commented Feb 11, 2014 at 8:24

1 Answer 1

5

I guess you have no space on the server :-) You can check the server space by running the command and see the available space first.

df -h
Sign up to request clarification or add additional context in comments.

1 Comment

You're right! I had no space - although the Linode manager showed otherwise :D

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.