Hi Sachin:

On Wed, Dec 23, 2009 at 02:19:41PM +0530, Sachin Srivastava wrote:
> Can you post the error part of the logs (%TEMP%\install-postgresql.log)?
> Mask out any passwords (if there are any).

I have attached it.  Examining the log reveals some clues that I used to 
manually populate the data directory...

cacls "C:\Program Files\PostgreSQL\8.4\data" /E /T /P postgres:F

cscript //NoLogo \
  "C:\Program Files\PostgreSQL\8.4/installer/server/initcluster.vbs" \
  "postgres" "postgres" "fakepassword" \
  "C:\Program Files\PostgreSQL\8.4" \
  "C:\Program Files\PostgreSQL\8.4\data" 5432 "DEFAULT"


I was then able to start the PostgreSQL service manually via the 
services.msc interface.  The service is being run as the "postgres" user. 
Then I created a user and a database in PostgreSQL without incident.

Please note, that while running the cscript test, it complained a bit.  
Here is the relevant portion of the output:

vvvvvv
Ensuring we can write to the data directory (using cacls):
The data is invalid.

The files belonging to this database system will be owned by user 
"theadmin".
This user must also own the server process.
^^^^^^


So, there seems to be a couple bugs in initcluster.vbs:

1) What does it mean it can't write to the directory?  Is the script 
having the "postgres" user attempt to set the permissions on "data" via 
cacls?  Of course it can't.  The script should have the admin user create 
"data" and run the cacls granting permission to the postgres user.  Then 
to test if "postgres" has the proper permissions, touch a file inside 
"data".  If that works, excellent.  If not, fall back to the admin having 
ownership.

2) Ownership should be given to "postgres".  Perhaps that's because of 
the prior issue.

Thanks,

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409
Log started 12/23/09 at 02:21:22
Preferred installation mode : win32
Trying to init installer in mode win32
Mode win32 successfully initialized
Could not find registy key 
HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-8.4 Service 
Account. Setting variable iServiceAccount to empty value
Could not find registy key 
HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-8.4 Super User. 
Setting variable iSuperuser to empty value
Could not find registy key 
HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-8.4 Branding. 
Setting variable iBranding to empty value
Could not find registy key 
HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-8.4 iShortcut. 
Setting variable Shortcuts to empty value
Could not find registy key 
HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-8.4 
DisableStackBuilder. Setting variable iDisableStackBuilder to empty value
[02:21:30] Existing base directory: C:\Program Files\PostgreSQL\8.4
[02:21:30] Existing data directory: C:\Program Files\PostgreSQL\8.4\data
[02:21:30] Using branding: PostgreSQL 8.4
[02:21:30] Using Super User: postgres and Service Account: postgres
[02:21:30] Using Service Name: postgresql-8.4
Executing cscript //NoLogo "C:\Documents and Settings\Administrator\Local 
Settings\Temp\postgresql_installer\installruntimes.vbs" "C:\Documents and 
Settings\Administrator\Local 
Settings\Temp\postgresql_installer\vcredist_x86.exe"
Script exit code: 0

Script output:
 Executing the runtime installer: C:\Documents and Settings\Administrator\Local 
Settings\Temp\postgresql_installer\vcredist_x86.exe
installruntimes.vbs ran to completion

Script stderr:
 

Executing C:\Documents and Settings\Administrator\Local 
Settings\Temp\postgresql_installer\getlocales.exe 
Script exit code: 0

Script output:
 AfrikaansxxCOMMAxxxxSPxxSouthxxSPxxAfrica=Afrikaans, South Africa
[... snipped by Dan ...]
ZuluxxCOMMAxxxxSPxxSouthxxSPxxAfrica=Zulu, South Africa

Script stderr:
 

Executing C:\Documents and Settings\Administrator\Local 
Settings\Temp\postgresql_installer\createuser.exe "." "postgres" "fakepassword"
Script exit code: 0

Script output:
 User account 'DANT41\postgres' already exists.
User 'DANT41\postgres' already member of 'Users' group.
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\POSTGR~1\CREATE~1.EXE ran to completion

Script stderr:
 

Executing C:\Documents and Settings\Administrator\Local 
Settings\Temp\postgresql_installer\validateuser.exe "." "postgres" 
"fakepassword"
Script exit code: 0

