a question about postgresql server connection
Hi all,
I installed postgresql and when I typed ./createdb mydb, it gave error message:
*************************************************************************************************************************
createdb: could not connect to database postgres: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Then I checked /etc/init.d file, and I got postgresql-8.3 in this directory, then I used $ sudo ./postgresql-8.3 start, which gave error message:
****************************************************************************
LOG: could not bind IPv4 socket: Address already in use
HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and
retry\.
FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
But before it, I have already add an line below the IPv4 connection, which looks like:
# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 130.238.209.11/1 trust
I got my IP address from ifconfig. After that, I really do not know what should I do next step. I really appreciate any help, thank you in advance!
Best regards,
Dongyan
Dongyan Song, Msc
Uppsala University
Applied Biotechnology & Computational Science
+46(0)707204195
Flogstavagen 67E-521
_________________________________________________________________
锟斤拷Windows Live 锟叫癸拷锟斤拷页锟斤拷锟斤拷锟斤拷锟斤拷锟铰帮拷 MSN锟斤拷
http://im.live.cn/
On Wednesday 15 April 2009 5:30:29 am SongDongyan wrote:
Hi all,
I installed postgresql and when I typed ./createdb mydb, it gave error
message:
***************************************************************************
********************************************** createdb: could not connect
to database postgres: could not connect to server: No such file or
directory Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?Then I checked /etc/init.d file, and I got postgresql-8.3 in this
directory, then I used $ sudo ./postgresql-8.3 start, which gave error
message:
***************************************************************************
* LOG: could not bind IPv4 socket: Address already in useHINT: Is another postmaster already running on port 5432? If not, wait a
few seconds andretry\.
FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission
deniedBut before it, I have already add an line below the IPv4 connection, which
looks like: # IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 130.238.209.11/1 trustI got my IP address from ifconfig. After that, I really do not know what
should I do next step. I really appreciate any help, thank you in advance!
First are you trying to connect to a local server or a remote server?
Second what is listen_addresses in postgresql.conf set to?
Best regards,
DongyanDongyan Song, Msc
Uppsala University
Applied Biotechnology & Computational Science
+46(0)707204195
Flogstavagen 67E-521_________________________________________________________________
上Windows Live 中国首页,下载最新版 MSN!
http://im.live.cn/
--
Adrian Klaver
aklaver@comcast.net
Adrian Klaver <aklaver@comcast.net> writes:
On Wednesday 15 April 2009 5:30:29 am SongDongyan wrote:
FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission
denied
First are you trying to connect to a local server or a remote server?
Second what is listen_addresses in postgresql.conf set to?
The /tmp permissions problem is unrelated to listen_addresses ...
need to fix that.
regards, tom lane
Hi,
Thank you for your suggestion, I set my listen_address = ' * ', and I want to connect to local server.
After I modified listen_address from localhost to *, the error message left to one line:
****************************************************************************************
FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
But still, I cannot link to server.
Thank you again!
Best regards,
Dongyan
Dongyan Song, Msc
Uppsala University
Applied Biotechnology & Computational Science
+46(0)707204195
Flogstavagen 67E-521
From: aklaver@comcast.net
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] a question about postgresql server connection
Date: Wed, 15 Apr 2009 06:46:04 -0700
CC: yzhskdls@hotmail.comOn Wednesday 15 April 2009 5:30:29 am SongDongyan wrote:
Hi all,
I installed postgresql and when I typed ./createdb mydb, it gave error
message:
***************************************************************************
********************************************** createdb: could not connect
to database postgres: could not connect to server: No such file or
directory Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?Then I checked /etc/init.d file, and I got postgresql-8.3 in this
directory, then I used $ sudo ./postgresql-8.3 start, which gave error
message:
***************************************************************************
* LOG: could not bind IPv4 socket: Address already in useHINT: Is another postmaster already running on port 5432? If not, wait a
few seconds andretry\.
FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission
deniedBut before it, I have already add an line below the IPv4 connection, which
looks like: # IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 130.238.209.11/1 trustI got my IP address from ifconfig. After that, I really do not know what
should I do next step. I really appreciate any help, thank you in advance!First are you trying to connect to a local server or a remote server?
Second what is listen_addresses in postgresql.conf set to?Best regards,
DongyanDongyan Song, Msc
Uppsala University
Applied Biotechnology & Computational Science
+46(0)707204195
Flogstavagen 67E-521_________________________________________________________________
锟斤拷Windows Live 锟叫癸拷锟斤拷页锟斤拷锟斤拷锟斤拷锟斤拷锟铰帮拷 MSN锟斤拷
http://im.live.cn/--
Adrian Klaver
aklaver@comcast.net
_________________________________________________________________
MSN 锟斤拷锟斤拷魔锟斤拷锟介,锟侥憋拷锟斤拷亩曰锟绞憋拷锟斤拷锟�
http://im.live.cn/emoticons/
Hi,
Thank you for your suggestion, I set my listen_address = ' * ', and I want
to connect to local server.
After I modified listen_address from localhost to *, the error message left
to one line:
****************************************************************************************
FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
But still, I cannot link to server.
Thank you again!
Best regards,
Dongyan
Tom Lane-2 wrote:
Adrian Klaver <aklaver@comcast.net> writes:
On Wednesday 15 April 2009 5:30:29 am SongDongyan wrote:
FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission
deniedFirst are you trying to connect to a local server or a remote server?
Second what is listen_addresses in postgresql.conf set to?The /tmp permissions problem is unrelated to listen_addresses ...
need to fix that.regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
-----
Dongyan Song, Msc
Medical informatics, Uppsala University, Sweden
--
View this message in context: http://www.nabble.com/a-question-about-postgresql-server-connection-tp23059116p23074712.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
On Thursday 16 April 2009 2:04:19 am SongDongyan wrote:
Hi,
Thank you for your suggestion, I set my listen_address = ' * ', and I want
to connect to local server.After I modified listen_address from localhost to *, the error message left
to one line:
***************************************************************************
************* FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock":
Permission deniedBut still, I cannot link to server.
Thank you again!
Best regards,
Dongyan
Per Toms suggestion, you need to look at the permissions on the /tmp directory
to see why Postgres cannot open a lock file there.
--
Adrian Klaver
aklaver@comcast.net
Hi,
Thank you for all suggestions, I fixed this problem by change the owner of
/tmp/.s.PGSQL.5432.lock file.
# chown postgres /tmp/.s.PGSQL.5432.lock
and it is done.
Best wishes,
Dongyan
Adrian Klaver wrote:
On Thursday 16 April 2009 2:04:19 am SongDongyan wrote:
Hi,
Thank you for your suggestion, I set my listen_address = ' * ', and I
want
to connect to local server.After I modified listen_address from localhost to *, the error message
left
to one line:
***************************************************************************
************* FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock":
Permission deniedBut still, I cannot link to server.
Thank you again!
Best regards,
DongyanPer Toms suggestion, you need to look at the permissions on the /tmp
directory
to see why Postgres cannot open a lock file there.--
Adrian Klaver
aklaver@comcast.net--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
-----
Dongyan Song, Msc
Medical informatics, Uppsala University, Sweden
--
View this message in context: http://www.nabble.com/a-question-about-postgresql-server-connection-tp23059116p23081602.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.