ubuntu 12.04 - Postgresql Erro - psql: could not connect to server

From: pmu <perlpetual(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: ubuntu 12.04 - Postgresql Erro - psql: could not connect to server
Date: 2013-06-23 08:17:19
Message-ID: 1371975439920-5760522.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

Recently started on Ubuntu. I have installed postgresql on CentOS with no
issues, but I dont know where I am going wrong with this one.

I installed postgresql first through the software center. Installed a couple
add-ons as well, and tried running the psql command. But saw somewhat un
usual error:
Code:

pmu(at)thinkpad:~$ psql
psql: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
pmu(at)thinkpad:~$ psql -h 127.0.0.1 -U pmu
psql: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
pmu(at)thinkpad:~$ psql -h 127.0.0.1 -U postgres
psql: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
pmu(at)thinkpad:~$

Nothing about the same socket being used, or service not started, or some
stuff like that which is documented in the postgresql documentation...Just
the above error.

So I removed postgresql, again from the Software Center, and then re
installed it from command line. Still no go.

So I tried checking if the postgresql process is running, but apparently, no
matter what I do, it doesn't start:

Code:

pmu(at)thinkpad:~$ sudo service postgresql status
pmu(at)thinkpad:~$ sudo service postgresql restart
pmu(at)thinkpad:~$ sudo service postgresql stop
pmu(at)thinkpad:~$ sudo service postgresql status
pmu(at)thinkpad:~$ sudo service postgresql start
pmu(at)thinkpad:~$ sudo service postgresql status
pmu(at)thinkpad:~$

There is a postgres user created though as shown below:

Code:

pmu(at)thinkpad:~$ sudo -su postgres
postgres(at)thinkpad:~$ whoami
postgres

And it's got a lot of processes associated with it as shown below:

Code:

postgres(at)thinkpad:~$ pgrep -u postgres -l
1283 pgpool
1284 logger
1315 pgpool
1316 pgpool
1317 pgpool
1318 pgpool
1319 pgpool
1320 pgpool
1323 pgpool
1324 pgpool
1325 pgpool
................
................
...............

The .......... in the above output are more entries for pgpool...35 to be
precise as shown below:

postgres(at)thinkpad:~$ pgrep -u postgres -l | grep pgpool | wc -l
35

Per a few google searches, there's supposed to be a /usr/loca/pgsql
directory that ought to be created, but I dont find that.

initdb is also not installed.

Really confused here, not sure why this is happening. I think I am doing
something really stupid, but I am at this pointed completely brain dead to
figure out what.

I looked up the postgresql documentation too, but nothing is metioned about
this error message.

Any help I will be very thankful.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/ubuntu-12-04-Postgresql-Erro-psql-could-not-connect-to-server-tp5760522.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Stuart Bishop 2013-06-24 09:19:14 Re: ubuntu 12.04 - Postgresql Erro - psql: could not connect to server
Previous Message Basil Bourque 2013-06-21 06:44:47 Re: Composite Unique Key - Doubt