http://bugs.winehq.org/show_bug.cgi?id=15894
Summary: postgresql fails to install Product: Wine Version: 1.1.7 Platform: Other URL: http://wwwmaster.postgresql.org/download/mirrors- ftp?file=%2Fbinary%2Fv8.3.4%2Fwin32%2Fpostgresql-8.3.4- 1.zip OS/Version: other Status: NEW Keywords: download, Installer Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: jeffz@jeffz.name
Created an attachment (id=17056) --> (http://bugs.winehq.org/attachment.cgi?id=17056) +process log
wine-1.1.7 - postgresql-8.3.4-1.zip
Run the setup.bat, click next on the installer, a message appears "failed to create process: 2!" and the installer exits.
http://bugs.winehq.org/show_bug.cgi?id=15894
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #1 from Dan Kegel dank@kegel.com 2009-03-10 22:37:25 --- +msi,+process shows:
trace:process:CreateProcessW app L"msiexec.exe" cmdline L"msiexec.exe /i "Z:\home\dank\installers\misc\postgress83\postgresql-8.3-int.msi" INTERNALLAUNCH=1 INSTALLLANG=en" trace:process:open_exe_file looking for L"msiexec.exe" trace:msi:wait_thread_handle waiting for L"instpg" ... trace:msi:DllThread custom action (19) returned 1603 err:msi:ITERATE_Actions Execution halted, action L"instpg" returned 1603
http://bugs.winehq.org/show_bug.cgi?id=15894
Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alexander.scott.johns+wineb | |ug@googlemail.com
--- Comment #2 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2010-01-26 19:46:19 --- Bug still present with postgresql-8.3.9-1.zip [1] and wine-1.1.37-103-g356b06f.
I was able to progress a bit by directly running the internal installer: $ wine msiexec /i postgresql-8.3-int.msi INTERNALLAUNCH=1 INSTALLLANG=en
If I uncheck "Install as a service" on the "Service configuration" page, the installation starts, then stops with a "Fatal error" - "Installation ended prematurely because of an error:" message (I assume something is meant to appear after the ':').
If I leave "Install as a service" checked, the installer allows me to create a new user (not sure if this worked), then displays another error: "Service check" - "Failed to open the Secondary Logon service: Service does not exist". After I manage to get past this error, I then get the "Fatal error", as before.
After the installation aborts (in both cases), I have some rather odd behaviour. Any attempt to run Wine displayed a postgres error message in the terminal:
pg_ctl: no operation specified Try "pg_ctl --help" for more information
I have to do a wineserver -k and rm -rf $WINEPREFIX/drive_c/Program\ Files/PostgreSQL/8.3 to get Wine into a sane state again.
[1]: http://wwwmaster.postgresql.org/download/mirrors-ftp/binary/v8.3.9/win32/pos...
http://bugs.winehq.org/show_bug.cgi?id=15894
--- Comment #3 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2010-01-26 19:55:38 --- Created an attachment (id=25905) --> (http://bugs.winehq.org/attachment.cgi?id=25905) +msi log of attempting to install postgresql-8.3-int.msi
This is with "Install as a service" unchecked.
http://bugs.winehq.org/show_bug.cgi?id=15894
--- Comment #4 from Hans Leidekker hans@meelstraat.net 2010-01-27 02:46:02 --- Created an attachment (id=25908) --> (http://bugs.winehq.org/attachment.cgi?id=25908) msi: Name and arguments in the service control table are formatted strings.
Does this patch help?
http://bugs.winehq.org/show_bug.cgi?id=15894
--- Comment #5 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2010-01-27 06:53:00 --- (In reply to comment #4)
Created an attachment (id=25908)
--> (http://bugs.winehq.org/attachment.cgi?id=25908) [details]
msi: Name and arguments in the service control table are formatted strings.
Does this patch help?
No. There is a slight change in the log (I think), but I still get the "Service check" and "Fatal Error" messages.
http://bugs.winehq.org/show_bug.cgi?id=15894
--- Comment #6 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2010-01-27 06:54:55 --- Created an attachment (id=25909) --> (http://bugs.winehq.org/attachment.cgi?id=25909) +msi log of attempting to install postgresql-8.3-int.msi, after applying patch
I unchecked "Install as a service" again.
http://bugs.winehq.org/show_bug.cgi?id=15894
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hans@meelstraat.net
--- Comment #7 from Hans Leidekker hans@meelstraat.net 2010-01-27 07:07:00 ---
trace:msi:MSI_GetPropertyW returning L"pgsql-8.3" for property L"SERVICEID" trace:msi:msiobj_release object 0x906058 destroyed err:msi:ITERATE_StartService Failed to start service L"pgsql-8.3"
So it uses the correct service name now, but fails to start the service. What happens if you leave "Install as a service" checked?
http://bugs.winehq.org/show_bug.cgi?id=15894
--- Comment #8 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2010-01-27 09:16:43 --- (In reply to comment #7)
trace:msi:MSI_GetPropertyW returning L"pgsql-8.3" for property L"SERVICEID" trace:msi:msiobj_release object 0x906058 destroyed err:msi:ITERATE_StartService Failed to start service L"pgsql-8.3"
So it uses the correct service name now, but fails to start the service. What happens if you leave "Install as a service" checked?
No change from comment #2; it dies in the same place.
http://bugs.winehq.org/show_bug.cgi?id=15894
--- Comment #9 from Hans Leidekker hans@meelstraat.net 2010-01-27 09:32:43 --- A +msi,+relay,+service log might tell us why it fails to start the service.
http://bugs.winehq.org/show_bug.cgi?id=15894
--- Comment #10 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2010-01-27 10:15:17 --- Created an attachment (id=25911) --> (http://bugs.winehq.org/attachment.cgi?id=25911) +msi,+relay,+service log of attempting to install postgresql-8.3-int.msi, after applying patch
Last 900000 lines of log; compressed with rzip. I pressed ^C in the terminal when the "Fatal error" appeared. I RelayExclude'd kernel32.lstrcmpW; ntdll.RtlAllocateHeap; ntdll.RtlFreeHeap; kernel32.GetProcessHeap.
http://bugs.winehq.org/show_bug.cgi?id=15894
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #25908|0 |1 is obsolete| |
--- Comment #11 from Hans Leidekker hans@meelstraat.net 2010-01-28 03:18:48 --- Created an attachment (id=25918) --> (http://bugs.winehq.org/attachment.cgi?id=25918) msi: Name and arguments in the service control table are formatted strings.
The OpenService call succeeds, so the service exists. It's the StartService call that fails but unfortunately it's not clear why. Can you try once more with this patch applied?
http://bugs.winehq.org/show_bug.cgi?id=15894
--- Comment #12 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2010-01-28 08:31:56 --- (In reply to comment #11)
The OpenService call succeeds, so the service exists. It's the StartService call that fails but unfortunately it's not clear why. Can you try once more with this patch applied?
err:msi:ITERATE_StartService Failed to start service L"pgsql-8.3" (1056)
According to winerror.h, 1056 is ERROR_SERVICE_ALREADY_RUNNING.
Oops...
This might have something to do with the 10+ installation attempts I did in this prefix without 'rm -rf'ing it.
In a clean prefix, it seemed to start the service, and then
pg_ctl: no operation specified Try "pg_ctl --help" for more information.
appeared in the terminal, and the trace stopped. The installer was frozen! I had to ^C it from the terminal (and it took a few seconds to respond). Then this message appeared in the terminal:
Deleting active MRSW lock (0x131fe4), expect failure
and the "Fatal error" messagebox appeared again.
http://bugs.winehq.org/show_bug.cgi?id=15894
--- Comment #13 from Alexander Scott-Johns alexander.scott.johns+winebug@googlemail.com 2010-01-28 08:34:39 --- Created an attachment (id=25920) --> (http://bugs.winehq.org/attachment.cgi?id=25920) +msi,+relay,+service log of attempting to install postgresql-8.3-int.msi, after applying 2nd patch
This was after rm -rf'ing the prefix and with "Install as a service" unchecked.
tail -n900000 of the log, rzipped.
http://bugs.winehq.org/show_bug.cgi?id=15894
--- Comment #14 from Hans Leidekker hans@meelstraat.net 2010-02-01 13:23:55 --- Commit 7c9cb1e1be3d78aafadcce55864e071718f7a08f makes sure we treat the service name as a formatted string.
Commit 246f9305e9f8eb18e54018746143d95afed887be fixes the install failure when the service is already running.
http://bugs.winehq.org/show_bug.cgi?id=15894
Colin Close itchka@compuserve.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |itchka@compuserve.com
--- Comment #15 from Colin Close itchka@compuserve.com 2010-03-09 20:04:17 --- I have looked into this problem in some detail and have determined that even with these patches the postmaster service is not starting. The reason for this is twofold. Firstly when the installer runs it executes a program called initdb.exe this is a standard utility in postgresql. This program creates the directory and files for the basic administrative db. Alas on completion this program attempts to start the postmaster service. If this fails then the previously created configuration files are deleted. The postmaster service will always fail as it must be started as an unprivileged user. The installer tries to create this user but fails because wine does not know how to create a password. It is forbidden to start the service by the db owner.
From version postgresql 8.2 onward it is possible to start the service using
the pg_ctl.exe binary. This new feature starts the server and then drops all privileges. This functionality is not available in the initdb.exe program which tries to start postmaster as an unprivileged user. the pg_ctl functionality is I think intended as a test mode. I have been able to test this mode by doing the following:- Obtain the windows binary tree from the postgresql site, unzip it and copy everything under the psql directory into a directory named postgresql in the wine c_drive. Run the following commands from within the bin directory of the tree:- wine cmd initdb -n -D c:\postgresql\data The -n flag disables the deletion of the files created even though the server fails to start properly. Remember initdb does not have the special functionality.
If one exits the wine console and checks the process tree one finds that the wineservice appears to be running but any attempt to connect to it failed for me. Kill these services. Run "wine cmd" again and after some time the following message will be displayed.
pg_ctl: no operation specified Try "pg_ctl --help" for more information.
Wine has tried to start the server using pg_ctl but its registry entry is not complete. If you exit you will again find that the wine services processes are running. Kill them again (I thinks wineserver -k may not be enough, I found that services.exe continued to run.).
Open the the system registry in a text editor and search for pg_ctl service edit the the Start key such that dword:00000003 this disables the service at start up so that it can be started manually. Now from the posresql bin directory run "pg_ctl.exe start -D c:\postgresql\data" to try and manually start the server. This what you get.
fixme:advapi:CreateRestrictedToken (0xbc, 0x1, 2, 0x81f45c, 0, (nil), 0, (nil), 0x81f44c): stub Failed to create restricted token: 120 pg_ctl: could not start server: exit code was 5
Alas we are at a fixme. Can anything be done with this?
I have run the various utilities such as psql and pgadmin3 under wine and have been able to connect the a linux postgresql server with full functionality so it is only the server part of postgresql that is broken
In summary it would be possible to install and run postgresql in wine by using a "winetricks" approach given that CreateRestrictedToken can be fixed. It will not be possible to use the distributed msi installer for postgresql because it uses initdb to set up and start the server. The installer could be changed (it's available from cvs) to implement the workaround but in truth a simple script and the binary sources would suffice.
Colin Close
http://bugs.winehq.org/show_bug.cgi?id=15894
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://wwwmaster.postgresql |ftp://ftp-archives.postgres |.org/download/mirrors-ftp?f |ql.org/pub/binary/v8.3.4/wi |ile=%2Fbinary%2Fv8.3.4%2Fwi |n32/postgresql-8.3.4-1.zip |n32%2Fpostgresql-8.3.4-1.zi | |p |
http://bugs.winehq.org/show_bug.cgi?id=15894
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |7c9cb1e1be3d78aafadcce55864 | |e071718f7a08f Status|NEW |RESOLVED CC| |focht@gmx.net Component|-unknown |msi Resolution| |FIXED Summary|postgresql fails to install |PostgreSQL 8.3 service | |installation fails
--- Comment #16 from Anastasius Focht focht@gmx.net 2012-02-10 13:52:22 CST --- Hello,
the initial issues with service installation failure were fixed some time ago (comment #14). Marking fixed before this bug gets recycled again.
--- quote --- fixme:advapi:CreateRestrictedToken (0xbc, 0x1, 2, 0x81f45c, 0, (nil), 0, (nil), 0x81f44c): stub Failed to create restricted token: 120 pg_ctl: could not start server: exit code was 5
Alas we are at a fixme. Can anything be done with this?
I have run the various utilities such as psql and pgadmin3 under wine and have been able to connect the a linux postgresql server with full functionality so it is only the server part of postgresql that is broken
In summary it would be possible to install and run postgresql in wine by using a "winetricks" approach given that CreateRestrictedToken can be fixed. It will not be possible to use the distributed msi installer for postgresql because it uses initdb to set up and start the server. The installer could be changed (it's available from cvs) to implement the workaround but in truth a simple script and the binary sources would suffice. --- quote ---
This is bug 25834
Regards
http://bugs.winehq.org/show_bug.cgi?id=15894
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #17 from Alexandre Julliard julliard@winehq.org 2012-02-11 13:53:23 CST --- Closing bugs fixed in 1.4-rc3.
http://bugs.winehq.org/show_bug.cgi?id=15894
--- Comment #18 from Dan Kegel dank@kegel.com 2012-09-03 23:46:14 CDT --- I'd be happy to add a winetricks verb for this, if someone provides at least a skeletal recipe.
http://bugs.winehq.org/show_bug.cgi?id=15894
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Hardware|Other |x86 OS|other |Linux