pg.ddx.io  pgsql-cygwin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
initdb fails
13+ messages / 9 participants
[nested] [flat]

* initdb fails
@ 2001-04-18 16:13  schopen@dimdi.de
  0 siblings, 1 reply; 13+ messages in thread

From: schopen@dimdi.de @ 2001-04-18 16:13 UTC (permalink / raw)
  To: pgsql-cygwin

Hello everybody,

I tried to install postgresql under cygwin on win nt 4.0 with SP6 
installed. I followed the instructions in
/usr/doc/cygwin/postgresql-7.1.README.
I have replaced cygwin1.dll (1.1.8-2) by the latest snapshot (April 
16) and all further steps succeeded until initdb, which fails:

bash-2.04$ bin/initdb
This database system will be initialized with username "schopen".
This user will own all the data files and must also own the server 
process.

Creating directory /usr/share/postgresql/data
Creating directory /usr/share/postgresql/data/base
Creating directory /usr/share/postgresql/data/global
Creating directory /usr/share/postgresql/data/pg_xlog
Creating template1 database in /usr/share/postgresql/data/base/1
DEBUG:  database system was shut down at 2001-04-18 16:08:49
DEBUG:  CheckPoint record at (0, 8)
DEBUG:  Redo record at (0, 8); Undo record at (0, 8); Shutdown TRUE
DEBUG:  NextTransactionId: 514; NextOid: 16384
DEBUG:  database system is in production state
Creating global relations in /usr/share/postgresql/data/global
DEBUG:  database system was shut down at 2001-04-18 16:08:56
DEBUG:  CheckPoint record at (0, 112)
DEBUG:  Redo record at (0, 112); Undo record at (0, 0); Shutdown TRUE
DEBUG:  NextTransactionId: 514; NextOid: 17199
DEBUG:  database system is in production state
Initializing pg_shadow.

initdb failed.
Removing /usr/share/postgresql/data.
Removing temp file /tmp/initdb.194.

Any help? Thanks a lot.

Michael
--
====================================================
Dr. med. Michael Schopen     Tel. +49 221 4724 325
Deutsches Institut fuer      Fax. +49 221 41 14 29
Medizinische Dokumentation 
und Information DIMDI        http://www.dimdi.de
Waisenhausgasse 36-38a
D-50676 Koeln                email:s#chopen@dimdi.de 
>>>   remove # to use email address   <<<
====================================================



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: initdb fails
@ 2001-04-18 17:30  Jason Tishler <Jason.Tishler@dothill.com>
  parent: schopen@dimdi.de
  0 siblings, 1 reply; 13+ messages in thread

From: Jason Tishler @ 2001-04-18 17:30 UTC (permalink / raw)
  To: schopen@dimdi.de; +Cc: pgsql-cygwin

Michael,

On Wed, Apr 18, 2001 at 06:13:43PM +0200, schopen@dimdi.de wrote:
> bash-2.04$ bin/initdb
> This database system will be initialized with username "schopen".
> This user will own all the data files and must also own the server 
> process.
> 
> Creating directory /usr/share/postgresql/data
> [snip]
> Initializing pg_shadow.
> 
> initdb failed.
> Removing /usr/share/postgresql/data.
> Removing temp file /tmp/initdb.194.
> 
> Any help? Thanks a lot.

I just tried the above with the following configuration:

    NT 4.0 SP6a
    PostgreSQL 7.1-2
    cygipc 1.09-2
    Cygwin 1.1.8-2 (with cygwin1.dll replaced by cygwin1-20010416.dll.bz2)

and the initdb worked as expected.

My only suggestion is to capture the output from the following:

    $ sh -x /bin/initdb

and send the precise point in the initdb shell script where the failure
occurs to the list.  Hopefully, someone will be able to figure out what
is going wrong for you.

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: initdb fails
@ 2001-04-18 19:38  Jason Tishler <Jason.Tishler@dothill.com>
  parent: Jason Tishler <Jason.Tishler@dothill.com>
  0 siblings, 0 replies; 13+ messages in thread

From: Jason Tishler @ 2001-04-18 19:38 UTC (permalink / raw)
  To: schopen@dimdi.de; +Cc: pgsql-cygwin

Michael,

