-
Notifications
You must be signed in to change notification settings - Fork 12
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 installer does not work over a WinRM session. #150
Comments
Hi, |
I'm seeing the same thing too, although it's made a bit more complex by being redistributable 15.8-1-windows via the Veeam silent installer, so I can't supply any alternative CLI arguments. I am installing via Windows DSC, so the command is running in a PowerShell "Start-Process" as a domain administrator user. Exactly same log output as @Resident-Alien. |
My apologies for not responding sooner. Or download the installer for 16.4.1, put it on the remote server, and then use either WinRM to access the server or Invoke-Command to attempt to execute the installer on the remote system. They all fail at the same place. As for the install log, I shared the part where it failed. If I install locally the log is identical up until the point where it fails for the remote session. initcluster.vbs is the failure point. |
Here's my experience, I've just reproduced directly with the Postgresql installer:
Which ends up being something like this:
The pertinent part of the log is
I am running as domain admin. If I run the command manually in a shell it works fine. Kind of defeats the whole point of a "silent install" if I have to do it manually though... Edited to add, that temp file it's talking about "opening for read", doesn't exist. The folder does, but that file does not.
|
@Resident-Alien @Cylindric Were you able to find a workaround? |
No work around found yet. As I noted in the problem the Chocolatey installer does indeed work. So to deploy to numerous servers in an automated way I am having to resort to Chocolatey with a local package cache so I can control the version. Winget and or command line installer options do not work remotely. |
@sandeep-edb Is EDB team aware of this issue? I can confirm that this is reproducible. We were able to remotely install v12 but updating to v16 installer fails with above error. |
I also facing same silent remote installation issues using remote powershell .. Any update on this issue? |
Alas, no workaround has been found so far, we've resorted to a manual process like it's 1997. |
I also facing same silent remote installation issues using remote powershell .. Any update on this issue? |
@Cylindric i switched to this powershell script -> https://github.com/darianmiller/install-postgres-on-windows. It runs in a PowerShell remoting session, and does most of the job. |
Hi Sandeep, any update on this issue? As this is show stopper issue for us , and does not allow automating installation using poweshell script |
We are experiencing the same issue on PostgreSQL versions 16, 15, 14, 13 and 12. |
@EDB / @sandeep-edb removal of icacls commands from installer has resulted into this issue. We have seen at least 2 installers released after reporting of this issue. Is EDB planning to fix it or we have to just live with it. Line# 134 & 140 in below commit : be9a18f3#diff-9dba0556fbd266ae0027adef444866ef186d7a4c6de8d3e10ca184332a013711L134 |
I am experiencing the same issue with version 17 |
@prafsh I'll check that and fix it. Thanks for the pointer. |
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 someone install and confirm the behaviour please? If it works then I'll push the fix and generate the release builds. |
I still get this: I don't know if it is relevant but the slash right after "Temp" is / instead of \ in the path it complains about . ... Ensuring we can write to the data directory (using icacls) to MFD-250\wAdmin: Granting full access to (NT AUTHORITY\NetworkService) on (C:\ANC2010\Data\PostgreSQL\17) Granting full access to CREATOR OWNER on (C:\ANC2010\Data\PostgreSQL\17) Granting full access to SYSTEM on (C:\ANC2010\Data\PostgreSQL\17) Granting full access to Administrators on (C:\ANC2010\Data\PostgreSQL\17)
This user must also own the server process. The database cluster will be initialized with locale "English_United States.1252". Data page checksums are disabled. Called Die(Failed to initialise the database cluster with initdb)... Script stderr: Error running C:\WINDOWS\System32\cscript //NoLogo "C:\Platinum\PostgreSQL\17/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\Users\wAdmin\AppData\Local\Temp/postgresql_installer_22a62ec5cd" "C:\Platinum\PostgreSQL\17" "C:\ANC2010\Data\PostgreSQL\17" 5432 "DEFAULT" 1: Program ended with an error exit code |
No, it's not related to slash. Can you try with the v16 test installer that I shared above? |
That's the one I tried with. I just didn't change the folder names in my script hence the 17 instead of 16. |
@sandeep-edb I have tested this installer and behavior is still same. It fails while performing remote installation, one windows server to another windows server over the WinRM. |
With both PSRemoting and or Invoke-Command the PostgreSQL installer fails at the same place every time:
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_db2b356bbd\rad92FA3.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
Error running C:\Windows\System32\cscript //NoLogo "C:\Program Files\PostgreSQL\16/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\Users%username%\AppData\Local\Temp/postgresql_installer_db2b356bbd" "C:\Program Files\PostgreSQL\16" "C:\Program Files\PostgreSQL\16\data" 5432 "DEFAULT" 1: Program ended with an error exit code
Problem running post-install step. Installation may not complete correctly
The database cluster initialisation failed.
Problem running post-install step. Installation may not complete correctly
The database cluster initialisation failed.
Setting variable whoami from C:\Windows\System32\whoami
Script exit code: 0
I thought this was a permissions issue, but when you remote into a windows server via WinRM your security context is set at your users highest level. I am a domain admin thus when I remote in my user is a domain admin, no need to elevate. The command works fine if you are local on the server and run in an elevated command prompt.
This affects both winget and just running the installer manually in the ps remote session. Is the installer just not able to be pushed to remote servers? Oddly enough Chocolately does seem to work without issue but they are always way behind and you can't rely on them if you need constant updates.
The text was updated successfully, but these errors were encountered: