Problem running post install step postgresql windows 10

I encountered this error when trying to re-install Postgres. **Problem running the post-install step. Installation may not complete correctly."

Asked
2 years, 7 months ago

Viewed
2k times

I encountered this error when trying to re-install Postgres.

**Problem running the post-install step. Installation may not complete correctly.»

asked Jun 10, 2020 at 16:23

Rod Paddock's user avatar

I found the following solution in this article:
https://webkul.com/blog/postgresql-windows-installation-problem-running-post-install-step-installation-may-not-complete-correctly/

This worked great so thought I would share here also so I have a place to refer to when I hit this error.

Solution:
1. Uninstall PostgreSQL

  1. Run command: net user postgres /delete

  2. Click: Control Panel -> User Accounts -> Configure advanced user profile properties -> delete all “Unknown User” instances that seem to be left from PostgreSQL installation.

  3. Run command: net user postgres /add

  4. Run: compmgmt.msc -> Click Local Users and Groups -> Users -> postgres ->Member of -> Add… -> Administrators -> OK

  5. Run: runas /user:postgres cmd.exe ->

  6. change into the directory where your installer is and execute your installer (version may be different) postgresql-8.4.9-1-windows.exe

installed successfully without errors. Checked data folder and confirmed files created successfully.

  1. Run: compmgmt.msc -> Local Users and Groups -> Users -> postgres -> Member of -> Administrators -> Remove
    9/ Run: compmgmt.msc -> Local Users and Groups -> Users -> postgres -> Member of -> Add… -> Power Users —

answered Jun 10, 2020 at 16:23

Rod Paddock's user avatar

Dear Readers,

Happy new year 2021!!!

This is my first day of learning PostgreSQL and I faced issue while installing version 13.1 on windows. After almost spending 3 hours of troubleshooting I was able to identify the issue & fix it.

In this post will explain basic steps to install Postgresql 13.1 on windows 10 & possible resolution in case you face similar issue.

First step is to download required software from required software from enterprisedb website. I downloaded version 13.1 for Windows x86-64.

Once the intended software is downloaded, you can run it as administrator. This will open setup screen. Click on next

You can choose to use default location & click next:

I wanted to install complete pg setup so checked all options & clicked next:

You can choose default location and click next:

You need to remember this password to connect to you postgresql cluster. Click next:

5432 is default port. You can keep it & click next:

Choose default option & click next:

You will see pre installation summary here:

Now we are ready to begin installation:

Installation in progress:

And it failed with below error:

I saw one more error after pressing OK button:

Though it shown me below screen at the end showing setup completion:

As expected installation was incomplete. DATA folder was empty.

I tried connecting to postgresql cluster using psql CLI. It failed connecting with below error:

I tried googling about all 3 errors, tried different solutions, but nothing worked. So though of trying lower version 12 but it ended with same story.

After lot of investigation, I found some movement in antivirus software whenever the setup was about to finish. After checking antivirus scan report, I was able to find the issue. Every time setup was about to complete, antivirus tried to clean possible threats it was identifying.

This time I decided to stop antivirus services during setup install & it worked without any issue :-). This time after setup completion, I was able to see number of files in DATA folder.

I tried connecting to postgresql cluster & it was working as expected;

Hope u will find this post very useful.

Cheers

Regards,
Adityanath

My PC is running windows 10 ver 1803.

I downloaded the zip containing the binary of postgres 10.

When I tried to init the db with:

initdb.exe -D ../data –A trust

I received this error: child process was terminated by exception 0xC00000FD

creating directory ../data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... windows
creating configuration files ... ok
running bootstrap script ... child process was terminated by exception 0xC00000FD
initdb: removing data directory "../data"

I tried to change version but postgres 11 and postgres 9.6 give to me the same result.

So I tried to install postgres 10 from the windows installer but the log in %TEMP% folder logged the same error:

    Executing batch file 'rad99CE0.bat'...
    The files belonging to this database system will be owned by user "postgres".
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".

Data page checksums are disabled.

fixing permissions on existing directory C:/Program Files/PostgreSQL/10/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... windows
creating configuration files ... ok
running bootstrap script ... child process was terminated by exception 0xC00000FD
initdb: removing contents of data directory "C:/Program Files/PostgreSQL/10/data"

Called Die(Failed to initialise the database cluster with initdb)...
Failed to initialise the database cluster with initdb

Script stderr:
 Program ended with an error exit code

Error running cscript //NoLogo "C:Program FilesPostgreSQL10/installer/server/initcluster.vbs" "NT AUTHORITYNetworkService" "postgres" "****" "C:Program FilesPostgreSQL10" "C:Program FilesPostgreSQL10data" 5432 "DEFAULT" 0: Program ended with an error exit code
Problem running post-install step. Installation may not complete correctly
 The database cluster initialisation failed.
[16:02:52] Delete the temporary scripts directory...
Creating menu shortcuts...
Executing cscript //NoLogo "C:Program FilesPostgreSQL10installerservercreateshortcuts_clt.vbs" "PostgreSQL 10" "C:Program FilesPostgreSQL10"
Script exit code: 0

I tried to uninstall and reinstall with postgres user and give postgres user the Administrators group but nothing changed.

Having the installation on an external hard drive I tried to do the same init on the same postgres10/bin folder from another PC with Windows 10 and the DB is initialized successfully at the first time. No installation needed.
The DB is starting well with:

pg_ctl.exe -D ../data start

When I reconnect my drive with the data folder created on my original PC, if I start the db with the instruction above, the server never start and after reaching the timeout, the process exits. No log at all.

D:pgsql10bin>pg_ctl.exe -D ../data start
waiting for server to start............................................................... stopped waiting
pg_ctl: server did not start in time

Any ideas?

Содержание

  1. Cozy Lakeside
  2. Technical playground with some personal sharing
  3. How To Solve “Problem running post install step…the Database Cluster Initialisation failed” on PostgreSQL Windows Installation
  4. Share this:
  5. Like this:
  6. Related
  7. 39 thoughts on “ How To Solve “Problem running post install step…the Database Cluster Initialisation failed” on PostgreSQL Windows Installation ”
  8. During installation, cluster initialisation fails with the message “No error” on Windows
  9. Troubleshooting Installation
  10. Contents
  11. Make sure you’re installing on a supported platform
  12. Try again without your virus scanner or 3rd-party firewall
  13. Read about other common installation problems
  14. Reporting an installation error
  15. Note down the basic information about your system
  16. Collect the installer log file
  17. Get the contents of the PostgreSQL server error log
  18. Extra information Windows users need to collect
  19. Windows: Check for messages in the Windows event log
  20. Windows: Check what Group Policy, if any, is active on your computer
  21. Windows: Take a copy of the environment variables set on the computer

Cozy Lakeside

Technical playground with some personal sharing

How To Solve “Problem running post install step…the Database Cluster Initialisation failed” on PostgreSQL Windows Installation

One day, when I install PostgreSQL on Windows, it always report the following error:

… when the installation progress bar reached the end.

  • Windows 7 Professional 64-bit
  • PostgreSQL Server 9.1 64-bit (installer: postgresql-9.1.8-1-windows-x64.exe)

After doing a bit searching, I found this link which contains the solution.

Here I will recap the solutions here:

  • Uninstall PostgreSQL
  • Run command: net user postgres /delete
  • Click: Control Panel ->User Accounts ->Configure advanced user profile properties -> delete all “Unknown User” instances that seem to be left from PostgreSQL installation.
  • Run: compmgmt.msc -> Click Local Users and Groups ->Users ->New User… ->User name: postgres, Password: postgrespass -> Create
  • Run: compmgmt.msc -> Click Local Users and Groups ->Users ->postgres ->Member of ->Add… ->Administrators ->OK
  • copy the PostgreSQL installer postgresql-8.4.9-1-windows.exe to C:
  • Run: runas /user:postgres cmd.exe ->cd ->postgresql-8.4.9-1-windows.exe -> installed successfully without errors. Checked data folder and confirmed files created successfully.
  • Run: compmgmt.msc ->Local Users and Groups ->Users ->postgres ->Member of ->Administrators ->Remove
  • Run: compmgmt.msc ->Local Users and Groups ->Users ->postgres ->Member of ->Add… ->Power Users ->OK

Voila! Installation completed successfully!

Like this:

