EnterpriseDB: The Enterprise Postgres Company Postgres Plus Forums: The PostgreSQL Open Source Database from EnterpriseDB
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 

PostgreSQL 8.4 OneClick Installer - initdb fails with "access denied" message  XML

Forum Index » PostgreSQL Installers for Windows, Linux and OS X
Author Message
Rommel_E

New member

Joined: 3 Jun 2009 00:19:51
Messages: 7
Offline

Hi all,

I downloaded the installer this morning and I have been trying to install it all day, but it always fails at the same point. Here's a clip of my log file:


[16:44:12] Running the post-installation/upgrade actions:
[16:44:12] Delete the temporary scripts directory...
[16:44:12] Write the base directory to the ini file...
[16:44:12] 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" "mypassword" "C:\Program Files\PostgreSQL\8.4" "C:\Program Files\PostgreSQL\8.4\data" 5432 "DEFAULT"
Script exit code: 1

Script output:

Ensuring we can write to the data directory (using icacls):
processed file: C:\Program Files\PostgreSQL\8.4\data
Successfully processed 1 files; Failed processing 0 files

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:/Program Files/PostgreSQL/8.4/data ... initdb: could not change permissions of directory "C:/Program Files/PostgreSQL/8.4/data": Permission denied

Failed to initialise the database cluster with initdb

Script stderr:
Program ended with an error exit code

Error running cscript //NoLogo "C:\Program Files\PostgreSQL\8.4/installer/server/initcluster.vbs" "postgres" "postgres" "mypassword" "C:\Program Files\PostgreSQL\8.4" "C:\Program Files\PostgreSQL\8.4\data" 5432 "DEFAULT" : Program ended with an error exit code
Problem running post-install step. Installation may not complete correctly
The database cluster initialisation failed.
Creating Uninstaller
Creating uninstaller 25%
Creating uninstaller 50%
Creating uninstaller 75%
Creating uninstaller 100%
Installation completed
Log finished 11/24/09 at 16:44:31


I am running Windows Vista Business SP2. I have done the following so far:

1. uninstall postgresql and manuall delete all remaining folders.
2. disable User Account Control.
3. run "postgresql-8.4.1-1-windows.exe" as administrator.
4. Log in as domain admin and launch installer as administrator.

Each of the above steps has ended with the same results. Any suggestions?
Sachin_S

Senior member

Joined: 1 Aug 2008 02:37:24
Messages: 486
Offline

Hello,

Can you try to run the installer by a Local User which has administrative privileges rather than the domain admin. I believe the 'postgres' user was created locally and not on a domain.

--
Regards,
Sachin Srivastava
EnterpriseDB , the Enterprise Postgres company.
Rommel_E

New member

Joined: 3 Jun 2009 00:19:51
Messages: 7
Offline

Hi, thanks for the reply.

I tried that, and I am no longer getting the "access denied" error. However, the installer now fails with a "current directory is invalid" message. I removed the postgres account that was created during the last install. I also uninstalled pg and removed the [Program Files]\PostgreSQL folder and subfolders. The usercode I am installing under is part of the local Administrators group. Here's the end of the log ...


[09:50:15] Running the post-installation/upgrade actions:
[09:50:15] Delete the temporary scripts directory...
[09:50:15] Write the base directory to the ini file...
[09:50:15] 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" "mypassword" "C:\Program Files\PostgreSQL\8.4" "C:\Program Files\PostgreSQL\8.4\data" 5432 "DEFAULT"
Script exit code: 1

Script output:

Ensuring we can write to the data directory (using icacls):
processed file: C:\Program Files\PostgreSQL\8.4\data
Successfully processed 1 files; Failed processing 0 files

The files belonging to this database system will be owned by user "iCeMAn".
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"

Failed to initialise the database cluster with initdb

Script stderr:
Program ended with an error exit code

Error running cscript //NoLogo "C:\Program Files\PostgreSQL\8.4/installer/server/initcluster.vbs" "postgres" "postgres" "mypassword" "C:\Program Files\PostgreSQL\8.4" "C:\Program Files\PostgreSQL\8.4\data" 5432 "DEFAULT" : Program ended with an error exit code
Problem running post-install step. Installation may not complete correctly
The database cluster initialisation failed.
Creating Uninstaller
Creating uninstaller 25%
Creating uninstaller 50%
Creating uninstaller 75%
Creating uninstaller 100%
Installation completed
Log finished 11/25/09 at 09:50:55


