EnterpriseDB / edb-installers

PostgreSQL installers packaged by EDB
36 stars 11 forks source link

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

Open maitrikpatelBH opened 1 week ago

maitrikpatelBH commented 1 week ago

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 commented 5 days ago

Is also reported here: https://github.com/EnterpriseDB/edb-installers/issues/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).