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

EDB postgres installer v14 and 16 both fails on using remote power shell #196

Open
maitrikpatelBH opened this issue Nov 14, 2024 · 5 comments

Comments

@maitrikpatelBH
Copy link

maitrikpatelBH commented Nov 14, 2024

Postgres giving following error, only if I ran remote powershell to install edb postgres installer....

This issue occurs only if we run installer using powershell , due to this our silent installation is broken.

Its clear EDB Postgres installer script issue, it worked fine till 14.11 but we have started such issues in recent version of installer that is 14.13 and so on. Tried same thing on EDB PG 16 installer, and it fails with same reason.

Initialising the database cluster (this may take a few minutes)...
Executing C:\Windows\System32\cscript //NoLogo "C:\Program Files\PostgreSQL\14/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\Users\USERNAME\AppData\Local\Temp/postgresql_installer_3bc6cea9f6" "C:\Program Files\PostgreSQL\14" "C:\ProgramData\Stores\PostgreSQL14" 7557 "DEFAULT" 0
Script exit code: 1

Script output:
WScript.Shell Initialized...
Scripting.FileSystemObject initialized...

Called ClearAcl (C:\ProgramData\Stores\PostgreSQL14)...
Executing batch file 'rad7B520.bat'...
C:\ProgramData\Stores\PostgreSQL14 ENGINEERING\USERNAME :(RX)
BUILTIN\Administrators:(F)
CREATOR OWNER:(OI)(CI)(IO)(F)
BUILTIN\Administrators:(OI)(CI)(F)
NT AUTHORITY\SYSTEM:(OI)(CI)(F)
NT AUTHORITY\NETWORK SERVICE:(OI)(CI)(F)
ENGINEERING\USERNAME:(OI)(CI)(F)

Successfully processed 1 files; Failed processing 0 files

Removing inherited ACLs on (C:\ProgramData\Stores\PostgreSQL14)
Executing batch file 'rad7B520.bat'...
processed file: C:\ProgramData\Stores\PostgreSQL14
Successfully processed 1 files; Failed processing 0 files

WScript.Network initialized...
strParentOfDataDirC:\ProgramData\Stores
logged in userENGINEERING\USERNAME
Called AclCheck(C:\ProgramData\Stores\PostgreSQL14)
Executing icacls to ensure the ENGINEERING\USERNAME account can read the path C:\ProgramData\Stores\PostgreSQL14
Executing batch file 'rad7B520.bat'...
processed file: C:\ProgramData\Stores\PostgreSQL14
Successfully processed 1 files; Failed processing 0 files

Ensuring we can write to the data directory (using icacls) to ENGINEERING\USERNAME:
Executing batch file 'rad7B520.bat'...
processed file: C:\ProgramData\Stores\PostgreSQL14
Successfully processed 1 files; Failed processing 0 files

Granting full access to (NT AUTHORITY\NetworkService) on (C:\ProgramData\Stores\PostgreSQL14)
Executing batch file 'rad7B520.bat'...
processed file: C:\ProgramData\Stores\PostgreSQL14
Successfully processed 1 files; Failed processing 0 files

Granting full access to CREATOR OWNER on (C:\ProgramData\Stores\PostgreSQL14)
Executing batch file 'rad7B520.bat'...
processed file: C:\ProgramData\Stores\PostgreSQL14
Successfully processed 1 files; Failed processing 0 files

Granting full access to SYSTEM on (C:\ProgramData\Stores\PostgreSQL14)
Executing batch file 'rad7B520.bat'...
processed file: C:\ProgramData\Stores\PostgreSQL14
Successfully processed 1 files; Failed processing 0 files

Granting full access to Administrators on (C:\ProgramData\Stores\PostgreSQL14)
Executing batch file 'rad7B520.bat'...
processed file: C:\ProgramData\Stores\PostgreSQL14
Successfully processed 1 files; Failed processing 0 files

Executing batch file 'rad7B520.bat'...
The files belonging to this database system will be owned by user "USERNAME".

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.
initdb: error: could not open file "C:\Users\USERNAME\AppData\Local\Temp/postgresql_installer_3bc6cea9f6\rad9C0E3.tmp" for reading: Permission denied

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

@HAldermo-Magnet
Copy link

Is also reported here: #150

We are experiencing the same issue on PostgreSQL versions 16, 15, 14, 13 and 12.
Installing using choco and Azure Image Builder (uses packer).

@sandeep-edb
Copy link
Contributor

sandeep-edb commented Dec 2, 2024

The PostgreSQL 17.2-2, 16.6-2, 15.10-2 are available for download. These installers include a fix for system installation issue with non-English name. I'm not entirely sure if that would fix this issue but could you try this out and confirm?

@maitrikpatelBH
Copy link
Author

The PostgreSQL 17.2-2, 16.6-2, 15.10-2 are available for download. These installers include a fix for system installation issue with non-English name. I'm not entirely sure if that would fix this issue but could you try this out and confirm?

same issue ..does not work with 16.6.2 on remote powershell..giving same error...

Data page checksums are disabled.
initdb: error: could not open file "C:\Users\USERNAME\AppData\Local\Temp/postgresql_installer_3bc6cea9f6\rad9C0E3.tmp" for reading: Permission denied

@sandeep-edb
Copy link
Contributor

sandeep-edb commented Dec 6, 2024

I've uploaded a test installer with a fix at https://get.enterprisedb.com/test-installers/postgresql-16.6-0.0snapshot12194602453.1003.1.64d4c34.2-windows-x64.exe Could you install and confirm the behaviour please?

@maitrikpatelBH
Copy link
Author

I've uploaded a test installer with a fix at https://get.enterprisedb.com/test-installers/postgresql-16.6-0.0snapshot12194602453.1003.1.64d4c34.2-windows-x64.exe Could you install and confirm the behaviour please?

not worked with given installer too..it gives same permission issue

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

3 participants