Sachin_S

Senior member

Joined: 1 Aug 2008 02:37:24
Messages: 486
Offline

Hello,

If you are sure you have removed the previous "C:\Program Files\PostgreSQL\8.4\data" directory, try installing it in some other directory say "C:\PgSQL\8.4".

Also as the initdb process failed you can do a manual initdb also as:



After this you run the installer again and point it to the data directory you just created.

This message was edited 1 time. Last update was at 25 Nov 2009 09:13:46


--
Regards,
Sachin Srivastava
EnterpriseDB , the Enterprise Postgres company.
Rommel_E

New member

Joined: 3 Jun 2009 00:19:51
Messages: 7
Offline

Hi Again,

Thanks for pointing me in the right direction. I was thinking of manually initializing the db cluster but I wasn't sure it would work, nor was I sure about how to go about doing it. Rather than re-installing to a different folder, I kept the existing installation, and issued the command:

"C:\Program Files\PostgreSQL\8.4\bin\initdb.exe" --encoding=UTF-8 -A md5 -U "postgres" -W -D "C:\Program Files\PostgreSQL\8.4\data"


This was done under the same local usercode that I used to install pg. The cluster has been successfully created. I am really puzzled as to why the installer fails to init the cluster, but I can do it manually under the same usercode that the installer was launched.

It looks like I will have to manually register postgres as a Windows service as well.

Thanks again for the help.
Sachin_S

Senior member

Joined: 1 Aug 2008 02:37:24
Messages: 486
Offline

Hello,

We are trying to figure out the issue in the installer, mean while to register postgres as service you can do as:

To change the display name of the sevice, you can modify the registry entry accordingly:

--
Regards,
Sachin Srivastava
EnterpriseDB , the Enterprise Postgres company.
Rommel_E

New member

Joined: 3 Jun 2009 00:19:51
Messages: 7
Offline

It worked! I'm up & running!

I also used the following command @ the command prompt to set a description for the service: sc description postgresql-8.4 "my description". This step was not neccessary but it made the service nice to look at in the services.msc utility.

Thanks for the help, I really appreciate it. Please let me (and the rest of the forum) know when the issue has been fixed. I'd really hate to have to repeat these steps every time I install on Windows Vista Business Edition. Thanks again!
Rommel_E

New member

Joined: 3 Jun 2009 00:19:51
Messages: 7
Offline

Ok, sorry to rain on the parade, but now that I am up & running I am seeing one problem:

When I try to open the postgres database I get the message "The server lacks instrumentation functions". This message apparently can be rectified by installing the adminpack module. I went to the download page, only to discover that this module is included in the windows installer ---> which isn't working properly for me.

I decided to test your earlier suggestion and install to C:\PgSQL. That also fails with the message "creating template1 database in C:/PgSQL/8.4/data/base/1 ... The current directory is invalid".

I think it is best for me to re-install pg8.3 and wait until the issues with the 8.4 install are resolved.

This message was edited 1 time. Last update was at 25 Nov 2009 13:33:13

Sachin_S

Senior member

Joined: 1 Aug 2008 02:37:24
Messages: 486
Offline

Hello,

Its just two more commands left and you will be up again.





--
Regards,
Sachin Srivastava
EnterpriseDB , the Enterprise Postgres company.
Rommel_E

New member

Joined: 3 Jun 2009 00:19:51
Messages: 7
Offline

Thanks for the additional help. I'll bookmark this thread ... I know I'm going to need to refer to this again ...
Wesker-12

New member

Joined: 30 Dec 2013 06:03:17
Messages: 2
Offline

Hello from Germany,

i have the same issue with the installer, it is not fixed after 5 years?

I tried to follow the istructions from this topic to start the service from the command line with admin rights, nothing happens.
I got only the error message that i have to integrate the user password into my command.
But how???

kind regards

This message was edited 2 times. Last update was at 30 Dec 2013 06:08:11

 
Forum Index » PostgreSQL Installers for Windows, Linux and OS X
Go to:   
Powered by JForum 2.1.8 © JForum Team