On Wed, Apr 18, 2001 at 01:30:04PM -0400, Jason Tishler wrote:
> On Wed, Apr 18, 2001 at 06:13:43PM +0200, schopen@dimdi.de wrote:
> > bash-2.04$ bin/initdb
> > This database system will be initialized with username "schopen".
> > This user will own all the data files and must also own the server 
> > process.
> > 
> > Creating directory /usr/share/postgresql/data
> > [snip]
> > Initializing pg_shadow.
> > 
> > initdb failed.
> > Removing /usr/share/postgresql/data.
> > Removing temp file /tmp/initdb.194.
> > 
> > Any help? Thanks a lot.
> 
> I just tried the above with the following configuration:
> 
>     NT 4.0 SP6a
>     PostgreSQL 7.1-2
>     cygipc 1.09-2
>     Cygwin 1.1.8-2 (with cygwin1.dll replaced by cygwin1-20010416.dll.bz2)
> 
> and the initdb worked as expected.

The plot thickens or I spoke too soon.

Although initdb works, I am getting the following errors when I connect
to postmaster:

    # server side
    $ postmaster
    DEBUG:  database system was shut down at 2001-04-18 15:12:29 
    DEBUG:  CheckPoint record at (0, 1563376)
    DEBUG:  Redo record at (0, 1563376); Undo record at (0, 0); Shutdown TRUE
    DEBUG:  NextTransactionId: 619; NextOid: 18720
    DEBUG:  database system is in production state
    pq_flush: send() failed: The connection was aborted
    pq_recvbuf: recv() failed: errno ESHUTDOWN triggered

    # client side
    $ psql -l
    psql: pqReadData() -- backend closed the channel unexpectedly.
            This probably means the backend terminated abnormally
            before or while processing the request.

The Cygwin snapshot from 4/13/2001 works but the one from 4/14/2001
doesn't.  I'm trying to determine why.  I will report back when I get
more information.

If anyone wants to help, please jump in.

Thanks,
Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: initdb fails
@ 2001-04-20 06:54  schopen@dimdi.de
  0 siblings, 1 reply; 13+ messages in thread

From: schopen@dimdi.de @ 2001-04-20 06:54 UTC (permalink / raw)
  To: pgsql-cygwin

>> On Wed, Apr 18, 2001 at 06:13:43PM +0200, schopen@dimdi.de wrote:
>> bash-2.04$ bin/initdb
>> This database system will be initialized with username "schopen".
>> This user will own all the data files and must also own the server 
>> process.
>> 
>> Creating directory /usr/share/postgresql/data
>> [snip]
>> Initializing pg_shadow.
>> 
>> initdb failed.
>> Removing /usr/share/postgresql/data.
>> Removing temp file /tmp/initdb.194.
>> 
>> Any help? Thanks a lot.

> I just tried the above with the following configuration:
> 
>     NT 4.0 SP6a
>     PostgreSQL 7.1-2
>     cygipc 1.09-2
>     Cygwin 1.1.8-2 (with cygwin1.dll replaced by
> cygwin1-20010416.dll.bz2)
> 
> and the initdb worked as expected.
> 
> My only suggestion is to capture the output from the following:
> 
>     $ sh -x /bin/initdb
> 
> and send the precise point in the initdb shell script where the failure
> occurs to the list.  Hopefully, someone will be able to figure out what
> is going wrong for you.
> 
> Jason

Thanks, Jason. After replacing shapshot 20010416 by 20010413 nothing changed. 
Then I followed your advice and located the call in the initdb script. I removed "-o 
/dev/null" from PGSQL_OPT and realized that the path to postgres was wrong: 
"//bin/postgres". I called initdb with -L and everything worked fine. I think the reason 
is that I have the whole cygnus stuff under c:\cygwin and not under c:\

Again thanks for your help.
Michael
--
====================================================
Dr. med. Michael Schopen     Tel. +49 221 4724 325
Deutsches Institut fuer      Fax. +49 221 41 14 29
Medizinische Dokumentation 
und Information DIMDI        http://www.dimdi.de
Waisenhausgasse 36-38a
D-50676 Koeln                email:s#chopen@dimdi.de 
>>>   remove # to use email address   <<<
====================================================



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: initdb fails
@ 2001-04-20 15:58  Jason Tishler <Jason.Tishler@dothill.com>
  parent: schopen@dimdi.de
  0 siblings, 0 replies; 13+ messages in thread

From: Jason Tishler @ 2001-04-20 15:58 UTC (permalink / raw)
  To: schopen@dimdi.de; +Cc: pgsql-cygwin

Michael,

On Fri, Apr 20, 2001 at 08:54:41AM +0200, schopen@dimdi.de wrote:
> >> On Wed, Apr 18, 2001 at 06:13:43PM +0200, schopen@dimdi.de wrote:
> >> bash-2.04$ bin/initdb

When I first saw the above, I thought that it was strange...

> Thanks, Jason. After replacing shapshot 20010416 by 20010413 nothing changed. 

I suggested using 20010413 (to the entire pgsql-cygwin list not just
you) to workaround the Cygwin AF_UNIX socket problem -- not to solve
your original problem.

> Then I followed your advice and located the call in the initdb script.
> I removed "-o /dev/null" from PGSQL_OPT and realized that the path to
> postgres was wrong: 
> "//bin/postgres".

The above will be interpreted by Cygwin as a UNC path.  In this case,
Cygwin will look for share "postgres" on machine "bin".

> I called initdb with -L and everything worked fine.
> I think the reason is that I have the whole cygnus stuff under c:\cygwin
> and not under c:\

No!  It is discouraged from installing Cygwin under the root directory
of a drive.  The default is "C:\Cygwin" and I suggest that you use it.
 
If your Cygwin installation is set up correctly, then you should be able
to just type:

    $ initdb

Hence, I believe that you environment (i.e., PATH) is not set up
correctly.  If you cannot determine what is wrong yourself, then send
the output from cygcheck -s -r v to the Cygwin mailing list:

    cygwin@cygwin.com

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* initdb fails
@ 2001-11-07 09:34  Karin Kuehtreiber <a8804453@unet.univie.ac.at>
  0 siblings, 0 replies; 13+ messages in thread

From: Karin Kuehtreiber @ 2001-11-07 09:34 UTC (permalink / raw)
  To: pgsql-cygwin

Hello,
yesterday (2001-11-06) I downloaded the complete cygwin-snapshot and tried to initialize postgres, but initdb failed with the following messages