Script output:
 C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\POSTGR~1\VALIDA~1.EXE ran to completion

Script stderr:
 

Preparing to Install
Creating directory C:\Program Files\PostgreSQL\8.4
[... snipped by Dan ...]
Unpacking C:\Program Files\PostgreSQL\8.4\symbols\zic.pdb
[02:25:36] Removing the existing ldconfig setting - set during the previous 
installation.
[02:25:36] Running the post-installation/upgrade actions:
[02:25:36] Delete the temporary scripts directory...
[02:25:36] Write the base directory to the ini file...
[02:25:36] Write the version number to the ini file...
Initialising the database cluster (this may take a few minutes)...
Executing cscript //NoLogo "C:\Program 
Files\PostgreSQL\8.4/installer/server/initcluster.vbs" "postgres" "postgres" 
"fakepassword" "C:\Program Files\PostgreSQL\8.4" "C:\Program 
Files\PostgreSQL\8.4\data" 5432 "DEFAULT"
Script exit code: 0

Script output:
 
Ensuring we can write to the data directory (using cacls):
The data is invalid.


The files belonging to this database system will be owned by user "theadmin".
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:/Program Files/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:/Program Files/PostgreSQL/8.4/data/base/1 ... 
The current directory is invalid.
child process exited with exit code 1
initdb: removing contents of data directory "C:/Program 
Files/PostgreSQL/8.4/data"

Granting service account access to the data directory (using cacls):
processed dir: C:\Program Files\PostgreSQL\8.4\data

initcluster.vbs ran to completion

Script stderr:
 

Configuring database server startup...
Executing cscript //NoLogo "C:\Program 
Files\PostgreSQL\8.4\installer\server\startupcfg.vbs" 8.4 "postgres" 
"fakepassword" "C:\Program Files\PostgreSQL\8.4" "C:\Program 
Files\PostgreSQL\8.4\data" "postgresql-8.4"
Script exit code: 0

Script output:
 startupcfg.vbs ran to completion

Script stderr:
 

Creating menu shortcuts...
Executing cscript //NoLogo "C:\Program 
Files\PostgreSQL\8.4\installer\server\createshortcuts.vbs" 8.4 "postgres" 5432 
"PostgreSQL 8.4" "C:\Program Files\PostgreSQL\8.4" "C:\Program 
Files\PostgreSQL\8.4\data" "postgresql-8.4"
Script exit code: 0

Script output:
 createshortcuts.vbs ran to completion

Script stderr:
 

Starting the database server...
Executing cscript //NoLogo "C:\Program 
Files\PostgreSQL\8.4\installer\server\startserver.vbs" postgresql-8.4
Script exit code: 0

Script output:
 Starting postgresql-8.4
Service postgresql-8.4 started successfully
startserver.vbs ran to completion

Script stderr:
 

Loading additional SQL modules...
Executing cscript //NoLogo "C:\Program 
Files\PostgreSQL\8.4\installer\server\loadmodules.vbs" "postgres" 
"fakepassword" "C:\Program Files\PostgreSQL\8.4" "C:\Program 
Files\PostgreSQL\8.4\data" 5432 "1"
Script exit code: 0

Script output:
 Installing pl/pgsql in the template1 databases...
psql: could not connect to server: Connection refused (0x0000274D/10061)
        Is the server running on host "???" and accepting
        TCP/IP connections on port 5432?

Installing the adminpack module in the postgres database...
psql: could not connect to server: Connection refused (0x0000274D/10061)
        Is the server running on host "???" and accepting
        TCP/IP connections on port 5432?

loadmodules.vbs ran to completion

Script stderr:
 

[02:26:14] Write the data directory to the ini file...
[02:26:14] Write the port number, service ID, locale and superuser to the ini 
file...
[02:26:14] Write ServiceID(postgresql-8.4) to registry/ini...
Problem running post-install step. Installation may not complete correctly
 Error reading file C:/Program Files/PostgreSQL/8.4/data/postgresql.conf
Creating Uninstaller
Creating uninstaller 25%
Creating uninstaller 50%
Creating uninstaller 75%
Creating uninstaller 100%
Installation completed
Log finished 12/23/09 at 02:26:59
-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to