39 thoughts on “ How To Solve “Problem running post install step…the Database Cluster Initialisation failed” on PostgreSQL Windows Installation ”

>runas /user:postgres cmd.exe -> cd -> postgresql-8.4.9-1-windows.exe

May be this way easier:
Right click+Shift on postgresql-8.4.9-1-windows.exe-> Run as user-> Enter name: postgres, Password: postgrespass

i followed urs procedure but i am getting this error.it said wrong password or user name.i enterd username:postgres and password:postgrespass

Try to copy paste istead type it manually to prevent miss typing

This might have been the most useful article I have ever read. Thank you so much. I can’t even begin to explain to you how useful this was for me.

If you ever need anything, just let me know!

Great to hear that!

didn’t work for me

thanks! finally I found the solution

P.S. Our company policy won’t allow postgrespass as the password, but I used one that it liked and the installation succeeded as reported. Thanx.

Worked like a charm! Thank you!

Thank-you! This also works for the 9.2.5.1 windows x64 install as well. I cannot express my gratitude enough!

Glad to see that this post help you all!

Thank you, it really solved the problem when installing it

I followed all the step, but nor working

When i try to create a new user it’s says that i have win home premium and that they can’t create new users that way. Pls help 😦

Ooops sorry I didn’t use WIndows Home Premium… Good luck

It works! Thanks to all involved with this solution!

OK FROM THIS PLACE, CAN YOU TELL IN ENGLISH ?? IN NORMAL HUMAN LANGUAGE ? Run: compmgmt.msc -> Click Local Users and Groups -> Users -> New User… -> User name: postgres, Password: postgrespass -> Create
Run: compmgmt.msc -> Click Local Users and Groups -> Users -> postgres -> Member of -> Add… -> Administrators -> OK
copy the PostgreSQL installer postgresql-8.4.9-1-windows.exe to C:
Run: runas /user:postgres cmd.exe -> cd -> postgresql-8.4.9-1-windows.exe -> installed successfully without errors. Checked data folder and confirmed files created successfully.
Run: compmgmt.msc -> Local Users and Groups -> Users -> postgres -> Member of -> Administrators -> Remove
Run: compmgmt.msc -> Local Users and Groups -> Users -> postgres -> Member of -> Add… -> Power Users -> OK
Because im not some hacker or nerd to understand this crap..
what is compmngm. something ? how to run it ? where to find it ?

dude, you don’t have to be so hostile… It’s it’s pretty elementary… You type those commands in cmd(Command Prompt). And if you are super lazy and dumm to to that, you can just go to Control Panel —> Administrative Tools —> Computer Management instead of typing compmgmt.msc…

Then you follow the instructions…

How is this for an English? huh?

Thanks for your additional comment. I write this to audience which I expect to have certain level of understanding of how Windows work. In my opinion, if one will install PostgreSQL, it should be some experienced user 😛 which can understand what I write.

Yet sorry I am a bit lazy to type more, my fault 😛

This has also worked for Windows 2012 Server. Many thanx !

Gracias, si Funciona.

Busqué muchas maneras de poder arreglar ese problema, pero con tu solución al fin logre instalarlo. Tengo Windows 8.1 y funciona perfectamente

THANK YOU man… very helpful… 🙂 (y)

Thanks. I was installing on an old Windows 2003 server (don’t ask!) and this worked for me although i ended up installing once, uninstalling, setting postgres as a user with full permissions for the postgresql directory which remained and then reinstalling.

Follow this link solve issue on Windows Home Premium

I’ll keep this one short and sweet. For those of you that have tried to install PostgreSQL (mine was 8.3.7-1) on Windows Vista and got the error Database Cluster Initialisation Failed error at the end of the install, read this.

The problem is that Vista has some safety features associated with setting permissions on the Program Files folder. Basically, even if you are an admin, you can’t change permissions on some folders like Program Files and Windows folder itself. This causes initdb to be unable to create some folders and the database cluster. What this means for you is that you need to install PostgreSQL in another folder that is not inside Program Files.

By the way, if you have forgotten your Postgres account password while installing the first time, just open a Command Prompt in Vista (If you don’t know how, Google for it). Then type the command “net user”. You will see a list of users on your computer. Find Postgre’s account. It’s usually “postgres“. Then you need to change its password by typing “net user postgres new_password” where new_password is… well, a new password for the account. You will be needing that postgres account during install. You will need admin privileges to do this change however.

Firstly, uninstall any failed installations. Use the Control Panel or the PostgreSQL installer in the install folder.

During the install, you will be prompted to choose where you want to install the program. Just select a location in another place. Like “C:PostgreSQL” or something similar. It may even be on your desktop. But not inside Program Files. Not inside Windows folder. However, it’s not as easy. Bear with me.

After the install, you will still see that darned error message (or something like non-fatal error occured). Do not despair! (For Windows Power Users, we are just assigning Full Control permission to Postgres account on the new PostgreSQL install folder). For other users, read on if you don’t know how to do it.

Go to where you just installed PostgreSQL. In this case, the C: drive. There, right-click on the folder (usually called PostgreSQL), and go to Properties – Security tab. Click on the Edit button. You will now see some usernames and other stuff. Click on the Add button. In the “Enter the object names to select” box, enter “postgres” and press Check. Postgres’ user account should appear there. Click on Ok.

Now from the “Group or Usernames” box, select the Postgres account. In the window below, with lots of checkboxes, assign permission “Full Control” in the Allow Column to it. Note, if you don’t want to allow full control, just give it read/write. But I just went ahead and gave it Full Control. (I was tired and annoyed. The “World’s most advanced open source database” had failed to install!). Click on Ok and wait a bit for permissions to be applied.

Then, just do a re-install. Do not uninstall anything. Just run the setup again. It’ll say that a PostgreSQL install folder already exists and other stuff. Just click on Next until the install finishes. If you see “file cannot be copied” errors, click on the “ignore” button when needed.

That’s it. PostgreSQL should be up and running on Vista now. Hope it works for you too as it did for me, and that my guide is helpful to anybody. If it works, or if you have other solutions, let us know. Thanks for reading! 🙂

Источник

During installation, cluster initialisation fails with the message “No error” on Windows

Today I ran into another strange issue with PostgreSQL installation on Windows. It turned out not to be a problem with the installer; instead it was a form of broken Windows installation that I hadn’t seen before, so I thought I’d write it up.

The installer already contains checks for several kinds of broken Windows install. For example, it tests to make sure that %TEMP% is writeable, and to makes sure the vbscript interpreter actually works. These were both the cause of frequent problem reports to the mailing lists in the past.

This is a less common issue, though it’s clearly turned up in the wild before. It turns out that some – probably rare – Windows installs have an incorrect %COMSPEC% environment variable. This causes popen to fail with the wonderfully useful error message: «No error» when initdb tries to execute the PostgreSQL backend. The message displayed to the user is:

Problem running post-install step. Installation may not complete correctly. The database cluster initialisation failed.

If this is your issue, when you examine the installer log file, %TEMP%postgresql-installer.log , you’ll find that it contains:

then a bit further down in the log you’ll see:

If it prints “test ok” then it’s likely fine and the issue is probably something else. If it fails, you’ve found the problem. Either way, check the value with:

It should print something like:

where C:Windows is the location of your Windows install as shown by echo %WINDIR% or echo %SYSTEMROOT% .

In the case of the issue I was investigating it was instead:

It’s valid, though not standard, to have %SYSTEMROOT% instead of C:Windows , so that wasn’t the issue. The problem is the trailing semicolon (‘;’). This single extra character was causing initdb to fail to launch postgres.exe during database cluster creation because the popen(. ) call was failing. The popen call requires that ComSpec point to a valid shell.

The error was fixed by correcting the COMSPEC environment variable. We opened the System control panel, opened Advanced system settings, and in the Environment Variables section under System variables edited ComSpec to remove the trailing semicolon.

Источник

Troubleshooting Installation

This page is intended to help people collect information to troubleshoot problems with the PostgreSQL Installers supplied by EnterpriseDB.

Many problems have already been identified and fixed, so make sure you’re using the installer for the latest point-release of PostgreSQL before reporting a problem.

Because some problems can’t be fixed in the installer, but are issues with the Windows installation or how it is being used, there is also a list of frequently asked questions and frequently encountered problems with PostgreSQL on Windows. Please read the common installation errors section, or preferably the whole document. You’ll probably save some time and hassle by doing so.

If you’ve tried all that, and you’re still having problems getting PostgreSQL installed, please read on to find out how you can collect the information we need to be able to help you with installation problems.

Contents

Make sure you’re installing on a supported platform

Please do not ask the mailing list for help with installation on unsupported Windows platforms. However, one of the paid PostgreSQL consultants, or EnterpriseDB (who make the PostgreSQL installer) may be able to help you on a paid basis.

Try again without your virus scanner or 3rd-party firewall

The Windows FAQ discusses potential issues with antivirus software and 3rd-party firewalls. If you’re encountering any installation issues, please try again with your virus scanner uninstalled (not just disabled) to see if the problem goes away. If it does, please report the fact to the mailing list and to the vendor of your antivirus product.

Read about other common installation problems

Before reporting a problem, please read the windows FAQ to see if your problem is one we’ve already seen and found a workaround or fix for.

Reporting an installation error

To be able to help you with an installation problem, we will need you to collect some basic details about your computer and the problem. Please see the instructions below.

Note down the basic information about your system

Any problem report must include:

  • The exact words of any error message you see when the installation fails
  • The exact version of PostgreSQL you are installing
  • Whether you installed a 32-bit or 64-bit release of PostgreSQL
  • The operating system and version you are using, eg:
    • «Windows XP Professional with Service Pack 3»
    • «Mac OS X 10.4.2»
    • «Fedora Core 14»
  • Whether you are running a 32-bit or 64-bit version of your operating system
  • How you ran the installer. Command-line arguments, what user account you ran it from, etc.
  • What antivirus and/or software firewall products you have installed, if any, even if they are disabled
  • Which, if any, of the troubleshooting instructions you have already tried
  • Whether a previous version of PostgreSQL was installed, and if so:
    • whether you uninstalled it before running the new installer
    • If you uninstalled a previous version, whether you did it with the uninstaller or some other way
    • Whether you removed the postgres user/service account when you uninstalled
  • Additional details and platform-specific information as described below

Collect the installer log file

The installer creates a log file in the system ‘temp’ directory. This will log all manner of data about the installation, and is invaluable when troubleshooting. The log will be called install-postgresql.log if the installation completed successfully. If not, the installer may not have been able to rename it, in which case the name will be either bitrock_installer.log or bitrock_installer_xxx.log, where xxx is a number (actually the process ID of the installation attempt).

On Linux and Mac systems, the logfile will almost always be found in the /tmp/ directory.

On Windows, the easiest way to find the logfile is to click Start -> Run, enter %TEMP% in the box and then click OK (these instructions apply to Windows XP and 2003 — adjust as necessary for other versions).

Get the contents of the PostgreSQL server error log

The PostgreSQL server has its own error log. This may not exist if installation failed early on, but it can be very informative for errors that happened later in installation. You can find it in the «pg_log» folder inside the data directory you chose for PostgreSQL. If it exists, please include it in any problem reports.

Windows users must collect additional Windows-specific details to help troubleshoot installation issues:

  • (On Windows Vista and Windows 7): The UAC security level
  • Whether you started the installer by logging in as Administrator, started it from from your own normal user account, or ran it using the «Run As Administrator» menu option.
  • Whether your computer is a part of a Windows domain. Home computers usually are not, business computers usually are.
  • Whether your computer and network has any Group Policy configured. If you’re on a corporate windows domain you probably have group policy and need to ask your network administrator for details about it.

Windows: Check for messages in the Windows event log

Please check the Windows Event Viewer for messages that might be related to installation problems or service startup problems.

TODO: detail on how to collect and save events.

Windows: Check what Group Policy, if any, is active on your computer

TODO: instructions for collecting domain and local group policy.

Windows: Take a copy of the environment variables set on the computer

Open a command prompt and run «set». Then copy and paste the results into your problem report.

I’d be better to collect the «all users» environment from the system control panel, but it’s not easy to just dump this information.

Источник

Понравилась статья? Поделить с друзьями:

Вот еще несколько интересных статей:

  • Problem mit windows und opengl diablo 2
  • Problem has been detected and windows has been перевод
  • Problem has been detected and windows has been shut down
  • Proactive windows security explorer скачать бесплатно
  • Proactive windows security explorer как пользоваться

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии