Thread: initdb failure
Hi All
I have been trying to install PostgreSQL-8.4 on Windows 2000 server and keep getting the following
creating template1 database in C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/data/base/1 ... initdb: could not execute command ""C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/bin/postgres.exe" --boot -x1 -F ": No error
initdb: removing contents of data directory "C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/data"
I have checked the archives but did not see any solution so far.
The data directory does have inheritable permissions for user postgres to read, write, modify etc.
Thanks
Pankaj
Hi All
I have been trying to install PostgreSQL-8.4 on Windows 2000 server and keep getting the following
creating template1 database in C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/data/base/1 ... initdb: could not execute command ""C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/bin/postgres.exe" --boot -x1 -F ": No error
initdb: removing contents of data directory "C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/data"
I have checked the archives but did not see any solution so far.
The data directory does have inheritable permissions for user postgres to read, write, modify etc.
Thanks
Pankaj
On Thu, Apr 8, 2010 at 7:28 PM, Pankaj Mandal (pmandal) <pmandal@cisco.com> wrote: > Hi All > > > > I have been trying to install PostgreSQL-8.4 on Windows 2000 server and keep > getting the following > > > creating template1 database in > C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/data/base/1 ... initdb: > could not execute command > ""C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/bin/postgres.exe" > --boot -x1 -F ": No error > > initdb: removing contents of data directory > "C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/data" > > > > I have checked the archives but did not see any solution so far. > > The data directory does have inheritable permissions for user postgres to > read, write, modify etc. > > are you executing the installer with a privileged user? -- Atentamente, Jaime Casanova Soporte y capacitación de PostgreSQL Asesoría y desarrollo de sistemas Guayaquil - Ecuador Cel. +59387171157
Hi Jaime The installer is being executed as Administrator I have check to ensure that, it will fail otherwise before even starting to install PostgreSQL. Thanks Pankaj -----Original Message----- From: Jaime Casanova [mailto:jcasanov@systemguards.com.ec] Sent: Friday, April 09, 2010 12:01 AM To: Pankaj Mandal (pmandal) Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] initdb failure On Thu, Apr 8, 2010 at 7:28 PM, Pankaj Mandal (pmandal) <pmandal@cisco.com> wrote: > Hi All > > > > I have been trying to install PostgreSQL-8.4 on Windows 2000 server and keep > getting the following > > > creating template1 database in > C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/data/base/1 ... initdb: > could not execute command > ""C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/bin/postgres.exe" > --boot -x1 -F ": No error > > initdb: removing contents of data directory > "C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/data" > > > > I have checked the archives but did not see any solution so far. > > The data directory does have inheritable permissions for user postgres to > read, write, modify etc. > > are you executing the installer with a privileged user? -- Atentamente, Jaime Casanova Soporte y capacitación de PostgreSQL Asesoría y desarrollo de sistemas Guayaquil - Ecuador Cel. +59387171157
"Pankaj Mandal (pmandal)" <pmandal@cisco.com> wrote: > initdb: could not execute command > ""C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/bin/ > postgres.exe" --boot -x1 -F ": No error I would check permissions related to the user and that postgres.exe file. -Kevin
Hi Kevin, I have checked this several times. The installer is executed by user Administrator (which apparently has all Administrator privileges) The user postgres is also being created and the data directory is owned by this user, which does have read, write, execute, modify, list folder contents and they are all inheritable. Here I am copying few more lines from the logs, upto when initdb failed. " Ensuring we can write to the data directory (using cacls): processed dir: C:\PROGRA~1\CISCOS~1\CSCONccm\objects\PostgreSQL\8.4\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 English_United States.1252. The default text search configuration will be set to "english". fixing permissions on existing directory C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/data ... ok creating subdirectories ... ok selecting default max_connections ... 10 selecting default shared_buffers ... 400kB creating configuration files ... ok creating template1 database in C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/data/base/1 ... initdb: could not execute command ""C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/bin/postgres.exe" --boot -x1 -F ": No error initdb: removing contents of data directory "C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/data" " Thank you Pankaj -----Original Message----- From: Kevin Grittner [mailto:Kevin.Grittner@wicourts.gov] Sent: Friday, April 09, 2010 7:27 AM To: Pankaj Mandal (pmandal); pgsql-admin@postgresql.org Subject: Re: [ADMIN] initdb failure "Pankaj Mandal (pmandal)" <pmandal@cisco.com> wrote: > initdb: could not execute command > ""C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/bin/ > postgres.exe" --boot -x1 -F ": No error I would check permissions related to the user and that postgres.exe file. -Kevin
"Pankaj Mandal (pmandal)" wrote: > creating template1 database in > C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/data/base/1 > ... > initdb: could not execute command > ""C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/bin/ > postgres.exe" --boot -x1 -F ": No error > initdb: removing contents of data directory > "C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/data" I don't recognize this. Anyone else? I am curious what can cause a failure with a description of "No error" -Kevin
Hello, > The files belonging to this database system will be owned by > user "Administrator". > This user must also own the server process. the user here should be postgres. Are you 'locally'/'directly' installing on the server machine? Good luck. Peter
Kevin Grittner wrote: > "Pankaj Mandal (pmandal)" wrote: > >> creating template1 database in >> C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/data/base/1 >> ... >> initdb: could not execute command >> ""C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/bin/ >> postgres.exe" --boot -x1 -F ": No error >> initdb: removing contents of data directory >> "C:/PROGRA~1/CISCOS~1/CSCONccm/objects/PostgreSQL/8.4/data" > > I don't recognize this. Anyone else? I am curious what can cause a > failure with a description of "No error" This is the only matching string in initdb.c /* * Open a subcommand with suitable error messaging */ static FILE * popen_check(const char *command, const char *mode) { FILE *cmdfd; fflush(stdout); fflush(stderr); errno = 0; cmdfd = popen(command, mode); if (cmdfd == NULL) fprintf(stderr, _("%s: could not execute command \"%s\": %s\n"), progname, command, strerror(errno)); return cmdfd; } So I guess the question is, what could cause popen on Windows to return NULL, but not set errno? Joe
Hi Peter, First I create the user postgres using the createuser.exe script. After that I run the following scripts from postgres installer in the order listed below. In between I do have checks to make sure the previous commands returned 0 exit code and that database server did start successfully before trying to load modules etc. initcluster.vbs startupcfg.vbs createshortcuts.vbs startserver.vbs loadmodules.vbs This pretty much seems to work on about half a dozen other machines where I have tested it. Meaning the data directory gets initialized properly, Servers start properly and modules get loaded correctly and later I am able to create database and execute SQL as well. On this one machine (Windows 2000 server) I get this problem, which results in unsuccessful install. I also get another error message as posted in the forum http://archives.postgresql.org/pgsql-admin/2010-04/msg00097.php With all the installs but that does not seem to cause any problem to my application so far. Thanks Pankaj -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Jan-Peter Seifert Sent: Sunday, April 11, 2010 3:18 PM To: pgsql-admin@postgresql.org Subject: Re: [ADMIN] initdb failure Hello, > The files belonging to this database system will be owned by > user "Administrator". > This user must also own the server process. the user here should be postgres. Are you 'locally'/'directly' installing on the server machine? Good luck. Peter -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin
Hi Peter, The scripts are executed by user Administrator on this specific machine which has all the privileges that postgres user has (note postgres user account is also created) I also checked that the data directory and it contents are owned by user postgres and user postgres's permissions are inheritable. Thanks Pankaj -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Jan-Peter Seifert Sent: Sunday, April 11, 2010 3:18 PM To: pgsql-admin@postgresql.org Subject: Re: [ADMIN] initdb failure Hello, > The files belonging to this database system will be owned by > user "Administrator". > This user must also own the server process. the user here should be postgres. Are you 'locally'/'directly' installing on the server machine? Good luck. Peter -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin
Hello Pankaj, well - obviously initdb wasn't run by (the operating system's user) postgres. The owner of the server process (normally named postgres) mustn't have any administrator privileges: http://www.postgresql.org/docs/8.4/interactive/app-initdb.html Good luck. Maybe there wasn't any problem so far because the other PostgreSQL servers have been installed on non-NTFS file systems? Good luck, Peter Am 12.04.2010 07:25, schrieb Pankaj Mandal (pmandal): > The scripts are executed by user Administrator on this specific machine > which has all the privileges that postgres user has (note postgres user > account is also created) > I also checked that the data directory and it contents are owned by user > postgres and user postgres's permissions are inheritable. > > Thanks > Pankaj > > -----Original Message----- > From: pgsql-admin-owner@postgresql.org > [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Jan-Peter Seifert > Sent: Sunday, April 11, 2010 3:18 PM > To: pgsql-admin@postgresql.org > Subject: Re: [ADMIN] initdb failure > > Hello, > >> The files belonging to this database system will be owned by >> user "Administrator". >> This user must also own the server process. > > the user here should be postgres. > Are you 'locally'/'directly' installing on the server machine? > > Good luck. > > Peter >
Hi Peter, The link you mention below does not say that Operating System user postgres, should not have Administrator privileges, It says user postgres may not have sufficient privileges and could fail to create the Data directory, in that case, create Data directory by root user and change ownership to postgres. This is not the case here, the Data directory does get created and the owner is postgres. It fails subsequently during initdb though. Also I have successfully tested the installation on more than half dozen machines and they are all NTFS file systems. Thanks Pankaj -----Original Message----- From: Jan-Peter Seifert [mailto:Jan-Peter.Seifert@gmx.de] Sent: Thursday, April 22, 2010 12:45 PM To: Pankaj Mandal (pmandal) Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] initdb failure Hello Pankaj, well - obviously initdb wasn't run by (the operating system's user) postgres. The owner of the server process (normally named postgres) mustn't have any administrator privileges: http://www.postgresql.org/docs/8.4/interactive/app-initdb.html Good luck. Maybe there wasn't any problem so far because the other PostgreSQL servers have been installed on non-NTFS file systems? Good luck, Peter Am 12.04.2010 07:25, schrieb Pankaj Mandal (pmandal): > The scripts are executed by user Administrator on this specific machine > which has all the privileges that postgres user has (note postgres user > account is also created) > I also checked that the data directory and it contents are owned by user > postgres and user postgres's permissions are inheritable. > > Thanks > Pankaj > > -----Original Message----- > From: pgsql-admin-owner@postgresql.org > [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Jan-Peter Seifert > Sent: Sunday, April 11, 2010 3:18 PM > To: pgsql-admin@postgresql.org > Subject: Re: [ADMIN] initdb failure > > Hello, > >> The files belonging to this database system will be owned by >> user "Administrator". >> This user must also own the server process. > > the user here should be postgres. > Are you 'locally'/'directly' installing on the server machine? > > Good luck. > > Peter >