Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgresql 17 Installation Error [2] on Windows 11 #186

Open
sinanganiz opened this issue Nov 2, 2024 · 14 comments
Open

Postgresql 17 Installation Error [2] on Windows 11 #186

sinanganiz opened this issue Nov 2, 2024 · 14 comments

Comments

@sinanganiz
Copy link

sinanganiz commented Nov 2, 2024

I encountered an error while attempting to install PostgreSQL 17.0.1 on my Windows 11 machine. The error appears during the installation process, preventing successful completion.

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

screenshot

System Information:

Windows Version: 23H2
Build: 22631.4391

Executed the installation command in the terminal:
.\postgresql-17.0-1-windows-x64.exe --debugtrace debug.txt

debug.txt

@mortensimon
Copy link

mortensimon commented Nov 5, 2024

Same problem here. I also couldn't find any service for Postgres running after the installation completed. I tried both Postgres 16 and 17 installation. I ran the installer "as admin". Running Windows 11.

@sandeep-edb
Copy link
Contributor

Hi,
Please share the installation log from system location

@mortensimon
Copy link

install2-postgresql.log
I renamed the log file, otherwise untouched.

@sandeep-edb
Copy link
Contributor

Thanks, I checked the log. The locale name has non-ASCII characters which are not supported by intidb. and hence the failure. We are looking into how to make installer list down the BCP 47 names. But there is no ETA atm

@mortensimon
Copy link

Is there something I can do on my side? Should I make a different locale when in the installation or do something with my Windows region/language?

@1xFalcon
Copy link

  1. First, ensure all PostgreSQL files are completely removed from your system. This includes uninstalling any existing PostgreSQL instances and deleting leftover files.
  2. Run the installer as an administrator.
  3. During setup, instead of selecting your local default region, choose "English, United States" as the locale.

This error appears to be caused by localization settings, and changing the locale provides a simple solution for now.

@sandeep-edb
Copy link
Contributor

Yes, if you choose a default locale, or a different locale during the installation that doesn't contains the non-ASCII characters, the installation will be successful. Meanwhile, we are looking to make changes in the installer that may allow passing of the locale name as a command line option. Do you think that would help?

@1xFalcon
Copy link

Allowing the locale to be set via command line would indeed be practical, especially for remote installations.
However, since most users rely on the graphical interface for the installer, this change may not provide a complete solution for all users.

@sandeep-edb
Copy link
Contributor

I made a small change in the installer to allow the non-ascii characters in the system username and uploaded the "test/snapshot" (not for production) installer postgresql-17.2-0.0snapshot12069192100.994.1.10c136e.1-windows-x64 to https://enterprisedb.sharefile.com/f/fo423619-ac6b-4868-ac4c-b2e3def6e3b0

If you could try installing and confirm how it went? Please note there is no handling of non-english service account names included yet. Also, during installation, the Info dialogues will appear to show the name and the SID of the user running the installer. Please confirm if it's correct.

If you have any questions please let me know.

@sandeep-edb
Copy link
Contributor

@mortensimon I've given you access to download postgresql-17.2-0.0snapshot12082629519.995.1.23fce2b.1-windows-x64
.exe that offers a command line option to provide a locale name.

At my end: postgresql-17.2-0.0snapshot12082629519.995.1.23fce2b.1-windows-x64.exe --locale "tr-TR" worked fine. Could you test this installer when time permits, and confirm so I can commit to Git and produce a release installer? Thanks

@sandeep-edb
Copy link
Contributor

The PostgreSQL 17.2-2, 16.6-2, 15.10-2 are available for download. These installers include a fix for system installation issue.

@dchyuu
Copy link

dchyuu commented Dec 5, 2024

install-postgresql.log
I got the same error as above, here is my log file, how to i fix it

@mustafay-yilmaz
Copy link

@mortensimon I've given you access to download postgresql-17.2-0.0snapshot12082629519.995.1.23fce2b.1-windows-x64 .exe that offers a command line option to provide a locale name.

At my end: postgresql-17.2-0.0snapshot12082629519.995.1.23fce2b.1-windows-x64.exe --locale "tr-TR" worked fine. Could you test this installer when time permits, and confirm so I can commit to Git and produce a release installer? Thanks

@sandeep-edb Hello, I tested the latest versions (17.2-2, 16.6-2) , but the issue with database cluster initialization still persists. Could you please assist in resolving this? Thank you for your support!

@mzwarthoed
Copy link

I've just done an installation on Windows 11 with postgresql-17.2-2-windows-x64.exe (downloaded from EDB site). I actually got the error about reading file postgresql.conf from the data directory.
image

I've looked in the install-postgresql.log file and noticed that the first error was actually for init DB:
Error running C:\WINDOWS\System32\cscript //NoLogo "C:\Program Files\PostgreSQL\17/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\Users\MartinZwarthoed\AppData\Local\Temp/postgresql_installer_662bbb507e" "C:\Program Files\PostgreSQL\17" "D:\POSTGRESQL\Data" 5432 "English,UnitedStates" 0:

I also noticed that the directory Data from D:\POSTGRESQL was removed after the installation (I've created that one manually before the installation).

I've tried the installation 3 times: with Default locale, with "Dutch, Netherlands" and with "English, United Status". All failed with the same error.

I fixed it by running this script from the command prompt:
"C:\Program Files\PostgreSQL\17\bin\initdb.exe" -D "D:\POSTGRESQL\Data" -U postgres --locale="English_United States.1252"

I've found this solution on the site https://stackoverflow.com/questions/77486742/postgresql-16-failed-to-initialise-the-database-cluster-with-initdb
On that site they also run a script to create the PostgreSQL service, but that one was already created in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants