Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 88EF8632E50 for ; Mon, 3 May 2010 00:53:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 44329-02 for ; Mon, 3 May 2010 03:53:06 +0000 (UTC) X-Greylist: delayed 00:06:58.990054 by SQLgrey-1.7.6 Received: from tcms.us (tcms.us [174.143.154.125]) by mail.postgresql.org (Postfix) with ESMTP id 71F36632DCE for ; Mon, 3 May 2010 00:53:06 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by tcms.us (Postfix) with ESMTP id D398A90B89 for ; Mon, 3 May 2010 03:46:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at tcms.us Received: from tcms.us ([127.0.0.1]) by localhost (tcms.us [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ewxOjVihj7uk for ; Mon, 3 May 2010 03:45:59 +0000 (UTC) Received: from [192.168.0.105] (c-68-35-134-229.hsd1.nm.comcast.net [68.35.134.229]) (Authenticated sender: daniel@summershome.org) by tcms.us (Postfix) with ESMTPA id AEE6D90B87 for ; Mon, 3 May 2010 03:45:58 +0000 (UTC) Message-ID: <4BDE46F4.4070401@djs-consulting.com> Date: Mon, 03 May 2010 03:45:56 +0000 From: "Daniel J. Summers" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Ubuntu 10.04 - Cannot Create TCP/IP Sockets Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201005/14 X-Sequence-Number: 34487 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@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@coolnewserver:~# ps -ef | grep postgresql root 7738 3403 0 03:37 pts/0 00:00:00 grep --color=auto postgresql root@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@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