Thread: Problem with connectiong to postmaster (WinNT 4.0 SP6)

Problem with connectiong to postmaster (WinNT 4.0 SP6)

From
David Löfstrand
Date:
Hello!

I have sucessfully installed and compiled PostgreSQL 7.0 to
WinNT 4.0 Workstation Service Pack 6
My machine is a dual PIII-500 workstation (in case it can cause
problems)
The initdb script works as it should and everything works fine and
runs smoothly until I try to start a program or a script that wants
a connection to the postmaster.

As an example:
-----------------
bash-2.02$ ipc-daemon.exe &
[1] 1016
bash-2.02$ postmaster -i &
[2] 1017
bash-2.02$ createdb testing
psql: connectDBStart() -- socket() failed: errno=106
Addresses in the specified family cannot be used with this socket
createdb: database creation failed
------------------

Any hints ?

+------------------------------------------+----------------------+
| David Lofstrand - Programmer             | Surgical Science AB  |
| davidl<NO_SPAMMING>@surgical-science.com | Medicinareg 3A       |
| Tel: +46 (0)31-74 11 804                 | SE-413 46 Gothenburg |
| Fax: +46 (0)31-74 11 701                 | SWEDEN               |
+------------------------------------------+----------------------+

Re: Problem with connectiong to postmaster (WinNT 4.0 SP6)

From
Kevin Lo
Date:
David Lofsstrand wrote:

> Hello!

Hi David,

> I have sucessfully installed and compiled PostgreSQL 7.0 to
> WinNT 4.0 Workstation Service Pack 6
> My machine is a dual PIII-500 workstation (in case it can cause
> problems)
> The initdb script works as it should and everything works fine and
> runs smoothly until I try to start a program or a script that wants
> a connection to the postmaster.
>
> As an example:
> -----------------
> bash-2.02$ ipc-daemon.exe &
> [1] 1016
> bash-2.02$ postmaster -i &
> [2] 1017
> bash-2.02$ createdb testing
> psql: connectDBStart() -- socket() failed: errno=106
> Addresses in the specified family cannot be used with this socket
> createdb: database creation failed
> ------------------
>
> Any hints ?

Hmm.. I also built the binary for NT on Cygwin B20.1. The binary is at:

ftp://ftp.postgresql.org/pub/binary/v7.0/NT/

I think the PostgreSQL only runs on Cygwin.

> +------------------------------------------+----------------------+
> | David Lofstrand - Programmer             | Surgical Science AB  |
> | davidl<NO_SPAMMING>@surgical-science.com | Medicinareg 3A       |
> | Tel: +46 (0)31-74 11 804                 | SE-413 46 Gothenburg |
> | Fax: +46 (0)31-74 11 701                 | SWEDEN               |
> +------------------------------------------+----------------------+

- Kevin


Re: Problem with connectiong to postmaster (WinNT 4.0 SP6)

From
Dan Rosner
Date:
Kevin Lo wrote:
>
> David Lofsstrand wrote:
>
> > Hello!
>
> Hi David,
>
> > I have sucessfully installed and compiled PostgreSQL 7.0 to
> > WinNT 4.0 Workstation Service Pack 6
> > My machine is a dual PIII-500 workstation (in case it can cause
> > problems)
> > The initdb script works as it should and everything works fine and
> > runs smoothly until I try to start a program or a script that wants
> > a connection to the postmaster.
> >
> > As an example:
> > -----------------
> > bash-2.02$ ipc-daemon.exe &
> > [1] 1016
> > bash-2.02$ postmaster -i &
> > [2] 1017
> > bash-2.02$ createdb testing
> > psql: connectDBStart() -- socket() failed: errno=106
> > Addresses in the specified family cannot be used with this socket
> > createdb: database creation failed
> > ------------------
> >
> > Any hints ?
>
> Hmm.. I also built the binary for NT on Cygwin B20.1. The binary is at:
>
> ftp://ftp.postgresql.org/pub/binary/v7.0/NT/
>
> I think the PostgreSQL only runs on Cygwin.
>
> > +------------------------------------------+----------------------+
> > | David Lofstrand - Programmer             | Surgical Science AB  |
> > | davidl<NO_SPAMMING>@surgical-science.com | Medicinareg 3A       |
> > | Tel: +46 (0)31-74 11 804                 | SE-413 46 Gothenburg |
> > | Fax: +46 (0)31-74 11 701                 | SWEDEN               |
> > +------------------------------------------+----------------------+
>
> - Kevin

Hejsan!

Are you running NT with service pack 6 or 6a?  I recall having
a similar problem with postgres on NT and it cleared up
after installing 6a.  I believe it is mentioned somewhere
in the ports archive as well.

Can you get the psql interpreter to work?  Try:

psql -i localhost template1

and then:

create database testing;


--
Dan Rosner
Cascade Programming Group
rosner@scn.org

Re: Problem with connectiong to postmaster (WinNT 4.0 SP6)

From
David Löfstrand
Date:

Dan Rosner wrote:
>
> Hejsan!
>
> Are you running NT with service pack 6 or 6a?  I recall having
> a similar problem with postgres on NT and it cleared up
> after installing 6a.  I believe it is mentioned somewhere
> in the ports archive as well.
>
> Can you get the psql interpreter to work?  Try:
>
> psql -i localhost template1
>
> and then:
>
> create database testing;
>
> --
> Dan Rosner
> Cascade Programming Group
> rosner@scn.org

I have now installed SP6a but the problem is still there...
Can the problem related to the IPC package?
I've compiled & installed cygwin32_ipc-1.03
I think it's not likely since it should produce some
ipc-errors as well, but you never know...
I'm also using Cygwin B20.1, I have also edited the
pgsql_dir/data/hba.conf so it contains the lines:
local        all                                          trust
host         all         127.0.0.1  my.subnet.mask.number trust
host         all      my.ip.number  my.subnet.mask.number trust

further I have created the /etc/passwd and /etc/group in cygwin...
and generally followed the NT-port guide


--
+-------------------------------+----------------------+
| David Loefstrand - Programmer | Surgical Science AB  |
| davidl@surgical-science.com   | Medicinareg 3A       |
| Tel: +46 (0)31-74 11 804      | SE-413 46 Gothenburg |
| Fax: +46 (0)31-74 11 701      | SWEDEN               |
+-------------------------------+----------------------+

Re: Problem with connectiong to postmaster (WinNT 4.0 SP6)

From
Dan Rosner
Date:
David Löfstrand wrote:

>
> I have now installed SP6a but the problem is still there...
> Can the problem related to the IPC package?
> I've compiled & installed cygwin32_ipc-1.03
> I think it's not likely since it should produce some
> ipc-errors as well, but you never know...
> I'm also using Cygwin B20.1, I have also edited the
> pgsql_dir/data/hba.conf so it contains the lines:
> local        all                                          trust
> host         all         127.0.0.1  my.subnet.mask.number trust
> host         all      my.ip.number  my.subnet.mask.number trust
>
> further I have created the /etc/passwd and /etc/group in cygwin...
> and generally followed the NT-port guide
>

Did you run postgres with a patched ipc-daemon?  The unpatched daemon
has a
semaphore bug which causes spinlocks.

Try to use this one (patched and compiled) that Alexei Zakharov
pointed out to me:

http://www.s34.co.jp/~luster/pgsql/cygwin32_ipc-1.03-bin-patched.tar.bz2

Or search the list to find and apply the patch yourself.

Dan

--

Dan Rosner
Cascade Programming Group
rosner@scn.org