Re: Ubuntu 10.04 - Cannot Create TCP/IP Sockets

From: "Dai, Tino" <tdai(at)loc(dot)gov>
To: "Daniel J(dot) Summers" <daniel(dot)lists(at)djs-consulting(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Ubuntu 10.04 - Cannot Create TCP/IP Sockets
Date: 2010-05-03 11:55:41
Message-ID: 1CA7FF980DA3824F9A5C31532B7A40DCCDCE01FD@LCXCLMB01.LCDS.LOC.GOV
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Couple of things to try:

- The default process is not postmaster any more, rather is it postgres:

http://www.postgresql.org/docs/8.4/interactive/server-start.html

- Try manually starting up the postgres with the debug cranked all the way up, see what that gives you in the server logs

- Perhaps try moving the port to somewhere else with the postgres command

HTH,
Tino

________________________________________
From: pgsql-admin-owner(at)postgresql(dot)org [pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Daniel J. Summers [daniel(dot)lists(at)djs-consulting(dot)com]
Sent: Sunday, May 02, 2010 11:45 PM
To: Dai, Tino; pgsql-admin(at)postgresql(dot)org
Subject: [ADMIN] Ubuntu 10.04 - Cannot Create TCP/IP Sockets

Good evening.

I've recently provisioned a new Ubuntu 10.04 server. I ran "apt-get
install postgresql-8.4", just like I normally do when I'm setting up a
new server. However, this time I got an error about an inability to
create TCP/IP sockets. The full error is below.

* Starting PostgreSQL 8.4 database server
* The PostgreSQL server failed to start. Please check the log output:
2010-05-03 03:36:06 UTC LOG: could not bind IPv4 socket: Cannot assign
requested address
2010-05-03 03:36:06 UTC HINT: Is another postmaster already running on
port 5432? If not, wait a few seconds and retry.
2010-05-03 03:36:06 UTC WARNING: could not create listen socket for
"localhost"
2010-05-03 03:36:06 UTC FATAL: could not create any TCP/IP sockets

However, there is nothing on port 5432...

root(at)coolnewserver:~# netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 localhost:smtp *:* LISTEN
tcp6 0 0 [::]:ssh [::]:* LISTEN

..and no postgresql processes...

root(at)coolnewserver:~# ps -ef | grep postgresql
root 7738 3403 0 03:37 pts/0 00:00:00 grep --color=auto postgresql
root(at)coolnewserver:~# ps -ef | grep postmaster
root 7740 3403 0 03:37 pts/0 00:00:00 grep --color=auto postmaster

Possibly pertinent lines from /etc/postgresql/8.4/main/postgresql.conf...

listen_addresses = 'localhost'
port = 5432
max_connections = 100
unix_socket_directory = '/var/run/postgresql'

..permissions on that last directory are...

drwxrwsr-x 2 postgres postgres 40 2010-05-03 03:10 postgresql

..and localhost is resolving...

root(at)coolnewserver:~# nslookup localhost
Server: [IP]
Address: [IP]#53

Name: localhost
Address: 127.0.0.1

Using search engines, I've seen this error, and my question, asked on
occasion; what I didn't find was what the actual solution was. Anyone
remember? I'll be sure to post what I find, so that maybe others can
benefit a few years from now. :)

Thanks...

Daniel

--
Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Cédric Villemain 2010-05-03 11:56:50 Re: out of memory ...
Previous Message Jan-Peter Seifert 2010-05-03 11:15:56 out of memory ...