"This database system will be initialized with username "User".
This user will own all the data files and must also own the server process.
Creating directory /usr/local/pgsql/data
Creating directory /usr/local/pgsql/data/base
Creating directory /usr/local/pgsql/data/global
Creating directory /usr/local/pgsql/data/pg_xlog
Creating template1 database in /usr/local/pgsql/data/base/1
DEBUG: database system was shut down at 2001-11-07 09:07:44  ('rem: I tried it out again today.... therefore today's date')
DEBUG: Ceckpoint record at (0, 8)
DEBUG: Redo record at (0, 8); Undo record at (0, 8); Shutdown TRUE
DEBUG: Next TransactionID: 514; Next0id: 16384
DEBUG: database system is in production state
Creating global relations in /usr/local/pgsql/data/global
DEBUG: database system was shut down at 2001-11-07 09:07:47
DEBUG: Ceckpoint record at (0, 112)
DEBUG: Redo record at (0, 112); Undo record at (0, 0); Shutdown TRUE
DEBUG: Next TransactionID: 514; Next0id: 17199
DEBUG: database system is in production state
Initializing pg_shadow.
Enabling unlimted row width for system tables.
Creating system views.
Loading pg_description.
Setting lastsysoid.
Vacuuming database.
Copyying template1 to template0.

Sucess. You can start the database server using:
/usr/bin/postmaster - D /usr/local/pgsql/data
or
/usr/bin/pg_ctl  -D /usr/local/pgsql/data -l logfile"

When I then run postmaster -D /usr/local/pgsql/data I get the following messages:

"DEBUG: database system was shut down at 2001-11-07 09:08:14
DEBUG: CheckPoint record at (0, 1563240)
DEBUG: Redo record at (0, 1563240); Undo record at (0, 0); Shutdown TRUE
DEBUG: NextTransactionId: 615; Next0id: 18720
DEBUG: database system is in production state"

so, and then nothing goes anymore. I tried it out both under Win98 and Win 2000 and used cygipc 1.10-1 and the results were the same.
Can anybody help me??

Yours
Karin





^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: initdb fails
@ 2001-11-07 09:58  Dave Page <dpage@vale-housing.co.uk>
  0 siblings, 0 replies; 13+ messages in thread

From: Dave Page @ 2001-11-07 09:58 UTC (permalink / raw)
  To: 'Karin Kuehtreiber' <a8804453@unet.univie.ac.at>; pgsql-cygwin



> -----Original Message-----
> From: Karin Kuehtreiber [mailto:a8804453@unet.univie.ac.at] 
> Sent: 07 November 2001 09:34
> To: pgsql-cygwin@postgresql.org
> Subject: [CYGWIN] initdb fails
> 
> 
> 
> Sucess. You can start the database server using: 
> /usr/bin/postmaster - D /usr/local/pgsql/data or 
> /usr/bin/pg_ctl  -D /usr/local/pgsql/data -l logfile"
> 
> When I then run postmaster -D /usr/local/pgsql/data I get the 
> following messages:
> 
> "DEBUG: database system was shut down at 2001-11-07 09:08:14
> DEBUG: CheckPoint record at (0, 1563240)
> DEBUG: Redo record at (0, 1563240); Undo record at (0, 0); 
> Shutdown TRUE
> DEBUG: NextTransactionId: 615; Next0id: 18720
> DEBUG: database system is in production state"
> 
> so, and then nothing goes anymore. I tried it out both under 
> Win98 and Win 2000 and used cygipc 1.10-1 and the results 
> were the same. Can anybody help me??
> 

It sounds to me like it's working fine, it's just that the postmaster is
still attached to the terminal. Type adding a '&' (without the quotes) to
the command line to detach the process:

postmaster -D /usr/local/pgsql/data &

Regards, Dave.



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* initdb fails
@ 2004-03-10 23:20  Alex Vasilyonok <alexdv38@comcast.net>
  0 siblings, 1 reply; 13+ messages in thread

From: Alex Vasilyonok @ 2004-03-10 23:20 UTC (permalink / raw)
  To: pgsql-cygwin

> initdb -d -D /usr/local/pgsql/data  -E SQL_ASCII

..........................................
creating template1 database in  /usr/local/pgsql/data/base/1...FATAL: invalid value for parameter "lc_messages": "EN"

Windows98, Second Edition 4.10.2222A

CYGWIN_98-4.10
postgres (PostgreSQL) 7.4.1

^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: initdb fails
@ 2004-03-15 12:10  Jason Tishler <jason@tishler.net>
  parent: Alex Vasilyonok <alexdv38@comcast.net>
  0 siblings, 1 reply; 13+ messages in thread

From: Jason Tishler @ 2004-03-15 12:10 UTC (permalink / raw)
  To: Alex Vasilyonok <alexdv38@comcast.net>; +Cc: pgsql-cygwin

Alex,

On Wed, Mar 10, 2004 at 06:20:38PM -0500, Alex Vasilyonok wrote:
> > initdb -d -D /usr/local/pgsql/data  -E SQL_ASCII
>  
> ..........................................
> creating template1 database in  /usr/local/pgsql/data/base/1...FATAL:
> invalid value for parameter "lc_messages": "EN"

Did you read the README?

    http://www.tishler.net/jason/software/postgresql/postgresql-7.4.1.README

Specifically, the following:

    3. Cygwin PostgreSQL only supports the "C" locale because Cygwin
    itself does not fully support locales.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: initdb fails
@ 2004-03-17 21:28  Jason Tishler <jason@tishler.net>
  parent: Jason Tishler <jason@tishler.net>
  0 siblings, 0 replies; 13+ messages in thread

From: Jason Tishler @ 2004-03-17 21:28 UTC (permalink / raw)
  To: Alex Vasilyonok <alexdv38@comcast.net>; +Cc: pgsql-cygwin

Alex,

Please keep your replies on-list.

On Wed, Mar 17, 2004 at 12:32:07AM -0500, Alex Vasilyonok wrote:
> Did according to Readme, basic installation for Windows-98,
> 
> ipc-daemon2 &
> initdb -D /var/postgresql/data
> 
> It tells me that,
> "The database cluster will be initialized with locale EN"
> 
> and then,
> 
> creating template1 database in /var/postgresql/data/base/1 ...FATAL:
> invalid value for parametr "lc_messages": "EN" initdb: failed

Do you Google?

    http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=cygwin+postgresql+lc_messages+inv...

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* initdb fails
@ 2004-04-01 10:09  Vinod Kumar Singh <vinod.singh@agileobjectsinc.com>
  0 siblings, 0 replies; 13+ messages in thread

From: Vinod Kumar Singh @ 2004-04-01 10:09 UTC (permalink / raw)
  To: pgsql-cygwin

Hi All,

I am trying to install postgresql-7.4.1-3, but initdb fails with
following message-


bash-2.05b$ initdb -D /usr/local/pgsql/data
The files belonging to this database system will be owned by user
"Administrator
".
This user must also own the server process.

The database cluster will be initialized with locale C.

creating directory /usr/local/pgsql/data... \c
ok
creating directory /usr/local/pgsql/data/base... \c
ok
creating directory /usr/local/pgsql/data/global... \c
ok
creating directory /usr/local/pgsql/data/pg_xlog... \c
ok
creating directory /usr/local/pgsql/data/pg_clog... \c
ok
selecting default max_connections... \c
100
selecting default shared_buffers... \c
1000
creating configuration files... \c
ok
creating template1 database in /usr/local/pgsql/data/base/1... \c
cat: not found
ok
initializing pg_shadow... \c
FATAL:  could not open file "/usr/local/pgsql/data/global/1262": No such
file or
 directory

initdb: failed
initdb: removing data directory "/usr/local/pgsql/data"

Any help is appreciated.

Vinod




^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* initdb fails
@ 2006-06-21 12:23  Álvaro García Pérez <alvaro.garcia.perez@upm.es>
  0 siblings, 1 reply; 13+ messages in thread

From: Álvaro García Pérez @ 2006-06-21 12:23 UTC (permalink / raw)
  To: pgsql-cygwin

Hello,

 

I´m trying to run postgreSQL 7.4.13 on cygwin under Windows XP.

 

I compile the source and install postgre, but when I run initdb it fails:

…

creating template1 database in /usr/local/pgsql/data/base/1...
/usr/local/pgsql/

bin/initdb: line 644:  1752 Bad system call         "$PGPATH"/postgres -boot
-x1

 $PGSQL_OPT $BOOTSTRAP_TALK_ARG template1

 

initdb: failed

 

I’ve read some about ipc services and think maybe that’s the problem. In the
latest cygwin version there’s no ipc-daemon nor ipc-daemon2 command. Instead
there’s cygserver. I’ve tried running the cygserver before and after
installation, but initdb always fails.

 

Anybody knows what could be the problem?

^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: initdb fails
@ 2006-06-22 10:25  Reini Urban <rurban@x-ray.at>
  parent: Álvaro García Pérez <alvaro.garcia.perez@upm.es>
  0 siblings, 0 replies; 13+ messages in thread

From: Reini Urban @ 2006-06-22 10:25 UTC (permalink / raw)
  To: Álvaro García Pérez <alvaro.garcia.perez@upm.es>; +Cc: pgsql-cygwin

2006/6/21, Álvaro García Pérez <alvaro.garcia.perez@upm.es>:
> I´m trying to run postgreSQL 7.4.13 on cygwin under Windows XP.
> I compile the source and install postgre, but when I run initdb it fails:

when you compiled the source by yourself only you can/should know to
which ipc library you linked against.
ipc-daemon2 or cygwin via cygserver

> creating template1 database in /usr/local/pgsql/data/base/1...
> /usr/local/pgsql/
>
> bin/initdb: line 644:  1752 Bad system call         "$PGPATH"/postgres -boot
> -x1
>
>  $PGSQL_OPT $BOOTSTRAP_TALK_ARG template1
>
>
>
> initdb: failed
>
>
>
> I've read some about ipc services and think maybe that's the problem. In the
> latest cygwin version there's no ipc-daemon nor ipc-daemon2 command.

yes, that's the problem. there is no ipc daemon running. or
the CYGWIN env does not contain "server".

> Instead
> there's cygserver. I've tried running the cygserver before and after
> installation, but initdb always fails.
>
>
>
> Anybody knows what could be the problem?


-- 
Reini Urban
http://phpwiki.org/              http://murbreak.at/
http://spacemovie.mur.at/   http://helsinki.at/



^ permalink  raw  reply  [nested|flat] 13+ messages in thread


end of thread, other threads:[~2006-06-22 10:25 UTC | newest]

Thread overview: 13+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-04-18 16:13 initdb fails schopen@dimdi.de
2001-04-18 17:30 ` Jason Tishler <Jason.Tishler@dothill.com>
2001-04-18 19:38   ` Jason Tishler <Jason.Tishler@dothill.com>
2001-04-20 06:54 Re: initdb fails schopen@dimdi.de
2001-04-20 15:58 ` Jason Tishler <Jason.Tishler@dothill.com>
2001-11-07 09:34 initdb fails Karin Kuehtreiber <a8804453@unet.univie.ac.at>
2001-11-07 09:58 Re: initdb fails Dave Page <dpage@vale-housing.co.uk>
2004-03-10 23:20 initdb fails Alex Vasilyonok <alexdv38@comcast.net>
2004-03-15 12:10 ` Jason Tishler <jason@tishler.net>
2004-03-17 21:28   ` Jason Tishler <jason@tishler.net>
2004-04-01 10:09 initdb fails Vinod Kumar Singh <vinod.singh@agileobjectsinc.com>
2006-06-21 12:23 initdb fails Álvaro García Pérez <alvaro.garcia.perez@upm.es>
2006-06-22 10:25 ` Reini Urban <rurban@x-ray.at>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox