Thread: Starting ProgreSQL server

Starting ProgreSQL server

From
"Richard Watt"
Date:
I've followed the installation instructions for 7.4.3 on Fedora Core 1 Linux on a Pentium II 233 system, and it's
installedfine. I've instructed the configure tool to use TCP port 5321 during the installation. 
 
I tried to create a test database with createdb, and this is the message I get:
 
createdb: could not connect to database template1: could not connect to server: Connection refused
        Is the server running on host <IP address> and accepting
       TCP/IP connections on port 5321? 
I've got PGHOSTADDR set to <IP address>, which is the correct address for my Linux machine, and PGPORT set
to5321, and the PostgreSQL server is set to start with the -i switch. 
 
I can't think of anything else that it could be - I had it working before without specifying a port during the
configurationphase, but I need the database running to test a customer's application, which is expecting the server to
belistening to a specific port. 
 
I haven't found anything else useful in the documentation other than setting PGHOSTADDR and PGPORT in the
environment,but can anyone else come up with something I can check? 
 
Thanks in advance,
Richard WattMSN Premium gives you PC protection, junk-mail filters, advanced communication tools and great software
likeMSN Encarta® Premium.   Click here for a FREE trial! 

Re: Starting ProgreSQL server

From
Tom Lane
Date:
"Richard Watt" <warren_tf_mcarthur@hotmail.com> writes:
> I tried to create a test database with createdb, and this is the message I get:
>
> createdb: could not connect to database template1: could not connect to server: Connection refused
>         Is the server running on host <IP address> and accepting
>         TCP/IP connections on port 5321?

Double check that the postmaster is really listening to 5321 and not
some other port ("netstat -l -n --inet" is a good way).  It seems
possible there's a stray PGPORT setting somewhere you didn't notice.

If that's not it, I'd guess that the kernel's ipfilter rules are set to
reject traffic to 5321.  You'll need to punch a hole in the firewall
rules.

In any case, "connection refused" is a kernel-level failure message;
your connection request did not get delivered to the postmaster at all.
So you should be looking at generic communications problems rather
than Postgres-specific ideas.

            regards, tom lane

Re: Starting ProgreSQL server

From
"Hari Bhanujan"
Date:

See if you have used the chmod and chown to make sure that it is running with proper permissions

 

Chmod 777 (dir where postgresql is loaded)

 

Regards

Hari

 

-----Original Message-----
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Richard Watt
Sent: Thursday, July 22, 2004 10:12 AM
To: pgsql-novice@postgresql.org
Subject: [NOVICE] Starting ProgreSQL server

 

I've followed the installation instructions for 7.4.3 on Fedora Core 1 Linux on a Pentium II 233 system, and it's installed fine. I've instructed the configure tool to use TCP port 5321 during the installation.

 

I tried to create a test database with createdb, and this is the message I get:

 

createdb: could not connect to database template1: could not connect to server: Connection refused

        Is the server running on host <IP address> and accepting
        TCP/IP connections on port 5321?

I've got PGHOSTADDR set to <IP address>, which is the correct address for my Linux machine, and PGPORT set to 5321, and the PostgreSQL server is set to start with the -i switch.

 

I can't think of anything else that it could be - I had it working before without specifying a port during the configuration phase, but I need the database running to test a customer's application, which is expecting the server to be listening to a specific port.

 

I haven't found anything else useful in the documentation other than setting PGHOSTADDR and PGPORT in the environment, but can anyone else come up with something I can check?

 

Thanks in advance,

Richard Watt



MSN Premium gives you PC protection, junk-mail filters, advanced communication tools and great software like MSN Encarta® Premium. Click here for a FREE trial!